Advertisement
Guest User

Actions/Scripts

a guest
May 29th, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. local exp = 0.2
  2. local expfinal = 1 --Não mude, isso é para a experiencia voltar ao normal.
  3. local tempo = 24*60*60 -- 1000 = 1s
  4. local time = os.time() + tempo
  5. local pos = {x=160, y=54, z=7}
  6.  
  7. function onUse(cid)
  8.  
  9. if getPlayerStorageValue(cid, 82037) == 2 then
  10. doPlayerSendTextMessage(cid, 30, "Você já usou esta alavanca.")
  11. return true
  12. end
  13.  
  14. if getPlayerGuildId(cid) > 0 then
  15. for _, pid in pairs(getPlayersOnline()) do
  16. if getPlayerGuildId(pid) == getPlayerGuildId(cid) and pid ~= cid then
  17. setPlayerStorageValue(pid, 82037, 2)
  18. setPlayerStorageValue(cid, 82037, 2)
  19. setPlayerStorageValue(cid, 82039, os.time() + tempo)
  20. setPlayerStorageValue(pid, 82039, os.time() + tempo)
  21. doBroadcastMessage("O jogador "..getCreatureName(cid).." da guild " ..getPlayerGuildName(cid).. " venceu o castle experience ", MESSAGE_INFO_DESCR)
  22. doBroadcastMessage("O jogador "..getCreatureName(cid).." da guild " ..getPlayerGuildName(cid).. " venceu o castle experience ", MESSAGE_INFO_DESCR)
  23. doBroadcastMessage("O jogador "..getCreatureName(cid).." da guild " ..getPlayerGuildName(cid).. " venceu o castle experience ", MESSAGE_INFO_DESCR)
  24. doBroadcastMessage("O jogador "..getCreatureName(cid).." da guild " ..getPlayerGuildName(cid).. " venceu o castle experience ", MESSAGE_INFO_DESCR)
  25. doBroadcastMessage("O jogador "..getCreatureName(cid).." da guild " ..getPlayerGuildName(cid).. " venceu o castle experience ", MESSAGE_INFO_DESCR)
  26. doPlayerSendTextMessage(cid, 30, "O jogador ("..getCreatureName(cid)..") da sua guild ganhou, voce tem 20% a mais de exp por 24 horas.")
  27. doPlayerSendTextMessage(pid, 30, "O jogador ("..getCreatureName(cid)..") da sua guild ganhou, voce tem 20% a mais de exp por 24 horas.")
  28. doTeleportThing(cid, pos)
  29. doSendMagicEffect(cid, 6)
  30. end
  31. end
  32. else
  33. doPlayerSendCancel(cid, "Você não tem guild.")
  34. end
  35. return true
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement