TommyGrule
New Member
- Joined
- Aug 30, 2011
- Messages
- 53
- Reaction score
- 0
Thank you!
if (bestNodes.Count > 1)
{
Random random = new Random();
int index = random.Next(0, (bestNodes.Count - 1)); // bestNodes.Count for List<WoWGameObject>
bestNode = bestNodes[index];
}
if (bestNodes.Count > 1)
{
int index = bestNodes.Count - 1; // bestNodes.Count for List<WoWGameObject>
bestNode = bestNodes[index];
}
why do you randomise the best node list? it should be ordered by distance, it keeps running past eggs that are right in front of me which looks incredibly bot like
I changed:
PHP:if (bestNodes.Count > 1) { Random random = new Random(); int index = random.Next(0, (bestNodes.Count - 1)); // bestNodes.Count for List<WoWGameObject> bestNode = bestNodes[index]; }
to:
PHP:if (bestNodes.Count > 1) { int index = bestNodes.Count - 1; // bestNodes.Count for List<WoWGameObject> bestNode = bestNodes[index]; }
Seems much more efficient like this
[12:52:07 AM:640] Activity: [Noble Gardener]: search for Player..
[12:52:07 AM:778] Activity: [Noble Gardener]: search for best node
[12:52:08 AM:071] Activity: [Noble Gardener]: Move to Brightly Colored Egg Distance: 14yards
[12:52:08 AM:083] Activity: Loading Tile/s
[12:52:08 AM:435] Activity: [Noble Gardener]: Move to Brightly Colored Egg Distance: 14yards
[12:52:08 AM:670] Activity: [Noble Gardener]: Move to Brightly Colored Egg Distance: 13yards
[12:52:08 AM:836] Activity: [Noble Gardener]: Move to Brightly Colored Egg Distance: 11yards
[12:52:09 AM:003] Activity: [Noble Gardener]: Move to Brightly Colored Egg Distance: 10yards
[12:52:09 AM:172] Activity: [Noble Gardener]: Move to Brightly Colored Egg Distance: 8yards
[12:52:09 AM:343] Activity: [Noble Gardener]: Move to Brightly Colored Egg Distance: 7yards
[12:52:09 AM:507] Activity: [Noble Gardener]: Move to Brightly Colored Egg Distance: 6yards
[12:52:09 AM:742] Activity: [Noble Gardener]: Interact..
[12:52:09 AM:743] InteractDebug:666118376
[12:52:09 AM:777] Interact Done:666118376
[12:52:11 AM:813] InteractDebug:666118376
[12:52:11 AM:846] Interact Done:666118376
[12:52:12 AM:826] Activity: [Noble Gardener]: search for Player..
[12:52:12 AM:827] Plugin [Noble Gardener] threw an exception in 'Pulse'! Exception:
[12:52:12 AM:830] System.NullReferenceException: Object reference not set to an instance of an object.
at NobleGardenerAchievement.NobleGardenerAchievement.Pulse() in e:\Honorbuddy\Plugins\NobleGardener_1.1.8_beta.cs:line 107
at Styx.Plugins.PluginWrapper.Pulse()
[12:52:12 AM:936] System.ApplicationException: Cannot run Tick before running Start first!
at TreeSharp.Composite.Tick(Object context)
at Styx.Logic.BehaviorTree.TreeRoot.Tick()
[12:52:12 AM:936] Cleared POI - Reason Exception in Root.Tick()
[12:52:12 AM:936] Cleared POI
[12:52:13 AM:755] Plugin [Noble Gardener] threw an exception in 'Pulse'! Exception:
[12:52:13 AM:756] System.NullReferenceException: Object reference not set to an instance of an object.
at NobleGardenerAchievement.NobleGardenerAchievement.Pulse() in e:\Honorbuddy\Plugins\NobleGardener_1.1.8_beta.cs:line 107
at Styx.Plugins.PluginWrapper.Pulse()
[12:52:13 AM:796] Activity: Loading Tile/s
[12:52:13 AM:939] Updating repair cost for current equipped items. New value: [0g24s90c]
This works great, a few ideas for improvements:Wanted to provide an update to this plugin.
- I've added a UI to allow for selecting what you want to do so there is no need for separate plugins
- Doesn't try to get eggs up high
- Selects the closest egg instead of randomly picking a node
By default it just searches for eggs and opens them. Also fixed the problems that occur when you don't have anything equiped in mainhand. Props to original author.