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

BS Quest Switch [POWER RING]

Nottinghster

Tibia World RPG Developer
Joined
Oct 24, 2007
Messages
1,618
Solutions
6
Reaction score
537
Location
Brazil - Rio de Janeiro
GitHub
Nottinghster
Hello guys!

Can someone tell what is wrong on my Script?
When I pull the lever appear the msg even if the power ring is in position

Here is the Script
Code:
function onUse(cid, item, frompos, item2, topos)

local power_ring = {x=32594, y=32214, z=9,stackpos=255}
local parede = {x=32604, y=32216, z=9, stackpos=0}
local event = 0

getpower_ring = getThingfromPos(power_ring)
getparede = getThingfromPos(parede)

if item.uid == 8889 and item.itemid == 1945 and getpower_ring.itemid == 2166 and getparede.itemid == 1026 then
doRemoveItem(getpower_ring.uid,1)
doRemoveItem(getparede.uid,1)
doTransformItem(item.uid, 1946)
event = addEvent(doCreateItem, 2 * 60 * 1000, 1026, 1, parede)
else
doPlayerSendCancel(cid, "There is something missing.")
end
if item.itemid == 1946 then
stopEvent(event)
doCreateItem(1026, 1, parede)
doTransformItem(item.uid, 1945)
end
return TRUE
end

Thanks!
 
Back
Top