• 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 Doors and Teleports

Wusse

Member
Joined
Oct 3, 2023
Messages
33
Reaction score
6
Hi im using the rebirth system made by @Stellow, Reference: Feature - Reborn System | Reset level, increase power, set exclusive items, spells, houses, web and more! (https://otland.net/threads/reborn-system-reset-level-increase-power-set-exclusive-items-spells-houses-web-and-more.245808/)

i have a tfs 1.4.2 10.98 server and the rebirth system works completly fine, in the thread he gives you two lua files for the doors and teleports, i simply cant find where to put these lua files or what files to replace them with. ive tried a couple of times alone with no luck, so i even put that on hold. Im now at a time where im trying to implement this but i cant seem to get it right.

could someone just lead me to the right direction, would be highly appreciated.

the lua files in question:
 

Attachments

Solution
Seems like there are doors with AID's from range [10001, 10999] meant to be used only by players with certain rebirth "level/count".
10001 - 1 reborn required
10002 - 2 reborn required
etc.

Lua:
if item.actionid > 10000 and item.actionid < 11000 then -- it is rebirths
    local reqRebirth = item.actionid - 10000
    if player:getRebirth() > reqRebirth then
        item:transform(itemId + 1)
        player:teleportTo(toPosition, true)
    else
        player:sendTextMessage(MESSAGE_INFO_DESCR, "It requires ".. reqRebirth .." rebirths to pass through this door.")
    end
elseif player:getStorageValue(item.actionid) ~= -1 then
    item:transform(itemId + 1)
    player:teleportTo(toPosition, true)
else...
Seems like there are doors with AID's from range [10001, 10999] meant to be used only by players with certain rebirth "level/count".
10001 - 1 reborn required
10002 - 2 reborn required
etc.

Lua:
if item.actionid > 10000 and item.actionid < 11000 then -- it is rebirths
    local reqRebirth = item.actionid - 10000
    if player:getRebirth() > reqRebirth then
        item:transform(itemId + 1)
        player:teleportTo(toPosition, true)
    else
        player:sendTextMessage(MESSAGE_INFO_DESCR, "It requires ".. reqRebirth .." rebirths to pass through this door.")
    end
elseif player:getStorageValue(item.actionid) ~= -1 then
    item:transform(itemId + 1)
    player:teleportTo(toPosition, true)
else
    player:sendTextMessage(MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
end

You simply need to put it to your door' script:

movement.lua is same thing but for tiles/items (e.g. teleports).
 
Solution
Seems like there are doors with AID's from range [10001, 10999] meant to be used only by players with certain rebirth "level/count".
10001 - 1 reborn required
10002 - 2 reborn required
etc.

Lua:
if item.actionid > 10000 and item.actionid < 11000 then -- it is rebirths
    local reqRebirth = item.actionid - 10000
    if player:getRebirth() > reqRebirth then
        item:transform(itemId + 1)
        player:teleportTo(toPosition, true)
    else
        player:sendTextMessage(MESSAGE_INFO_DESCR, "It requires ".. reqRebirth .." rebirths to pass through this door.")
    end
elseif player:getStorageValue(item.actionid) ~= -1 then
    item:transform(itemId + 1)
    player:teleportTo(toPosition, true)
else
    player:sendTextMessage(MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
end

You simply need to put it to your door' script:

movement.lua is same thing but for tiles/items (e.g. teleports).
Thank you for taking your time to help me!

the movement.lua file, should it then be in data/movements/lib/movement.lua?

or should it be inside of data/movements/scripts?

because ive tried to put it in lib and it doesnt seem to work :/
 
Thank you for taking your time to help me!

the movement.lua file, should it then be in data/movements/lib/movement.lua?

or should it be inside of data/movements/scripts?

because ive tried to put it in lib and it doesnt seem to work :/
He told you where to actually put it in your existing script.

Look at the link he posted, which shows which line(61 to 66) should be replaced by the script he gave you...

about movements, its only if you create a teleport or use a floor, in the style of the Rookgaard Bridge that only passes Premium
 
He told you where to actually put it in your existing script.

Look at the link he posted, which shows which line(61 to 66) should be replaced by the script he gave you...

about movements, its only if you create a teleport or use a floor, in the style of the Rookgaard Bridge that only passes Premium

i understood what to do with the door.lua and ive changed it. But i still get an issue.

when having a character who is below 10 rebirths this appears (which is correct):

but as soon as i get a character that is above 10 rebirths this occurs:

to my understanding the movement.lua is simply for tiles and teleports but has to be put in movements.xml and movements/scripts. (this is what i wanted to be clearified)


EDIT:

I have managed to fix it, what needed to be changed is the fact that movement.xml has the same doors with a StepIn command that needed to be removed so the script could actually apply to the door.
 
Last edited:
Back
Top