Advertisement
Guest User

Untitled

a guest
Mar 17th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. --[[
  2.  
  3. Real Castle Event
  4. Desenvolvido por Vítor Bertolucci (Killua)
  5.  
  6. ]]
  7.  
  8. function onUse(cid, item, frompos, item2, topos)
  9. if item.uid == 61466 then
  10. local guild = getGlobalStorageValue(realCastle.guild_storage) > 1 and "a guild "..getGuildNameByID(getGlobalStorageValue(realCastle.guild_storage)).." possui o domínio" or "nenhuma guild possui o domínio do castelo"
  11. local sto = realCastle.date_storages
  12. local gsto = getGlobalStorageValue
  13. local time = gsto(sto[1]).."/"..gsto(sto[2]).."/"..gsto(sto[3])
  14. local domain = realCastle.isOpen() and "as guilds estão batalhando pelo domínio do castelo" or guild
  15. local msg = " ----------[Real Castle]---------\n\n\nAtualmente "..domain..".\n\nPróxima batalha: "..time.." às 21:00."
  16. doShowTextDialog(cid,8977,msg)
  17. return true
  18. end
  19. if not realCastle.isOpen() then
  20. doTeleportThing(cid,getTownTemplePosition(1))
  21. return true
  22. end
  23. if not realCastle.isDominating(cid) then
  24. realCastle.domain(cid)
  25. doSendMagicEffect(getThingPos(cid), CONST_ME_CRAPS)
  26. else
  27. doPlayerSendCancel(cid,"Sua guild já está com o domínio do castelo.")
  28. end
  29. return true
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement