Hello OTland, I have a problem with my script in that it says it will deal damage every 3 seconds (which is what I would like it to do), but deals damage like 3/4x a second. I've tried other values and it doesn't change anything so I know it's a problem with how its scripted. Can someone fix the problem for me please?
Here is the script:
It deals damage 30x but like i said, 3/4 times a second rather than once a second.
Thanks,
Sam
Here is the script:
Code:
local combat = createCombatObject()
local getPlayerLevel
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
function onGetFormulaValues(cid, level, skill)
min = -level*1.5 -skill*5.5
max = -level*1.6 -skill*5.6
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function healMe(i, parameters)
if i > 0 and isPlayer(parameters.cid) then
i = i-1
addEvent(healMe, 3000, i, parameters)
doCombat(parameters.cid, parameters.combat, parameters.var)
end
end
function onCastSpell(cid, var)
local i = 30
local parameters = {cid = cid, var = var, combat = combat}
healMe(i, parameters)
return doCombat(cid, combat, var)
end
It deals damage 30x but like i said, 3/4 times a second rather than once a second.
Thanks,
Sam