Bolodefchoco_LUAXML

[Pedido] Remake PT (War 2 team)

Sep 13th, 2015
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.05 KB | None | 0 0
  1. adm = {Bolodefchoco = true,Bolodefchocoa = true}
  2. forca_das_bombas = 70
  3. cmd = {
  4.     a = 'mago',
  5.     b = 'arqueiro',
  6.     c = 'start',
  7. }
  8. tfm.exec.disableAfkDeath(true)
  9. tfm.exec.disableAutoScore(true)
  10. tfm.exec.disableAutoShaman(true)
  11. tfm.exec.disableAutoNewGame(true)
  12. tfm.exec.disableAutoTimeLeft(true)
  13. tfm.exec.newGame('4529148')
  14. Power = {}
  15. canSelect = false
  16. function eventChatCommand(n,c)
  17.     if c==string.lower(cmd.a) then
  18.         if canSelect==true then
  19.             if Power[n]~=cmd.a and Power[n]~=cmd.b then
  20.                 tfm.exec.bindKeyboard(n,32,true)
  21.                 tfm.exec.movePlayer(n,173,185,false)
  22.                 ui.addPopup(0,0,"Agora você é um "..cmd.a.."! Clique para soltar uma bomba!",n,300,150,200)
  23.                 Power[n] = cmd.a   
  24.             else
  25.                 ui.addPopup(0,0,"Você já tem uma classificação ("..Power[n]..")! Não pode ser "..Power[n].." e "..cmd.a.." ao mesmo tempo!",n,300,150,200)
  26.             end
  27.         end
  28.     end
  29.     if c==string.lower(cmd.b) then
  30.         if canSelect==true then
  31.             if Power[n]~=cmd.a and Power[n]~=cmd.b then
  32.                 tfm.exec.bindKeyboard(n,32,true)
  33.                 tfm.exec.movePlayer(n,631,186,0,0,0,0)
  34.                 ui.addPopup(6679, 0, "Agora você é um "..cmd.b.."! Clique para soltar uma bomba!",n,300,150,200)
  35.                 Power[n] = cmd.a
  36.             else
  37.                 ui.addPopup(0,0,"Você já tem uma classificação ("..Power[n]..")! Não pode ser "..Power[n].." e "..cmd.b.." ao mesmo tempo!",n,300,150,200)
  38.             end
  39.         end
  40.     end
  41.     if c==string.lower(cmd.c) and adm[n] then
  42.         if canSelect==true then canSelect=false else canSelect=true         ui.addPopup(0,0,"Para ser um "..cmd.a.." digite !"..cmd.a.."\nPara ser um "..cmd.b.." digite !"..cmd.b,n,300,150,200) end
  43.     end
  44. end
  45. k = forca_da_bomba
  46. function eventKeyboard(n,k,d,x,y)
  47.     if k==32 then
  48.         if Power[n]==cmd.a or Power[n]==cmd.b then
  49.             if tfm.get.room.playerList[n].isFacingRight then
  50.                 tfm.exec.addShamanObject(23,tfm.get.room.playerList[n].x-10,y,0,k)
  51.             else
  52.                 tfm.exec.addShamanObject(23,tfm.get.room.playerList[n].x+10,y,0,-k)
  53.             end
  54.         else
  55.             ui.addPopup(0,0,"Para ser um "..cmd.a.." digite !"..cmd.a.."\nPara ser um "..cmd.b.." digite !"..cmd.b,n,300,150,200)
  56.         end
  57.     end
  58. end
Advertisement
Add Comment
Please, Sign In to add comment