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

Will this small plugin work?

Gideonnn

New Member
Joined
Apr 7, 2012
Messages
94
Reaction score
0
So, for some reason my GB is acting weird and a bit broken, I thought I should give this a shot.

My char sometimes, after herbing/mining, stays idle for no reason, untill eternity! When I press the mount button manually it goes on as if nothing happned. Now, this isn't the case all the time, but I dont want my bot to stop when im off at school or something.

So, the idea was to check if the char is moved every x seconds, if he didn't, mount!

As this is my first try at a real plugin, feel free in any way to advice me etc. Gogo, check it!

View attachment Template.cs
 
So, for some reason my GB is acting weird and a bit broken, I thought I should give this a shot.

My char sometimes, after herbing/mining, stays idle for no reason, untill eternity! When I press the mount button manually it goes on as if nothing happned. Now, this isn't the case all the time, but I dont want my bot to stop when im off at school or something.

So, the idea was to check if the char is moved every x seconds, if he didn't, mount!

As this is my first try at a real plugin, feel free in any way to advice me etc. Gogo, check it!

View attachment 40417

Honorbuddy comes with a lot of stuff, use the built in stuff when possible.

Code:
        public readonly WaitTimer _WaitTimer = WaitTimer.FiveSeconds;

        public override void Initialize()
        {
            _oldLocation = Me.Location;
        }

        public override void Pulse()
        {
            if (!_WaitTimer.IsFinished) return;

            _WaitTimer.Reset();
            // Check if character moved
            checkStuck();
        }

as for the rest, I have no idea. There are some bugs when the bot thinks you are inside a building when its not.
 
Most of the stuff is hard to find because I dont know where to look. :p But whats the difference of waittimer compared to stopwatch?
 
Ahh okay, that's nice. :) The mount part, should there be any more checks, so it doesnt try to mount when gathering or something.

Also, what is the proper way to test this addon? How can I see it actually works?
 
Ahh okay, that's nice. :) The mount part, should there be any more checks, so it doesnt try to mount when gathering or something.

Also, what is the proper way to test this addon? How can I see it actually works?

Well I usually look at whats happening, Add some Logging.Write("Stuff is happening"); in your methods, and ask yourself, is this supposed to happen?
Bot logic is not my cup of tea, so I can't give you any pointers on that.
 
Back
Top