Slowmice

Lua game on TFM

Sep 28th, 2013
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.23 KB | None | 0 0
  1. tfm.exec.newGame(math.random(1, 143))--CLOWFISH БЫДЛО КОДЕР
  2.  
  3. function eventNewPlayer(name)
  4.             for i,key in ipairs({32}) do
  5.          tfm.exec.bindKeyboard(name,key,true,true)
  6.     end
  7. end
  8.  
  9. function eventKeyboard(name,key,down,x,y)
  10.     if key==32 then
  11.         tfm.exec.movePlayer(name,0,0,true,0,-50,true)
  12.     end
  13. end
  14.  
  15. function eventChatCommand(name,command)
  16.         if command=="help" then
  17.             ui.addPopup(9999, 999, "Welcome, "..name..", to the Minigame Test.Type !list for the commands.", name, 250, 150, 300)
  18.                 elseif command=="list" then
  19.                     ui.addPopup(9324,0,"! commands : !next , !snow , !cheese , !mort , !respawn, !meep , !sham , !vamp , !(color) ; colors available : black, white, red, orange, yellow, green, blue, purple", nil,250,150,400)                elseif command=="cheese" then
  20.                 elseif command=="mort" then
  21.                     tfm.exec.killPlayer(name)
  22.                 elseif command=="respawn" then
  23.                     tfm.exec.respawnPlayer(name)
  24.                 elseif command=="cheese" then
  25.                     tfm.exec.giveCheese(name)
  26.                 elseif command:sub(1,2)=="np" then
  27.                     tfm.exec.newGame(command:sub(4))
  28.                 elseif command=="sham" then
  29.                     tfm.exec.setShaman(name)
  30.                 elseif command=="vamp" then
  31.                     tfm.exec.setVampirePlayer(name)
  32.                 elseif command=="next" then
  33.                     tfm.exec.newGame(math.random(1, 143))
  34.                 elseif command=="meep" then
  35.                     tfm.exec.giveMeep(name)
  36.                 elseif command=="snow" then
  37.                     tfm.exec.snow()
  38.                     print("It's Snowing!")
  39.                 elseif command=="white" then
  40.                     tfm.exec.setNameColor(name, 0xffffff)
  41.                 elseif command=="black" then
  42.                     tfm.exec.setNameColor(name, 0x000000)
  43.                 elseif command=="red" then
  44.                     tfm.exec.setNameColor(name, 0xFF0000)
  45.                 elseif command=="blue" then
  46.                     tfm.exec.setNameColor(name, 0x0D00FF)
  47.                 elseif command=="yellow" then
  48.                     tfm.exec.setNameColor(name, 0xFFEE00)
  49.                 elseif command=="green" then
  50.                     tfm.exec.setNameColor(name, 0x11FF00)
  51.                 elseif command=="orange" then
  52.                     tfm.exec.setNameColor(name, 0xFFAE00)
  53.                 elseif command=="purple" then
  54.                     tfm.exec.setNameColor(name, 0xD400FF)
  55.                 end
  56.             end
  57.  
  58. function eventNewGame()
  59.     tfm.exec.disableAfkDeath(true)
  60.     tfm.exec.setGameTime(120, true)
  61.     tfm.exec.disableAutoTimeLeft(true)
  62.     tfm.exec.disableAutoNewGame(true)
  63.     tfm.exec.setUIShamanName("<font color='#C2C2DA' size='11' >*Uknown*</font>")
  64.     tfm.exec.setUIMapName("<font color='#C2C2DA' size='11' >Minigame Test</font><font color='#BABD2F' size='11' >")
  65. end
  66.  
  67. function eventNewPlayer(name)
  68.     ui.addPopup(2, 999, "Type !help for more information.", name, 300, 200, 200)
  69. end
  70.  
  71. function eventPlayerGetCheese(name)
  72.     ui.addPopup(3, 999, "You have gotten the cheese, go back to the hole!", name, 5, 300, 200)
  73. end
  74.  
  75. function eventPlayerDied(name)
  76.     ui.addPopup(4,999, "No Cheese For You ^-^" ,name,5,120,200)
  77. end
  78.  
  79. function eventPlayerWon(name)
  80.     ui.addPopup(5,999, "Cheese *-*" ,name,5,120,200)
  81.     tfm.exec.setNameColor(name,0x98E2EB)
  82.     tfm.exec.newGame(math.random(1, 143))
  83. end
  84.  
  85. for name in pairs(tfm.get.room.playerList) do tfm.exec.setShaman(name) end
  86. for name,player in pairs(tfm.get.room.playerList) do
  87.     eventNewPlayer(name)
  88. end
  89.  
  90. function eventLoop()
  91.   tfm.exec.addShamanObject(tfm.enum.shamanObject.ball, math.random()*800, 30)
  92. end--CLOWFISH БЫДЛО КОДЕР
Advertisement
Add Comment
Please, Sign In to add comment