Rohere

Berek

Jan 1st, 2016
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.53 KB | None | 0 0
  1. maps = {"@650592","@4385075"}
  2.  
  3. tfm.exec.setGameTime(10)
  4.  
  5.  
  6.  
  7. function eventNewGame()
  8. tfm.exec.newGame(maps[math.random(#maps)])
  9. tfm.exec.setNameColor(players[math.random(#players)], 0xFF1900)
  10. system.bindKeyboard(players[math.random(#players)],88,true,true)
  11. ui.addTextArea(0,'<J><a href="event:pomoc">Pomoc',nick,5,190,0,20,0x1c3c41,0x1c3c41,1)
  12. tfm.exec.setGameTime(30)
  13. end
  14.  
  15. function eventTextAreaCallback(id,nick,klik)
  16. if klik=="pomoc" then
  17. ui.addPopup(0, 0, "Witaj w berku! <br><br>Gdy masz czerwony nick postaraj się przekazać czerwoność innej myszce z białym nickiem.<br>Jeśli masz biały nick, staraj się jak najprędzej uciekać!<br><br>X - gdy masz czerwony nick przekazujesz go za pomocą kliknięcia klawisza przy kimś<br><br><br>Kod : Rohere,Krzysiul,Rkubi<br><br>Pomysł : Rohere,Krzysiul<br><br>",nick, 292, 91, 200, true)
  18. end
  19. end
  20.  
  21. players = {}
  22.  
  23. for nick,player in pairs(tfm.get.room.playerList) do
  24. table.insert(players,nick)
  25. end
  26.  
  27.  
  28. function eventKeyboard(nick,key,d,x,y)
  29. for n,p in pairs(tfm.get.room.playerList) do
  30. if key==88 and p.x>x-20 and p.x<x+20 and p.y>y-20 and p.y<y+20 and n~=nick then
  31. system.bindKeyboard(n,88,true,true)
  32. tfm.exec.setNameColor(n, 0xFF1900)
  33. table.insert(czer,n)
  34. table.invert(czer,nick)
  35. system.bindKeyboard(nick,88,true,false)
  36. tfm.exec.setNameColor(nick, 0xFFFFFF)
  37. end
  38. end
  39. end
  40.  
  41.  
  42.  
  43. tfm.exec.disableAutoShaman(true)
  44. tfm.exec.disableAutoScore(true)
  45.  
  46.  
  47.  
  48. function eventLoop(t,r)
  49. if r<=0 then
  50. tfm.exec.newGame(maps[math.random(#maps)])
  51. tfm.exec.setNameColor(all, 0xFFFFFF)
  52. end
  53. end
Advertisement
Add Comment
Please, Sign In to add comment