Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local price = 20000 -- em Gold Por Bless
- local gSto = 123123 -- Global Storage que Salva Guild Dominante do Castelo
- function onSay(cid, words, param)
- if getGlobalStorageValue(gSto) ~= getPlayerGuildId(cid) then
- return doPlayerSendCancel(cid, 'You need to join the guild that dominates the castle to use this command.')
- end
- if getPlayerMoney(cid) >= price then
- x = 0
- for i = 1, 5 do
- if getPlayerBlessing(cid, i) == false then
- if getPlayerMoney(cid) >= price then
- doPlayerAddBlessing(cid, i)
- doPlayerRemoveMoney(cid, price)
- x = x + 1
- else
- doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You don\'t have more money, you have been '..x..' blesse(s)!')
- return true
- end
- end
- if i == 5 then
- if x == 0 then
- doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You already been blessed by the Gods!')
- else
- doSendMagicEffect(getPlayerPosition(cid), 28)
- doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Congratulations, you have been all blessed by the Gods!')
- end
- end
- end
- else
- doPlayerSendCancel(cid,"You need "..price.." gold coins per bless!")
- end
- return TRUE
- end
Advertisement
Add Comment
Please, Sign In to add comment