Advertisement
adrianoswatt

CastleSys Salvo - TalkAction

Oct 16th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. local gSto = 123123 -- Global Storage que Salva Guild Dominante do Castelo
  2.  
  3. function onSay(cid, words, param)
  4.     if getGlobalStorageValue(gSto) ~= getPlayerGuildId(cid) then
  5.         doPlayerSendCancel(cid,"Você não possui o Castelo.")
  6.     return TRUE
  7.     end
  8.     if (doPlayerRemoveItem(cid,2160,1)) then
  9.         doPlayerAddItem(cid,2173,1) -- coloque id do shield aqui
  10.         doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
  11.         doCreatureSay(cid, "Agora estou salvo.", TALKTYPE_ORANGE_1)
  12.     else
  13.         doPlayerSendCancel(cid, 'You do not have 10000 gold coins.')
  14.         doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
  15.     end
  16. return TRUE
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement