Page 1 of 1
Looting problem
Posted: Fri Jun 03, 2011 7:15 pm
by kanta
Sometimes the bot doesn't loot some bodies. This isn't a major issue, but it bothers me a little bit. It seems to happen mainly when I use a skill that hits multiple enemies and kills them all with one shot. Typically the non targeted mobs that are killed do not get looted. Here's my loot options:
Code: Select all
<!-- Loot settings -->
<option name="LOOT" value="true" />
<option name="LOOT_ALL" value="true" /> <!-- Loot all nearby dead mobs after combat -->
<option name="LOOT_IN_COMBAT" value="false" />
<option name="LOOT_DISTANCE" value="225" />
<option name="LOOT_PAUSE_AFTER" value="0" /> <!-- probability in % for a short rest -->
<option name="LOOT_AGAIN" value="1000" />
Re: Looting problem
Posted: Fri Jun 03, 2011 7:46 pm
by lisa
I have noticed this also a couple of times myself.
What I noticed is that if your target dies but you still have agro and the other mob/mobs die from the last aoe then it has a point where it thinks the target is dead but you are still in combat but then you are out of combat before it can get a new target. So it skips the looting part of the code altogether.
I haven't had a chance to loot into improving it as yet, working on a lot of other stuff atm
Re: Looting problem
Posted: Fri Jun 03, 2011 10:27 pm
by rock5
lisa wrote:I haven't had a chance to loot into improving it as yet
This made me laugh because the spelling mistake is related to the subject.

Re: Looting problem
Posted: Fri Jun 03, 2011 10:53 pm
by lisa
lol yeah I do that a bit, pretty sure there is some heriditory mind thing where we all go senile sooner then we should.
Re: Looting problem
Posted: Fri Jun 03, 2011 11:39 pm
by kanta
No rush

Was just wondering if it was happening because of a wrong setting.
Re: Looting problem
Posted: Sat Jun 04, 2011 11:56 am
by Mushroomstamp
Good to hear others having the same problem. It seems also that the un-looted bodies are often later recognized, (i.e. when character is in another room of an instance), because I get a lot of errors for unlooted monster being > max target distance, even when there aren't any un-looted monsters in sight.
Re: Looting problem
Posted: Sat Jun 04, 2011 12:07 pm
by lisa
hmm I couldn't say off the top of my head how the loot code works but it seems to me it only tries to loot after it thinks it has killed something. It then looks around for other bodies aswell. So maybe do the loot check on leave combat instead of after it thinks the mob is dead.
Re: Looting problem
Posted: Sat Jun 04, 2011 2:49 pm
by Mushroomstamp
lisa wrote:maybe do the loot check on leave combat
That was the first thing I tried... now that I think of it, I wonder if that is what's causing all my self.TargetPtr == 0 errors.
Re: Looting problem
Posted: Sat Jun 04, 2011 10:04 pm
by rock5
The looting works in 2 parts.
The first part is the original looting and basically hasn't changed. It loots the monster you just killed and relys on it still being the target. The LOOT_IN_COMBAT option affects this looting.
The second part is the loot all looting. It looks for lootable bodies nearby after combat has ended. You enable/disable it with the LOOT_ALL option.
Both checks are done after the onLeaveCombat code so it is possible that something you added to the onLeaveCombat section could interfer with the looting. In particular, if something changes the target then the first looting wont work. I'm not sure what would interfer with the loot all function.
If you are having strange loot behaviour, try removing the code you've added in the onLeaveCombat section.
Re: Looting problem
Posted: Sat Jun 04, 2011 10:08 pm
by lisa
I don't have any onleavecombat code.
What I see is happening is the target is killed and with an aoe most of the time, it is still in combat hence the not looting straight away. It then clears target hoping to get the target of what is attacking it but the aoe killed it. The in combat goes away and it has no target and therefore doesn't loot.
I was working along the lines of instead of clearing target after it's dead just use findenemy and see how that affects it. if there is no enemy to find then loot.
Re: Looting problem
Posted: Sat Jun 04, 2011 10:40 pm
by rock5
If it enters the "fight" then the only way it can exit without looting is if it is still in combat. So what it must do is check that you are still battling then exit the fighting function without looting. Then when it gets back to the bot.lua main loop, it finds that it has lost aggro so it continues.
The only way I can see to fix it is to add an extra loot check somewhere in bot.lua which is not the best solution. I'll have another look at the loot functions to see if I can tweak them a bit.
Just 1 question: you aren't in a party when you get the loot problems are you?
Re: Looting problem
Posted: Sat Jun 04, 2011 11:03 pm
by lisa
technically yes I have been in party, instance running, wouldn't be an agro issue though as other party member is elsewhere.
Re: Looting problem
Posted: Sun Jun 05, 2011 1:11 am
by rock5
It's possible that when you use the aoe the mobs all die but the battling flag takes too long to clear. If so then the following should help.
Around line 1277 of player.lua you will see,
Code: Select all
if not self.Battling then
self:lootAll()
end
Change to
Code: Select all
if not self.Battling or not self:findEnemy(true,nil,evalTargetDefault) then
self:lootAll()
end
Re: Looting problem
Posted: Mon Jun 06, 2011 11:17 pm
by lisa
The loot has become more reliable while using aoe with this code, it does however cause a pause after leaving combat for 0.5 -1 second which is probably because it is looking for mobs to kill.
Re: Looting problem
Posted: Tue Jun 07, 2011 1:29 am
by rock5
lisa wrote:it does however cause a pause after leaving combat for 0.5 -1 second which is probably because it is looking for mobs to kill.
I'd say it can't be helped. At least it should only add that pause after aoe when having this problem. Regular battles should end with self.Battling equaling false so it wont do the search.
Re: Looting problem
Posted: Tue Jun 07, 2011 3:37 am
by lisa
yup absolutely correct, if normal single target botting loot works as usual, it's only when aoe botting is there a pause =)