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

Az's Guide to Combat Routine(CR) Development & Theory

Loved the video. Waiting for more learning stuff to come. Very helpful.
 
Commenting as I watch the video...

First things first... Make sure you're creating a .NET 4.0 project (NOT 4.5). 4.5 features (async keyword, etc) aren't supported by HB (or any of our bots). Please keep that in mind. You may also want to point out that people want to make a "Class Library" project specifically. (I've seen users trying to make CRs out of console applications and WinForms applications, which obviously aren't valid)

Nitpicking: "[" is a bracket. "{" is a curly brace. (Yep...)

Also nitpicking (mostly about your naming convention): you'll notice in my code that any instance variables are prefixed by an underscore, and start with a lowercase. This is to ensure when coding, I can quickly jump to any local variable via Intellisense. Static vars are named as per normal (most of the time. Exclusions are when I'm dealing with "hidden" instance wrappers). Also, any function local (including parameter names) should start with a lowercase (no underscore!). This is also the naming convention we use in all of our code internally as well. (Some places excluded due to some requirements, etc) Also, all method names (private, public, internal, protected, etc) should always start with a capital letter. (This is from MS's best practices) But again... nitpicking. :)

"=>" is a "lambda expression". Something you should explain a bit more. (Feel free to check MSDN)

TimeSpan.TotalSeconds (the object returned by WoWAura.TimeLeft) returns fractions of seconds. So you can do something like; aura.TimeLeft.TotalSeconds > 1.2.

For your "spellCooldownLeft", you may want to explain more what it actually does. (The override vs the original.) If you need an explanation on what it actually does, feel free to ask. (I know the code is a bit undocumented, which is my fault)

Do not use macro checks! That's why I wrote the hotkey system (HotkeysManager). There's no reason to use macros anymore! They're not safe, and not "easy" for users to deal with.

Also:
Code:
Lua.GetReturnVal<bool>("return Manual", 0)

Macros in general will be far slower since you need to execute Lua every time you want to check the value. Using a hotkey, you can set it in your code, which means 0 overhead.

Anything that is a ValueType (int, float, double, bool, etc) will not return null. There's no reason to check it. Also; you're re-reading things when you don't need to. (targetDistance and targetHP)

You'll also want to fix your Cast methods to properly get the target. (If onTarget isn't null, you're usually casting on something *other* than your current target) That's why that parameter is there.
 
Commenting as I watch the video...

First things first... Make sure you're creating a .NET 4.0 project (NOT 4.5). 4.5 features (async keyword, etc) aren't supported by HB (or any of our bots). Please keep that in mind. You may also want to point out that people want to make a "Class Library" project specifically. (I've seen users trying to make CRs out of console applications and WinForms applications, which obviously aren't valid)

Nitpicking: "[" is a bracket. "{" is a curly brace. (Yep...)

Also nitpicking (mostly about your naming convention): you'll notice in my code that any instance variables are prefixed by an underscore, and start with a lowercase. This is to ensure when coding, I can quickly jump to any local variable via Intellisense. Static vars are named as per normal (most of the time. Exclusions are when I'm dealing with "hidden" instance wrappers). Also, any function local (including parameter names) should start with a lowercase (no underscore!). This is also the naming convention we use in all of our code internally as well. (Some places excluded due to some requirements, etc) Also, all method names (private, public, internal, protected, etc) should always start with a capital letter. (This is from MS's best practices) But again... nitpicking. :)

"=>" is a "lambda expression". Something you should explain a bit more. (Feel free to check MSDN)

TimeSpan.TotalSeconds (the object returned by WoWAura.TimeLeft) returns fractions of seconds. So you can do something like; aura.TimeLeft.TotalSeconds > 1.2.

For your "spellCooldownLeft", you may want to explain more what it actually does. (The override vs the original.) If you need an explanation on what it actually does, feel free to ask. (I know the code is a bit undocumented, which is my fault)

Do not use macro checks! That's why I wrote the hotkey system (HotkeysManager). There's no reason to use macros anymore! They're not safe, and not "easy" for users to deal with.

Also:
Code:
Lua.GetReturnVal<bool>("return Manual", 0)

Macros in general will be far slower since you need to execute Lua every time you want to check the value. Using a hotkey, you can set it in your code, which means 0 overhead.

Anything that is a ValueType (int, float, double, bool, etc) will not return null. There's no reason to check it. Also; you're re-reading things when you don't need to. (targetDistance and targetHP)

You'll also want to fix your Cast methods to properly get the target. (If onTarget isn't null, you're usually casting on something *other* than your current target) That's why that parameter is there.
Thank you Apoc!!! I'll dig a bit deeper and remake the initial guide once I gain more know-how into the details.
 
I am trying to get thongs upladed but, my computer isn't allowing me to upload the files from work. Will try to get home at a resonable time to upload things!
 
Sorry guys, i am trying to upload the combat routine's(CR's) but, HB keeps telling me the that there is an IOerror and the Bubbles= false... No facking clue what that means... Will try a different method later...
 
Loving your idea so far, learning alot and enjoying it!

One thing I'd love to see is a repository with your CRs, would make it a million times easier following your progress without having to go through alot of threads - 11 classes with each 3 specs (and yeh the odd case of druids fourth spec).

a last thumbs up from here.

nummus83
 
Loving your idea so far, learning alot and enjoying it!

One thing I'd love to see is a repository with your CRs, would make it a million times easier following your progress without having to go through alot of threads - 11 classes with each 3 specs (and yeh the odd case of druids fourth spec).

a last thumbs up from here.

nummus83
I do have an SVN with all the combat routines(CR's) and I will upload it here once each combat routine(CR) is working, or at last gives a "Soon to Come" message, lol! In any case, I'm glad you like the idea thus far!
 
Waking up an old thread as this can still be very good for the community! I'd appreciate if we could get those files re-uploaded. Anyone still got them and are able to do that?
 
Back
Top