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

Quest..

szymon095

New Member
Joined
May 16, 2009
Messages
22
Reaction score
2
Siema, ma ktoś albo widział gdzieś skrypt taki ze trzeba położyć 2 itemy w wyznaczone miejsce, i potem naciskasz dźwignię.. Itemy znikają a Ciebie teleportuje w dane miejsce ?..

Jeśli ktoś posiada skrypt/link proszę, żeby się podzielił :).

Albo przerobić ten skrypt, żeby tylko było polozenie 2 itemów, dla jednego gracza i teleportowało w wybrane miejsce:

Desert Quest

function onUse(cid, item, fromPosition, itemEx, toPosition)
-- Positions/ID's/Vocations order: paladin, sorcerer, knight, druid.
local positions = {
players = {
{x = 100, y = 100, z = 7, stackpos = 253},
{x = 100, y = 100, z = 7, stackpos = 253},
{x = 100, y = 100, z = 7, stackpos = 253},
{x = 100, y = 100, z = 7, stackpos = 253}
}
items = {
{x = 100, y = 100, z = 7, stackpos = 2},
{x = 100, y = 100, z = 7, stackpos = 2},
{x = 100, y = 100, z = 7, stackpos = 2},
{x = 100, y = 100, z = 7, stackpos = 2}
}
new = {
{x = 100, y = 100, z = 7},
{x = 100, y = 100, z = 7},
{x = 100, y = 100, z = 7},
{x = 100, y = 100, z = 7}
}
}

local vocations = {3, 1, 4, 2}
local items = {2455, 2376, 2674, 2175}

-- don't touch below.
local check = {
players = true,
vocations = true,
items = true
}

if (item.itemid == 1945) then
for i = 1, 4 do
if (not isPlayer(getThingFromPos(positions.players).uid)) then
doPlayerSendCancel(cid, "You need 4 players.")
check.players = false
break
end
end
for i = 1, 4 do
if (getPlayerVocation(getThingFromPos(positions.players).uid) ~= vocations) then
doPlayerSendCancel(cid, "Wrong vocations.")
check.vocations = false
break
end
end
for i = 1, 4 do
if (getThingFromPos(positions.items).itemid ~= items) then
doPlayerSendCancel(cid, "Wrong items.")
check.items = false
break
end
end
if (check.players and check.vocations and check.items) then
for i = 1, 4 do
doTeleportThing(getThingFromPos(positions.players).uid, positions.new)
doSendMagicEffect(positions.players, CONST_ME_POFF)
doSendMagicEffect(positions.new, CONST_ME_TELEPORT)
doTransformItem(item.uid, item.itemid + 1)
end
end
elseif (item.itemid == 1946) then
doTransformItem(item.uid, item.itemid - 1)
end

return TRUE
end
 
Last edited:
Lua:
local pos = {
	--[itemid] = {pos},
	[3465] = {x=100, y=100, z=7, stackpos=255},
	[4564] = {x=100, y=100, z=7, stackpos=255}
}

local telePos = {x=100, y=100, z=7} -- pozycja gdzie teleportuje gracza

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local thing = {}
	for id, _pos in pairs(pos) do
		local x = getThingFromPos(_pos, false).uid
		if x > 0 and not isCreature(x) then
			if x.itemid == id then
				table.insert(thing, x)
			end
		end
	end
	
	if #thing == #pos then
		for _, uid in pairs(thing) do
			doRemoveItem(uid)
		end
		doTeleportThing(cid, telePos)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You have been teleported to new room.')
	else
		doCreatureSay(cid, 'Items aren\'t on correct position.', TALKTYPE_MONSTER_YELL)
	end
	return doTransformItem(item.uid, item.itemid == 1946 and item.itemid-1 or item.itemid+1)
end
 
Back
Top