• 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!

Disable mwalls in a specific area!! rep++

Bacheer

New Member
Joined
Jun 18, 2009
Messages
246
Reaction score
0
Location
Sweden
How i make so the magicwall don't work in this area:

PHP:
local config = {
	arena = {
		frompos = {x = 32353, y = 31886, z =7},
		topos = {x = 32384, y = 31904, z=7}
	}
}

Please help! i rep++
 
LUA:
local from = {x = 32353, y = 31886, z = 7}
local to = {x = 32384, y = 31904, z = 7}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isInRange(getCreaturePosition(cid), from, to) then
		return doPlayerSendCancel(cid, "Sorry, not possible.")
	end
	
	return true
end
 
This is the script where do i put it?

PHP:
local TilePos = {x=32359, y=32239, z=7, stackpos = 1}

local config = {
	arena = {
		frompos = {x = 32353, y = 31886, z =7},
		topos = {x = 32384, y = 31904, z=7}
	}
}


--function onThink(interval)
--doBroadcastMessage("Deadly Spider event will start after 15 minutes! The teleport to arena is located in temple.", MESSAGE_EVENT_ADVANCE)
--addEvent(BC2, 5 * 60 * 1000)
--end

function onTime(interval, lastExecution)
doBroadcastMessage("LastManAlive event will start after 10 minutes! The teleport to arena is located in temple.", MESSAGE_EVENT_ADVANCE)
addEvent(BC3, 5 * 60 * 1000)
return true
end

function BC3()
doBroadcastMessage("LastManAlive event will start after 5 minutes! The teleport to arena is located in temple. You can\'t enter arena during the event, so hurry up and don\'t be late!", MESSAGE_EVENT_ADVANCE)
addEvent(Spawn, 5 * 60 * 1000)
addEvent(BC4, 5 * 60 * 1000)
end

function BC4()
doItemSetAttribute(getThingFromPos(TilePos).uid, "aid", 7796)
doBroadcastMessage("LastManalive event started and Effected Zombiiiee\'s are being summoned. Winner is the player who dies last. Good luck!", MESSAGE_EVENT_ADVANCE)
doSendMagicEffect({x=32359, y=32239, z=7}, 6)
end

function Spawn()
	if #getPlayersfromArea(config.arena.frompos, config.arena.topos) < 1 then
		local monsters = getMonstersfromArea(config.arena.frompos, config.arena.topos)
		doItemSetAttribute(getThingFromPos(TilePos).uid, "aid", 7795)
		for _, monster in ipairs(monsters) do
			doRemoveCreature(monster)
		end
	else
		addEvent(Spawn, 1 * 15 * 1000)
		doSummonCreature("Infected Zombiiiee", {x = 32368, y = 31895, z=7})
		doSendMagicEffect({x = 32368, y = 31895, z=7}, 10)
	end
	return true
end
 
You don't put it in that script. Make a new lua file in actions..
ain't return false needed so the mwall can't be shot?

Code:
[FONT=monospace]return doPlayerSendCancel(cid, "Sorry, not possible.") and false
[/FONT]


 
Back
Top