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

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Get honor plug-in

Crazyd22

Member
Joined
Mar 25, 2010
Messages
165
Hey, I am trying to develop a plug-in that stops HB after you have reached a certain amount of honor.

I am getting stuck on retrieving the current amount of honor, so far I have:

Code:
public static int GetHonorCurrency();

        public override void Pulse()
        {    
            slog("honor (" + GetHonorCurrency + ")");
        }

but it comes back with the error:
Code:
Error: 'Styx.Bot.CustomClasses.Jumper.GetHonorCurrency()' must declare a body because it is not marked abstract, extern, or partial

Any ideas?

Thanks.
 
Post or PM me your entire code and I'll take a look. Hard to tell with that error without seeing the code around it (and more importantly, above it).
 
Post or PM me your entire code and I'll take a look. Hard to tell with that error without seeing the code around it (and more importantly, above it).

Hey, sent you the PM ^^
Thanks.
 
Basically, you had:

Code:
        public static int GetHonorCurrency();

        public override void Pulse()
        {
            slog("honor (" + GetHonorCurrency + ")");
        }

GetHonorCurrency() returns an int, so you need to set it to an int in your own code, then reference that int.

Like so:

Code:
        public static int currentHonor = Styx.Logic.Battlegrounds.GetHonorCurrency();

        public override void Pulse()
        {
            slog("honor (" + currentHonor + ")");
        }
 
Basically, you had:

Code:
        public static int GetHonorCurrency();

        public override void Pulse()
        {
            slog("honor (" + GetHonorCurrency + ")");
        }

GetHonorCurrency() returns an int, so you need to set it to an int in your own code, then reference that int.

Like so:

Code:
        public static int currentHonor = Styx.Logic.Battlegrounds.GetHonorCurrency();

        public override void Pulse()
        {
            slog("honor (" + currentHonor + ")");
        }
this all looks very complicated! good luck!
 
Styx.Logic.Battlegrounds.GetHonorCurrency is still bugged as far as I know. Always returns zero in my case.
 
this all looks very complicated! good luck!

Only difference:
public static int GetHonorCurrency();
public static int currentHonor = Styx.Logic.Battlegrounds.GetHonorCurrency();

public (defines what type of "protection" this variable has, ie. what other methods/classes can call it: public, protected, friend, private)
static (modifier, what type of object it is within the class)
int (defines variable type, this is an integer)
GetHonorCurrency(); (function call to retrieve the value of the player's honor)

The first call is attempting to create a function named GetHonorCurrency as type int, however, what the user wanted was to create an integer variable and then store the value returned by the function into it.
Thus: public static int currentHonor which then gets set with the value of Styx.Logic.Battlegrounds.GetHonorCurrency();
 
Also, it seems GetHonorCurrency() is missing from the 1.333 dll's.
 
Also, it seems GetHonorCurrency() is missing from the 1.333 dll's.
Yeah we need to get them to add that back, I perused through all the other functions in the dll's and didn't find it hidden in other classes.
 
Yeah we need to get them to add that back, I perused through all the other functions in the dll's and didn't find it hidden in other classes.

Didn't see Hawker on today, I'll let him know tomorrow.
 
Well, I got around to coding it for 1.331 so I could finish up the honor end of things, and it seems that at least in 1.331 GetHonorCurrency() returns 0 regardless of Honor amount.
 
Back
Top