• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

how to disable magicwall in a specifik area!! rep++

Bacheer

New Member
Joined
Jun 18, 2009
Messages
246
Reaction score
0
Location
Sweden
Hello!

How i disable magicwall in a specific area etc. inside an event??

rep if help!
 
Last edited:
If you don't want to edit sources, use my script!!
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
 
function onCastSpell(cid, var)
	local pos = variantToPosition(var)
	if getTileInfo(getThingPos(cid)).protection or getTileInfo(pos).protection then
		return not doPlayerSendDefaultCancel(cid, RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE)
	end

	local v = getTileItemByType(pos, ITEM_TYPE_MAGICFIELD).uid
	if v ~= 0 then
		doRemoveItem(v)
	end

	v = doCreateItemEx(1497)
	if doTileAddItemEx(pos, v) == 1 and getTileItemByType(pos, ITEM_TYPE_MAGICFIELD).uid ~= 0 then
		doDecayItem(v)
		return doCombat(cid, combat, var)
	else
		return not doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHROOM)
	end
end
Besides, it won't give you a PZBlock!
 
Well, why don't make it to add pzblock when used magicwall? or tell me in what source i should edit?:O

help :(
 
Last edited by a moderator:
Back
Top