function onUse(cid, item, frompos, item2, topos)
queststatus = getPlayerStorageValue(cid,7777)
topos = getPlayerPosition(cid)
if item.actionid == 1555 and queststatus == -1 and getPlayerVocation(cid) == 1 then
if getPlayerLevel(cid) < 20 then
setPlayerStorageValue(cid,7777,1)
doPlayerSendTextMessage(cid,24,message)
doSendMagicEffect(topos,30)
doPlayerAddMagLevel(cid, 10)
doPlayerAddExperience(cid, (getExperienceForLevel(20) - getPlayerExperience(cid)))
end
elseif item.actionid == 1555 and queststatus == -1 and getPlayerVocation(cid) == 2 then
if getPlayerLevel(cid) < 20 then
setPlayerStorageValue(cid,7777,1)
doPlayerSendTextMessage(cid,24,message)
doSendMagicEffect(topos,30)
doPlayerAddMagLevel(cid, 10)
doPlayerAddExperience(cid, (getExperienceForLevel(20) - getPlayerExperience(cid)))
end
elseif item.actionid == 1555 and queststatus == -1 and getPlayerVocation(cid) == 3 then
if getPlayerLevel(cid) < 20 then
setPlayerStorageValue(cid,7777,1)
doPlayerSendTextMessage(cid,24,message)
doSendMagicEffect(topos,30)
doPlayerAddMagLevel(cid, 5)
doPlayerAddExperience(cid, (getExperienceForLevel(20) - getPlayerExperience(cid)))
doPlayerAddSkill(cid, SKILL_DISTANCE, 6)
doPlayerAddSkill(cid, SKILL_SHIELDING, 5)
end
elseif item.actionid == 1555 and queststatus == -1 and getPlayerVocation(cid) == 4 then
if getPlayerLevel(cid) < 20 then
setPlayerStorageValue(cid,7777,1)
doPlayerSendTextMessage(cid,24,message)
doSendMagicEffect(topos,30)
doPlayerAddMagLevel(cid, 2)
doPlayerAddExperience(cid, (getExperienceForLevel(20) - getPlayerExperience(cid)))
doPlayerAddSkill(cid, SKILL_AXE, 5)
doPlayerAddSkill(cid, SKILL_SHIELDING, 5)
end
elseif queststatus == 1 then
doPlayerSendCancel(cid,cancel)
doSendMagicEffect(topos, CONST_ME_POFF)
end
return TRUE
end