Hello everyone, I want to know, is there any way to make something like:
I mean, so there will be random ticks, every spell cast.
I have tried everything, and cannot make it work. So, any ideas?
1)If we make this way, it will be rand_time = 0 when you casting spell
2)If declare rand_time = math.random(600000,1200000) before condition, it will be random, but it will be costant until I reload spells
3)Even if declare rand_time as global, and globaleven which will randomize, it's don't work....
Any ideas? xD
PHP:
local combatwarrior = createCombatObject()
setCombatParam(combatwarrior, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combatwarrior, COMBAT_PARAM_AGGRESSIVE, 0)
local conditionwarrior = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(conditionwarrior, CONDITION_PARAM_TICKS, rand_time)
function onCastSpell(cid, var)
rand_time = math.random(600000,1200000)
return doCombat(cid, combatwarrior, var)
end
I mean, so there will be random ticks, every spell cast.
I have tried everything, and cannot make it work. So, any ideas?
1)If we make this way, it will be rand_time = 0 when you casting spell
2)If declare rand_time = math.random(600000,1200000) before condition, it will be random, but it will be costant until I reload spells
3)Even if declare rand_time as global, and globaleven which will randomize, it's don't work....
Any ideas? xD
Last edited: