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

Who can make ?

Zool

Banned User
Joined
Jun 9, 2009
Messages
742
Reaction score
5
Location
Poland/St Wola
I make new quest on Ots and i need this script :



Need 4 players :
Posidions :

1088 1004 8 -- 1090 1004 8
1088 1006 8 -- 1090 1006 8

When Players put items (on screen u see were put and what items put)

Push Laver and they teleportet to posidion :
1)1149 1079 10
2)1050 1079 10
3)1049 1080 10
4)1050 1080 10

Make it Pls :)
 
''Tauku'' Started script who can end ;p ?
Code:
  local config =  {
                level = 100, -- Level needed for this quest
                tileactionID1 = 8300, -- First Tile
                tileactionID2 = 8302, -- Second Tile
                tileactionID3 = 8303, -- Third Tile
                tileactionID4 = 8304, -- Fourth tile
        }
               
                function onUse(cid, item, fromPosition, itemEx, toPosition)
    local positions = {
        {x=50, y=100, z=100},  --Tile1 Pos
        {x=50, y=100, z=100},  --Tile2 Pos
        {x=50, y=100, z=100},  --tile3 Pos
        {x=50, y=100, z=100}   --tile4 Pos
 
LUA:
function onUse(cid, item, frompos, item2, topos)

-- Item ID and Uniqueid --
switchUniqueID = 10034 
switchID = 1945 
switch2ID = 1946 
Item1ID = 0000 
Item2ID = 0000 
Item3ID = 0000 
Item4ID = 0000 

-- Level to do the quest --
questlevel = 100 

piece1pos = {x=XXXX, y=YYYY, z=Z, stackpos=1} -- Where the first piece will be placed
getpiece1 = getThingfromPos(piece1pos)
--
piece2pos = {x=XXXX, y=YYYY, z=Z, stackpos=1} -- Where the second piece will be placed
getpiece2 = getThingfromPos(piece2pos)
--
piece3pos = {x=XXXX, y=YYYY, z=Z, stackpos=1} -- Where the third piece will be placed
getpiece3 = getThingfromPos(piece3pos) 
--
piece4pos = {x=XXXX, y=YYYY, z=Z, stackpos=1} -- Where the fourth piece will be placed
getpiece4 = getThingfromPos(piece4pos) 
--
player1pos = {x=1090, y=1006, z=8, stackpos=253} -- Where player1 will stand before pressing lever
player1 = getThingfromPos(player1pos) 
--
player2pos = {x=1090, y=1004, z=8, stackpos=253} -- Where player2 will stand before pressing lever
player2 = getThingfromPos(player2pos)
--
player3pos = {x=1088, y=1004, z=8, stackpos=253} -- Where player3 will stand before pressing lever
player3 = getThingfromPos(player3pos) 
--
player4pos = {x=1088, y=1006, z=8, stackpos=253} -- Where player4 will stand before pressing lever
player4 = getThingfromPos(player4pos) 
--

if player1.itemid > 0 and --
player2.itemid > 0 and --
player3.itemid > 0 and --
player4.itemid > 0 then --

nplayer1pos = {x=1049, y=1079, z=10} -- The new position of player1
nplayer2pos = {x=1050, y=1079, z=10} -- The new position of player2
nplayer3pos = {x=1049, y=1080, z=10} -- The new position of player3
nplayer4pos = {x=1050, y=1080, z=10} -- The new position of player4
--
player1level = getPlayerLevel(player1.uid) -- Checking the level of player1
player2level = getPlayerLevel(player2.uid) -- Checking the level of player2
player3level = getPlayerLevel(player3.uid) -- Checking the level of player3
player4level = getPlayerLevel(player4.uid) -- Checking the level of player4
--

-- check if they all players are on right positions -------------------------------------------------------------------

if player1level >= questlevel and 
player2level >= questlevel and 
player3level >= questlevel and 
player4level >= questlevel then 

if item.uid == switchUniqueID and 
item.itemid == switchID and 
getpiece1.itemid == Item1ID and 
getpiece2.itemid == Item2ID and 
getpiece3.itemid == Item3ID and 
getpiece4.itemid == Item4ID then 

-- sends an "poff" to the old pos --
doSendMagicEffect(player1pos,2) 
doSendMagicEffect(player2pos,2) 
doSendMagicEffect(player3pos,2) 
doSendMagicEffect(player4pos,2) 


-- teleports the players to the new pos ---
doTeleportThing(player1.uid,nplayer1pos) 
doTeleportThing(player2.uid,nplayer2pos) 
doTeleportThing(player3.uid,nplayer3pos) 
doTeleportThing(player4.uid,nplayer4pos) 

-- sends an "glimmer" to the new pos --
doSendMagicEffect(nplayer1pos,10) 
doSendMagicEffect(nplayer2pos,10) 
doSendMagicEffect(nplayer3pos,10) 
doSendMagicEffect(nplayer4pos,10) 


-- removes the items ---------------
doRemoveItem(getpiece1.uid,1) 
doRemoveItem(getpiece2.uid,1) 
doRemoveItem(getpiece3.uid,1) 
doRemoveItem(getpiece4.uid,1) 

doTransformItem(item.uid,item.itemid+1) 

--elseif item.uid == switchUniqueID and --Why? then you will still pull the lever when the items are incorrect and no error messages will be send
--item.itemid == switch2ID then 
--doTransformItem(item.uid,item.itemid-1)

else
doPlayerSendCancel(cid,"Sorry, you need to put the correct items on the correct basins.")
end
else
return 0
end
else
doPlayerSendCancel(cid,"Sorry, all players in your team must be at least level " .. questlevel .. ".")
end
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end

If the cords are not correct change them and you need to edit the ItemIDs. :) The edited script should work.
Although this is not a recommended script, lol.
 
