Okay, I have one uniqueID lever, when its pulled, it checks if 4 switches are pulled to the right, if it is, then it will remove the walls. After 3 seconds, everything gets reset back to normal.
I know it's a very very messy script, but it should somehow work, but for some damn reason, it is NOT! The switch just didn't get pulled.
Here is the script:
I know it's a very very messy script, but it should somehow work, but for some damn reason, it is NOT! The switch just didn't get pulled.
Here is the script:
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
wall_pos1 = {x=764, y=888, z=11, stackpos=1}
wall1 = getThingfromPos(wall_pos1)
wall_pos2 = {x=765, y=888, z=11, stackpos=1}
wall2 = getThingfromPos(wall_pos2)
switch1_pos = {x=755, y=892, z=11, stackpos=1}
switch1 = getThingfromPos(switch1_pos)
switch2_pos = {x=755, y=900, z=11, stackpos=1}
switch2 = getThingfromPos(switch2_pos)
switch3_pos = {x=774, y=892, z=11, stackpos=1}
switch3 = getThingfromPos(switch3_pos)
switch4_pos = {x=774, y=900, z=11, stackpos=1}
switch4 = getThingfromPos(switch4_pos)
if item.itemid == 1945 and wall1.itemid == 1547 and wall2.itemid == 1547 then
if switch1 == 1946 and switch2 == 1946 and switch3 == 1946 and switch4 == 1946 then
doSendMagicEffect(wall_pos1, 10)
doSendMagicEffect(wall_pos2, 10)
doRemoveItem(wall1.uid, 1)
doRemoveItem(wall2.uid, 1)
doTransformItem(item.uid, 1946)
addEvent(createWallent, 3 * 1000)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
end
return TRUE
end
function createWallent()
doCreateItem(1547, wall_pos1)
doCreateItem(1547, wall_pos2)
doSendMagicEffect(wall_pos1, 10)
doSendMagicEffect(wall_pos2, 10)
doTransformItem(item.uid, 1945)
doTransformItem(switch1, 1945)
doTransformItem(switch2, 1945)
doTransformItem(switch3, 1945)
doTransformItem(switch4, 1945)
end