Lua Snippets |
![]() ![]() « Consul » 1380468060000
| 0 | ||
Magicalorb a dit : Showing us an error without seeing the rest of the code is pretty useless ;) Unicorm a dit : That's possible, but you'd have to use other events like key presses if you wanted it, since the eventLoop only runs every 500ms, and you can't use timers. |
![]() ![]() « Citoyen » 1380468480000
| 0 | ||
Shamousey a dit : Well ok nevermind; we tried that bomb key-press thing a few pages back and it was horrible. -o- |
![]() « Citoyen » 1380475980000
| 0 | ||
How do you make one person teleport or generally any powers without having everyone in the room using the power? |
![]() ![]() « Citoyen » 1380477300000
| 0 | ||
Shamousey do u remember that #utinity thing that you can put in ur tribe house by saying /module #ultininy I spelled it wrong and i need the word #ulyininy PLZ |
![]() ![]() « Citoyen » 1380477540000
| 0 | ||
/module #utility |
![]() ![]() « Consul » 1380477540000
| 0 | ||
Goldenlion a dit : You can just put in a specific name if you like, such as tfm.exec.movePlayer("Goldenlion",400,200). Kidxdeath a dit : This isn't the place to ask, but it's #utility. Topic-451941 |
![]() ![]() « Citoyen » 1380478200000
| 0 | ||
is the lua codes in the tribe house still down or is it up yet |
![]() ![]() « Citoyen » 1380480840000
| 0 | ||
Added an Advanced Command (Setting the name color) that has more than 1 argument. |
![]() ![]() « Citoyen » 1380481500000
| 0 | ||
Shamousey help me please my code : http://pastebin.com/UB9g5LyS Can you add a command in my script : - !fly : to fly - And the help command with two page Thank pro ! <3 |
![]() ![]() « Citoyen » 1380481740000
| 0 | ||
Manacer a dit : i'm not shamousey but this might work -- function eventChatCommand(name,command) if command=="fly" then 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.movePlayer(name,0,0,true,0,-50,false) --makes mice fly by saying !fly end end |
![]() ![]() « Citoyen » 1380482040000
| 0 | ||
Bengalstar a dit : [•] Init Error : [string "transformice.lua"]:15: 'end' expected (to close 'if' at line 2) [•] [Manacer] Lua script loaded in 1 ms (4000 max) |
![]() ![]() « Citoyen » 1380482520000
| 0 | ||
Manacer a dit : oh and another end I think |
![]() ![]() « Citoyen » 1380482520000
| 0 | ||
Bengalstar a dit : Ok, can you post correction please? |
![]() ![]() « Citoyen » 1380482640000
| 0 | ||
Manacer a dit : ok, this one might work function eventChatCommand(name,command) if command=="fly" then 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.movePlayer(name,0,0,true,0,-50,false) --makes mice fly by saying !fly end end end |
![]() ![]() « Citoyen » 1380482640000
| 0 | ||
Bengalstar a dit : [•] Init Error : [string "transformice.lua"]:16: 'end' expected (to close 'function' at line 1) [•] [Manacer] Lua script loaded in 1 ms (4000 max) |
![]() ![]() « Citoyen » 1380482760000
| 0 | ||
Manacer a dit : oh oops (i'm bad at coding sorry e.e) function eventChatCommand(name,command) if command=="fly" then 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.movePlayer(name,0,0,true,0,-50,false) --makes mice fly by saying !fly end end end end |
![]() ![]() « Citoyen » 1380482940000
| 0 | ||
But , not work ^^ |
![]() ![]() « Citoyen » 1380482940000
| 0 | ||
Bengalstar a dit : Not error and don't work (fly) |
![]() ![]() « Citoyen » 1380483180000
| 0 | ||
hmm, quite strange I think a better coder would be able to help (rather than me) I'm very nooby at coding things sorry |
![]() ![]() « Citoyen » 1380483180000
| 0 | ||
Bengalstar a dit : No problem, i wait Shamousey. ^^ |