×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 19 / 160 › »
Script Requests
Safwanrockz
« Censeur »
1382989440000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#361
  0
Doneky a dit :
I need of help:

Well! If you to use command !list will open a Popup but don't will is all the names of table Lideres.
Ever to be will the last name = texte.

I only thought of the table.concat function, there might be an easier one though.
a dit :
Lideres = {"Doneky","lixo","texte"}

function table.concat(tbl,delim)
local str=''
if delim==nil then delim=" " end
for k,v in pairs(tbl) do
str=str..v..delim
end
return str
end


function eventChatCommand(playerName,command)
if command == [
    ] then
    ui.addPopup(0,0,table.concat(Lideres),playerName,300,100,200)
    end
    end

 
Irishcow
« Citoyen »
1382990700000
    • Irishcow#0095
    • Profil
    • Derniers messages
    • Tribu
#362
  0
I would appreciate if somebody could create a script disabling a certain person from using commands :p
-
Also, being a little greedy, is it possible to create a script which will tell you all of the commands of the script that a friend is using?
For example, if a friend could kill you with a certain command that you didn't know, you could run a script that will list all of the commands available for use.
Hophipmice
« Citoyen »
1382991060000
    • Hophipmice#0000
    • Profil
    • Derniers messages
    • Tribu
#363
  0
a dit :

function eventNewPlayer(name)
tfm.exec.bindKeyboard(name,32,true,true)
end

for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

function eventKeyboard(name,key,down,x,y)
if key==32 then
tfm.exec.addShamanObject(39,x,y)
end
end
end

I'd like to know how can we make it that you can only summon one per second.
Tailtong
« Citoyen »
1382991180000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#364
  0
Irishcow a dit :
I would appreciate if somebody could create a script disabling a certain person from using commands :p
-
Also, being a little greedy, is it possible to create a script which will tell you all of the commands of the script that a friend is using?
For example, if a friend could kill you with a certain command that you didn't know, you could run a script that will list all of the commands available for use.

function eventChatCommand(p,c)
print("<V>["..p.."] <N>"..c)
end

Is what I use.
Shamousey
« Consul »
1382991480000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#365
  0
Irishcow a dit :
I would appreciate if somebody could create a script disabling a certain person from using commands :p

You can disable them from using commands just like the admin scripts that're floating around.

banned={Tailtong=true}
function eventChatCommand(name,command)
if not banned[name] then
--Commands go here
end
end

Irishcow a dit :
Also, being a little greedy, is it possible to create a script which will tell you all of the commands of the script that a friend is using?
For example, if a friend could kill you with a certain command that you didn't know, you could run a script that will list all of the commands available for use.

I'm not sure if I understand you correctly, but you want to find out all of the commands in someone elses script? As you run a script, the other one is terminated - there's no way to find out by running your own script.
Safwanrockz
« Censeur »
1382991480000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#366
  0
Irishcow a dit :
I would appreciate if somebody could create a script disabling a certain person from using commands :p

Just change the values in the isBanned table to any player you wouldn't like to use your commands, I also added the command !cheese as an example.
a dit :
isBanned={"Irishcow"}

function table.contains(t,element)
if element==nil then
return false
end
for key,value in pairs(t) do
if value==element then
return true
end
end
return false
end

function eventChatCommand(name,cmd)
if cmd=="cheese" and not table.contains(isBanned,name) then
tfm.exec.giveCheese(name)
end
end

~


Hophipmice a dit :
I'd like to know how can we make it that you can only summon one per second.

Try this~
a dit :
players={}

function eventNewPlayer(name)
tfm.exec.bindKeyboard(name,32,true,true)
players[name]={
timestamp=os.time()
}
end

for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

function eventKeyboard(name,key,down,x,y)
if key==32 then
if players[name].timestamp < os.time()-1000 then
tfm.exec.addShamanObject(39,x,y)
end
players[name].timestamp=os.time()
end
end

 
Doneky
« Citoyen »
1382991600000
    • Doneky#0000
    • Profil
    • Derniers messages
    • Tribu
#367
  0
Safwanrockz a dit :
I only thought of the table.concat function, there might be an easier one though.
 

Thanks.
Irishcow
« Citoyen »
1382991720000
    • Irishcow#0095
    • Profil
    • Derniers messages
    • Tribu
#368
  0
Thanks guys

Shamousey a dit :

I'm not sure if I understand you correctly, but you want to find out all of the commands in someone elses script? As you run a script, the other one is terminated - there's no way to find out by running your own script.

