Gekkeiju

Untitled

Dec 28th, 2016
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 25.82 KB | None | 0 0
  1. tfm.exec.disableAfkDeath(true)
  2. tfm.exec.disableAutoShaman(true)
  3. tfm.exec.disableAutoNewGame(true)
  4. maps={6946086,6354056,6980067,6373101,6947670,6973435,6980067}
  5.  
  6. function eventLoop(time,remaining)
  7.     if remaining<=0 then
  8.         tfm.exec.newGame(maps[math.random(#maps)])
  9.     end
  10. end
  11.  
  12. function eventPlayerDied()
  13.     local i=0
  14.     for n,player in pairs(tfm.get.room.playerList) do
  15.         if not player.isDead then
  16.             i=i+1
  17.             tfm.exec.respawnPlayer(n)
  18.         end
  19.     end
  20.     if i==0 then
  21.         tfm.exec.newGame(maps[math.random(#maps)])
  22.     end
  23. end
  24.  
  25. function eventPlayerWon(name)
  26.     tfm.exec.respawnPlayer(name)
  27.     tfm.exec.chatMessage("<VP>You just completed the level!",name)
  28.     tfm.exec.chatMessage("<VP>Your score: "..tfm.get.room.playerList[name].score,name)
  29. end
  30.  
  31. DOWN0 = string.byte("W")
  32. DOWN3 = string.byte("O")
  33. DOWN4 = 38
  34. DOWN1 = 40 --keycode of down arrow
  35. DOWN2 = string.byte("S") --keycode of S
  36.  
  37. for name, player in pairs(tfm.get.room.playerList) do
  38.     system.bindKeyboard(name, DOWN1, true)
  39.     system.bindKeyboard(name, DOWN2, true)
  40.     system.bindKeyboard(name, DOWN4, true)
  41.     system.bindKeyboard(name, DOWN3, true)
  42.     system.bindKeyboard(name, DOWN0, true)
  43. end
  44.  
  45. function eventKeyboard(name, keyCode, down, x, y)
  46.     if keyCode == DOWN1 or keyCode == DOWN2 then
  47.         tfm.exec.explosion(x, y + 20, 10, 60, true) -- spark(?) explosion
  48.         tfm.exec.displayParticle(tfm.enum.particle.spirit, x, y + 30) -- spark(?) spirit particle
  49.     elseif keyCode == DOWN3 or keyCode == DOWN4 or keyCode == DOWN0 then
  50.         tfm.exec.explosion(x, y - 20, 10, 60, true) -- spark(?) explosion
  51.         tfm.exec.displayParticle(tfm.enum.particle.spirit, x, y - 30) -- spark(?) spirit particle
  52.     end
  53. end
  54.  
  55.    
  56. ui.addTextArea(96,"<a href='event:906' align='center'><font size='11' color='#00FF57'><p'>Stats</a>",nil,5,255,70,20,0x000001,0x000001,1,true)
  57. ui.addTextArea(1,"<a href='event:example' align='center'><font size='11' color='#FF0000'><p'>Vampire</a>",nil,5,175,70,20,0x000001,0x000001,1,true)
  58. ui.addTextArea(2,"<a href='event:p' align='center'><font size='11' color='#00FF57'><p'>Help</a>",nil,5,195,70,20,0x000001,0x000001,1,true)
  59. ui.addTextArea(4,"<a href='event:4' align='center'><font size='11' color='#00FF57'><p'>Credits</a>",nil,5,215,70,20,0x000001,0x000001,1,true)
  60. ui.addTextArea(30,"<a href='event:99' align='center'><font size='11' color='#00FF57'><p'>Commands</a>",nil,5,235,70,20,0x000001,0x000001,1,true)
  61. ui.addTextArea(31,"<a href='event:59' align='center'><font size='11' color='#0000FF'><p'>Move Tabs</a>",nil,5,155,70,20,0x000001,0x000001,1,true)
  62.  
  63. function eventTextAreaCallback(textAreaID, playerName, callback)
  64.     if callback=="example" then
  65.         tfm.exec.setVampirePlayer(playerName)
  66.     elseif callback=="906" then
  67.         ui.addTextArea(1000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                         <a align='center'><font size='15' color='#0000FF'><p'> ",playerName,-500,-100,3000,3000,0x000001,0x000001,0.5,true)
  68.         ui.addTextArea(3909,"<a align='center'><font size='25' color='#00FF57'><p'>"..playerName.."'s Stats<a align='center'><font size='20' color='#FFD000'><p'>                                                   Won: "..info[playerName].victories.."                                                       Died: "..info[playerName].deaths.."                                                     Touched Cheese: "..info[playerName].rounds.."                                                       Shot Spirits: "..info[playerName].sparks.."                                                     Number of times being a vampire: "..info[playerName].vampire,playerName,180,100,500,190,0x000001,0x000001,1,true)
  69.         ui.addTextArea(7,"<a href='event:7' align='center'><font size='11' color='#00FF57'><p'>Close</a>",playerName,5,255,70,20,0x000001,0x000001,1,true)
  70.     elseif callback=="999" then
  71.         ui.addTextArea(1000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                         <a align='center'><font size='15' color='#0000FF'><p'> ",playerName,-500,-100,3000,3000,0x000001,0x000001,0.5,true)
  72.         ui.addTextArea(7,"<a href='event:7' align='center'><font size='11' color='#00FF57'><p'>Close</a>",playerName,730,235,70,20,0x000001,0x000001,1,true)
  73.         ui.addTextArea(3,"<a align='center'><font size='25' color='#00FF57'><p'>                Commands                                            <a align='center'><font size='19' color='#0000FF'><p'> <J>!maps - Shows the maps that are in the rotation of #Zerogravity.                                              !help - Gives you some of the help and then gives you a larger Help button to draw your attention.<BV>                                                  !bg (red, green, yellow, blue, purple) - Lets you change the background while you're playing. Example: <V>!bg purple<VP>                                                    !x - Removes the pop ups from the !bg command.",playerName,180,80,500,300,0x000001,0x000001,1,true)
  74.     elseif callback=="44" then
  75.         ui.addTextArea(1000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                             <a align='center'><font size='15' color='#0000FF'><p'> ",playerName,-500,-100,3000,3000,0x000001,0x000001,0.5,true)
  76.         ui.addTextArea(3,"<a align='center'><font size='25' color='#00FF57'><p'>                Credits                                         <a align='center'><font size='20' color='#0000FF'><p'> <J>Fuzzyfirsdog - Coding the minigame.       <V>Tohpy - Working on BR translate. <VI>                                Bibsho - Gave ideas for the minigame. <T>Tortuegreen - Showed Fuzzyfirsdog how to use some coding stuff.                                        <CH> Suprodo - Gave ideas for the minigame.                             <BV>Pinyxzyaj - Makes sure that there are no bugs.                                                  <R>Hidskills - Tests new updates and reports bugs.                                                  <N>Bolodefchoco - Helped to create the stats.",playerName,180,100,500,260,0x000001,0x000001,1,true)
  77.         ui.addTextArea(7,"<a href='event:7' align='center'><font size='11' color='#00FF57'><p'>Close</a>",playerName,730,215,70,20,0x000001,0x000001,1,true)
  78.     elseif callback=="p0" then
  79.         ui.addTextArea(1000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                         <a align='center'><font size='15' color='#0000FF'><p'> ",playerName,-500,-100,3000,3000,0x000001,0x000001,0.5,true)
  80.         ui.addTextArea(3,"<a align='center'><font size='25' color='#00FF57'><p'>                #Zerogravity                                            <b><a align='center'><font size='15' color='#FFD000'><p'> The aim in #Zerogravity is to get through obstacles in no gravity maps. There are many easy maps, and at the same time, many hard maps! The creator of this minigame is Fuzzyfirsdog. In #Zerogravity, you can do some tricks, click next to see! ",playerName,180,100,500,190,0x000001,0x000001,1,true)
  81.         ui.addTextArea(9,"<a href='event:9' align='center'><font size='11' color='#00FF57'><p'>Next</a>",playerName,300,265,70,20,0x000001,0x000001,1,true)
  82.         ui.addTextArea(5,"<a href='event:5' align='center'><font size='11' color='#00FF57'><p'>Close</a>",playerName,730,195,70,20,0x000001,0x000001,1,true)
  83.     elseif callback=="59" then
  84.         ui.addTextArea(1,"<a href='event:example' align='center'><font size='11' color='#FF0000'><p'>Vampire</a>",playerName,730,175,70,20,0x000001,0x000001,1,true)
  85.         ui.addTextArea(2,"<a href='event:p0' align='center'><font size='11' color='#00FF57'><p'>Help</a>",playerName,730,195,70,20,0x000001,0x000001,1,true)
  86.         ui.addTextArea(4,"<a href='event:44' align='center'><font size='11' color='#00FF57'><p'>Credits</a>",playerName,730,215,70,20,0x000001,0x000001,1,true)
  87.         ui.addTextArea(30,"<a href='event:999' align='center'><font size='11' color='#00FF57'><p'>Commands</a>",playerName,730,235,70,20,0x000001,0x000001,1,true)
  88.         ui.addTextArea(31,"<a href='event:69' align='center'><font size='11' color='#0000FF'><p'>Move Tabs</a>",playerName,730,155,70,20,0x000001,0x000001,1,true)
  89.         ui.addTextArea(96,"<a href='event:909' align='center'><font size='11' color='#00FF57'><p'>Stats</a>",playerName,730,255,70,20,0x000001,0x000001,1,true)
  90.     elseif callback=="69" then
  91.         ui.addTextArea(1,"<a href='event:example' align='center'><font size='11' color='#FF0000'><p'>Vampire</a>",playerName,5,175,70,20,0x000001,0x000001,1,true)
  92.         ui.addTextArea(2,"<a href='event:p' align='center'><font size='11' color='#00FF57'><p'>Help</a>",playerName,5,195,70,20,0x000001,0x000001,1,true)
  93.         ui.addTextArea(4,"<a href='event:4' align='center'><font size='11' color='#00FF57'><p'>Credits</a>",playerName,5,215,70,20,0x000001,0x000001,1,true)
  94.         ui.addTextArea(30,"<a href='event:99' align='center'><font size='11' color='#00FF57'><p'>Commands</a>",playerName,5,235,70,20,0x000001,0x000001,1,true)
  95.         ui.addTextArea(31,"<a href='event:59' align='center'><font size='11' color='#0000FF'><p'>Move Tabs</a>",playerName,5,155,70,20,0x000001,0x000001,1,true)
  96.         ui.addTextArea(96,"<a href='event:906' align='center'><font size='11' color='#00FF57'><p'>Stats</a>",playerName,5,255,70,20,0x000001,0x000001,1,true)
  97.     elseif callback=="909" then
  98.         ui.addTextArea(1000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                         <a align='center'><font size='15' color='#0000FF'><p'> ",playerName,-500,-100,3000,3000,0x000001,0x000001,0.5,true)
  99.         ui.addTextArea(3909,"<a align='center'><font size='25' color='#00FF57'><p'>"..playerName.."'s Stats<a align='center'><font size='20' color='#FFD000'><p'>                                                   Won: "..info[playerName].victories.."                                                       Died: "..info[playerName].deaths.."                                                     Touched Cheese: "..info[playerName].rounds.."                                                       Shot Spirits: "..info[playerName].sparks.."                                                     Number of times being a vampire: "..info[playerName].vampire,playerName,180,100,500,190,0x000001,0x000001,1,true)
  100.         ui.addTextArea(7,"<a href='event:7' align='center'><font size='11' color='#00FF57'><p'>Close</a>",playerName,730,255,70,20,0x000001,0x000001,1,true)
  101.     elseif callback=="99" then
  102.         ui.addTextArea(1000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                         <a align='center'><font size='15' color='#0000FF'><p'> ",playerName,-500,-100,3000,3000,0x000001,0x000001,0.5,true)
  103.         ui.addTextArea(7,"<a href='event:7' align='center'><font size='11' color='#00FF57'><p'>Close</a>",playerName,5,235,70,20,0x000001,0x000001,1,true)
  104.         ui.addTextArea(3,"<a align='center'><font size='25' color='#00FF57'><p'>                Commands                                            <a align='center'><font size='19' color='#0000FF'><p'> <J>!maps - Shows the maps that are in the rotation of #Zerogravity.                                              !help - Gives you some of the help and then gives you a larger Help button to draw your attention.<BV>                                                  !bg (red, green, yellow, blue, purple) - Lets you change the background while you're playing. Example: <V>!bg purple<VP>                                                    !x - Removes the pop ups from the !bg command.",playerName,180,80,500,300,0x000001,0x000001,1,true)
  105.     elseif callback=="4" then
  106.         ui.addTextArea(1000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                         <a align='center'><font size='15' color='#0000FF'><p'> ",playerName,-500,-100,3000,3000,0x000001,0x000001,0.5,true)
  107.         ui.addTextArea(3,"<a align='center'><font size='25' color='#00FF57'><p'>                Credits                                         <a align='center'><font size='20' color='#0000FF'><p'> <J>Fuzzyfirsdog - Coding the minigame.       <V>Tohpy - Working on BR translate. <VI>                                Bibsho - Gave ideas for the minigame. <T>Tortuegreen - Showed Fuzzyfirsdog how to use some coding stuff.                                        <CH> Suprodo - Gave ideas for the minigame.                             <BV>Pinyxzyaj - Makes sure that there are no bugs.                                                  <R>Hidskills - Tests new updates and reports bugs.                                                  <N>Bolodefchoco - Helped to create the stats.",playerName,180,100,500,260,0x000001,0x000001,1,true)
  108.         ui.addTextArea(7,"<a href='event:7' align='center'><font size='11' color='#00FF57'><p'>Close</a>",playerName,5,215,60,20,0x000001,0x000001,1,true)
  109.     elseif callback=="p" then
  110.         ui.addTextArea(1000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                         <a align='center'><font size='15' color='#0000FF'><p'> ",playerName,-500,-100,3000,3000,0x000001,0x000001,0.5,true)
  111.         ui.addTextArea(3,"<a align='center'><font size='25' color='#00FF57'><p'>                #Zerogravity                                            <a align='center'><font size='15' color='#FFD000'><p'><b>The aim in #Zerogravity is to get through obstacles in no gravity maps. There are many easy maps, and at the same time, many hard maps! The creator of this minigame is Fuzzyfirsdog. In #Zerogravity, you can do some tricks, click next to see! ",playerName,180,100,500,190,0x000001,0x000001,1,true)
  112.         ui.addTextArea(9,"<a href='event:9' align='center'><font size='11' color='#00FF57'><p'>Next</a>",playerName,300,265,60,20,0x000001,0x000001,1,true)
  113.         ui.addTextArea(5,"<a href='event:5' align='center'><font size='11' color='#00FF57'><p'>Close</a>",playerName,5,195,60,20,0x000001,0x000001,1,true)
  114.     elseif callback=="9" then
  115.         ui.addTextArea(3,"<a align='center'><font size='25' color='#00FF57'><p'>                #Zerogravity                                            <a align='center'><font size='15' color='#FFD000'><p'>Some of the basics that you need to know will be displayed here.<br>1. Jumping will actually spawn a spark <b><u>over</u></b> you. So be prepared when you jump! <br>2. Ducking will spawn a spark <b><u>under</b></u> you. <br><br><R>The tabs on the left will help you with a lot more stuff, and can be moved by clicking <BV><i>Move Tabs</i></BV>! Please feel free to use it for help.",playerName,180,100,500,190,0x000001,0x000001,1,true)
  116.         ui.addTextArea(9,"<a href='event:88' align='center'><font size='11' color='#00FF57'><p'>Back</a>",playerName,330,265,60,20,0x000001,0x000001,1,true)
  117.     elseif callback=="88" then
  118.         ui.addTextArea(3,"<a align='center'><font size='25' color='#00FF57'><p'>                #Zerogravity <a align='center'><font size='15' color='#FFD000'><p'>                                                 <b>The aim in #Zerogravity is to get through obstacles in no gravity maps. There are many easy maps, and at the same time, many hard maps! The creator of this minigame is Fuzzyfirsdog. In #Zerogravity, you can do some tricks, click next to see! ",playerName,180,100,500,190,0x000001,0x000001,1,true)
  119.         ui.addTextArea(9,"<a href='event:9' align='center'><font size='11' color='#00FF57'><p'>Next</a>",playerName,300,265,60,20,0x000001,0x000001,1,true)
  120.     elseif callback=="5" or callback=="7" then
  121.         ui.removeTextArea(5,playerName)
  122.         ui.removeTextArea(200,playerName)
  123.         ui.removeTextArea(3,playerName)
  124.         ui.removeTextArea(7,playerName)
  125.         ui.removeTextArea(3909,playerName)
  126.         ui.removeTextArea(9,playerName)
  127.         ui.removeTextArea(1000,playerName)
  128.     end
  129. end
  130.  
  131.  
  132. function eventNewGame()
  133.     o=tfm.get.room.xmlMapInfo.mapCode
  134.     a=tfm.get.room.xmlMapInfo.author
  135.     m=tfm.get.room.currentMap.id
  136.     tfm.exec.setUIMapName("<VP>@"..o.." - Creator: "..a)
  137.     if m=="6946086" then
  138.         tfm.exec.setUIMapName("<VP>@"..o.." - Level 1 - Creator: "..a)
  139.     end
  140. end
  141.  
  142. tfm.exec.chatMessage("<ROSE>")
  143.  
  144. function eventPlayerDied(name)
  145.     tfm.exec.respawnPlayer(name)
  146. end
  147.  
  148. tfm.exec.setGameTime(5)
  149. tfm.exec.setRoomMaxPlayers(12)
  150.  
  151. function eventNewGame()
  152.     ui.removeTextArea (945) --Remove textarea when a new round begins
  153.     ui.removeTextArea (992)
  154.     mouseWon = false
  155.     o=tfm.get.room.xmlMapInfo.mapCode
  156.     a=tfm.get.room.xmlMapInfo.author
  157.     m=tfm.get.room.currentMap.id
  158.     tfm.exec.setUIMapName("<J>@"..o.."<VP> - Creator: "..a)
  159.     if m=="6946086" then
  160.         tfm.exec.setUIMapName("<VP>@"..o.." - Level 1 - Creator: "..a)
  161.         tfm.exec.chatMessage("<ROSE>[MAP INFO] <CH>@"..o.."<> - Creator: <J>"..a,name)
  162.     end
  163. end
  164.  
  165. function eventPlayerWon(name)
  166.     if not mouseWon then --This'll trigger only when the first mouse gets in the hole
  167.         ui.addTextArea (992,"<a align='center'><font size='95' color='#E9D504'><a'> ",nil,-400,-405,9000,9000,0x000001,0x000001,0.4,true)
  168.         ui.addTextArea (945,"<a align='center'><font size='90' color='#E9D504'><a'>Cheeeeeese *-* "..name.."! ",nil,65,85,790,1000,0x000001,0x000001,0,true)
  169.         mouseWon = true
  170.         tfm.exec.setGameTime(5)
  171.         tfm.exec.chatMessage("<VP>You just completed the level!",name)
  172.         tfm.exec.chatMessage("<VP>Your score: "..tfm.get.room.playerList[name].score,name)
  173.     end
  174. end
  175.  
  176. tfm.exec.chatMessage("<J>The aim in #Zerogravity is to get through obstacles in no gravity maps. There are many easy maps, and at the same time, many hard maps! The creator of this minigame is Fuzzyfirsdog. Click the large help button to see more info.")
  177.  
  178. serialization = function(x)
  179.     if type(x) == "table" then
  180.         local t = x
  181.         local str = ""
  182.         for index,value in next,t do
  183.             local prefix,tbOption = (type(value)=="string" and "_@" or type(value)=="boolean" and "_!" or type(value)=="number" and "_#" or type(value)=="table" and "_%" or ""),(type(value)~="table" and tostring(value) or "+&"..serialization(value):gsub(";","?").."&-")
  184.             str = str .. ':' .. tostring(index) .. prefix .. tbOption .. ";"
  185.         end
  186.         return str
  187.     elseif type(x) == "string" then
  188.         local s = x
  189.         local list = {}
  190.         for str in s:gmatch("(.-);") do
  191.             local varName,valueType,value = str:match(':(.-)_(%p)(.+)')
  192.             if varName~=nil then
  193.                 varName = tonumber(varName) or varName
  194.                 if valueType == "@" then
  195.                     list[varName] = tostring(value)
  196.                 elseif valueType == "!" then
  197.                     list[varName] = value=="true"
  198.                 elseif valueType == "#" then
  199.                     list[varName] = tonumber(value)
  200.                 elseif valueType == "%" then
  201.                     list[varName] = serialization(value:gsub("+&",""):gsub("&-",""):gsub("%?",";"))
  202.                 end
  203.             end
  204.         end
  205.         return list
  206.     end
  207. end
  208.  
  209. info = {}
  210.  
  211. eventNewPlayer = function(n)
  212.     tfm.exec.respawnPlayer(n)
  213.     ui.addTextArea(1,"<a href='event:example' align='center'><font size='11' color='#FF0000'><p'>Vampire</a>",n,5,175,70,20,0x000001,0x000001,1,true)
  214.     ui.addTextArea(2,"<a href='event:p' align='center'><font size='11' color='#00FF57'><p'>Help</a>",n,5,195,70,20,0x000001,0x000001,1,true)
  215.     ui.addTextArea(4,"<a href='event:4' align='center'><font size='11' color='#00FF57'><p'>Credits</a>",n,5,215,70,20,0x000001,0x000001,1,true)
  216.     ui.addTextArea(30,"<a href='event:99' align='center'><font size='11' color='#00FF57'><p'>Commands</a>",n,5,235,70,20,0x000001,0x000001,1,true)
  217.     ui.addTextArea(31,"<a href='event:59' align='center'><font size='11' color='#0000FF'><p'>Move Tabs</a>",n,5,155,70,20,0x000001,0x000001,1,true)
  218.     ui.addTextArea(96,"<a href='event:906' align='center'><font size='11' color='#00FF57'><p'>Stats</a>",n,5,255,70,20,0x000001,0x000001,1,true)
  219.     system.bindKeyboard(n, DOWN1, true)
  220.     system.bindKeyboard(n, DOWN2, true)
  221.     system.bindKeyboard(n, DOWN4, true)
  222.     system.bindKeyboard(n, DOWN3, true)
  223.     system.bindKeyboard(n, DOWN0, true)
  224.     info[n] = { -- Creates a table for the player
  225.         victories = 0,
  226.         deaths = 0,
  227.         vampire = 0,
  228.         rounds = 0,
  229.         sparks = 0
  230.     }  
  231. end
  232.  
  233. table.foreach(tfm.get.room.playerList,eventNewPlayer)
  234.  
  235. eventPlayerWon = function(name)
  236.     if not mouseWon then --This'll trigger only when the first mouse gets in the hole
  237.         ui.addTextArea (992,"<a align='center'><font size='95' color='#E9D504'><a'> ",nil,-400,-405,9000,9000,0x000001,0x000001,0.4,true)
  238.         ui.addTextArea (945,"<a align='center'><font size='90' color='#E9D504'><a'>Cheeeeeese *-*<br> <VP>"..name.."! ",nil,65,85,790,1000,0x000001,0x000001,0,true)
  239.         mouseWon = true
  240.         tfm.exec.setGameTime(5)
  241.         tfm.exec.chatMessage("<VP>You just completed the level!",name)
  242.         tfm.exec.chatMessage("<VP>Your score: "..tfm.get.room.playerList[name].score,name)
  243.         tfm.exec.respawnPlayer(name)
  244.         info[name].victories = info[name].victories + 1
  245.     end
  246. end
  247. eventPlayerDied = function(name)
  248.     tfm.exec.respawnPlayer(name)
  249.     info[name].deaths = info[name].deaths + 1
  250. end
  251.  
  252. eventPlayerGetCheese = function(n)
  253.     info[n].rounds = info[n].rounds + 1
  254. end
  255.  
  256. function eventKeyboard(name, keyCode, down, x, y)
  257.     info[name].sparks = info[name].sparks + 1
  258.     if keyCode == DOWN1 or keyCode == DOWN2 then
  259.         tfm.exec.explosion(x, y + 20, 10, 60, true) -- spark(?) explosion
  260.         tfm.exec.displayParticle(tfm.enum.particle.spirit, x, y + 30) -- spark(?) spirit particle
  261.     elseif keyCode == DOWN3 or keyCode == DOWN4 or keyCode == DOWN0 then
  262.         tfm.exec.explosion(x, y - 20, 10, 60, true)-- spark(?) explosion
  263.         tfm.exec.displayParticle(tfm.enum.particle.spirit, x, y - 30) -- spark(?) spirit particle
  264.     end
  265. end
  266.  
  267. eventPlayerVampire = function(name)
  268.     info[name].vampire = info[name].vampire + 1
  269. end
  270. system.disableChatCommandDisplay("help",true)
  271. system.disableChatCommandDisplay("maps",true)
  272. system.disableChatCommandDisplay("x",true)
  273. system.disableChatCommandDisplay("stats",true)
  274. system.disableChatCommandDisplay("bg",true)
  275.  
  276. function eventChatCommand(m,n)
  277.     if n=="maps" then
  278.         tfm.exec.chatMessage("["..#maps.." Maps]<J> MAPS: <VP>6946086, 6354056, 6373101, 6947670, 6973435, 6980067",m)
  279.     elseif n=="help" then
  280.         tfm.exec.chatMessage("<J>The aim in #Zerogravity is to get through obstacles in no gravity maps. There are many easy maps, and at the same time, many hard maps! The creator of this minigame is Fuzzyfirsdog. Click the large help button to see more info.",m)
  281.         ui.addTextArea(200,"<a href='event:p' align='center'><font size='130' color='#00FF57'><p'>          Help</a>",m,250,-5,600,600,0x000001,0xFFE300,0,true)
  282.     elseif n=="x" then
  283.         ui.removeTextArea(200,m)
  284.         ui.removeTextArea(3909,m)
  285.         ui.removeTextArea(2000,m)
  286.     elseif n=="stats" then
  287.         tfm.exec.chatMessage("<VP>Touched Cheese: "..info[m].rounds.." |Won: "..info[m].victories.." |Shot Spirits: "..info[m].sparks.." | Died: "..info[m].deaths,m)
  288.     elseif n=="bg red" then
  289.         ui.addTextArea(2000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                         <a align='center'><font size='15' color='#0000FF'><p'> ",m,-500,-100,3000,3000,0xFF0000,0xFF0000,0.4,true)
  290.         ui.addTextArea(1,"<a href='event:example' align='center'><font size='11' color='#FF0000'><p'>Vampire</a>",m,5,175,70,20,0x000001,0x000001,1,true)
  291.         ui.addTextArea(2,"<a href='event:p' align='center'><font size='11' color='#00FF57'><p'>Help</a>",m,5,195,70,20,0x000001,0x000001,1,true)
  292.         ui.addTextArea(4,"<a href='event:4' align='center'><font size='11' color='#00FF57'><p'>Credits</a>",m,5,215,70,20,0x000001,0x000001,1,true)
  293.         ui.addTextArea(30,"<a href='event:99' align='center'><font size='11' color='#00FF57'><p'>Commands</a>",m,5,235,70,20,0x000001,0x000001,1,true)
  294.         ui.addTextArea(31,"<a href='event:59' align='center'><font size='11' color='#0000FF'><p'>Move Tabs</a>",m,5,155,70,20,0x000001,0x000001,1,true)
  295.         ui.addTextArea(96,"<a href='event:906' align='center'><font size='11' color='#00FF57'><p'>Stats</a>",m,5,255,70,20,0x000001,0x000001,1,true)
  296.     elseif n=="bg blue" then
  297.         ui.addTextArea(2000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                         <a align='center'><font size='15' color='#0000FF'><p'> ",m,-500,-100,3000,3000,0x0000FF,0x0000FF,0.4,true)
  298.         ui.addTextArea(1,"<a href='event:example' align='center'><font size='11' color='#FF0000'><p'>Vampire</a>",m,5,175,70,20,0x000001,0x000001,1,true)
  299.         ui.addTextArea(2,"<a href='event:p' align='center'><font size='11' color='#00FF57'><p'>Help</a>",m,5,195,70,20,0x000001,0x000001,1,true)
  300.         ui.addTextArea(4,"<a href='event:4' align='center'><font size='11' color='#00FF57'><p'>Credits</a>",m,5,215,70,20,0x000001,0x000001,1,true)
  301.         ui.addTextArea(30,"<a href='event:99' align='center'><font size='11' color='#00FF57'><p'>Commands</a>",m,5,235,70,20,0x000001,0x000001,1,true)
  302.         ui.addTextArea(31,"<a href='event:59' align='center'><font size='11' color='#0000FF'><p'>Move Tabs</a>",m,5,155,70,20,0x000001,0x000001,1,true)
  303.         ui.addTextArea(96,"<a href='event:906' align='center'><font size='11' color='#00FF57'><p'>Stats</a>",m,5,255,70,20,0x000001,0x000001,1,true)
  304.     elseif n=="bg green" then
  305.         ui.addTextArea(2000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                         <a align='center'><font size='15' color='#0000FF'><p'> ",m,-500,-100,3000,3000,0x00FF00,0x00FF00,0.6,true)
  306.         ui.addTextArea(1,"<a href='event:example' align='center'><font size='11' color='#FF0000'><p'>Vampire</a>",m,5,175,70,20,0x000001,0x000001,1,true)
  307.         ui.addTextArea(2,"<a href='event:p' align='center'><font size='11' color='#00FF57'><p'>Help</a>",m,5,195,70,20,0x000001,0x000001,1,true)
  308.         ui.addTextArea(4,"<a href='event:4' align='center'><font size='11' color='#00FF57'><p'>Credits</a>",m,5,215,70,20,0x000001,0x000001,1,true)
  309.         ui.addTextArea(30,"<a href='event:99' align='center'><font size='11' color='#00FF57'><p'>Commands</a>",m,5,235,70,20,0x000001,0x000001,1,true)
  310.         ui.addTextArea(31,"<a href='event:59' align='center'><font size='11' color='#0000FF'><p'>Move Tabs</a>",m,5,155,70,20,0x000001,0x000001,1,true)
  311.         ui.addTextArea(96,"<a href='event:906' align='center'><font size='11' color='#00FF57'><p'>Stats</a>",m,5,255,70,20,0x000001,0x000001,1,true)
  312.     elseif n=="bg purple" then
  313.         ui.addTextArea(2000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                         <a align='center'><font size='15' color='#0000FF'><p'> ",m,-500,-100,3000,3000,0x740090,0x740090,0.4,true)
  314.         ui.addTextArea(1,"<a href='event:example' align='center'><font size='11' color='#FF0000'><p'>Vampire</a>",m,5,175,70,20,0x000001,0x000001,1,true)
  315.         ui.addTextArea(2,"<a href='event:p' align='center'><font size='11' color='#00FF57'><p'>Help</a>",m,5,195,70,20,0x000001,0x000001,1,true)
  316.         ui.addTextArea(4,"<a href='event:4' align='center'><font size='11' color='#00FF57'><p'>Credits</a>",m,5,215,70,20,0x000001,0x000001,1,true)
  317.         ui.addTextArea(30,"<a href='event:99' align='center'><font size='11' color='#00FF57'><p'>Commands</a>",m,5,235,70,20,0x000001,0x000001,1,true)
  318.         ui.addTextArea(31,"<a href='event:59' align='center'><font size='11' color='#0000FF'><p'>Move Tabs</a>",m,5,155,70,20,0x000001,0x000001,1,true)
  319.         ui.addTextArea(96,"<a href='event:906' align='center'><font size='11' color='#00FF57'><p'>Stats</a>",m,5,255,70,20,0x000001,0x000001,1,true)
  320.     elseif n=="bg yellow" then
  321.         ui.addTextArea(2000,"<a align='center'><font size='25' color='#00FF57'><p'>                                                         <a align='center'><font size='15' color='#0000FF'><p'> ",m,-500,-100,3000,3000,0xFFFF00,0xFFFF00,0.6,true)
  322.         ui.addTextArea(1,"<a href='event:example' align='center'><font size='11' color='#FF0000'><p'>Vampire</a>",m,5,175,70,20,0x000001,0x000001,1,true)
  323.         ui.addTextArea(2,"<a href='event:p' align='center'><font size='11' color='#00FF57'><p'>Help</a>",m,5,195,70,20,0x000001,0x000001,1,true)
  324.         ui.addTextArea(4,"<a href='event:4' align='center'><font size='11' color='#00FF57'><p'>Credits</a>",m,5,215,70,20,0x000001,0x000001,1,true)
  325.         ui.addTextArea(30,"<a href='event:99' align='center'><font size='11' color='#00FF57'><p'>Commands</a>",m,5,235,70,20,0x000001,0x000001,1,true)
  326.         ui.addTextArea(31,"<a href='event:59' align='center'><font size='11' color='#0000FF'><p'>Move Tabs</a>",m,5,155,70,20,0x000001,0x000001,1,true)
  327.         ui.addTextArea(96,"<a href='event:906' align='center'><font size='11' color='#00FF57'><p'>Stats</a>",m,5,255,70,20,0x000001,0x000001,1,true)
  328.     end
  329. end
Advertisement
Add Comment
Please, Sign In to add comment