• 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 0.x] Simple autoloot for older versions

Roddet

Staff member
Global Moderator
Joined
May 1, 2013
Messages
928
Solutions
101
Reaction score
748
Location
Mex
It should be way faster than the current autoloot mods

e87dcaeaf0255c0f9cdd6f7034c13b06.png
66837e0e0ca0bc8b5488272fb794ea67.png

if you have checkCorpseOwner on true (config.lua), only the owner will auto-loot the monster (if owner not found, it will be accesible for everyone)
SQL:
ALTER TABLE `players` ADD autoloot BLOB NOT NULL AFTER `conditions`;

i used OTXServer2 as base but should work for all versions, if you have any issue just comment

known issues for other versions or outdated otx2:
missing getItemList() method on Container class -> Fix: here
missing clear() method on PropWriteStream class -> Fix: here
missing MSG_NONE on MessageClasses enum -> Fix: here (0 or 0x00)
missing checkExhausted function -> Fix: here

general fixes:
an issue where it wasnt possible to loot coins if your item list was empty has been addressed -> Fixes: fix-1, fix-2
 
Last edited:
Thanks Roddet, awesome as always! There's a way to customize? X slots for free, Y slots for VIP. Similar to MOD who worked for us.
It should be way faster than the current autoloot mods

View attachment 73106
View attachment 73104

if you have checkCorpseOwner on true (config.lua), only the owner will auto-loot the monster (if owner not found, it will be accesible for everyone)
SQL:
ALTER TABLE `players` ADD autoloot BLOB NOT NULL AFTER `conditions`;
 
Not currently but I could make the addition once I get some free time again
 
Not currently but I could make the addition once I get some free time again
Ok, thanks for this amazing release, im will try now and compile my server. Somethings like custom slots i said, block items, block money get, block bank transfer, etc...
Post automatically merged:

Got this error on compile

C++:
iologindata.cpp: In member function ‘bool IOLoginData::savePlayer(Player*, bool, bool)’:
iologindata.cpp:956:18: error: ‘class PropWriteStream’ has no member named ‘clear’
  propWriteStream.clear();
 
Last edited:
Ok, this error now

C++:
monster.cpp: In member function ‘void Monster::executeAutoLoot(Container*, const DeathList&)’:
monster.cpp:1342:34: error: ‘class Container’ has no member named ‘getItemList’; did you mean ‘getItems’?
   ItemList corpseItems = corpse->getItemList();
 
Last edited:
All things seems to works perfect! But autoloot its not getting itens inside a bag, anyway, thanks for contribution Roddet, u're amazing!!! <3
For some reason I assumed getItemList() was returning a full item list.
I added recursivity so now every child container will be examined
 
Can you add function for collect all items?
 
Last edited:
ubuntu 16

error : unused variable 'begin' [-Werror=unused-variable] "bool begin = true;"
 

Attachments

ubuntu 16

error : unused variable 'begin' [-Werror=unused-variable] "bool begin = true;"
Remove this line
You could also remove the -Werror flag from your make/cmake files or use -Wno-error to avoid treating warnings as errors
 
Last edited:
Remove this line
You could also remove the -Werror flag from your make/cmake files or use -Wno-error to avoid treating warnings as errors
Items take normally, gold does not take
2148
2152
2160
Post automatically merged:

nothing true if you don't have any item the gold doesn't work, you have to have some item in the slot..
even using the fix
Post automatically merged:

with the char of god it takes even without slot, now in normal char of player it doesn't work if you don't have an item.
added your fix and it still happens
 
Last edited:
I'll check the code once I can but as far I know there is more people using the code with no issues
This Fix should solve your problem
 
I'll check the code once I can but as far I know there is more people using the code with no issues
This Fix should solve your problem
I'm mostly curious, but what if someone added the brown bag to their autoloot, and a monster dropped a bag with items inside?
 
I'm mostly curious, but what if someone added the brown bag to their autoloot, and a monster dropped a bag with items inside?
Good question.

Just by reading the code (because I dont remember) I can tell that it will try to loot all the items inside first and then grab the brown bag

However, lets assume the container has 6 items and the player could only loot 3 items of them due no space nor slots

The container will remain on the corpse with those 3 items inside left because on the last check <this one> the same will happen, the code will be aware that the player has no capacity nor slots and nothing will happen

The funny thing is that I accidentally omitted what you mentioned (didnt think about it), so I unconsciously solved the problem xD

EDIT: I didn realize about the continue keyword due quick review, so in other words, the container itself will be completely ignored and only the items inside will be taken in count
 
Last edited:
I'll check the code once I can but as far I know there is more people using the code with no issues
This Fix should solve your problem
does not solve, only with staff load it works
need to put an item without slot
Post automatically merged:

if i add any item the autoloot recognizes the gold

in group6 I don't need to add item that it recognizes
I tested with your fix
 
Back
Top