function onUse(cid, item, frompos, item2, topos)
local mlGain = 3 -- quantidade de ml que ira ganhar o player
local skillGain = 5 -- quantidade de skill que ira ganhar o player
if (getPlayerStorageValue(cid, 602032) < 1) then
if (getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 or getPlayerVocation(cid) == 15 or getPlayerVocation(cid) == 16) then
doPlayerAddMagLevel(cid, mlGain)
doCreatureSay(cid,"Voce ganhou "..mlGain.." magic leveis!",TALKTYPE_ORANGE_1)
end
if (getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8) then
doPlayerAddSkill(cid, 2, skillGain)
doPlayerAddSkill(cid, 3, skillGain)
doCreatureSay(cid,"Voce ganhou "..skillGain.." skills!",TALKTYPE_ORANGE_1)
end
if (getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7) then
doPlayerAddSkill(cid, 4, skillGain)
doCreatureSay(cid,"Voce ganhou "..skillGain.." skills!",TALKTYPE_ORANGE_1)
end
if (getPlayerVocation(cid) == 13 or getPlayerVocation(cid) == 14) then
doPlayerAddSkill(cid, 1, skillGain)
doCreatureSay(cid,"Voce ganhou "..skillGain.." skills!",TALKTYPE_ORANGE_1)
end
if (getPlayerVocation(cid) == 17 or getPlayerVocation(cid) == 18) then
doPlayerAddSkill(cid, 3, skillGain)
doCreatureSay(cid,"Voce ganhou "..skillGain.." skills!",TALKTYPE_ORANGE_1)
end
setPlayerStorageValue(cid, 602032, 1)
else
doCreatureSay(cid,"Voce ja fez esta quest.",TALKTYPE_ORANGE_1)
end
return TRUE
end