local event_areas = {
{{x = 940, y = 987, z = 7}, {x = 947, y = 994, z = 7}}, -- {{from},{to}}
{{x = 950, y = 989, z = 7}, {x = 956, y = 995, z = 7}}
}
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 33000)
setConditionFormula(condition, 0.3, -24, 0.3, -24)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
local cid_pos = getThingPosition(cid)
for i = 1, #event_areas do
if isInArea(cid_pos, event_areas[i][1], event_areas[i][2]) then
doPlayerSendCancel(cid, "You cannot use any runes in event zone.")
return false
end
end
return doCombat(cid, combat, var)
end