Maxwel1
Legend Of Everything
Code:
function onUse(cid, item, frompos, item2, topos)
if item.actionid == 1028 then
leverpos1 = {x=1332, y=1279, z=14, stackpos=255}
lever1 = getThingfromPos(leverpos1)
leverpos2 = {x=1339, y=1286, z=15, stackpos=255}
lever2 = getThingfromPos(leverpos2)
leverpos3 = {x=1376, y=1275, z=15, stackpos=255}
lever3 = getThingfromPos(leverpos3)
leverpos4 = {x=1363, y=1285, z=15, stackpos=255}
lever4 = getThingfromPos(leverpos4)
leverpos5 = {x=1363, y=1254, z=14, stackpos=255}
lever5 = getThingfromPos(leverpos5)
leverpos6 = {x=1335, y=1238, z=14, stackpos=255}
lever6 = getThingfromPos(leverpos6)
leverpos7 = {x=1338, y=1254, z=14, stackpos=255}
lever7 = getThingfromPos(leverpos7)
wallpos1 = {x=1340, y=1253, z=14, stackpos=255}
wall1 = getThingfromPos(wallpos1)
wallpos2 = {x=1341, y=1253, z=14, stackpos=255}
wall2 = getThingfromPos(wallpos2)
if item.itemid == 1945 then
doTransformItem(item.uid,1946)
elseif item.itemid == 1946 then
doTransformItem(item.uid,1945)
end
if (item.actionid == 1028 and lever1.itemid == 1945 and lever2.itemid == 1945 and lever3.itemid == 1945 and lever4.itemid == 1945 and lever5.itemid == 1945 and lever6.itemid == 1945 and lever7.itemid == 1945 and wall1.itemid == 0 and wall2.itemid == 0) then
doCreateItem(1304,1,wallpos1)
doCreateItem(1304,1,wallpos2)
elseif (item.actionid == 1028 and lever1.itemid == 1946 and lever2.itemid == 1946 and lever3.itemid == 1946 and lever4.itemid == 1946 and lever5.itemid == 1946 and lever6.itemid == 1946 and lever7.itemid == 1946 and wall1.itemid == 1304 and wall2.itemid == 1304) then
doRemoveItem(wall1.uid,1)
doRemoveItem(wall2.uid,1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
end
end
first 7 levers of poi. i donno where is the prob. added the action id to the levers and tried to change the script alot but the rock didn't disappear. any idea?