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

darcioantonio

www.adventurerpg.com.br
Joined
Jul 30, 2013
Messages
135
Solutions
1
Reaction score
2
Location
Brasil
This is my spell, it's a wave that have 3 steps. Once I move my character in the middle of the spells it moves to a different way of the intended!

Lua:
<instant group="attack" spellid="59" name="Tremor" words="skill 1" lvl="70" mana="10" prem="0" needweapon="1" direction="0"  cooldown="1000" groupcooldown="1000" needlearn="0" script="novas magias/tremor.lua">
        <vocation name="Mago"/>
        <vocation name="Bruxo"/>
        <vocation name="Arqueiro"/>
        <vocation name="Caçador"/>
        <vocation name="Guerreiro"/>
        <vocation name="Gladiador"/>
    </instant>

Lua:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_STUN)
function getDmg_Brush(cid, level, maglevel)
    return (10) * -1, (20) * -1
end
setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_STUN)
function getDmg_Brush(cid, level, maglevel)
    return (10) * -1, (20) * -1
end
setCombatCallback(combat2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_STUN)
function getDmg_Brush(cid, level, maglevel)
    return (10) * -1, (20) * -1
end
setCombatCallback(combat3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

arr1 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}

arr2 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}

arr3 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
local function onCastSpell1(parameters)
    doCombat(parameters.cid, parameters.combat1, parameters.var)
end
local function onCastSpell2(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end
local function onCastSpell3(parameters)
    doCombat(parameters.cid, parameters.combat3, parameters.var)
end

function onCastSpell(cid, var)
    local parameters = {cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3}
    addEvent(onCastSpell1, 100, parameters)
    addEvent(onCastSpell2, 200, parameters)
    addEvent(onCastSpell3, 300, parameters)
end
 
Last edited:
OP
OP
darcioantonio

darcioantonio

www.adventurerpg.com.br
Joined
Jul 30, 2013
Messages
135
Solutions
1
Reaction score
2
Location
Brasil
it didn't work, I already tried like that

Lua:
<instant group="attack" spellid="59" name="Tremor" words="skill 1" lvl="70" mana="10" prem="0" needweapon="1" direction="0"  cooldown="1000" groupcooldown="1000" needlearn="0" script="novas magias/tremor.lua">
        <vocation name="Mago"/>
        <vocation name="Bruxo"/>
        <vocation name="Arqueiro"/>
        <vocation name="Caçador"/>
        <vocation name="Guerreiro"/>
        <vocation name="Gladiador"/>
    </instant>
 

Ascuas Funkeln

Rakkedo Game
Joined
Apr 14, 2013
Messages
516
Solutions
30
Reaction score
268
Location
Poland
GitHub
AscuasFunkeln
"direction="0" ->"direction="1"
Lua:
function onCastSpell(cid, var)
    local start = getCreaturePosition(cid)
    local parameters = {cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3}
    addEvent(onCastSpell1, 100, parameters, start)
    addEvent(onCastSpell2, 200, parameters, start)
    addEvent(onCastSpell3, 300, parameters, start)
end
 

Levi999x

AoT
Joined
Dec 14, 2017
Messages
1,802
Solutions
35
Reaction score
1,002
Location
Germany
"direction="0" ->"direction="1"
Lua:
function onCastSpell(cid, var)
    local start = getCreaturePosition(cid)
    local parameters = {cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3}
    addEvent(onCastSpell1, 100, parameters, start)
    addEvent(onCastSpell2, 200, parameters, start)
    addEvent(onCastSpell3, 300, parameters, start)
end

still has some problems tho
 

Peonso

Godly Member
Joined
Jan 14, 2008
Messages
1,638
Solutions
27
Reaction score
1,314
Top