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

[Spell] Need help with singel-target spell ...hit 3 times

cover

New Member
Joined
Aug 31, 2007
Messages
6
Reaction score
0
I need help with singel-target spell witch hits 3 times
some thing like exori mort ... but 3 times that
for druids and sorc's
 
try adding
Code:
local repeatAmount = 3
at the top of the spell script.. i think it may work (only tested with big spell, not target)
 
nah don't work that way lol... you need to use the variable too, i see you got that from my script but meeh........

if cover paste code of exori mort spell i can fix it, i dont have access to opentibia files atm......
 
Code:
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)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
LUA:
local repeatAmount = 3

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)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

function castSpell(cid, var)
    if(isCreature(cid)) then
        return doCombat(cid, combat, var)
    end
end

function onCastSpell(cid, var)
    for i = 0, repeatAmount-1 do
        addEvent(castSpell, 300 * i, cid, var)
    end
    return true
end
 
Back
Top