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

Lua [0.3.6] spell damage interval not working?

Samaster

Raptorserver.ddns.net
Joined
Jun 9, 2013
Messages
291
Reaction score
23
Location
UK
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:
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
 
Back
Top