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

Feature [TFS 1.2]+ Advanced Auto Loot System

Nekiro

Excellent OT User
TFS Developer
Support Team
Joined
Sep 7, 2015
Messages
2,129
Best answers
94
Reaction score
983
Hi, today I release system exclusively written to be released publicly. I noticed that we don't have a good auto loot system here on otland, so that's why. It was tested on latest tfs 1.3 master branch, but it should work in any 1.x version probably.

How does it work?
Clicking on corpse will loot the corpse, only corpse owners can auto loot the corpse, in addition to that you can choose to which backpack it should loot the item.
The configuration is also very easy! Just put the code and that's it.

Players can easily write their items into a list that will be parsed then and converted into auto loot config, configs are saved in database.

Example list:


Any means it will loot to anywhere, your main backpack including.

To send that window to player use, player:sendAutoLootWindow() method.

You can find the changes required to add this function to your server in my fork of forgottenserver, branch autoloot_system.
Link: nekiro/forgottenserver (https://github.com/nekiro/forgottenserver/tree/autoloot_system)

Enjoy, let me know if you liked it!
 

Pedrook

Well-Known Member
Joined
May 24, 2009
Messages
387
Best answers
3
Reaction score
94
sql missing.
Thanks for contributing to the community with this release.
 
OP
Nekiro

Nekiro

Excellent OT User
TFS Developer
Support Team
Joined
Sep 7, 2015
Messages
2,129
Best answers
94
Reaction score
983
sql missing.
Thanks for contributing to the community with this release.
Yeah, I forgot about it somehow, repo updated.
 

ZowN

Active Member
Joined
Mar 19, 2015
Messages
116
Best answers
1
Reaction score
48
Is this working flawlessly for you guys?

I'm using TFS 1.2
Looting only applies to main backpack(unless full)
If full, nothing happens(No errors). Haven't looked into why yet, might have to do something with my former adjustments to the server.
Writing out specific items to specific containers has no effect for me as well.
Just thought I'd write this before taking a look, to know if it's because of something in just my server or not.
 
OP
Nekiro

Nekiro

Excellent OT User
TFS Developer
Support Team
Joined
Sep 7, 2015
Messages
2,129
Best answers
94
Reaction score
983
Is this working flawlessly for you guys?

I'm using TFS 1.2
Looting only applies to main backpack(unless full)
If full, nothing happens(No errors). Haven't looked into why yet, might have to do something with my former adjustments to the server.
Writing out specific items to specific containers has no effect for me as well.
Just thought I'd write this before taking a look, to know if it's because of something in just my server or not.
Could you do more testing or elaborate actually all wrong behaviour that should be fixed? I'll fix that in my free time.
 

Zombiegod

Member
Joined
Oct 22, 2009
Messages
198
Best answers
1
Reaction score
24
here is a compare for people for easy access

Post automatically merged:

Also would it be possible to make it so it loots on kill instead of on corpse open?
 
Last edited:
OP
Nekiro

Nekiro

Excellent OT User
TFS Developer
Support Team
Joined
Sep 7, 2015
Messages
2,129
Best answers
94
Reaction score
983
here is a compare for people for easy access

Post automatically merged:

Also would it be possible to make it so it loots on kill instead of on corpse open?
Ofc it is possible, but you need to find a way yourself
 

Zombiegod

Member
Joined
Oct 22, 2009
Messages
198
Best answers
1
Reaction score
24
Player.cpp code has this erro

Code:
identifier "StringVector" is undefined
Lastest stable tfs
 

Zombiegod

Member
Joined
Oct 22, 2009
Messages
198
Best answers
1
Reaction score
24
for those using the source in "releases" make these edits

add this too tool.h
C++:
using StringVector = std::vector<std::string>;
and in the code change these
From
C++:
Database& db = Database::getInstance();
too
C++:
Database* db = Database::getInstance();
and from
C++:
if (DBResult_ptr result = db.storeQuery(query.str())) {
too

C++:
if (DBResult_ptr result = db->storeQuery(query.str())) {
 

Leo32

Getting back into it...
Joined
Sep 21, 2007
Messages
956
Best answers
14
Reaction score
401
for those using the source in "releases" make these edits

add this too tool.h
C++:
using StringVector = std::vector<std::string>;
and in the code change these
From
C++:
Database& db = Database::getInstance();
too
C++:
Database* db = Database::getInstance();
and from
C++:
if (DBResult_ptr result = db.storeQuery(query.str())) {
too

C++:
if (DBResult_ptr result = db->storeQuery(query.str())) {
Nope nope.

I confirmed in this thread:
That it builds just fine if your TFS codebase is up-to-date.

The errors are specific to you, due to old sources.
Gj sorting it out though.
 

Zombiegod

Member
Joined
Oct 22, 2009
Messages
198
Best answers
1
Reaction score
24
Nope nope.

I confirmed in this thread:
That it builds just fine if your TFS codebase is up-to-date.

The errors are specific to you, due to old sources.
Gj sorting it out though.
That is why i said the source in "releases" as that is what i am using, and i downloaded less then a week ago so its not that old. Releases section has to be manually updated, and the last time it was, was 443 commits ago, which my guess is when they added in the vectorstring

You can download and check for yourself, i promise i am not wrong.

Untitled.png
 
Top