freddzor11
Member
- Joined
- May 25, 2009
- Messages
- 695
- Reaction score
- 5
Hello! I got a small problem here... I use this magic wall rune script right now and that's good because you cannot magic wall inside zombie etc but now I can't even magic wall in town now, could someone fix this magicwall script?
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)
local ctfArena = {
frompos = {x=720, y=985, z=7},
topos = {x=756, y=1012, z=7},
}
local warArena = {
frompos = {x=716, y=937, z=7},
topos = {x=726, y=947, z=7},
}
function onCastSpell(cid, var)
if not isInArea(getPlayerPosition(cid), ctfArena.frompos, ctfArena.topos) and not isInArea(getPlayerPosition(cid), warArena.frompos, warArena.topos) and not isInArea(getPlayerPosition(cid), satanQuest.frompos, satanQuest.topos) then
return doCombat(cid, combat, var)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You may not use this rune here.")
end
end