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

When you click lever item on another position disappears

rsdsebek

C++/LUA coder
Joined
Oct 8, 2008
Messages
128
Reaction score
30
Hi
I tried to make script like in the title, but I couldn't manage to do that. Here is what i wrote:
Code:
function onUse(cid, item, frompos, item2, topos) 
    if item.uniqueid == 5876 then 
        local barPos = {x = 161, y = 156, z = 5}
        local bar = getTileItemById(barPos, 1547).uid
        doTransformItem(bar, 0)
        return TRUE
    end 
    return FALSE
end
Unfortunately I keep getting no errors in console, so I don't know what's going on. Second case is changing tile. I want to change floor item (for example grass to dirt) when I click lever on another position. Can anyone help me with that?

Best
Sebastian
 

Similar threads

Back
Top