• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Transform giving HP?

metiu11

Member
Joined
Mar 26, 2011
Messages
94
Solutions
2
Reaction score
5
Heyo, i got the problem with script


function onCastSpell(cid, var)

if getPlayerVocation(cid) == 1 then
if getPlayerLevel(cid) >= 30 then
if exhaustion.get(cid,61260) == false then
doPlayerSetVocation(cid,2)
doCreatureChangeOutfit(cid, {lookType=4})
doSendMagicEffect(getCreaturePosition(cid), 208)
doCreatureAddHealth(cid, 0)
doCreatureAddMana(cid, 0)
setCreatureMaxHealth(cid, 2000)
setCreatureMaxMana(cid, 0)
exhaustion.set(cid,61260,0)

end
return true
end
doPlayerSendCancel(cid, "Text")

end
end


I want to give X hp and X mana when they used this spell.
doCreatureAddHealth(cid, 0) - heal X hp
setCreatureMaxHealth(cid, 0) - Add new "full HP"

When i used this script my character with 5000 hp got 5000/2000 HP xD

How can i give them X hp ? (calculate with actually hp)
 
Back
Top