zerghel
Tsuni
- Joined
- Jul 1, 2008
- Messages
- 299
- Reaction score
- 9
As title says i need addCreatureMaxHealth 'cause setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+1000) is not working properly when a player is wearing a +%hp item. =/
the script adds 1000 max hp each use
but adds more than 1000 hp when player is wearing such items on set
example:
armor +23% hp
helmet +23% hp
when using the script adds like 4k hp not 1k as the script says
i dunno how to solve this one but creating this function maybe!
but i'm not a scripter myself =/
Code:
function onUse(cid, item, frompos, item2, topos)
if (getPlayerStorageValue(cid, STORAGE) < 1) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+1000)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your Health Is Now: " .. getCreatureMaxHealth(cid) .. ".")
doRemoveItem(item.uid, 1)
else
doPlayerSendTextMessage(cid, 22, "can not use it!")
end
end
the script adds 1000 max hp each use
but adds more than 1000 hp when player is wearing such items on set
example:
armor +23% hp
helmet +23% hp
when using the script adds like 4k hp not 1k as the script says
i dunno how to solve this one but creating this function maybe!
but i'm not a scripter myself =/
Last edited: