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

Rebirth Tile

ares413

New Member
Joined
Apr 1, 2010
Messages
130
Reaction score
3
i have a rebirth server im working on,
the global storage for rebirth is 2500

i want a tp(portal) that when stepped on, checks if that storage is 5 or more, and sends you through if so.

if not it teleports you to a different position.

can anyone help?
rep++

Edit: i know its a movement step in script, i just cant get it right. please help!


Edit: i just found this script and changed it a bit, still not working

Code:
function onStepIn(cid, item, position, fromPosition)

local config = {
uniqueid = 1112,  ---item unique id
vipstorage = 2500, ---- storage of vip player
kickpos = {x=1090, y=1062, z=7, stackpos=1 } --- position where non vip player will be kicked
}

    if(item.uid == config.uniqueid) then
        if (getPlayerStorageValue(cid, config.vipstorage) == 0) then
            doTeleportThing(cid, config.kickpos)
            doCreatureSay(cid, "You need atleast 1 rebirth", TALKTYPE_ORANGE_2, getCreaturePosition(cid))
        else
            doPlayerSendTextMessage(cid, 20, 'Welcome to the first rebirth spawn.')       
        end
    end
return TRUE
end

Code:
<movevent type="StepIn" itemid="1112" event="script" value="teleport1.lua"/>
 
Last edited:
Try, not shure its working
Code:
local config = {
    pos = {
        [5] = {x=1077, y=1023, z=4}
    },
local storageid = 4587

function onStepIn(cid, item, position, fromPosition)
    for rebirth, location in pairs(config.pos) do
        if (getPlayerStorageValue(cid, storageid) < rebirth) then
            doTeleportThing(cid, fromPosition, FALSE)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need rebirth ".. rebirth .." to goto this location!")
        elseif (getPlayerStorageValue(cid, storageid) >= rebirth) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "seems like you are ".. rebirth .." or higher!")
            doTeleportThing(cid, location)
        end
    return true
end
end
end
 
Last edited:
Back
Top