• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Remove wall

DestinationSer

@echo off
Joined
Mar 7, 2009
Messages
2,806
Solutions
1
Reaction score
676
I need a script that does so when you click a switch a wall removes
Switch need to have a uniqueid.
 
Code:
function onUse(cid, item, frompos, item2, topos) 
gatepos = {x=711, y=1065, z=12, stackpos=1} 
getgate = getThingfromPos(gatepos) 

if item.uid == 4644 and item.itemid == 1945 and getgate.itemid == 1355 then 
doRemoveItem(getgate.uid,1) 
doTransformItem(item.uid,item.itemid+1) 
elseif item.uid == 4644 and item.itemid == 1946 and getgate.itemid == 0 then 
doCreateItem(1355,1,gatepos) 
doTransformItem(item.uid,item.itemid-1) 
else 
doPlayerSendCancel(cid,"Sorry, not possible.") 
end 
return 1 
end

1945-1946 = switch id
4644 = unique id of the switch
1355 = wall id

Don't forget to add it in actions.xml

Code:
<action uniqueid="4644" script="removewall.lua"/>
 
Back
Top