• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

How it works? (Spells)

Exura ATS

New Member
Joined
Feb 5, 2017
Messages
72
Reaction score
4
Hey!

Can someone teach me how this parameter works:
setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 60 * 1000)

I took it from my recovery.lua (spell script):
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 60 * 1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 20)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
   return doCombat(cid, combat, var)
end
 
LUA:
setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 60 * 1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 20)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000)

looking at those 3 lines what i think (and im pretty sure im right) is

1. calculate the time how long its gonna last, in this case 1 minute
2. how much health you gonna get
3. how many seconds before you get the amount of hp from point 2.

explanation: you get 20 hp every 3 sec, this buff lasts for a minute
 
LUA:
setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 60 * 1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 20)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000)

looking at those 3 lines what i think (and im pretty sure im right) is

1. calculate the time how long its gonna last, in this case 1 minute
2. how much health you gonna get
3. how many seconds before you get the amount of hp from point 2.

explanation: you get 20 hp every 3 sec, this buff lasts for a minute

Oh. Thanks man. But, why it's "1 * 60 * 1000"?
What does it mean?
 
technically yes, but you should avoid writing insane number and make them as simple as possible, you dont really want to end up writing numbers such as 9000000000 (i didnt even count how many zeros there are but theres many) and that becomes obnoxious in the long run
 
Back
Top