hello i dont get any errors but it isnt working here is the lua script.
would be thankfull if anyone could fix it.
thanks in advance
Code:
function onUse(cid, item, frompos, item2, topos)
gate1pose = {x=32176, y=31868, z=15, stackpos=1} -- Where the first piece will be placed
getgate1 = getThingfromPos(gate1pose)
gate2pose = {x=32177, y=31868, z=15, stackpos=1} -- Where the first piece will be placed
getgate2 = getThingfromPos(gate2pose)
piece1pos = {x=32173, y=31871, z=15, stackpos=1} -- Where the first piece will be placed
getpiece1 = getThingfromPos(piece1pos)
piece2pos = {x=32180, y=31871, z=15, stackpos=1} -- Where the second piece will be placed
getpiece2 = getThingfromPos(piece2pos)
if item.uid == 1500 and item.itemid == 1945 and getpiece1.itemid == 2143 and getpiece2.itemid == 2144 then
doRemoveItem(getpiece1.uid,1)
doRemoveItem(getpiece2.uid,1)
doRemoveItem(getgate2.uid,1)
doRemoveItem(getgate1.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 1500 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"There are no pearls or you putted them on the wrong desk.")
end
return 1
end
would be thankfull if anyone could fix it.
thanks in advance