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

Script that heal ticks?

clario

OTS based on Heroes III Might and Magic
Joined
Feb 4, 2018
Messages
98
Reaction score
5
Hello PPL! i need to know what im doing wrong here :
local time = 240 * 1000 -- 120 * 1000 = 2 min
local addFist = 5 -- how much shielding should be added


local wolf = {lookType = 20}
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local outfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(outfit, CONDITION_PARAM_TICKS, 240 * 1000)
addOutfitCondition(outfit, {lookType = 20})
setCombatCondition(combat, outfit)


local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, time)
setConditionParam(condition, CONDITION_PARAM_SKILL_FISTPERCENT, 120)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)

local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, time)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 15)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 2000)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Here's a look for hp/mp and fist skill
oUQVoLf.gif


What can i do to get this health regen ?
 
You should rename one of the conditions to condition2 or something. Since now they overlap eachother.
 
I WILL TRY I!


like that :
local condition2 = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition2, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition2, CONDITION_PARAM_BUFF, true)
setConditionParam(condition2, CONDITION_PARAM_TICKS, 4 * 100 * 1000)
setConditionParam(condition2, CONDITION_PARAM_HEALTHGAIN, 5)
setConditionParam(condition2, CONDITION_PARAM_HEALTHTICKS, 1000)
?

That dont work, will try another way ;)
@Printer should i do something at end ? for that condition ?

@EDIT 50%SOLVED ! THANKS TO @Printer ...
im so stupid Look at this :
"setCombatCondition(combat, condition2) " just needed to add this xd

BY OTHER HAND i have that problem whit this:
The next "transform" doesnt work and the begar conditions dont work too (werebear got 15/hp on 2 sec , beggar got 8 mana per 1 sec in script)
how can i solve it ?

kHLJg3E.gif


local condition2 = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition2, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition2, CONDITION_PARAM_BUFF, true)
setConditionParam(condition2, CONDITION_PARAM_TICKS, 3.5 * 60 * 1000)
setConditionParam(condition2, CONDITION_PARAM_MANAGAIN, 8)
setConditionParam(condition2, CONDITION_PARAM_MANATICKS, 1000)
setCombatCondition(combat, condition2)


KK i solved it by myself i add
exhaustion="20000"
to every spell and i got it right
 
Last edited:
Back
Top