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

How to Write a Custom Class, a Guide for Beginners.

guide updated for the settings helper class.
soon to come....
Adding a UI
 
I got a question for you, If i want to make my mage do this


Ice barrier up at all times
casting frostbolt at first pull
then mage freeze and 2 icelances
and if target is not dead frostbolt. I have no idea what to do or how to code this. Or how to make this rotation work. I read your guide several times.
 
I got a question for you, If i want to make my mage do this


Ice barrier up at all times
casting frostbolt at first pull
then mage freeze and 2 icelances
and if target is not dead frostbolt. I have no idea what to do or how to code this. Or how to make this rotation work. I read your guide several times.
best thing you can do is take a look at some of the more simple CC's if your having issues, then ask a CC dev if the functionality you want can be added to their CC.
 
yea sure :). btw when i use amplify Mage cc thingy i sometimes get this error when i dc



"System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType)
at Styx.WoWInternals.Lua.GetReturnVal[T](String lua, UInt32 retVal)
"

What is causing this?
 
yea sure :). btw when i use amplify Mage cc thingy i sometimes get this error when i dc



"System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType)
at Styx.WoWInternals.Lua.GetReturnVal[T](String lua, UInt32 retVal)
"

What is causing this?
whatever it is, it needs to be reported in that thread not this one.
 
Herro!
I added HB.exe and Tripper.tools as reference, but the intellimenu doesn't open when pressing dot at i.e. "return WoWClass." it doesn't show up a menu with the different classes that the references should identify. Also, if i type some random jitterish it doesn't recognize that eighter and say that it's wrong.

I added blank.cs(file i got from thread) and the HB.exe and Tipper.tools.dll as a reference(following the exact guide)

Any1 got any idea what i'm don' wrong?


edit CnG fixed it for me =) He's awesome
 
Last edited:
good read, glad to see you put a lot of effort into it buddy keep it up hope to see that it gets bigger^^ so I can learn more:D
 
I try to create my first CC and have 2 questions.

1. Me CC will only attack the first target but not the adds?
2. And how to buff on startup or the begining of a bg?
 
One way could be to check for the prep buff + buff name <28mins (that should help stop it just spamming your buffs, but yet will cast your buff during prep, hopefully only once.)
 
Is there documentation available what stuff like "Me.CurrentTarget.Distance" and "SpellManager.CanCast" exactly do (Not limited to these 2 examples, but all possible ones in HB)?
 
Is there documentation available what stuff like "Me.CurrentTarget.Distance" and "SpellManager.CanCast" exactly do (Not limited to these 2 examples, but all possible ones in HB)?

Whatever documentention is available is provided in the Honorbuddy.xml file that ships with Honorbuddy. Visual Studio parses this file, and makes it available to you through Intellisense and its Object Browser.

That's all there is. Most of the information should be self evident. However, there are some glaring omissions. For instance, without testing, there is no way for a developer to know:
  • The difference between IsFacing() and IsSafelyFacing()
  • Should you prefer ObjectManager.Me, or StyxWoW.Me? Why do both exist?
  • Should you get the inventory from LocalPlayer.BagItems or the InventoryManager? Why do both exist?
  • What's the difference between the Auras list and the ActiveAuras list?
  • tons of other ambiguities like this
Of course, the seasoned Community developers know the answers. They have put in a huge amount of time to learn the nuances. But, that's not the point...

A developer 'probing' a method to determine how it works is wrong. Without documentation there is no guarantee the method will continue to operate with that characteristic between releases. A great example of this is somewhere in the 4xxx-5xxx releases of Honorbuddy, some 'facing' methods were broken, or changed how they operated. This caused a number of CCs to break, and is still a problem for the InteractWith behavior. To date, no one has figured out the problem, or what changed.

Also, from an effort standpoint, good documentation is a key element for making a Community 'take off'. Writing proper documentation for a method may take 30mins of a key developer's time. The time saved is...
(2+ hours to write probing functions to figure out how it works) times (50+ Community Developers)
that's a 200+ return on investment​

Its a major problem, but it is what it is.


cheers,
chinajade
 
