TFS 1.2. How can i prevent magic wall macro abuse where people place new magic wall on the same position without any delay and can basically trap someone permanently, so its like when they put magic wall the see the timer and with scripts when the timer ends they put new magic wall on same position with zero delay. In spells.xml casting delay is 1 second, overall magic wall stays for 10 seconds, dont wantto make magic wall casting delay for 11 seconds that would be terrible solution
LUA:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, 18)
combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_MAGICWALL)
function onCastSpell(creature, var, isHotkey)
local targetPosition = variantToPosition(var)
local targetTile = Tile(targetPosition)
local targetZoneId = targetTile and targetTile:getZoneId()
local blockedZoneId = 6438
if targetZoneId == blockedZoneId then
creature:sendCancelMessage("You can't cast magic wall here.")
return false
end
return combat:execute(creature, var)
end
