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

How to add new doors? TFS 1.5 downgraded to 8.6 (modal window version)

Dran Ryszard

Member
Joined
Apr 25, 2023
Messages
81
Reaction score
18
Location
Poland
Hi, any ideas how to add new doors? I was add to global.lua, but still not work :( (The doors what not work have id 19849, the open doors with id 19851 work and after use they change to 19849(close) but 19849 not)

openHouseDoors = {
1220, 1222, 1238, 1240, 3539, 3548, 5083, 5085, 5102, 5111, 5120, 5129, 5285, 5287, 5516, 5518, 6199,
6201, 6256, 6258, 6895, 6904, 7037, 7046, 8548, 8550, 9172, 9174, 9274, 9276, 10275, 10277, 10472, 10481, 19851
}
closedHouseDoors = {
1219, 1221, 1237, 1239, 3538, 3547, 5082, 5084, 5101, 5110, 5119, 5128, 5284, 5286, 5515, 5517, 6198,
6200, 6255, 6257, 6894, 6903, 7036, 7045, 8547, 8549, 9171, 9173, 9273, 9275, 10274, 10276, 10471, 10480, 19849
}
 
Solution
Hi, any ideas how to add new doors?
Doors script is in data/scripts/actions/others/doors.lua.
For open doors it does:
Code:
item:transform(itemId - 1)
for closed doors it does:
Code:
item:transform(itemId + 1)
So it expects doors to be +/- 1 ID, not 2 like yours 19849 and 19851.

You have to edit your items.otb and items.xml to map these items into 2 IDs next to each other on server side or edit doors.lua to execute +/- 2 for given IDs.
Hi, any ideas how to add new doors?
Doors script is in data/scripts/actions/others/doors.lua.
For open doors it does:
Code:
item:transform(itemId - 1)
for closed doors it does:
Code:
item:transform(itemId + 1)
So it expects doors to be +/- 1 ID, not 2 like yours 19849 and 19851.

You have to edit your items.otb and items.xml to map these items into 2 IDs next to each other on server side or edit doors.lua to execute +/- 2 for given IDs.
 
Last edited:
Solution
Doors script is in data/scripts/actions/others/doors.lua.
For open doors it does:
Code:
item:transform(itemId - 1)
for closed doors it does:
Code:
item:transform(itemId + 1)
So it expects doors to by +/- 1 ID, not 2 like yours 19849 and 19851.

You have to edit your items.otb and items.xml to map these items into 2 IDs next to each other on server side or edit doors.lua to execute +/- 2 for given IDs.

Ohh sorry i type wrong door ID, closed are 19850 and open 19851.


///////////////////
Okey @Gesior.pl thanks! But im stupid.. Just remove that topic, couse i think my iq is lower than 10.. I mean about doors 19850 and 19851, but in global.lua i was add 19849 and 19851.. :D
 
Last edited:
Back
Top