Testa ai:
function onUse(cid, item, frompos)
local pid = getPlayerGUID(cid)
local level = 400
local manaxx = getCreatureMaxMana(cid)/2
local healthmaxx = getCreatureMaxHealth(cid)/2
local health = getCreatureHealth/2
local mana = getCreatureMana/2
if not getTilePzInfo(getCreaturePosition(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'O item so pode usar em protection zones.')
return true
end
if getPlayerLevel(cid) >= level then
if getPlayerStorageValue(cid, 96667) == -1 then
setPlayerStorageValue(cid, 96667, 0)
end
setPlayerStorageValue(cid, 96667, getPlayerStorageValue(cid, 96667)+1)
doRemoveItem(item.uid)
doRemoveCreature(cid)
db.executeQuery("UPDATE players SET mana = mana WHERE id = " .. pid)
db.executeQuery("UPDATE players SET manamax = manamaxx WHERE id = " .. pid)
db.executeQuery("UPDATE players SET health = health WHERE id = " .. pid)
db.executeQuery("UPDATE players SET healthmax = healthmaxx WHERE id = " .. pid)
db.executeQuery("UPDATE players SET level = 8 WHERE id = " .. pid)
end
return true
Obs: Não testei





info
Grupo: Campones
Registrado: 27/01/12
Posts: 5
Reputação: 0
Eu possuo um script de reset por livro so que ele não esta dando certo
ele so some o livro e volta pro lv 8 eu queria que alguem mi ajudaçe a modificar para que
ele resetasse voltesse para o lv 8 so que com metade do hp e mp e assim
iria acumular grato