• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Desert Quest

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
My desert quest don't are working:
Code:
  <action uniqueid="9010" script="desert_quest.lua" />
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 local getItem1 = getThingfromPos({x=1927, y=1768, z=9, stackpos=255})
 local getPlayer1 = getThingfromPos({x=1929, y=1768, z=9, stackpos=253})
 local getItem2 = getThingfromPos({x=1933, y=1761, z=9, stackpos=255})
 local getPlayer2 = getThingfromPos({x=1933, y=1763, z=9, stackpos=253})
 local getItem3 = getThingfromPos({x=1939, y=1768, z=9, stackpos=255})
 local getPlayer3 = getThingfromPos({x=1937, y=1768, z=9, stackpos=253})
 local getItem4 = getThingfromPos({x=1933, y=1774, z=9, stackpos=255})
 local getPlayer4 = getThingfromPos({x=1933, y=1772, z=9, stackpos=253})

	if ((item.uid == 9010) and (item.itemid == 1945) and (getItem1.itemid == 2674) and (getItem2.itemid == 2455) and (getItem3.itemid == 2175) and (getItem4.itemid == 2376) and (getPlayer1.itemid > 0) and (getPlayer2.itemid > 0) and (getPlayer3.itemid > 0) and (getPlayer4.itemid > 0) and (getPlayerVocation(getPlayer1.uid) == 2) and (getPlayerVocation(getPlayer2.uid) == 3) and (getPlayerVocation(getPlayer3.uid) == 1) and (getPlayerVocation(getPlayer4.uid) == 4)) then
	   doRemoveItem(getItem1.uid, 1)
	   doRemoveItem(getItem2.uid, 1)
	   doRemoveItem(getItem3.uid, 1)
	   doRemoveItem(getItem4.uid, 1)
	   doTeleportThing(getPlayer1.uid, {x=1932, y=1767, z=10})
	   doTeleportThing(getPlayer2.uid, {x=1933, y=1766, z=10})
	   doTeleportThing(getPlayer3.uid, {x=1934, y=1767, z=10})
	   doTeleportThing(getPlayer4.uid, {x=1933, y=1767, z=10})
	   doTransformItem(item.uid, item.itemid+1)
	 elseif ((item.uid == 9010) and (item.itemid == 1946)) then
	   doTransformItem(item.uid, item.itemid-1)
    else
 return FALSE
end
 return TRUE
end
 
Code:
function onUse(cid, item, frompos, item2, topos)

end1pos = {x=308, y=462, z=8, stackpos=255} --onde o player1 sera teleportado quando a alavanca for puxada
end2pos = {x=308, y=462, z=8, stackpos=255} --onde o player2 sera teleportado quando a alavanca for puxada
end3pos = {x=308, y=462, z=8, stackpos=255} --onde o player3 sera teleportado quando a alavanca for puxada
end4pos = {x=308, y=462, z=8, stackpos=255} --onde o player4 sera teleportado quando a alavanca for puxada

ppl1pos = {x=398, y=530, z=8, stackpos=253} --posicao do player1
ppl2pos = {x=398, y=536, z=8, stackpos=253} --posicao do player2
ppl3pos = {x=395, y=533, z=8, stackpos=253} --posicao do player3
ppl4pos = {x=401, y=533, z=8, stackpos=253} --posicao do player4
ppl1 = getThingfromPos(ppl1pos)
ppl2 = getThingfromPos(ppl2pos)
ppl3 = getThingfromPos(ppl3pos)
ppl4 = getThingfromPos(ppl4pos)

item1pos = {x=398, y=529, z=8, stackpos=2} --item1pos
item2pos = {x=398, y=537, z=8, stackpos=2} --item2pos
item3pos = {x=394, y=533, z=8, stackpos=2} --item3pos
item4pos = {x=402, y=533, z=8, stackpos=2} --item4pos
item1 = getThingfromPos(item1pos)
item2 = getThingfromPos(item2pos)
item3 = getThingfromPos(item3pos)
item4 = getThingfromPos(item4pos)


if item.itemid == 1945 and item1.itemid == 2455 and item2.itemid == 2376 and item3.itemid == 2674 and item4.itemid == 2175 and getPlayerVocation(ppl1.uid) == 3 and getPlayerVocation(ppl2.uid) == 4 and getPlayerVocation(ppl3.uid) == 2 and getPlayerVocation(ppl4.uid) == 1 then
  doRemoveItem(item1.uid,1)
  doSendMagicEffect(item1pos,13)
  doRemoveItem(item2.uid,1)
  doSendMagicEffect(item2pos,13)
  doRemoveItem(item3.uid,1)
  doSendMagicEffect(item3pos,13)
  doRemoveItem(item4.uid,1)
  doSendMagicEffect(item4pos,13)
  doTeleportThing(ppl1.uid,end1pos)
  doSendMagicEffect(ppl1pos,10)
  doSendMagicEffect(end1pos,10)
  doTeleportThing(ppl2.uid,end2pos)
  doSendMagicEffect(ppl2pos,10)
  doSendMagicEffect(end2pos,10)
  doTeleportThing(ppl3.uid,end3pos)
  doSendMagicEffect(ppl3pos,10)
  doSendMagicEffect(end3pos,10)
  doTeleportThing(ppl4.uid,end4pos)
  doSendMagicEffect(ppl4pos,10)
  doSendMagicEffect(end4pos,10)
  doTransformItem(item.uid,item.itemid+1)

elseif item.itemid == 1946 then
  doTransformItem(item.uid,item.itemid-1)
else
  doPlayerSendTextMessage(cid,22,"Algum item está faltando ou as vocações não correspondem.")
end
end
 
Back
Top