What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

LootItemTask

tozededao

Community Developer
Joined
Jan 15, 2010
Messages
1,225
Reaction score
5
Is there anyway to make it work more efficiently? Sometimes it has 2 items to pick, one closer and one further away but it goes to the further away. Is there anyway to change the loot order from FIFO to the one thats closer?

Would also be useful if we had that on breakables/objects.
 
I'll cook you one up if you're interested, i'm currently making a loot/dynamic item filter while i wait for pushedx to implement id 0 objects (projectiles/effects/particles/etc for the dodge plugin)
 
Is there anyway to make it work more efficiently?

Unless you want back and forth looping of items again, not really. :p

It finds an item that is the closest to you using euclidean distance, and then commits to looting that item. If another item drops that is closer from the time the item is decided, or if combat happens again moving the character away from the item, it will not replace it.

Otherwise, the same thing will happen as before, one item is closer, bot starts to move towards it, another item comes into view that is closer due to the way the map / object loading works in this game, and then bot switches, then an infinite cycle happens because it's always trying to move to the closest item after you change position. If any other tasks kick in before looting that cause the bot to stop looting and do something else, that too adds to it.

Most of the old problems EB had pretty much stem from this very issue, as depending on which tileset you a're in, it manifests in different ways. That's why most of the code now, save for ExampleRoutine targeting, picks something, and commits to doing it until it's done.

There's two looting tasks now (as opposed to 1 before) to make it work better, one short range 'on screen', and then the long range 'any known item'. basically though, there's no generic way to try and optimize it without coding a bunch of specific behaviors for different tilesets, and then doing a ton of testing and fine tuning to handle the randomness of the area generation in this game. I can't even say there's a way to code logic that works the way you want in random generated areas in the first place, but if you're up for that challenge, go for it!
 
Back
Top