Felipe93
Ghost Member
Hello otland
Well im stuck with an script that creates a brigde made of 4 sqm
The thing is that the script works only once when i pull the lever the brigde appears but when i pull the lever again nothing happens i've tried several scripts and none of them besides this works
i've tried with these scripts too and few others also i've edited other ones buyt whitout triumph
[Release] Bridge Lever
Solved - Lever Bridge Help
can anyone edit this for me or tell me what it's wrong here?
And the issue with this other script is that works 90% fine but i need if a player it standing on the square where the changes will happen the lever would not be able to be pulled, because it bug the server
thanks in advance and regards to everyone
@Xikini @Sarah Wesker @Nottinghster
anyone of you guys can re-edit this or guide me please?
thanks again in advance
Well im stuck with an script that creates a brigde made of 4 sqm

The thing is that the script works only once when i pull the lever the brigde appears but when i pull the lever again nothing happens i've tried several scripts and none of them besides this works
Code:
local poss = {
[1] = {x=32410, y=32231, z=10},
[2] = {x=32410, y=32232, z=10},
[3] = {x=32411, y=32231, z=10},
[4] = {x=32411, y=32232, z=10}
}
local lever = {
[1] = {x=32412, y=32231, z=10, stackpos = 1},
[2] = {x=32412, y=32232, z=10,stackpos = 1 }
}
function onUse(cid, item, fromPosition, target, toPosition)
local way = (item.itemid == 1945)
for i = 1, #lever do
local lev = getTileItemById(lever[i], item.itemid)
if lev and lev.uid > 0 then
doTransformItem(lev.uid, (lev.itemid == 1945 and 1946 or 1945))
end
end
if way then
for i = 3, 4 do
if getTileItemById(poss[i], 4799).itemid > 0 then
doRemoveItem(getTileItemById(poss[i], 4799).uid)
end
end
for i = 1, #poss do
if getTileItemById(poss[i], 493).itemid > 0 then
doCreateItem(1284, 1, poss[i])
end
end
else
for i = 1, #poss do
if getTileItemById(poss[i], 1284).itemid > 0 then
doCreateItem(493, 1, poss[i])
end
end
for i = 3, 4 do
if getTileItemById(poss[i], 4799).itemid == 0 then
doCreateItem(4799, 1, poss[i])
end
end
end
return true
end
Code:
<action actionid="4022" script="tibia/bonelord_brigde_4sqm.lua" />
[Release] Bridge Lever
Solved - Lever Bridge Help
can anyone edit this for me or tell me what it's wrong here?
And the issue with this other script is that works 90% fine but i need if a player it standing on the square where the changes will happen the lever would not be able to be pulled, because it bug the server
Code:
function onUse(cid, item, frompos, item2, topos)
tile1 = {x = 32225, y = 32276, z = 8, stackpos = 1}
gettile1 = getThingfromPos(tile1)
if item.actionid == 4016 and item.itemid == 1945 then
doRemoveItem(gettile1.uid,1)
doCreateItem(427,1,tile1)
doTransformItem(item.uid,item.itemid+1)
elseif item.actionid == 4016 and item.itemid == 1946 then
doRemoveItem(gettile1.uid,1)
doCreateItem(351,1,tile1)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
Code:
<action actionid="4016" script="tibia/Thais Lighthouse Quest/switch.lua" />
thanks in advance and regards to everyone
@Xikini @Sarah Wesker @Nottinghster
anyone of you guys can re-edit this or guide me please?
thanks again in advance