Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Baú que recompesará apenas sorceres e druids
- function onUse(cid, item, fromPos, itemEx, toPos)
- -- Confere o valor do storage
- if getPlayerStorageValue(cid, 71236) == -1 then
- -- Confere se o jogador é druida ou mago
- if getPlayerVocation(cid) % 4 == 1 or getPlayerVocation(cid) % 4 == 2 then
- -- Adiciona 10 crystal coins (itemid = 2160)
- doPlayerAddItem(cid, 2160, 10)
- -- Muda o valor do storage 712367 para 1
- setPlayerStorageValue(cid, 712367, 1)
- -- Envia uma mensagem para o jogador
- doPlayerSendTextMessage(cid, 25, "Parabens! Voce completou a quest e ganhou a recompensa.")
- else
- doPlayerSendTextMessage(cid, 25, "Esse bau e restrito a magos e druidas.")
- end
- else
- doPlayerSendTextMessage(cid, 25, "Bau vazio.")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement