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

[Plugin] Chest Looter

echelon17

New Member
Joined
Jan 6, 2011
Messages
176
Reaction score
8
This plugin will move to and loot all chests it finds within the game. I notice that the current 'Loot Chests' option in HB does not work, so I wrote this plugin to resolve the problem.

Only tested on a ground mount with other objects, but it works fine for me.

EDIT: Changelog: Merged all copies of the plugin into the main post.

1.0:
  • Initial Release
1.3:
  • Added blacklisting of objects. Since this plugin searches for the game object type "Chest" (applies to other objects too) containing the word "Chest", it may inadvertently pick out some Chest objects that are unavailable at the time. If it can't loot the chest after 3 attempts, it will blacklist it for an hour.
  • Also added some more sanity checks, such as when on transport, etc.
2.0:
  • Rewrote a ton of code, hence labeling as 2.0.
  • Fixed incredibly stupid mistake of chaining && conditionals instead of || (or) conditionals - causing the entire plugin to not actually work.
  • Added CanLoot object check to try and reduce the possibility of locating chests that cannot be looted yet and wasting time blacklisting.
  • Added big combat fix. Not sure whether or not this plugin or Singular is causing strange behaviour, but sometimes my character would target mobs above/below me or mobs through walls. I've added some combat target checking now to ensure it will only target closest hostile mobs that are within line of sight. Again, not sure how my plugin would affect mob tracking but what the hell, it's fixed in this.
3.0:


  • Still learning, so cleaned up things significantly.
  • Tested and confirmed to work fine.


3.1:


  • Final update.
  • Removed CanLoot() check as this doesn't appear to function properly. HB issue.
  • Changed chest name detection from "Chest" to "Treasure Chest" to eliminate possible false positives. This will ONLY loot treasure chests now and not all chests.

3.2:


  • Added fix/safeguard for objects out of distance and with no location.

3.3:


  • Fixed deadlock where HB cannot navigate to chest, so toon remains stuck in position.
 

Attachments

Last edited:
doesnt work with the latest update
Code:
[18:48:33:554] Plugin Chest Looter threw an exception in 'Pulse'! Exception:[18:48:33:557] System.NullReferenceException: Object reference not set to an instance of an object.
   at ChestLooter.ChestLooter.Pulse() in c:\Users\aman\Desktop\hb test\Plugins\ChestLooter.cs:line 59
   at Styx.Plugins.PluginWrapper.Pulse()
[18:48:33:698] Spell_C::CastSpell(3044, 0, 0xF33007EF000615F5, 0) [2]
[18:48:33:714] -Arcane Shot
[18:48:33:891] Plugin Chest Looter threw an exception in 'Pulse'! Exception:
[18:48:33:891] System.NullReferenceException: Object reference not set to an instance of an object.
   at ChestLooter.ChestLooter.Pulse() in c:\Users\aman\Desktop\hb test\Plugins\ChestLooter.cs:line 59
   at Styx.Plugins.PluginWrapper.Pulse()
[18:48:34:037] Plugin Chest Looter threw an exception in 'Pulse'! Exception:
[18:48:34:037] System.NullReferenceException: Object reference not set to an instance of an object.
   at ChestLooter.ChestLooter.Pulse() in c:\Users\aman\Desktop\hb test\Plugins\ChestLooter.cs:line 59
   at Styx.Plugins.PluginWrapper.Pulse()
[18:48:34:189] Plugin Chest Looter threw an exception in 'Pulse'! Exception:
[18:48:34:190] System.NullReferenceException: Object reference not set to an instance of an object.
   at ChestLooter.ChestLooter.Pulse() in c:\Users\aman\Desktop\hb test\Plugins\ChestLooter.cs:line 59
   at Styx.Plugins.PluginWrapper.Pulse()
[18:48:34:347] Plugin Chest Looter threw an exception in 'Pulse'! Exception:
[18:48:34:347] System.NullReferenceException: Object reference not set to an instance of an object.
   at ChestLooter.ChestLooter.Pulse() in c:\Users\aman\Desktop\hb test\Plugins\ChestLooter.cs:line 59
   at Styx.Plugins.PluginWrapper.Pulse()
