Thetroz

#Pesque

Dec 16th, 2013
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.86 KB | None | 0 0
  1. lluvia={"25"}
  2. pAtOnce=500
  3. radiusX=100
  4. radiusY=100
  5. timer = 0
  6. despawnTime=5
  7. tiempo = {"1","2","3"}
  8.  
  9. admin = {Aritxy = true, Thetroz = true, Deebuglua = true}
  10.  
  11. local maps = {"@3711303"}
  12. ui.addTextArea(52, "<a href='event:cordenadas'><font size='15'><j><b>Mis cordenadas</b></j></font>", player, 650, 377, 200, 50, 16777215, 16777215, 0,0);
  13. tfm.exec.disableAutoShaman(true)
  14. tfm.exec.disableAutoNewGame(true)
  15. tfm.exec.newGame(maps[math.random(#maps)])
  16.  
  17. function eventTextAreaCallback(id,player,callback)
  18.         if callback=="cordenadas" then
  19.                 if tfm.get.room.playerList then
  20. if tfm.get.room.playerList[player].x then
  21.         if tfm.get.room.playerList[player].y then
  22. ui.addTextArea(52, "<a href='event:cordenadas'><font size='15'><b><r>X:" .. tfm.get.room.playerList[player].y.. "<n>  /  <v>Y:".. tfm.get.room.playerList[player].x.."", player, 660, 377, 200, 50, 16777215, 16777215, 0,0);
  23.                                 end
  24.                         end
  25.                 end
  26.         end
  27. end
  28.  
  29.  
  30. function eventLoop(currentTime, timeRemaining,curTime, timeR)
  31.         tfm.exec.displayParticle(27, 400, 200, 0, 0, 0, 0)
  32.         tfm.exec.displayParticle(26, 658, 98, 0, 0, 0, 0)
  33.         tfm.exec.displayParticle(27, 10, 50, 0, 0, 0, 0)
  34.         tfm.exec.displayParticle(26, 500, 380, 0, 0, 0, 0)
  35. for i=1,pAtOnce do
  36.         tfm.exec.displayParticle(lluvia[math.random(#lluvia)],math.random(400-radiusX*4,400+radiusX*4),math.random(200-radiusY*2,200+radiusY*2),0,0,0,0,nil)
  37.     end
  38.         tfm.exec.addShamanObject(0, 581, 137);
  39.     end
  40.        if timer == despawnTime * 2 then
  41.                 tfm.exec.giveCheese(player)
  42.         else
  43.                 timer = timer + 1
  44.     end
  45.  
  46. function eventNewGame()
  47.         tfm.exec.setUIMapName("<font color='#BABD2F'>Pesque</font><font color='#6C77C1'> - @0</font>")
  48.         tfm.exec.setGameTime(360)
  49.         tfm.exec.disableAfkDeath(true)
  50.         tfm.exec.disableAutoShaman(true)
  51. end
  52.  
  53. function eventEmotePlayed(player,emote)
  54.         if emote==8 then
  55.         if tfm.get.room.playerList[player].x < 581 then
  56.         if tfm.get.room.playerList[player].y < 165 then
  57.         ui.addTextArea(2, "<font size='10'>Estás pescando el queso...</font>", player, 5, 30, 200, 50, 16777215, 16777215, 0);
  58.         timer = 0
  59.             end
  60.         end
  61.     end
  62. end
  63.  
  64. function eventChatCommand(name,command)
  65.        if admin[name] then
  66.          if command=="next" then
  67.                 tfm.exec.newGame (maps[math.random(#maps)]);
  68.          elseif command=="win" then
  69.                 tfm.exec.giveCheese(name)
  70.                 tfm.exec.playerVictory(name)
  71.          elseif command=="snow" then
  72.                 tfm.exec.snow(20, 99999999999)
  73.          elseif command=="color" then
  74.                 tfm.exec.setNameColor(name, 0xED67EA)
  75.          elseif command=="np" then
  76.                 ui.addPopup(1,2,"<p align='center'>El código del mapa:</p>",name,300,200,200);
  77.          elseif command=="map" then
  78.                 ui.addPopup(2,2,"<p align='center'>Cambia el nombre del mapa:</p>",name,300,200,200);
  79.          elseif command=="time" then
  80.                 ui.addPopup(0,2,"<p align='center'>Establece el tiempo en segundos:</p>",name,300,200,200);
  81.          elseif command=="respawn" then
  82.                 tfm.exec.respawnPlayer(name)
  83.                 end
  84.         end
  85. end
  86.  
  87. function eventPopupAnswer(Id,Name,answer)
  88.        if Id==0 then
  89.         tfm.exec.setGameTime(answer)
  90.        elseif Id==1 then
  91.         tfm.exec.newGame(answer)
  92.        elseif Id==2 then
  93.         tfm.exec.setUIMapName(answer)
  94.         end
  95. end
  96.  
  97. function eventPlayerGetCheese(player)
  98.         ui.addTextArea(2, "<font size='10'>¡Has pescado el queso! Corre a la madriguera.</font>", player, 5, 30, 200, 50, 16777215, 16777215, 0)
  99. end
  100.  
  101. function eventPlayerWon (player)
  102.         ui.removeTextArea(2,player)
  103.         ui.addTextArea(3, "<font size='10'>¡<b>"..player.."</b> ha ganado!</font>", nil, 5, 30, 200, 50, 16777215, 16777215, 0);
  104. end
Advertisement
Add Comment
Please, Sign In to add comment