• 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:
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) < 1) 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
and
Code:
<movevent type="StepIn" uniqueid="1112" event="script" value="teleport1.lua"/>

Try :p
 
Yes, but i need the script for it, it contains a storage or something else that shows that you have vip to the server
 
TESTED/MADE - TFS 0.3.6 - Like and comment if errors
  • 10:56 You need rebirth 5 to goto this location!
  • 10:56 seems like you are 5 or higher!
Code:
local location = {x=1077, y=1023, z=4} -- This is where player will be teleported if he has rebirth 5+
local storageid = 4587
local rebirth = 5

function onStepIn(cid, item, position, fromPosition)
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
 
Last edited:
TESTED/MADE - TFS 0.3.6 - Like and comment if errors
  • 10:56 You need rebirth 5 to goto this location!
  • 10:56 seems like you are 5 or higher!
Code:
local location = {x=1077, y=1023, z=4} -- This is where player will be teleported if he has rebirth 5+
local storageid = 4587
local rebirth = 5

function onStepIn(cid, item, position, fromPosition)
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
is that an good rebirth tile
 
Back
Top Bottom