Hello, they will can to help to me to correct this script. must to drive 14 switch and when you have made this completes drive it with action you go 10284 which once driven the 14 completes and it remove two stones in this position.
but the stone dont remove... why ?
but the stone dont remove... why ?
Lua:
function onUse(cid, item, frompos, item2, topos)
wall1pos = {x=458, y=1386, z=11, stackpos=1}
wall2pos = {x=459, y=1386, z=11, stackpos=1}
wall1 = getThingfromPos(wall1pos)
wall2 = getThingfromPos(wall2pos)
leverpos1 = {x=450, y=1412, z=11, stackpos=1}
leverpos2 = {x=454, y=1385, z=12, stackpos=1}
leverpos3 = {x=493, y=1390, z=12, stackpos=1}
leverpos4 = {x=460, y=1412, z=13, stackpos=1}
leverpos5 = {x=457, y=1419, z=12, stackpos=1}
leverpos6 = {x=467, y=1417, z=12, stackpos=1}
leverpos7 = {x=481, y=1407, z=13, stackpos=1}
leverpos8 = {x=481, y=1387, z=11, stackpos=1}
leverpos9 = {x=498, y=1381, z=13, stackpos=1}
leverpos10 = {x=450, y=1405, z=13, stackpos=1}
leverpos11 = {x=496, y=1402, z=14, stackpos=1}
leverpos12 = {x=494, y=1383, z=11, stackpos=1}
leverpos13 = {x=453, y=1371, z=11, stackpos=1}
leverpos14 = {x=494, y=1408, z=12, stackpos=1}
lever1 = getThingfromPos(leverpos1)
lever2 = getThingfromPos(leverpos2)
lever3 = getThingfromPos(leverpos3)
lever4 = getThingfromPos(leverpos4)
lever5 = getThingfromPos(leverpos5)
lever6 = getThingfromPos(leverpos6)
lever7 = getThingfromPos(leverpos7)
lever8 = getThingfromPos(leverpos8)
lever9 = getThingfromPos(leverpos9)
lever10 = getThingfromPos(leverpos10)
lever11 = getThingfromPos(leverpos11)
lever12 = getThingfromPos(leverpos12)
lever13 = getThingfromPos(leverpos13)
lever14 = getThingfromPos(leverpos14)
if (item.actionid == 10284 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
lever8.itemid == 1946 and
lever9.itemid == 1946 and
lever10.itemid == 1946 and
lever11.itemid == 1946 and
lever12.itemid == 1946 and
lever13.itemid == 1946 and
lever14.itemid == 1946 and
wall1.itemid == 1304 and
wall2.itemid == 1304) then
doSendMagicEffect(wall1pos, 1)
doSendMagicEffect(wall2pos, 1)
doRemoveItem(wall1.uid,1)
doRemoveItem(wall2.uid,1)
doTransformItem(item.uid,1946)
else
doPlayerSendCancel(cid,"You have not pulled all 15 levers.")
end
return 1
end