local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1498)
local ctfArena = {
frompos = {x=31694, y=32709, z=7},
topos = {x=31744, y=32774, z=7},
}
local warArena = {
frompos = {x=31728, y=32704, z=7},
topos = {x=31755, y=32763, z=7},
}
local satanQuest = {
frompos = {x=771, y=2225, z=9},
topos = {x=775, y=2229, z=9},
}
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 in zombie or ctf events.")
end
end