Last edited:
Whatever documentention is available is provided in the Honorbuddy.xml file that ships with Honorbuddy. Visual Studio parses this file, and makes it available to you through Intellisense and its Object Browser.

That's all there is. Most of the information should be self evident. However, there are some glaring omissions. For instance, without testing, there is no way for a developer to know:
  • The difference between IsFacing() and IsSafelyFacing()
  • Should you prefer ObjectManager.Me, or StyxWoW.Me? Why do both exist?
  • Should you get the inventory from LocalPlayer.BagItems or the InventoryManager? Why do both exist?
  • What's the difference between the Auras list and the ActiveAuras list?
  • tons of other ambiguities like this
Of course, the seasoned Community developers know the answers. They have put in a huge amount of time to learn the nuances. But, that's not the point...

A developer 'probing' a method to determine how it works is wrong. Without documentation there is no guarantee the method will continue to operate with that characteristic between releases. A great example of this is somewhere in the 4xxx-5xxx releases of Honorbuddy, some 'facing' methods were broken, or changed how they operated. This caused a number of CCs to break, and is still a problem for the InteractWith behavior. To date, no one has figured out the problem, or what changed.

Also, from an effort standpoint, good documentation is a key element for making a Community 'take off'. Writing proper documentation for a method may take 30mins of a key developer's time. The time saved is...
(2+ hours to write probing functions to figure out how it works) times (50+ Community Developers)
that's a 200+ return on investment​

Its a major problem, but it is what it is.


cheers,
chinajade
Thanks for your awnser, makes it more clear to me. Its a shame that such documentation does not exist. I've been reading through the Wiki and was unable to find anything about that, now I know why ;).
 
I've got this as my settings class:

PHP:
namespace Jim87
{
    class LootStatisticsSettings : Settings
    {
        public static readonly LootStatisticsSettings Instance = new LootStatisticsSettings();

        public LootStatisticsSettings()
            : base(Path.Combine(Logging.ApplicationPath, string.Format(@"Settings/LootStatistics/Settings-{0}.xml", StyxWoW.Me.Name)))
        {
        }

        [Setting, DefaultValue("")]
        public string undermineJournalLink { get; set; }

        [Setting, DefaultValue("<?xml version=\"1.0\" encoding=\"utf-8\"?><page><realm></realm></page>")]
        public string auctionHouseData { get; set; }

        [Setting, DefaultValue((uint)0)]
        public uint undermineJournalLastCheckout { get; set; }
    }
}
NOTE: quote me to see the correct values, some backslashes are not showing...

Problem is that when I try to access, for example, auctionHouseData (via LootStatisticsSettings.Instance.Load(); string myString = LootStatisticsSettings.Instance.auctionHouseData), it returns a void string instead of the default one. HBFolder\Settings\LootStatistics does not exist.

What's wrong?
Thanks
 
Last edited:
welldone,Thanks for sharing.I have got some useful information from your post ,just what I need,I'm looking forward to the guide
 
Hi,

Is this tutorial still valid. I mean it was updated long back , so if i try it out will it work ?

thanks .
 
From what I've seen here, I believe it is MOSTLY valid... meaning some of the files or locations may have changed, but the rest is probably pretty accurate... of course, someone that's actually developing would be able to give a better answer... ;)
 
From what I've seen here, I believe it is MOSTLY valid... meaning some of the files or locations may have changed, but the rest is probably pretty accurate... of course, someone that's actually developing would be able to give a better answer... ;)


doesnt matter ... i have started following it ... will know the answer soon :D

thanks.
 
might be a noob question, but is there any way to recompile ccs at run time so you dont have to reload HB every time you make a change?
 
Very basic programming it looks like, great API like "RSBuddy".

Anyway, I would just start trying this out but I'm on my linux laptop for the next 24 hours, so, since I can't, I want to ask you:

How far can a path be generated? Across continents (E.G. Northerends to Kalamidor)? From stormwind to ironforge? from 10 yards away? Also, what if you select a location that doesn't exist? Or a location that does exist but is EXTREMELY far away (Few easter eggs hidden around WoW, like GM island (been there, done that)/that place off the south of Uldum)? Does it use your flying mount automatically or do you have to state it somewhere?

Thanks for answering.
 
Back
Top