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

Request...

kito2

www.masteria.net
Joined
Mar 9, 2009
Messages
3,764
Solutions
1
Reaction score
227
Location
Chile, Santiago
I have been thinking on how to make a lever-brige... But I don't know how :S

The idea is the following:

dibujokh.jpg


Red mark is the square to be removed and be replaced by water itemID 4666 - The item ID that should add after using it again is 5770.
The green are the actionid for those levers.

Someone, I rep :)
 
Hm... It didn't work, I found this:

LUA:
-- rook lever by QuaS~
local posi3 = {x=410, y=1389, z=10} --
poss = {
[1] = {x=407, y=1389, z=10},
[2] = {x=408, y=1389, z=10},
[3] = {x=409, y=1389, z=10}
}

local lever = {
[1] = {x=411, y=1387, z=10},
[2] = {x=407, y=1392, z=10}
}
local itemids = 5770
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if item.itemid == 1945 then
                doCreateItem(itemids,poss[1])
                if getTileItemById(poss[2],4645).itemid ~= nil then
                        doTransformItem(getTileItemById(poss[2],4645).uid,itemids)
                end
                if getTileItemById(poss[3],4647).itemid > 0 then
                        doTransformItem(getTileItemById(poss[3],4647).uid,itemids)
                end
                for i=1,#lever do
                        if lever[i].x == fromPosition.x then
                                o = i
                        end
                end
                if o == 1 then
                        b = 2
                else 
                        b = 1
                end
                doTransformItem(item.uid,item.itemid+1)
                doTransformItem(getTileItemById(lever[b],1945).uid,1946)
        elseif item.itemid == 1946 then
                for p = 1,#poss do
                doRelocate(poss[p], posi3)
                end
                for z =1,#poss do
                                poss[z].stackpos = 254
                                if getThingFromPos(poss[z]).itemid > 1000 then
                                        doRemoveItem(getThingFromPos(poss[z]).uid)
                                end
                                poss[z].stackpos = 1
                                if getThingFromPos(poss[z]).itemid > 1000 then
                                        doRemoveItem(getThingFromPos(poss[z]).uid)
                                end

                end
                for i=1,#lever do
                        if lever[i].x == toPosition.x then
                                o = i 
                        end
                end
                if o == 1 then
                        b = 2
                else 
                        b = 1
                end
                doCreateItem(4616,poss[1])
                doCreateItem(351,poss[2])
                doCreateItem(351,poss[3])
                doCreateItem(4645,poss[2])
                doCreateItem(4647,poss[3])
                doTransformItem(item.uid,item.itemid-1)
                doTransformItem(getTileItemById(lever[b],1946).uid,1945)
        end
        return TRUE
end
 
Back
Top