Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "None"
- EventName[x] = "None"
- end
- function eventLoop()
- print("a="..a)
- print(c)
- print(ctrl)
- print("tped="..tped)
- if racing == 1 then
- racingTime = racingTime+1
- end
- if shaman == 1 then
- shamanTime = shamanTime+1
- end
- if racingTime == 120 then
- tfm.exec.newGame(Racing[math.random(#Racing)])
- end
- if shamanTime == 290 then
- tfm.exec.newGame(Shaman[math.random(#Shaman)])
- end
- if mice == 0 and racing ==1 then
- tfm.exec.newGame(Racing[math.random(#Racing)])
- end
- if mice == 0 and shaman ==1 then
- tfm.exec.newGame(Shaman[math.random(#Shaman)])
- end
- if loopCount == 0 and snow == 1 then
- tfm.exec.snow()
- end
- loopCount = (loopCount + 1) % 100
- end
- function eventChatCommand(playerName,command)
- system.disableChatCommandDisplay(command, true)
- if command=="ro" then
- remove = {}
- for i,o in pairs(tfm.get.room.objectList) do
- table.insert(remove, i)
- end
- for _,n in pairs(remove) do
- tfm.exec.removeObject(n)
- end
- table.insert(log,1,playerName)
- table.insert(EventName,1,"Remove objects")
- end
- if command=="help" or command=="??" then
- ui.addTextArea(60, [[<p align='center'><font size='18'> <J>MENU<br></br><font size='15'> <T><a href="event:??/????">Comandos</a> <br></br> <a href="event:??????">Summon Objects</a> <br></br><a href="event:????">Clear Objects</a><br></br><a href="event:????">Chat Commands</a><br></br><a href="event:????">Mode Options</a> <br></br><a href="event:??????">Record Sheet</a><br></br><b><r><a href="event:close">close page</a></r></b></p>]],playerName,350,200,290,180,0x000000,0x0fff00,0.5,true)
- end
- if command=="mort" then
- tfm.exec.addShamanObject(tfm.enum.shamanObject.iceCube,tfm.get.room.playerList[playerName].x,tfm.get.room.playerList[playerName].y)
- tfm.exec.killPlayer(playerName)
- table.insert(log,1,playerName)
- table.insert(EventName,1,command)
- end
- if command=="kill" or command=="death" or command=="birthday" or command=="badhank" then
- tfm.exec.killPlayer(playerName)
- table.insert(log,1,playerName)
- table.insert(EventName,1,command)
- end
- if command=="hole" then
- tfm.exec.playerVictory(playerName)
- end
- if command=="cheese" or command=="????" or command=="dinner" or command=="??" then
- tfm.exec.giveCheese(playerName)
- table.insert(log,1,playerName)
- table.insert(EventName,1,command)
- end
- if command=="meep" then
- tfm.exec.giveMeep(playerName)
- table.insert(log,1,playerName)
- table.insert(EventName,1,command)
- end
- if command=="sham" or command=="mybirthdayo" then
- tfm.exec.setShaman(playerName)
- table.insert(log,1,playerName)
- table.insert(EventName,1,command)
- end
- if command=="snow" or command=="scarysnowman" then
- snow = 1
- end
- if command=="??" or command=="stop" then
- snow = 0
- end
- if command=="win" or command=="nicehank" then
- tfm.exec.giveCheese(playerName)
- tfm.exec.playerVictory(playerName)
- table.insert(log,1,playerName)
- table.insert(EventName,1,command)
- end
- if command=="vamp" or command=="nagosan" then
- tfm.exec.setVampirePlayer(playerName)
- table.insert(log,1,playerName)
- table.insert(EventName,1,command)
- end
- if command=="refresh" or command=="ref" or command=="tig" then
- tfm.exec.newGame()
- table.insert(log,1,playerName)
- table.insert(EventName,1,command)
- tfm.exec.addShamanObject(87,0,0)
- end
- if command=="off" then
- system.exit()
- end
- if command=="explosion" or command=="????" or command=="???? ????" then
- b=1
- end
- if command=="explosion-off" then
- b=0
- table.insert(log,1,playerName)
- table.insert(EventName,1,command)
- end
- if command=="tmax" then
- tfm.exec.setGameTime(99400)
- end
- end
- function eventPlayerDied(playerName)
- mice = mice-1
- if racing == 0 and shaman == 0 then
- tfm.exec.respawnPlayer(playerName)
- end
- end
- function eventNewPlayer(name)
- tfm.exec.addShamanObject(87,0,0)
- tfm.exec.bindKeyboard(name,17,true,true)
- tfm.exec.bindKeyboard(name,104,true,true)
- tfm.exec.bindKeyboard(name,100,true,true)
- tfm.exec.bindKeyboard(name,102,true,true)
- tfm.exec.bindKeyboard(name,98,true,true)
- tfm.exec.bindKeyboard(name,71,true,true)
- tfm.exec.bindKeyboard(name,72,true,true)
- tfm.exec.bindKeyboard(name,75,true,true)
- tfm.exec.bindKeyboard(name,76,true,true)
- tfm.exec.bindKeyboard(name,79,true,true)
- tfm.exec.bindKeyboard(name,186,true,true)
- system.bindMouse(name, true)
- tfm.exec.respawnPlayer(name)
- mice = mice+1
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- function eventKeyboard(playername,key,down,x,y)
- if key==72 then
- ui.addTextArea(60, [[<p align='center'><font size='18'> <J>MENU<br></br><font size='15'> <T><a href="event:??/????">Keyboard/Mouse Commands</a> <br></br> <a href="event:??????">Summon Objects</a> <br></br><a href="event:????">Clear Objects</a><br></br><a href="event:????">Chat Commands</a><br></br><a href="event:????">Mode Options</a> <br></br><a href="event:??????">Record Sheet</a><br></br><b><r><a href="event:close">close page</a></r></b></p>]],playername,350,200,290,180,0x000000,0x0fff00,0.5,true)
- end
- if key==71 then
- Portal = 26
- c = playername
- end
- if key==17 then
- if tped == 1 then
- tped = 0
- ctrl = true
- for playername,player in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(playername,17,ctrl,true)
- end
- elseif a == 0 then
- a = 1
- c = playername
- ctrl = false
- elseif a == 1 then
- a = 0
- c = nil
- ctrl = true
- end
- for playername,player in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(playername,17,ctrl,true)
- end
- end
- if key==104 or key==79 then
- tfm.exec.movePlayer(playername,0,0,true,0,-63,false)
- end
- if key==100 or key==75 then
- tfm.exec.movePlayer(playername,0,0,true,-200,0,false)
- end
- if key==102 or key==186 then
- tfm.exec.movePlayer(playername,0,0,true,200,0,false)
- end
- if key==98 or key==76 then
- tfm.exec.movePlayer(playername,0,0,true,0,300,false)
- end
- end
- for name,player in pairs(tfm.get.room.playerList) do
- system.bindMouse(name, true)
- end
- function eventMouse(name, x, y)
- if b == 1 then
- tfm.exec.explosion( x, y, 100, 100, false)
- tfm.exec.addShamanObject(24,x,y)
- table.insert(log,1,name)
- table.insert(EventName,1,"Explosion")
- elseif a == 1 and c == name then
- a = 0
- c = nil
- ctrl = false
- tped = 1
- tfm.exec.movePlayer(name, x, y, false, 0, 1, false)
- table.insert(log,1,name)
- table.insert(EventName,1,"Transport")
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(name,17,ctrl,true)
- end
- elseif Portal == 26 and c == name then
- tfm.exec.addShamanObject(26,x,y)
- Portal = 27
- table.insert(log,1,name)
- table.insert(EventName,1,"Portal")
- elseif Portal == 27 and c == name then
- tfm.exec.addShamanObject(27,x,y)
- Portal = 0
- end
- end
- function eventTextAreaCallback(ID,name,event)
- if event=='close' then
- ui.removeTextArea(ID,name)
- end
- if event=='??/????' then
- ui.removeTextArea(ID,name)
- ui.addTextArea(60, [[<p align='left'><font size='18'> <J>Comandos<br></br><font size='12'>Transportes: pressione Ctrl e clique na tela!<br></br> Para ligar <br></br>Explosão: Digite "!explosion", Em seguida, clique na tela!<br></br> Para desligar explosion digite "!explosion-off"<br></br>Portal:Pressione "G" em seguida, clique na tela para por o portal!<br></br>Rush/Fly/Fall down:Number pad 4,6/8/2<br></br><br></br><a href="event:???">Voltar</a><br></br><b><r><a href="event:close">Fechar</a></r></b></p>]],name,350,200,290,180,0x000000,0x0fff00,0.5,true)
- end
- if event=='??????' then
- ui.removeTextArea(ID,name)
- ui.addTextArea(60, [[<p align='left'><font size='20'> <J>Summon Objects<br></br><font size='12'><a href="event:Arrow">?Arrow?</a> <a href="event:Ball">?Ball?</a> <a href="event:Fish">?Fish?</a> <a href="event:Trampoline">?Trampoline?</a> <a href="event:Anvil">?Anvil?</a> <a href="event:Bomb">?Bomb?</a> <a href="event:Spirit">?Spirit?</a> <a href="event:Balloon">?Balloon?</a> <a href="event:??!">?Chicken?</a> <a href="event:Rune">?Rune?</a> <a href="event:Valentines Arrow">?Valentines Arrow?</a> <a href="event:Apple">?Apple?</a> <a href="event:Sheep">?Sheep?</a> <a href="event:??">?Ice Plank?</a> <a href="event:????">?Choco Plank?</a> <a href="event:?">?Cloud?</a> <a href="event:??">?Buble?</a> <a href="event:?????">?Companion Crate?</a> <a href="event:??">?Pufferfish?</a> <a href="event:???">?Very Long Plank?</a> <a href="event:???">?Triangle Box?</a> <a href="event:S??">?S-Shaped Plank?</a> <a href="event:??">?Rock?</a> <a href="event:??">?Pumpkin?</a> <a href="event:??">?Tombstone?</a> <a href="event:?????">?Small Heart Box?</a> <a href="event:?????">?Small Christmas Box?</a> <a href="event:?????">?Small Cake Box?</a> <br></br><a href="event:???">previous page</a><br></br><b><r><a href="event:close">close page</a></r></b></p>]],name,0,30,800,120,0x000000,0x0fff00,0.5,true)
- end
- if event=='????' then
- ui.removeTextArea(ID,name)
- ui.addTextArea(60, [[<p align='left'><font size='20'> <J>Chat Commands<br></br><font size='12'>?Remove Objects?:!ro<br></br>?Frozen Mouse?:!mort<br></br>?Suicide?:!death<br></br>?Get cheese?:!cheese<br></br>?Get meep?:!meep<br></br>?Be a shaman?:!sham<br></br>?Unlimited snow?:!snow<br></br>?Stop the snow?:!stop<br></br>?I R WINNER?:!win<br></br>?Be a vampire?:!vamp<br></br>?refresh tribe?:!tig,!refresh<br></br><a href="event:???">previous page</a><br></br><T><b><r><a href="event:close">close page</a></r></b></p>]],name,100,80,290,220,0x000000,0x0fff00,0.5,true)
- end
- if event=='??????' then
- ui.removeTextArea(ID,name)
- ui.addTextArea(60, [[<p align='left'><font size='24'> <J>Record Sheet<font size='12'><br></br></r></b></p>]]..table.concat( { log[1]," ",EventName[1],[[<br></br>]] } )..table.concat( { log[2]," ",EventName[2],[[<br></br>]] } )..table.concat( { log[3]," ",EventName[3],[[<br></br>]] } )..table.concat( { log[4]," ",EventName[4],[[<br></br>]] } )..table.concat( { log[5]," ",EventName[5],[[<br></br>]] } )..table.concat( { log[6]," ",EventName[6],[[<br></br>]] } )..table.concat( { log[7]," ",EventName[7],[[<br></br>]] } )..table.concat( { log[8]," ",EventName[8],[[<br></br>]] } )..table.concat( { log[9]," ",EventName[9],[[<br></br>]] } )..table.concat( { log[10]," ",EventName[10],[[<br></br>]] } )..table.concat( { log[11]," ",EventName[11],[[<br></br>]] } )..table.concat( { log[12]," ",EventName[12],[[<br></br>]] } )..table.concat( { log[13]," ",EventName[13],[[<br></br>]] } )..table.concat( { log[14]," ",EventName[14],[[<br></br>]] } )..table.concat( { log[15]," ",EventName[15],[[<br></br>]] } )..[[<p align='left'><font size='12'> <J><a href="event:???">previous page</a><br></br><b><r><a href="event:close">close page</a></r></b></p>]],name,100,80,290,300,0x000000,0x0fff00,0.5,true)
- end
- if event=='???' then
- ui.removeTextArea(ID,name)
- ui.addTextArea(60, [[<p align='center'><font size='18'> <J>MENU<br></br><font size='15'> <T><a href="event:??/????">Keyboard/Mouse Commands</a> <br></br> <a href="event:??????">Summon Objects</a> <br></br><a href="event:????">Clear Objects</a><br></br><a href="event:????">Chat Commands</a><br></br><a href="event:????">Mode Options</a> <br></br><a href="event:??????">Record Sheet</a><br></br><b><r><a href="event:close">close page</a></r></b></p>]],name,350,200,290,180,0x000000,0x0fff00,0.5,true)
- end
- if event=='????' then
- ui.removeTextArea(ID,name)
- ui.addTextArea(60, [[<p align='center'><font size='20'> <J>Mode Options<br></br><font size='12'>Racing Mode<br></br><a href="event:RacingOn">ON</a> <a href="event:RacingOff">OFF</a><br></br>Bootcamp Mode<br></br><a href="event:BootcampOn">NEXT</a> <a href="event:BootcampOff">OFF</a><br></br>Shaman Mode<br></br><a href="event:ShamanOn">ON</a> <a href="event:ShamanOff">OFF</a><br></br><a href="event:???">previous page</a><br></br><b><r><a href="event:close">close page</a></r></b></p>]],name,0,30,350,150,0x000000,0x0fff00,0.5,true)
- end
- if event=='RacingOn' then
- racing = 1
- shaman = 0
- bootcamp = 0
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAfkDeath(false)
- tfm.exec.newGame(Racing[math.random(#Racing)])
- end
- if event=='RacingOff' then
- racing = 0
- tfm.exec.setGameTime(1)
- tfm.exec.disableAutoNewGame(false)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoTimeLeft(false)
- tfm.exec.disableAfkDeath(true)
- end
- if event=='BootcampOn' then
- racing = 0
- shaman = 0
- bootcamp = 1
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.newGame(Bootcamp[math.random(#Bootcamp)])
- end
- if event=='BootcampOff' then
- bootcamp = 0
- tfm.exec.setGameTime(1)
- tfm.exec.disableAutoNewGame(false)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoTimeLeft(false)
- tfm.exec.disableAfkDeath(true)
- end
- if event=='ShamanOn' then
- racing = 0
- bootcamp = 0
- shaman = 1
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(false)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAfkDeath(false)
- tfm.exec.newGame(Shaman[math.random(#Shaman)])
- end
- if event=='ShamanOff' then
- shaman = 0
- tfm.exec.setGameTime(1)
- tfm.exec.disableAutoNewGame(false)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoTimeLeft(false)
- tfm.exec.disableAfkDeath(true)
- end
- if event=='????' then
- remove = {}
- for i,o in pairs(tfm.get.room.objectList) do
- table.insert(remove, i)
- end
- for _,n in pairs(remove) do
- tfm.exec.removeObject(n)
- end
- table.insert(log,1,name)
- table.insert(EventName,1,"Remove Objects")
- end
- if event=='Arrow' then
- tfm.exec.addShamanObject(0,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=0
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Fish' then
- tfm.exec.addShamanObject(63,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=63
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Small Box' then
- tfm.exec.addShamanObject(1,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=1
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Large Box' then
- tfm.exec.addShamanObject(2,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=2
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Small Plank' then
- tfm.exec.addShamanObject(3,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=3
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Large Plank' then
- tfm.exec.addShamanObject(4,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=4
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Ball' then
- tfm.exec.addShamanObject(6,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=6
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Trampoline' then
- tfm.exec.addShamanObject(7,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=7
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Anvil' then
- tfm.exec.addShamanObject(10,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=10
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Bomb' then
- tfm.exec.addShamanObject(23,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=23
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Spirit' then
- tfm.exec.addShamanObject(24,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=24
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Balloon' then
- tfm.exec.addShamanObject(28,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=28
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Rune' then
- tfm.exec.addShamanObject(32,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=32
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='??!' then
- tfm.exec.addShamanObject(33,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=33
- table.insert(log,1,name)
- table.insert(EventName,1,"Chicken")
- end
- if event=='Valentines Arrow' then
- tfm.exec.addShamanObject(35,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=35
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Apple' then
- tfm.exec.addShamanObject(39,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=39
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='Sheep' then
- tfm.exec.addShamanObject(40,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=40
- table.insert(log,1,name)
- table.insert(EventName,1,event)
- end
- if event=='??' then
- tfm.exec.addShamanObject(45,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=45
- table.insert(log,1,name)
- table.insert(EventName,1,"Ice Plank")
- end
- if event=='????' then
- tfm.exec.addShamanObject(46,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=46
- table.insert(log,1,name)
- table.insert(EventName,1,"Choco Plank")
- end
- if event=='?' then
- tfm.exec.addShamanObject(57,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=57
- table.insert(log,1,name)
- table.insert(EventName,1,"Cloud")
- end
- if event=='??' then
- tfm.exec.addShamanObject(59,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=59
- table.insert(log,1,name)
- table.insert(EventName,1,"Buble")
- end
- if event=='?????' then
- tfm.exec.addShamanObject(61,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=61
- table.insert(log,1,name)
- table.insert(EventName,1,"Companion Crate")
- end
- if event=='??' then
- tfm.exec.addShamanObject(65,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=65
- table.insert(log,1,name)
- table.insert(EventName,1,"Pufferfish")
- end
- if event=='???' then
- tfm.exec.addShamanObject(67,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=67
- table.insert(log,1,name)
- table.insert(EventName,1,"Very Long Plank")
- end
- if event=='???' then
- tfm.exec.addShamanObject(68,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=68
- table.insert(log,1,name)
- table.insert(EventName,1,"Triangle Box")
- end
- if event=='S??' then
- tfm.exec.addShamanObject(69,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=69
- table.insert(log,1,name)
- table.insert(EventName,1,"S-Shaped Plank")
- end
- if event=='??' then
- tfm.exec.addShamanObject(85,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=85
- table.insert(log,1,name)
- table.insert(EventName,1,"Rock")
- end
- if event=='??' then
- tfm.exec.addShamanObject(89,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=89
- table.insert(log,1,name)
- table.insert(EventName,1,"Pumpkin")
- end
- if event=='??' then
- tfm.exec.addShamanObject(90,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=90
- table.insert(log,1,name)
- table.insert(EventName,1,"Tombstone")
- end
- if event=='?????' then
- tfm.exec.addShamanObject(101,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=101
- table.insert(log,1,name)
- table.insert(EventName,1,"Small Heart Box")
- end
- if event=='?????' then
- tfm.exec.addShamanObject(103,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=103
- table.insert(log,1,name)
- table.insert(EventName,1,"Small Christmas Box")
- end
- if event=='?????' then
- tfm.exec.addShamanObject(104,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+10)
- d=104
- table.insert(log,1,name)
- table.insert(EventName,1,"Small Cake Box")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement