• 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 Add two things into my spells

gmstrikker

Well-Known Member
Joined
Jul 30, 2014
Messages
458
Solutions
1
Reaction score
50
I wanted to add two things in my magic! How do I?

1 Time BUFF to be able to use an example again, I used this spell now, you can only use it later in 600 seconds

2 Take the time to get out the magic, you use it there opens a count of 3 seconds after it hits the target, that for several power combo!

Thank you!

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)

function onGetFormulaValues(cid, level, maglevel)
min = (level * 1 + maglevel * 4) * 0.8
max = (level * 1 + maglevel * 4) * 1.0
return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
doCastingTimeSpell(cid, combat, var, 1500)
return true
end
 
Which server do you use?
For the first one you can use storage and set the value with os.time(), so os.time() + 600.
The to check if the exhaustion/time is still there, compare the storagevalue with os.time(), the storagevalue will be higher when the exhaustion is still there.

What do you mean with the second one?
 
Which server do you use?
For the first one you can use storage and set the value with os.time(), so os.time() + 600.
The to check if the exhaustion/time is still there, compare the storagevalue with os.time(), the storagevalue will be higher when the exhaustion is still there.

What do you mean with the second one?

@Limos Not sure if I am necroposting, but I want to do something similar.

On the second point I think he means that when the spell is casted it deals damage, then after a short delay it hits again simulating a combo, but also giving the target a chance to get out of the spell area, like this:

mx3fEKB.gif


That's the animation from a spell I've been trying to script but I am not knowledgeable enough.
 
Last edited:
Back
Top