• 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 position spell

andree

New Member
Joined
Feb 19, 2014
Messages
70
Reaction score
4
targeting spell changes its position graphics, when i move. wants to graphic was always in one place, even as i stand in a different direction from the enemy

video


will always be such as in the fifth second

script:

Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 1)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 82)

function getDmg_Brush_4(cid, level, maglevel)
    return (3000)*-1,(3500)*-1 
end
setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_4")

local 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, 2, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 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},
}

local area1 = createCombatArea(arr1)

setCombatArea(combat1, area1)



local function onCastSpell1(parameters)
    doCombat(parameters.cid, parameters.combat1, parameters.var)
end



function onCastSpell(cid, var) 
local parameters = { cid = cid, var = var, combat1 = combat1 }
addEvent(onCastSpell1, 300, parameters)

return true
end
 
I can't answer your question but I think that naruto theme is amazing! Good job!
 
Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 1)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 255)

function getDmg_Brush_4(cid, level, maglevel)
return (3000)*-1,(3500)*-1
end

setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_4")

local function onCastSpell1(parameters, target)
doSendMagicEffect(getCreaturePosition(target), 82)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, }
local target = getCreatureTarget(cid)
addEvent(onCastSpell1, 300, parameters, target)

return true
end

Check that. I don't know if it is what you wanted, if not tell me more details.

By the way, you should create a thread in "Requests" not here.
 
does not work :/ now looks like this
wjc79g.jpg
 
Tell me more details. Is it targeted spell? Where should the effect be, on player who use it or on target?
 
yes. its a target. the effect of the 5x5 fields. I want to graphic was in the middle of the target
 
Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 1)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 255)

function getDmg_Brush_4(cid, level, maglevel)
return (3000)*-1,(3500)*-1
end

setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_4")

local function onCastSpell1(parameters, target)
local targetpos = { x=getCreaturePosition(target).x + 2, y=getCreaturePosition(target).y + 2, z=getCreaturePosition(target).z }
doSendMagicEffect(targetpos, 82)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, }
local target = getCreatureTarget(cid)
addEvent(onCastSpell1, 300, parameters, target)

return true
end

Try this and see results. If it's still in wrong position try to change "+ 2" in this to for example +1, +3 maybe -1 or something like that.
Code:
x=getCreaturePosition(target).x + 2, y=getCreaturePosition(target).y + 2,
 
Back
Top