function onUse(cid, item, fromPosition, itemEx, toPosition)
pid = getPlayerGUID(cid)
if getPlayerVocation(cid) == 1 and getPlayerLevel(cid) ~= 250 then
doPlayerSetVocation(cid, 9)
doPlayerAddExp(cid, -(getPlayerExperience(cid)-getExperienceForLevel(8)))
doPlayerAddHealth(cid, -getplayerHealth(cid)-185)
doPlayerAddMana(cid, -getPlayerMana(cid)+35)
setCreatureMaxHealth(cid, -setCreatureMaxHealth(cid)+185)
setCreatureMaxMana(cid, -setCreatureMaxMana(cid)+35)
doPlayerSetMaxCapacity(cid, 435)
doSendMagicEffect(getCreaturePosition(cid), 13)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = ".. 20 ..", `experience` = ".. 4200 ..",`manamax` = ".. 35 ..",`healthmax` = ".. 1850 ..",`health` = ".. 1850 ..",`mana` = ".. 35 .." WHERE `id` = "..pid)
for id=1, 8 do
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 10 .." WHERE `player_id` = ".. getPlayerGUID(cid) .. " and `skillid` = ".. id ..";")
end
return TRUE
elseif getPlayerVocation(cid) == 2 and getPlayerLevel(cid) ~= 250 then
doPlayerSetVocation(cid, 9)
doPlayerAddExp(cid, -(getPlayerExperience(cid)-getExperienceForLevel(8)))
doPlayerAddHealth(cid, -getplayerHealth(cid)+100)
doPlayerAddMana(cid, -getPlayerMana(cid)+35)
setCreatureMaxHealth(cid, -setCreatureMaxHealth(cid)+185)
setCreatureMaxMana(cid, -setCreatureMaxMana(cid)+35)
doPlayerSetMaxCapacity(cid, 435)
doSendMagicEffect(getCreaturePosition(cid), 13)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = ".. 20 ..", `experience` = ".. 4200 ..",`manamax` = ".. 35 ..",`healthmax` = ".. 1850 ..",`health` = ".. 1850 ..",`mana` = ".. 35 .." WHERE `id` = "..pid)
for id=2, 8 do
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 10 .." WHERE `player_id` = ".. getPlayerGUID(cid) .. " and `skillid` = ".. id ..";")
end
return TRUE
elseif getPlayerVocation(cid) == 3 and getPlayerLevel(cid) ~= 250 then
doPlayerSetVocation(cid, 9)
doPlayerAddExp(cid, -(getPlayerExperience(cid)-getExperienceForLevel(8)))
doPlayerAddHealth(cid, -getplayerHealth(cid)+185)
doPlayerAddMana(cid, -getPlayerMana(cid)+35)
setCreatureMaxHealth(cid, -setCreatureMaxHealth(cid)+185)
setCreatureMaxMana(cid, -setCreatureMaxMana(cid)+35)
doPlayerSetMaxCapacity(cid, 435)
doSendMagicEffect(getCreaturePosition(cid), 13)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = ".. 20 ..", `experience` = ".. 4200 ..",`manamax` = ".. 35 ..",`healthmax` = ".. 1850 ..",`health` = ".. 1850 ..",`mana` = ".. 35 .." WHERE `id` = "..pid)
for id=3, 8 do
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 10 .." WHERE `player_id` = ".. getPlayerGUID(cid) .. " and `skillid` = ".. id ..";")
end
return TRUE
elseif getPlayerVocation(cid) == 4 and getPlayerLevel(cid) ~= 250 then
doPlayerSetVocation(cid, 9)
doPlayerAddExp(cid, -(getPlayerExperience(cid)-getExperienceForLevel(8)))
doPlayerAddHealth(cid, -getplayerHealth(cid)-1850)
doPlayerAddMana(cid, -getPlayerMana(cid)+35)
setCreatureMaxHealth(cid, -setCreatureMaxHealth(cid)-1850)
setCreatureMaxMana(cid, -setCreatureMaxMana(cid)+35)
doPlayerSetMaxCapacity(cid, 35)
doSendMagicEffect(getCreaturePosition(cid), 13)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = ".. 8 ..", `experience` = ".. 4200 ..",`manamax` = ".. 35 ..",`healthmax` = ".. 1850 ..",`health` = ".. 1850 ..",`mana` = ".. 35 .." WHERE `id` = "..pid)
for id=4, 8 do
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 10 .." WHERE `player_id` = ".. getPlayerGUID(cid) .. " and `skillid` = ".. id ..";")
end
return TRUE
else
doPlayerSendCancel(cid, "Você não pode mais Resetar!")
end
return TRUE
end