SHARE
TWEET

iarbă

a guest Mar 22nd, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tfm.exec.disableAutoShaman(true)
  2. tfm.exec.disableAutoNewGame(true)
  3. tfm.exec.disableAfkDeath(true)
  4. gr_speed=40
  5.  
  6.  
  7. players={}
  8. iduri={}
  9. map='@6429129'
  10. candy={[1]={x=10,y=340,g=10},[2]={x=20,y=340,g=10},[3]={x=30,y=340,g=10},[4]={x=40,y=340,g=10},[5]={x=50,y=340,g=10},[6]={x=60,y=340,g=10},[7]={x=70,y=340,g=10},[8]={x=80,y=340,g=10},[9]={x=90,y=340,g=10},[10]={x=100,y=340,g=10},[11]={x=110,y=340,g=10},[12]={x=120,y=340,g=10},[13]={x=130,y=340,g=10},[14]={x=140,y=340,g=10},[15]={x=150,y=340,g=10},[16]={x=160,y=340,g=10},[17]={x=170,y=340,g=10},[18]={x=180,y=340,g=10},[19]={x=190,y=340,g=10},[20]={x=200,y=340,g=10},[21]={x=210,y=340,g=10},[22]={x=220,y=340,g=10},[23]={x=230,y=340,g=10},[24]={x=240,y=340,g=10},[25]={x=250,y=340,g=10},[26]={x=260,y=340,g=10},[27]={x=270,y=340,g=10},[28]={x=280,y=340,g=10},[29]={x=290,y=340,g=10},[30]={x=300,y=340,g=10},[31]={x=310,y=340,g=10},[32]={x=320,y=340,g=10},[33]={x=330,y=340,g=10},[34]={x=340,y=340,g=10},[35]={x=350,y=340,g=10},[36]={x=360,y=340,g=10},[37]={x=370,y=340,g=10},[38]={x=380,y=340,g=10},[39]={x=390,y=340,g=10},[40]={x=400,y=340,g=10},[41]={x=410,y=340,g=10},[42]={x=420,y=340,g=10},[43]={x=430,y=340,g=10},[44]={x=440,y=340,g=10},[45]={x=450,y=340,g=10},[46]={x=460,y=340,g=10},[47]={x=470,y=340,g=10},[48]={x=480,y=340,g=10},[49]={x=490,y=340,g=10},[50]={x=500,y=340,g=10},[51]={x=510,y=340,g=10},[52]={x=520,y=340,g=10},[53]={x=530,y=340,g=10},[54]={x=540,y=340,g=10},[55]={x=550,y=340,g=10},[56]={x=560,y=340,g=10},[57]={x=570,y=340,g=10},[58]={x=580,y=340,g=10},[59]={x=590,y=340,g=10},[60]={x=600,y=340,g=10},[61]={x=610,y=340,g=10},[62]={x=620,y=340,g=10},[63]={x=630,y=340,g=10},[64]={x=640,y=340,g=10},[65]={x=650,y=340,g=10},[66]={x=660,y=340,g=10},[67]={x=670,y=340,g=10},[68]={x=680,y=340,g=10},[69]={x=690,y=340,g=10},[70]={x=700,y=340,g=10},[71]={x=710,y=340,g=10},[72]={x=720,y=340,g=10},[73]={x=730,y=340,g=10},[74]={x=740,y=340,g=10},[75]={x=750,y=340,g=10},[76]={x=760,y=340,g=10},[77]={x=770,y=340,g=10},[78]={x=780,y=340,g=10},[79]={x=790,y=340,g=10}}
  11.  
  12. function eventNewGame()
  13. for candyz=1,#candy do
  14. imagineID = tfm.exec.addImage("169a7218c3b.png", "!1", candy[candyz].x-15, candy[candyz].y, nil)
  15. iduri[candyz] = imagineID
  16. end
  17. end
  18.  
  19. function eventNewPlayer(n)
  20. players[n]={look=string.sub(tfm.get.room.playerList[n].look,1,2)}
  21. tfm.exec.respawnPlayer(n)
  22. tfm.exec.bindKeyboard(n,3,true,true)
  23. end
  24.  
  25. for n,p in pairs(tfm.get.room.playerList) do
  26. eventNewPlayer(n)
  27. end
  28.  
  29. function eventKeyboard(n,k,down,x,y)
  30.  
  31. look=players[n].look
  32.  
  33. for i=1,#candy do
  34.  if candy[i].g==0 and x>candy[i].x-15 and x<candy[i].x+15 and y<candy[i].y+15 and y>candy[i].y-15 then
  35.     candy[i].g=gr_speed
  36. tfm.exec.removeImage(iduri[i])
  37. iduri[i] = -1
  38. break
  39. end
  40. end
  41.  
  42. end
  43.  
  44. function eventLoop()
  45. for i=1,#candy do
  46. if candy[i].g>0 then candy[i].g=candy[i].g-1 else
  47. if iduri[i] == -1 then
  48. imagineID = tfm.exec.addImage("169a7218c3b.png", "!1", candy[i].x-15, candy[i].y, nil)
  49. iduri[i] = imagineID
  50. end
  51. end
  52. end
  53. end
  54.  
  55. function eventPlayerDied(n)
  56. players[n].look=string.sub(tfm.get.room.playerList[n].look,1,2)
  57. tfm.exec.respawnPlayer(n)
  58. end
  59.  
  60. tfm.exec.newGame(map)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top