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

Use 5 switch and wall removed

Shan Trus

New Member
Joined
May 7, 2009
Messages
67
Reaction score
0
Location
Poland
Welcome, I need one script. When I use five switch, wall disappear/remove.

Haha, sorry for my English ; D
 
So, scripts for TFS 8.42 (0.3.4).

When use 5 items, wall is removed.

I have scripts for 1 items use and removed wall, i need 5 items use...
 
post here your script.

okey, this script is for 1 use items and remove walls.

function onUse(cid, item, frompos, item2, topos)
gatepos = {x=869, y=727, z=6, stackpos=1}
getgate = getThingfromPos(gatepos)
if item.uid == 9700 and item.itemid == 1945 and getgate.itemid == 1543 then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 9700 and item.itemid == 1946 and getgate.itemid == 1543 then
doCreateItem(1543,1,gatepos)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end

x,z,y removed items
"9700" - this is uniqueid (use items)
This is items removed id

I need for 5 use items and removed walls.
 
thats pretty simple , if on X/Y/Z is 1946 & X/Y/Z is 1946 & X/Y/Z ... ... then

Lua:
function onUse(cid, item, frompos, item2, topos)
 
if item.actionid == XXX then

leverpos1 = {x=000, y=000, z=0, stackpos=1}
lever1 = getThingfromPos(leverpos1)
leverpos2 = {x=000, y=0000, z=0, stackpos=1}
lever2 = getThingfromPos(leverpos2)
leverpos3 = {x=000, y=000, z=0, stackpos=1}
lever3 = getThingfromPos(leverpos3)
leverpos4 = {x=000, y=000, z=0, stackpos=1}
lever4 = getThingfromPos(leverpos4)
leverpos5 = {x=000, y=000, z=0, stackpos=1}
lever5 = getThingfromPos(leverpos5)

wallpos = {x=000, y=000, z=0, stackpos=1}
wall = getThingfromPos(wallpos)

if item.itemid == 1945 then
    doTransformItem(item.uid,1946)
  elseif item.itemid == 1946 then
    doTransformItem(item.uid,1945)
end

if (item.actionid == XXX and lever1.itemid == 1946 and lever2.itemid == 1946 and lever3.itemid == 1946 and lever4.itemid == 1946 and lever5.itemid == 1946 and wall.itemid == 0) then
doCreateItem(1304,1,wallpos)
elseif (item.actionid == XXX and lever1.itemid == 1946 and lever2.itemid == 1946 and lever3.itemid == 1946 and lever4.itemid == 1946 and lever5.itemid == 1946 and wall.itemid == 1304) then
doRemoveItem(wall.uid,1)
else 
doPlayerSendCancel(cid,"Sorry, not possible.") 
end 
end
end

doCreateItem(1304,1,wallpos)
Your Wall ID
 
Last edited:
Example:
Code:
if item.actionid == 1234 then

Propably it's actiond ID of item.

Wall pos:
Code:
wallpos = {x=000, y=000, z=0, stackpos=1}
and item pos than isn't necessary.
 
Last edited:
Eyy... me stone don't remove ;/

You don't know where is Error ?

In engine don't write error, how i use items...

Meybe because my item use have id 9825 and use id items is 9826 (this is lever)
If this don't action id only uniqueid ?

Please help me, this is me very need. Thanks you from top.
 
Back
Top