Silly me didn't realize the specific person just kept running his script after I terminated it.
Guilherme
« Citoyen »
1382994900000
    • Guilherme#0368
    • Profil
    • Derniers messages
    • Tribu
#369
  0
Jordynl a dit :
Ah.
There you go. ^^'

I do not know if you got it ... lol

Wanted a script in which the shaman could freeze the mice using the space bar, but he could only freeze if were near the mice.

:P
Jordy
« Consul »
1382995020000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#370
  0
Guiprezotto a dit :
I do not know if you got it ... lol

Wanted a script in which the shaman could freeze the mice using the space bar, but he could only freeze if were near the mice.

That's now what you said here. :P

Guiprezotto a dit :

But I want that just the shaman can to use the key 32 (space) and if it made this, all mice around, will to be transformer in ice cube. Just the mouse, the shaman will stay normal.

Miss-understand. :/
Guilherme
« Citoyen »
1382995680000
    • Guilherme#0368
    • Profil
    • Derniers messages
    • Tribu
#371
  0
Jordynl a dit :
That's now what you said here. :P
Miss-understand. :/

I tested it and the shaman can not freeze ... : \

Faill xD
Jordy
« Consul »
1382995800000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#372
  0
Guiprezotto a dit :
I tested it and the shaman can not freeze ... : \

Faill xD

I'l try to write it asap. I probably need some sleep first. (Haven't been able to sleep for weeks now)
Guilherme
« Citoyen »
1382996040000
    • Guilherme#0368
    • Profil
    • Derniers messages
    • Tribu
#373
  0
Jordynl a dit :
I'l try to write it asap. I probably need some sleep first. (Haven't been able to sleep for weeks now)

Okay, Thanks :3
Jordy
« Consul »
1383071220000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#374
  0
Jordynl a dit :
I'l try to write it asap. I probably need some sleep first. (Haven't been able to sleep for weeks now)

I hope that this works. I had no friends to test it. ;;

a dit :
function eventKeyboard(name, key, down, xPos, yPos)
if key == 32 then
local me = tfm.get.room.playerList[name]
for name,player in pairs(tfm.get.room.playerList) do
local victim = tfm.get.room.playerList[name]
if me.isShaman == true and victim ~= me then
if pythag(me.x, me.y, 20, victim.x, victim.y, 20) == true then
tfm.exec.killPlayer(victim.playerName)
tfm.exec.addShamanObject(tfm.enum.shamanObject.iceCube,victim.x,victim.y)
end
end
end
end
end

function eventNewPlayer(name)
tfm.exec.bindKeyboard(name,32,true)
end

function eventNewGame()
players = {}
for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end
end

function main()
for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end
end

main()

function eventChatCommand(name, message)
if message == "sh" then
tfm.exec.setShaman(name)
end
end

--Shamousey's soup
function pythag(x1,y1,x2,y2,r)
local x=x2-x1
local y=y2-y1
local r=r+r
return x*x+y*y<r*r
end

If not you know where to find me. :P
Guilherme
« Citoyen »
1383073020000
    • Guilherme#0368
    • Profil
    • Derniers messages
    • Tribu
#375
  0
jordynl a dit :
text...

Will test ... :P

@edit:

Woooow!!!Your pr0

Thanks :3

I will to get crédits. :P
Tranna
« Citoyen »
1383078240000
    • Tranna#0000
    • Profil
    • Derniers messages
    • Tribu
#376
  0
To be able to fly with the spacebar?
Jordy
« Consul »
1383080040000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#377
  0
Tranna a dit :
To be able to fly with the spacebar?

a dit :

function eventKeyboard(player, key, down, x, y)
if key == 32 then
tfm.exec.movePlayer(player, player.x, player.y, false, 0, -50, false)
end
end

function eventNewPlayer(name)
tfm.exec.bindKeyboard(name,32,true)
end

for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

Here you go.
Tranna
« Citoyen »
1383083880000
    • Tranna#0000
    • Profil
    • Derniers messages
    • Tribu
#378
  0
Thank you c:
Woebegone
« Citoyen »
1383093720000
    • Woebegone#8377
    • Profil
    • Derniers messages
    • Tribu
#379
  0
What about playing Tic Tac Toe? <3
Makinit
« Citoyen »
1383128280000
    • Makinit#0095
    • Profil
    • Derniers messages
    • Tribu
#380
  0
Juliantwofan a dit :
What about playing Tic Tac Toe? &lt;3

Topic-462899
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 19 / 160 › »
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27