I have a spell that creates magic walls around a player and this is used to trap people in my server but the problem with it is that if a player uses the spell near water or a border the magic wall appears on water, making it seem like the tile is walk able when it really isn't, can someone help me configure my spell so that it only spawns magic tiles on places that people can walk on, and not water or lava, or swamp, or any other border
this is the spell i use: I use OTX 2.9, Client 8.60, I wouldn't mind editing sources.
this is the spell i use: I use OTX 2.9, Client 8.60, I wouldn't mind editing sources.
Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat1, COMBAT_PARAM_CREATEITEM, 1497)
local arr1 = {
{0, 0, 0, 0, 0, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{0, 1, 0, 0, 0, 1, 0},
{0, 1, 0, 2, 0, 1, 0},
{0, 1, 0, 0, 0, 1, 0},
{0, 1, 1, 1, 1, 1, 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, 100, parameters)
end