Advertisement
Guest User

Untitled

a guest
Feb 12th, 2014
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. -- Baú que recompesará apenas sorceres e druids
  2. function onUse(cid, item, fromPos, itemEx, toPos)
  3.     -- Confere o valor do storage
  4.     if getPlayerStorageValue(cid, 71236) == -1 then
  5.         -- Confere se o jogador é druida ou mago
  6.         if getPlayerVocation(cid) % 4 == 1 or getPlayerVocation(cid) % 4 == 2 then
  7.             -- Adiciona 10 crystal coins (itemid = 2160)
  8.             doPlayerAddItem(cid, 2160, 10)
  9.             -- Muda o valor do storage 712367 para 1
  10.             setPlayerStorageValue(cid, 712367, 1)
  11.             -- Envia uma mensagem para o jogador
  12.             doPlayerSendTextMessage(cid, 25, "Parabens! Voce completou a quest e ganhou a recompensa.")
  13.         else
  14.             doPlayerSendTextMessage(cid, 25, "Esse bau e restrito a magos e druidas.")
  15.         end
  16.     else
  17.         doPlayerSendTextMessage(cid, 25, "Bau vazio.")
  18.     end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement