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

Solved TFS 1.1 corpse, bag, depot not closing till 3 tiles away

Shadow Dan

Sh4dowDan
Joined
Jun 5, 2010
Messages
344
Reaction score
88
Location
Poland
My problem is explained on this screen shot.
I have feeling like i saw somewhere fix on that but can not find it.
autoclose_wswphne.png
 
Compiling errors? In that case please post them.
Most likely due to the updated Boost.
Code:
sudo apt-get install git cmake build-essential liblua5.2-dev libgmp3-dev libmysqlclient-dev libboost-system-dev
 
player.cpp
http://wklej.to/2mOYG

#EDIT
my src files:
Code:
The Forgotten Server - Version 1.0
Compilied on Jun  3 2015 02:05:26 for arch x64

A server developed by TFS TEAM, Others
Visit our forum for updates, support, and resources: http://otland.net/.

>> Loading config
>> Establishing database connection... MySQL 6.1.2
>> Running database manager
>> Loading vocations
>> Loading items
>> Loading script systems
>> Loading monsters
>> Loading outfits
>> Checking world type... PVP
>> Loading map
> Map size: 48422x47676.
> Map loading time: 78.605 seconds.
> Loaded house items in: 0.073 s
>> Initializing gamestate
>> Loaded 1127 npcs, spawned 51493 monsters.
>> Servidor feito por Romario.
Saving server...
> Saved house items in: 0.768 s
>> Fury Gate jest dzis w carlin.
>> Loaded all modules, server starting up...
>> Matera Server Online!
Github src files:
Code:
The Forgotten Server - Version 1.2
Compiled with Microsoft Visual C++ version 12.0
Compiled on Jun 15 2015 01:09:23 for platform x64

A server developed by Mark Samman
Visit our forum for updates, support, and resources: http://otland.net/.

>> Loading config
>> Establishing database connection... MySQL 6.1.2
>> Running database manager
>> Loading vocations
>> Loading items
[Warning - Items::parseItemNode] Unknown key value: breakChance
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: breakChance
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: breakChance
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: breakChance
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: breakChance
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: breakChance
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: breakChance
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: breakChance
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: breakChance
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: ammoAction
[Warning - Items::parseItemNode] Unknown key value: alwaysOnTop
[Warning - Items::parseItemNode] Unknown key value: topOrder
[Warning - Items::parseItemNode] Unknown key value: alwaysOnTop
[Warning - Items::parseItemNode] Unknown key value: topOrder
[Warning - Items::parseItemNode] Unknown key value: breakChance
[Warning - Items::parseItemNode] Unknown key value: ammoAction
>> Loading script systems

Lua Script Error: [Test Interface]
data/actions/scripts/secret service/amazonDisguiseKit.lua
data/actions/scripts/secret service/amazonDisguiseKit.lua:3: attempt to call method 'addOutfit' (a nil value)
stack traceback:
        [C]: in function 'addOutfit'
        data/actions/scripts/secret service/amazonDisguiseKit.lua:3: in main chunk
[Warning - Event::checkScript] Can not load script: scripts/secret service/amazonDisguiseKit.lua


Lua Script Error: [Test Interface]
data/actions/scripts/the thieves guild quest/dwarfDisguiseKit.lua
...ons/scripts/the thieves guild quest/dwarfDisguiseKit.lua:3: attempt to call method 'addOutfit' (a nil value)
stack traceback:
        [C]: in function 'addOutfit'
        ...ons/scripts/the thieves guild quest/dwarfDisguiseKit.lua:3: in main chunk
[Warning - Event::checkScript] Can not load script: scripts/the thieves guild quest/dwarfDisguiseKit.lua


Lua Script Error: [Test Interface]
data/movements/scripts/svargrond arena quest/arenaPit.lua
data/movements/scripts/svargrond arena quest/arenaPit.lua:3: attempt to call method 'addOutfit' (a nil value)
stack traceback:
        [C]: in function 'addOutfit'
        data/movements/scripts/svargrond arena quest/arenaPit.lua:3: in main chunk
[Warning - Event::checkScript] Can not load script: scripts/svargrond arena quest/arenaPit.lua


Lua Script Error: [Test Interface]
data/movements/scripts/svargrond arena quest/arenaPit.lua
data/movements/scripts/svargrond arena quest/arenaPit.lua:3: attempt to call method 'addOutfit' (a nil value)
stack traceback:
        [C]: in function 'addOutfit'
        data/movements/scripts/svargrond arena quest/arenaPit.lua:3: in main chunk
[Warning - Event::checkScript] Can not load script: scripts/svargrond arena quest/arenaPit.lua

[Error - GlobalEvent::configureEvent] No valid type "start" for globalevent with name griffinclawFlower
[Warning - BaseEvents::loadFromXml] Failed to configure event
>> Loading monsters
>> Loading outfits
>> Checking world type... PVP
>> Loading map
> Map size: 48422x47676.
> Map loading time: 63.654 seconds.
> Loaded house items in: 0.17 s
>> Initializing gamestate
[Warning - Commands::loadFromXml] Unknown command /serverdiag
>> Loaded 1127 npcs, spawned 51493 monsters.
>> Servidor feito por Romario.

Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/others/cleanHouse.lua:onStartup
data/globalevents/scripts/others/cleanHouse.lua:8: attempt to call field 'getDataString' (a nil value)
stack traceback:
        [C]: in function 'getDataString'
        data/globalevents/scripts/others/cleanHouse.lua:8: in function <data/globalevents/scripts/others/cleanHouse.lua:3>

Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/worldchanges/furygate.lua:onStartup
data/global.lua:441: attempt to call field 'getDataString' (a nil value)
stack traceback:
        [C]: in function 'getDataString'
        data/global.lua:441: in function 'getGlobalStorageValue'
        data/global.lua:456: in function 'setGlobalStorageValue'
        data/globalevents/scripts/worldchanges/furygate.lua:35: in function <data/globalevents/scripts/worldchanges/furygate.lua:4>

Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/gray island/grayIslandBosses.lua:onStartup
data/globalevents/scripts/gray island/grayIslandBosses.lua:16: attempt to call global 'doCreateTeleport' (a nil value)
stack traceback:
        [C]: in function 'doCreateTeleport'
        data/globalevents/scripts/gray island/grayIslandBosses.lua:16: in function <data/globalevents/scripts/gray island/grayIslandBosses.lua:14>
>> Loaded all modules, server starting up...
>> Matera Server Online!

So should i change my server to TFS 1.2 and start updating my scripts to that version one by one?
 
Last edited:
bump
I can't use src files tfs 1.2 from github because when i compile my server has milion bugs and even more. example stairs brings you down not up, you cant look at anything etc etc.

#edit
I fixed it myself, here is line in player.cpp that need to be changed. Should be useful for other players in future.
Code:
if (!Position::areInRange<3, 3, 0>(container->getPosition(), getPosition())) {
Code:
if (!Position::areInRange<1, 1, 0>(container->getPosition(), getPosition())) {
 
You were probably using a broken version, NOT TFS itself, since this line has never existed in player.cpp. Since the very beginning, the template parameters were 1, 1 and 0:
iurut5p.png

This is the first commit adding code to the repository.
 
I've used datapack and for this datapack that version is working better than any other.
Maybe someone who made this pack just edited it or made some bugs on purpose? idk but server is stable and has working scripts i will continue upgrading it.
 
The first errors are that the items ammuntion attributes etc got moved to weapons.xml (if you use an rlmap just use the weapons.xml from ORTS).
The addOutfit error: it got renamed to setOutfit.
The start error, it most likely got renamed to onStartup or something like that(once again check github).
Server diag. command got deleted since no one used it, just remove it from the xml file.
getDataString => getString.
doCreateTeleport was deleted and now uses the item:setDesination etc (I cheat and create a Game.createTeleport(item, pos) insted to make it easier to remember.

Most of these things actually get "fixed" by adding the compat.lua file (it was added not long ago on ORTS aswell.
 
Yup everything is fixable but im in worry that there is much more bugs that console dont say and you need for an example talk to npc(you know how many npcs and quests you can find in real map and how long is to check every script) or enter with interaction of script to see the bug.
All i wanted was datapack with working scripts/quests and i found it but TFS 1.2 makes it really bugged. Thats why i dont want switch to 1.2
If i dont have really good reason to switch into higher version i probably wont do it.
 
Yup everything is fixable but im in worry that there is much more bugs that console dont say and you need for an example talk to npc(you know how many npcs and quests you can find in real map and how long is to check every script) or enter with interaction of script to see the bug.
All i wanted was datapack with working scripts/quests and i found it but TFS 1.2 makes it really bugged. Thats why i dont want switch to 1.2
If i dont have really good reason to switch into higher version i probably wont do it.

There are numerous of reasons, insted of us repeating it in every thread - serach.
Unless you have modified ALOT of your server just go with a fresh ORTS and TFS.

Trust me you are gonna have a hard time getting support here for 1.0, unless you know how to code you should stay updated - just take this thread as an example.
 
Yes i have 2 options:
1. Stay with finished engine (with small amount of bugs and easy to fix)
2. Switch to TFS 1.2 engine and stay updated to lastest version with support on OTland and high amount of bugs and not working functions to fix)
I knew it before, just dont want put my all work into nothing.

Unless you have modified ALOT of your server just go with a fresh ORTS and TFS.
I used datapack, there is everything done. I saw just a small bugs like female hunter addon gives you first addon(tiara) instead of second for hunter gloves.

Fixing bugs is not problem for me, only c++ a bit.
Perhaps bug with not closing bags was the only bug in c++ and i dont need to switch engine?
Probably till i wont find any serious problems it will be pointless to switch.

I seen very weird bug on TFS monsters. There monsters have too high armor/defense so players cant hit it or killing it takes alot of time.
see balanced
rat.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Rat" nameDescription="a rat" race="blood" experience="5" speed="134" manacost="200">
<health now="20" max="20"/>
<look type="21" corpse="5964"/>
<targetchange interval="2000" chance="0"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="1"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="1"/>
<flag convinceable="1"/>
<flag pushable="1"/>
<flag canpushitems="0"/>
<flag canpushcreatures="0"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="5"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="15" attack="7"/>
</attacks>
<defenses armor="1" defense="2"/>
<elements>
<element earthPercent="12"/>
<element holyPercent="20"/>
<element icePercent="-6"/>
<element deathPercent="-10"/>
</elements>
<voices interval="5000" chance="10">
<voice sentence="Meep!"/>
</voices>
<loot>
<item id="3976" countmax="10" chance="50000"/><!-- worm -->
<item id="2148" countmax="7" chance="80000"/><!-- gold coin -->
<item id="2696" chance="20000"/><!-- cheese -->
</loot>
</monster>
and TFS unbalanced
rat.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Rat" nameDescription="a rat" race="blood" experience="5" speed="135" manacost="200">
<health now="20" max="20" />
<look type="21" corpse="5964" />
<targetchange interval="4000" chance="0" />
<flags>
<flag summonable="1" />
<flag attackable="1" />
<flag hostile="1" />
<flag illusionable="1" />
<flag convinceable="1" />
<flag pushable="1" />
<flag canpushitems="0" />
<flag canpushcreatures="0" />
<flag targetdistance="1" />
<flag staticattack="90" />
<flag runonhealth="5" />
</flags>
<attacks>
<attack name="melee" interval="2000" skill="10" attack="10" />
</attacks>
<defenses armor="5" defense="5" />
<elements>
<element earthPercent="25" />
<element holyPercent="20" />
<element icePercent="-10" />
<element deathPercent="-10" />
</elements>
<voices interval="5000" chance="10">
<voice sentence="Meep!" />
</voices>
<loot>
<item id="2148" countmax="4" chance="100000" /><!-- gold coin -->
<item id="2696" chance="39410" /><!-- cheese -->
</loot>
</monster>
Code:
    <strategy attack="100" defense="0"/>
    <defenses armor="1" defense="2"/>
Code:
    <defenses armor="5" defense="5" />
 
Last edited:
Yes i have 2 options:
1. Stay with finished engine (with small amount of bugs and easy to fix)
2. Switch to TFS 1.2 engine and stay updated to lastest version with support on OTland and high amount of bugs and not working functions to fix)
I knew it before, just dont want put my all work into nothing.


I used datapack, there is everything done. I saw just a small bugs like female hunter addon gives you first addon(tiara) instead of second for hunter gloves.

I bet the bugs you have fixed have already been patched on the ORTS git page.
This is most likely easy to fix(wrong protocol statment?) but you still created a thread insted of seraching and patching it.
So my guess is that you do not have alot of experience with C++ and stayd at 1.0 to have the tibiaking cast system.

(Trust me on this)
Those who want an updated server either make there own or buy a cast system and then get updates from the creator when TFS updates.
That is alot better then staying at an old version without the major updates (ex the optimized map loading).
 
Back
Top