Last edited:
@up i think u meybe dont understand ;d
I need to players put items (what u see on screen).
When they put items and push laver they teleported to pos :
1)1149 1079 10
2)1050 1079 10
3)1049 1080 10
4)1050 1080 10

If u want this id :
 
First is that wrong place for requests, go to Requests & Support for any kind of help or requests.

Umm zool, I think that you don't understand, that script does just that,
when players place the items in their respective places and pull the switch
they get teleported and they remove the item that you placed in the
'pedestal'.
Edit:
Here! I made the script that Barbyn made and made it more user friendly, also there was and additional 'end' in the
script, so basically it was not going to work.
Just configure everything that is under 'local cfg'
Anyways here it is:
LUA:
--/////Configuration\\\\\--
local cfg = {
	switchUniqueID = 10034, -- change to the unique id that you want to use for the lever
	switchID = 1945, -- don't change
	switch2ID = 1946, 
	Item1ID = 0000, -- change to the type of item that the player1 must place
	Item2ID = 0000, -- change to the type of item that the player2 must place
	Item3ID = 0000, -- change to the type of item that the player3 must place
	Item4ID = 0000, -- change to the type of item that the player4 must place
	questlevel = 100, -- change the required level for players to do this quest
	piece1pos = {x=XXXX, y=YYYY, z=Z, stackpos=1}, -- change to where the first piece will be placed
	piece2pos = {x=XXXX, y=YYYY, z=Z, stackpos=1}, -- change to where the second piece will be placed
	piece3pos = {x=XXXX, y=YYYY, z=Z, stackpos=1}, -- change to where the third piece will be placed
	piece4pos = {x=XXXX, y=YYYY, z=Z, stackpos=1}, -- change to where the fourth piece will be placed
	player1pos = {x=1090, y=1006, z=8, stackpos=253}, -- change to where player1 will stand before pressing lever (do not change the 'stackpos' of any of them)
	player2pos = {x=1090, y=1004, z=8, stackpos=253}, -- change to where player2 will stand before pressing lever
	player3pos = {x=1088, y=1004, z=8, stackpos=253}, -- change to where player3 will stand before pressing lever
	player4pos = {x=1088, y=1006, z=8, stackpos=253}, -- change to where player4 will stand before pressing lever
	nplayer1pos = {x=1049, y=1079, z=10}, -- change to the new position of player1
	nplayer2pos = {x=1050, y=1079, z=10}, -- change to the new position of player2
	nplayer3pos = {x=1049, y=1080, z=10}, -- change to the new position of player3
	nplayer4pos = {x=1050, y=1080, z=10} -- change to the new position of player4
	}
