• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action [TFS 1.0] Regenerative Herb

Jaed Le Raep

★Gaeming★
Joined
Sep 3, 2007
Messages
1,296
Reaction score
441
Hey guys, here's a script that when you use item id 2802 (sling herb), it'll consume it and give you 10 seconds of regeneration. In this regeneration, every 2 seconds you'll get healed for 10 hp, meaning 50hp healed over 10 seconds :) It also comes with its own exhaust, which you can edit any which way you like. Credits to @Ninja for being a part of helping to fix this script.

Code:
local exhaust = createConditionObject(CONDITION_EXHAUST_HEAL)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 15000)

local regeneration = createConditionObject(CONDITION_REGENERATION)
setConditionParam(regeneration, CONDITION_PARAM_SUBID, 1)
setConditionParam(regeneration, CONDITION_PARAM_BUFF_SPELL, 1)
setConditionParam(regeneration, CONDITION_PARAM_BUFF, true)
setConditionParam(regeneration, CONDITION_PARAM_TICKS, 1 * 10 * 1000)
setConditionParam(regeneration, CONDITION_PARAM_HEALTHGAIN, 10)
setConditionParam(regeneration, CONDITION_PARAM_HEALTHTICKS, 2000)


function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerItemById(cid, 0, 2802) and (getCreatureCondition(cid, CONDITION_EXHAUST_HEAL) == false) then
    doAddCondition(cid, exhaust)
    doAddCondition(cid, regeneration)
    doRemoveItem(item.uid, 1)
    doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
    return true
else
    doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
    doPlayerSendCancel(cid, "You cannot eat another herb yet.")
    return true
end
end
 
Last edited:
Back
Top