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

Some can FIX this script?

Stewie

Family Guy # ;3
Joined
May 3, 2010
Messages
786
Reaction score
12
Location
TV
See,im push lever and dont lever dont move

Code:
local playerPosition =
{
	{x = 32673, y = 32085, z = 8, stackpos = STACKPOS_TOP_CREATURE},
	{x = 32669, y = 32089, z = 8, stackpos = STACKPOS_TOP_CREATURE},
	{x = 32677, y = 32089, z = 8, stackpos = STACKPOS_TOP_CREATURE},
	{x = 32673, y = 32093, z = 8, stackpos = STACKPOS_TOP_CREATURE}
}

local newPosition =
{
	{x = 32671, y = 32069, z = 8},
 	{x = 32672, y = 32069, z = 8},
	{x = 32671, y = 32070, z = 8},
	{x = 32672, y = 32070, z = 8}
}

-- Do not modify the declaration lines below.
local player = {0, 0, 0, 0}
local failed = FALSE

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		for i = 1, 4 do
			failed = TRUE
			player[i] = getThingfromPos(playerPosition[i])
			if player[i].itemid > 0 then
				if isPlayer(player[i].uid) == TRUE then
					if getPlayerStorageValue(player[i].uid, 9012) == -1 then
						if getPlayerLevel(player[i].uid) >= 20 then
							failed = FALSE
						end
					end
				end
			end
			if failed == TRUE then
				doPlayerSendCancel(cid, "Sorry, not possible.")
				return TRUE
			end
		end
		for i = 1, 4 do
			doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
			doTeleportThing(player[i].uid, newPosition[i], FALSE)
			doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)
		end
		doTransformItem(item.uid, item.itemid + 1)
	elseif item.itemid == 1946 then
		doPlayerSendCancel(cid, "Sorry, not possible.")
	end
	return TRUE
end
 
Code:
local playerPosition =
{
	{x = 32673, y = 32085, z = 8},
	{x = 32669, y = 32089, z = 8},
	{x = 32677, y = 32089, z = 8},
	{x = 32673, y = 32093, z = 8}
}

local newPosition =
{
	{x = 32671, y = 32069, z = 8},
 	{x = 32672, y = 32069, z = 8},
	{x = 32671, y = 32070, z = 8},
	{x = 32672, y = 32070, z = 8}
}
local players = {}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		for _, pos in ipairs(playerPosition) do
			local creature = getTopCreature(pos).uid
			if creature > 0 and isPlayer(creature) then
				table.insert(players, creature)
			end
		end
		if #players ~= 4 then
			doPlayerSendCancel(cid, "Sorry, not possible.")
			return doTransformItem(item.uid, item.itemid+1)
		end
		for i, v in ipairs(players) do
			if getPlayerStorageValue(v, 9012) > 0 then
				return doPlayerSendCancel(cid, "Sorry, not possible.")
			else
				doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
				doTeleportThing(v, newPosition[i], true)
				doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)
				return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
			end
		end
	end
end
 
Back
Top