• 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!

[REQUEST/HELP] I need a talkaction to heals overtime!

BlackList

PassingWrath.us
Joined
Aug 30, 2007
Messages
133
Reaction score
26
Hello,
I'm trying to make this script work but so far no luck :( So if someone could tell me the issue and help make this work, I'd greatly appreciate it.

Basically, I want it, so when player is located on position "player" and talkaction is called upon it will check position and make sure it's correct, then begin healing 2 seconds for the next 2 minutes.

So far what I have is this code, mostly coded by me and imported someone elses work, the exhaustion and event(time)(?), all others is mine.
Lua:
local healthgain = 75local player = {x = 1247, y = 1054, z = 7, stackpos = 3}
 
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 10))


function onSay(cid, words, param, channel, fromPosition, toPosition)
    if getCreaturePosition(cid, player) == true then
       return FALSE
        end
        
    if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
        doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
        return TRUE
    end


 
 
for i = 1,3 do
   addEvent(doCreatureAddHealth(cid, healthgain))
end
 
    doAddCondition(cid, exhaust)
    return TRUE
end

Thanks,
Jeff
 
Back
Top