Guest User

Spiritcheese

a guest
Dec 9th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  ui.addPopup (1,0,"Bienvenido a Spiritcheese, minijuego creado por Flingoyo, Drymisty y Quesoyquesos, créditos a Thetroz por su valiosa ayuda. escribe !help para ver una lista de comandos y una pequeña ayuda.", nil, 250, 100, 300);
  2. for name in pairs (tfm.get.room.playerList) do
  3.     system.bindMouse (name);
  4. end
  5.  
  6. function eventMouse (playerName, x, y)
  7.     tfm.exec.addShamanObject (24, x, y);
  8. end
  9.  
  10. local maps = {"@4580112", "@4580134", "@4580171", "@4580165", "@4580177", "@4580185","@4580197", "@4580640", "@4580645", "@4581538", "@4581571"}
  11.  
  12.  function main()
  13.         tfm.exec.disableAutoNewGame (true)              
  14.         tfm.exec.disableAutoTimeLeft (true)            
  15.         startNewGame();
  16. end
  17.  
  18. function startNewGame()
  19.        tfm.exec.disableAutoShaman(true)
  20.         tfm.exec.newGame (maps[math.random(#maps)]);
  21.     tfm.exec.setGameTime (43);
  22. end
  23.  
  24. function eventLoop (a, timeLeft)
  25.         if timeLeft <= 0 then
  26.                 startNewGame();
  27.         end
  28. end
  29.  
  30. function eventPlayerDied (playerName)
  31.         local playersAlive = 0;
  32.         local winner;
  33.        
  34.         for player in pairs(tfm.get.room.playerList) do
  35.                 if not tfm.get.room.playerList[player].isDead then
  36.                         playersAlive = playersAlive + 1;
  37.                         winner = player;
  38.                 end
  39.         end
  40.                    
  41.         if (playersAlive ==0) then
  42.                 startNewGame();
  43.         end
  44. end
  45.  
  46. main();
  47.  
  48. function eventChatCommand(name,command)
  49.     if command == "help" then
  50.         ui.addPopup (0,0,"Haz click donde desees invocar una chispa, si quieres ponerle color a tu nombre escribe, !rojo o !azul, !amarillo, !naranja, !rosa, !verde.", name, 200, 100, 400)
  51.         elseif command == "rojo" then
  52.             tfm.exec.setNameColor(name, 0xFF0000)        
  53.         elseif command == "azul" then
  54.             tfm.exec.setNameColor(name, 0x000AFF)        
  55.     elseif command == "verde" then
  56.             tfm.exec.setNameColor(name, 0x32FF00)        
  57.     elseif command == "rosa" then
  58.             tfm.exec.setNameColor(name, 0xFD55FB)        
  59.     elseif command == "naranja" then
  60.         tfm.exec.setNameColor(name, 0xFF9500)        
  61.     elseif command == "amarillo" then
  62.         tfm.exec.setNameColor(name, 0xFFEF00)        
  63.         end
  64. end
  65.  
  66. function eventPlayerDied (name)
  67.     tfm.exec.respawnPlayer(name)
  68. end
Advertisement
Add Comment
Please, Sign In to add comment