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

Lua Script help!

Kayan

Active Member
Joined
Sep 19, 2007
Messages
1,561
Reaction score
38
Location
Santa Catarina
Here is my script. It is like rat bigde in rookgard. I need help, because when player are in bridgePos and somebody use switch player need be teleported and don't stay in bridgePos pos.

Lua:
local bridgePos = {x = 32801, y = 32336, z = 11}



function onUse(cid, item, fromPosition, itemEx, toPosition)

    local status = getThingFromPos(bridgePos)



    -- if we don't have a bridge, create it!

    if (status.itemid ~= 5770) then

        doCreateItem(5770, 1, bridgePos)

    else
        doTeleportThing(status, {x = bridgePos.x - 1, y = bridgePos.y, z = bridgePos.z})

        doCreateItem(493, 1, bridgePos)

        -- we should teleport players that are in that place

    end

end
 
Back
Top