[18:48:34:494] Plugin Chest Looter threw an exception in 'Pulse'! Exception:
[18:48:34:494] System.NullReferenceException: Object reference not set to an instance of an object.
   at ChestLooter.ChestLooter.Pulse() in c:\Users\aman\Desktop\hb test\Plugins\ChestLooter.cs:line 59
   at Styx.Plugins.PluginWrapper.Pulse()
[18:48:35:838] Stopping the bot!
[18:48:35:839] Stop called!
 

Attachments

Should work fine with the latest update. I made a new version some weeks ago but didn't bother posting it because I had no feedback on this one. Try this:
 
Last edited:
thanks for the fix.not throwing an error,which is good.Will watch it and as soon as it spots a chest,will update
 
Is it possible to make it work like GB? I mean, the bot flying by certain zones and just loot the treasures as if they were ores or herbs? What would it take to do that?
 
It's not really designed as a chest farmer, it's intended more to fix the 'Loot Chests' option in GB. When you're levelling a toon this will loot the chests in the area, but not specifically go hunting for chests.
 
Seems nice, haven't had the chance to see it in action however. I may try to "test" it if i happen on a chest sometime! Thanks for your effort.
 
Just skimmed quickly over your plugin (I had done this for myself for some time already)...
Do you take into account any flying before you dismount ^^
Otherwise when ur flying around and it finds a chest you might fall to your death (one of my own mistakes, haha).
 
Just skimmed quickly over your plugin (I had done this for myself for some time already)...
Do you take into account any flying before you dismount ^^
Otherwise when ur flying around and it finds a chest you might fall to your death (one of my own mistakes, haha).
I thought you looked at the code? :P

Yes it takes this into account.;

Code:
if (nearestChest != null && nearestChest.Distance <= 3 && count <= maxAttempts) { // If we're close enough to loot, and we haven't exceeded maxAttempts:
                        WoWMovement.MoveStop();
                        if (Me.Mounted) { Mount.Dismount(); Thread.Sleep(250); } // If mounted, dismount (for safety)
......
}
 
Hi, I noticed an error or issue of sorts. This attempted to loot some sortof chests that exist in the stormwind mage tower. I forget the name, but my bot was going there to train at the time. And it kept trying to loot 4 or 5 chests there. The chests weren't actually lootable though... They were like fake nonloot chests you see here and there in the world. Would like some way to blacklist chests.
 
Hi, I noticed an error or issue of sorts. This attempted to loot some sortof chests that exist in the stormwind mage tower. I forget the name, but my bot was going there to train at the time. And it kept trying to loot 4 or 5 chests there. The chests weren't actually lootable though... They were like fake nonloot chests you see here and there in the world. Would like some way to blacklist chests.
It automatically blacklists after 4-5 loot attempts. If you give me the name of the chests I'll come up with a global blacklist solution.
 
I asked for the names of chests to blacklist. I don't need names of chests to loot.
 
I think there are more chest to blacklist than the ones to pickup so it might be better to choose the ones to pick ;)
 
I keep getting the following:

[ChestLooter] Found Dark Iron Treasure Chest with GUID 17371274968482089225 at <0, 0, 0> moving to it.

This ends up causing me to start running away from my current zone and into other zones endlessly.

Other than that, it works as intended.

EDIT: Using version 3.1.0
 
Last edited:
I got something like that too, standing in Northern STV:

[ChestLooter] Found Sturdy Treasure Chest with GUID 17371274908352549428 at <0, 0, 0> moving to it.

at the same time:

[9:08:31:672] Activity: Loading Tile/s
[9:08:32:532] Flight time: 00:25:33
[9:08:32:532] Run Time: 01:15:13
[9:08:32:532] Difference: 2980
[9:08:32:533] Changed POI to:Type: Fly, R: Use, Aerie Peak, The Hinterlands

Instead of taking the flightpath it started running. and being a level 31 character I died in Burning Steppes.
Maybe there is an error in the code that makes me take a flight path? I was standing next to a Flight Master when I started the bot.

I'm also on 3.1.0
 
Back
Top