Made this script like a month ago.
Realized now that it wouldn't work. Fixed it and now it's here to the public.
I will most certainly not give you the "movements.xml" part.
If you can't do that yourself then you're shit outta luck.
AFTER MANY EDITS. It should work now.
Realized now that it wouldn't work. Fixed it and now it's here to the public.
I will most certainly not give you the "movements.xml" part.
If you can't do that yourself then you're shit outta luck.
Lua:
---CONFIG---
local config = {
hp = getCreatureHealth(cid),
mp = getCreatureMana(cid),
maxHp = getCreatureMaxHealth(cid),
maxMp = getCreatureMaxMana(cid),
healthheal = config.maxHp - config.hp,
manaheal = config.maxMp - config.mp
}
function onStepIn(cid, item, position, fromPosition)
if (isPlayer(cid)) then
if (config.hp < config.maxHp) then
doSendAnimatedText(getCreaturePosition(cid), "+" .. config.healthheal, CONST_ANI_RED)
doPlayerAddHealth(cid, config.healthheal)
end
if (config.mp < config.maxMp) then
doSendAnimatedText(getCreaturePosition(cid), "+" .. config.manaheal, CONST_ANI_BLUE)
doPlayerAddMana(cid, config.manaheal)
end
end
return true
end
AFTER MANY EDITS. It should work now.
Last edited: