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

Push a lever and players will get teleported!

mikkas70

Owner and Developer of omegaservers.org
Joined
Jan 6, 2009
Messages
42
Reaction score
8
Ok, I need a script that will do this:
When you push a lever, all the players in the "target zone" will be teleported each one to different places ( This will be usefull for my PVP arena )

Example:
X different players in different squares (obviously) , they'll be teleported at the same time, each one to a different square.

Sorry about my english!
Any help will be apreciated!
 
Just change this Annihilator script
LUA:
local from={x=33222, y=31693, z=14}
local to={x=33240, y=31701, z=14}
 
local summon={
	{x=33224, y=31695, z=14},
	{x=33226, y=31695, z=14},
	{x=33228, y=31697, z=14},
	{x=33229, y=31697, z=14},
	{x=33227, y=31699, z=14},
	{x=33225, y=31699, z=14}
}
 
local playerA={
	{x=33224, y=31671, z=13},
	{x=33223, y=31671, z=13},
	{x=33222, y=31671, z=13},
	{x=33221, y=31671, z=13}
}
local playerB={
	{x=33227, y=31697, z=14},
	{x=33226, y=31697, z=14},
	{x=33225, y=31697, z=14},
	{x=33224, y=31697, z=14}
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local t = {}
	if item.itemid == 1945 then
		for i = 1, 4 do
			t[i]=getTopCreature(playerA[i]).uid
			if t[i] == 0 or not isPlayer(t[i]) then
				return doPlayerSendCancel(cid, 'You need 4 players for this quest.')
			elseif getPlayerLevel(t[i]) < 100 then
				return doPlayerSendCancel(cid, 'All players need to have level 100 or higher.')
			end
		end
		for i = 1, 6 do
			doCreateMonster('Demon', summon[i])
		end
		for i=1, 4 do
			doTeleportThing(t[i], playerB[i])
			doSendMagicEffect(playerA[i], CONST_ME_POFF)
			doSendMagicEffect(playerB[i], CONST_ME_ENERGYAREA)
		end
	else
		for x = from.x, to.x do
			for y = from.y, to.y do
				local v = getTopCreature({x=x, y=y, z=from.z}).uid
				if v ~= 0 then
					if isPlayer(v) then
						return doPlayerSendCancel(cid, 'There is already a team in the quest room.')
					elseif isMonster(v) then
						table.insert(t, v)
					end
				end
			end
		end
		for i = 1, #t do
			doRemoveCreature(t[i])
		end
	end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
 
Back
Top