Dear Scripters and Readers!
After a long time away from OTs ive got a new idea for a server and will therefor need some help to finish the first steps to find out if the server will work or not.
An important thing for the server would be to have potions in wich heals over time.
Normal Health Potion Script:
What I need exactly is for the script to heal the player over time, as for example:
10HP every second to a maximum of 30HP. (So basicly 10HP 3 Times)
Note: Its important that its being a potions and not a rune.
Thank You for atleast reading.
Kind Regards,
Eldin.
After a long time away from OTs ive got a new idea for a server and will therefor need some help to finish the first steps to find out if the server will work or not.
An important thing for the server would be to have potions in wich heals over time.
Normal Health Potion Script:
Code:
local MIN = 30
local MAX = 30
local EMPTY_POTION = 7636
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) == FALSE then
return FALSE
end
if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end
if doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
return FALSE
end
doAddCondition(cid, exhaust)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
doTransformItem(item.uid, EMPTY_POTION)
return TRUE
end
What I need exactly is for the script to heal the player over time, as for example:
10HP every second to a maximum of 30HP. (So basicly 10HP 3 Times)
Note: Its important that its being a potions and not a rune.
Thank You for atleast reading.
Kind Regards,
Eldin.