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

hi

Maxwel1

Legend Of Everything
Joined
Feb 3, 2009
Messages
196
Reaction score
1
Location
In The Jungle
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?
 
First of all from where you got this script lolwhere are the <local>,And where is commands that moves the rocks.is there already rocks and lever must remove or you need lever to creat and remove rocks
 
did u check if the coordinates of the rock are Correct?
Are you sure if you added the Action id to the Item?

There should be an error but i cant see whats wrong in the lua. the script its good in my opinion. try to check what i said, check the ids if is the right item to transform etc.
 
actually, it works now but i have to pull one of the levers again after switiching all on donno why but i wish sumone help this time. thanks alot

Maxwel
 
Back
Top