--\\\\\Configuration/////--
function onUse(cid, item, frompos, item2, topos)
--//Get Item Pos\\--
getpiece1 = getThingfromPos(cfg.piece1pos)
--
getpiece2 = getThingfromPos(cfg.piece2pos)
--
getpiece3 = getThingfromPos(cfg.piece3pos)
--
getpiece4 = getThingfromPos(cfg.piece4pos)
--
--//Get Player Pos\\--
player1 = getThingfromPos(cfg.player1pos)
--
player2 = getThingfromPos(cfg.player2pos)
--
player3 = getThingfromPos(cfg.player3pos)
--
player4 = getThingfromPos(cfg.player4pos)
--

	if player1.itemid > 0 and --
	player2.itemid > 0 and --
	player3.itemid > 0 and --
	player4.itemid > 0 then --

--
		player1level = getPlayerLevel(player1.uid) -- Checking the level of player1
		player2level = getPlayerLevel(player2.uid) -- Checking the level of player2
		player3level = getPlayerLevel(player3.uid) -- Checking the level of player3
		player4level = getPlayerLevel(player4.uid) -- Checking the level of player4
--

-- check if they all players are on right positions -------------------------------------------------------------------

		if player1level >= cfg.questlevel and
		player2level >= cfg.questlevel and
		player3level >= cfg.questlevel and
		player4level >= cfg.questlevel then

			if item.uid == cfg.switchUniqueID and
			item.itemid == cfg.switchID and
			getpiece1.itemid == cfg.Item1ID and
			getpiece2.itemid == cfg.Item2ID and
			getpiece3.itemid == cfg.Item3ID and
			getpiece4.itemid == cfg.Item4ID then

				-- sends an "poff" to the old pos --
				doSendMagicEffect(player1pos,2)
				doSendMagicEffect(player2pos,2)
				doSendMagicEffect(player3pos,2)
				doSendMagicEffect(player4pos,2)


				-- teleports the players to the new pos ---
				doTeleportThing(player1.uid,cfg.nplayer1pos)
				doTeleportThing(player2.uid,cfg.nplayer2pos)
				doTeleportThing(player3.uid,cfg.nplayer3pos)
				doTeleportThing(player4.uid,cfg.nplayer4pos)

				-- sends an "glimmer" to the new pos --
				doSendMagicEffect(cfg.nplayer1pos,10)
				doSendMagicEffect(cfg.nplayer2pos,10)
				doSendMagicEffect(cfg.nplayer3pos,10)
				doSendMagicEffect(cfg.nplayer4pos,10)


				-- removes the items ---------------
				doRemoveItem(getpiece1.uid,1)
				doRemoveItem(getpiece2.uid,1)
				doRemoveItem(getpiece3.uid,1)
				doRemoveItem(getpiece4.uid,1)

				doTransformItem(item.uid,item.itemid+1)

--elseif item.uid == switchUniqueID and --Why? then you will still pull the lever when the items are incorrect and no error messages will be send
--item.itemid == switch2ID then
--doTransformItem(item.uid,item.itemid-1)

			else
				doPlayerSendCancel(cid,"Sorry, you need to put the correct items on the correct basins.")
			end
		else
			doPlayerSendCancel(cid,"Sorry, all players in your team must be at least level " .. cfg.questlevel .. ".")
		end
	else
		doPlayerSendCancel(cid,"Sorry, not possible.")
	end
return 1
end
 
Last edited:
Back
Top