CodenameG
New Member
- Joined
- Jan 15, 2010
- Messages
- 38,364
- Reaction score
- 231
Mr.LazyRaider - Your Guide to Writing a LazyRaider CC
4/26/12 - Version 1.0
What is this
This is is a guide and template designed to help you to create your own CC for use with CombatBot, LazyRaider or Raidbot. you can find the at the links below. (combat bot is already packed with honorbuddy)
http://www.thebuddyforum.com/honorb...ider-user-controlled-raiding-heroics-raf.html
http://www.thebuddyforum.com/honorbuddy-forum/plugins/uncataloged/24775-lazyraider-user-controlled-raiding-heroics-raf.html
What is a LazyRaider CustomClass?
A LazyRaider CC is a CustomClass built specifically for use with LazyRaider or Similar bots, as LazyRaider is ment to be used while you control movement it makes it very easy for us to make one for just about any class. all our CC is going to do is run our combat rotation if we get into combat and have something targeted.
What if ive never coded before?
Then you will want to go over my Custom Class Creation Guide to learn how to setup your project in visual studio.
http://www.thebuddyforum.com/honorb...1-how-write-custom-class-guide-beginners.html
So what do i do?
first things first you wanna get your project setup in visual studio and add the proper references to honorbuddy.exe and fasmdll_managed.dll
once thats done scroll down to the bottom of the post for and download. MrLazyRaider.cs this is a template i made for you packed with some extra methods to help you with the Custom Class Creation process. feel free to rename MrLazyRaider.cs to MrLazyRaider - *classname or other unique name here* so you know thats what your working on.
once you have that done, there are only a couple of things inside a CC we need to worry about when writing a LazyRaider CC.
the first thing is.
as you can see i took the time to comment everything for you, and this should be easy to find. this tells honorbuddy What Class this is suppose to be used on. and by default its set to mage. you can easily change this by replacing mage. with what class you want.
For Example.
if you have your visual studio project setup correctly visual studio should try and auto complete what your trying to do. but by changing it to Warlock our code will now run for a Warlock instead of a mage.
the second thing is.
if you scroll down a bit you should find this.
public override void Combat() is the method honorbuddy pulses when in combat since we are writing a CustomClass that ONLY functions in combat, this is where a large majority of our code will be. as you can tell, i took the liberty of including some methods you can use to castspells. and ive included code to automatically use health and Mana potions.
so say i wanted this cc to get into combat and spam fireball.
heres what i would do.
of course i left the mana potion stuff in, but we can take it out if we dont want it.
4/26/12 - Version 1.0
What is this
This is is a guide and template designed to help you to create your own CC for use with CombatBot, LazyRaider or Raidbot. you can find the at the links below. (combat bot is already packed with honorbuddy)
http://www.thebuddyforum.com/honorb...ider-user-controlled-raiding-heroics-raf.html
http://www.thebuddyforum.com/honorbuddy-forum/plugins/uncataloged/24775-lazyraider-user-controlled-raiding-heroics-raf.html
What is a LazyRaider CustomClass?
A LazyRaider CC is a CustomClass built specifically for use with LazyRaider or Similar bots, as LazyRaider is ment to be used while you control movement it makes it very easy for us to make one for just about any class. all our CC is going to do is run our combat rotation if we get into combat and have something targeted.
What if ive never coded before?
Then you will want to go over my Custom Class Creation Guide to learn how to setup your project in visual studio.
http://www.thebuddyforum.com/honorb...1-how-write-custom-class-guide-beginners.html
So what do i do?
first things first you wanna get your project setup in visual studio and add the proper references to honorbuddy.exe and fasmdll_managed.dll
once thats done scroll down to the bottom of the post for and download. MrLazyRaider.cs this is a template i made for you packed with some extra methods to help you with the Custom Class Creation process. feel free to rename MrLazyRaider.cs to MrLazyRaider - *classname or other unique name here* so you know thats what your working on.
once you have that done, there are only a couple of things inside a CC we need to worry about when writing a LazyRaider CC.
the first thing is.
Code:
//Change WoWClass.***** to change the class your routine works for.
public override WoWClass Class { get { return WoWClass.Mage; } }
For Example.
Code:
//Change WoWClass.***** to change the class your routine works for.
public override WoWClass Class { get { return WoWClass.Warlock; } }
if you have your visual studio project setup correctly visual studio should try and auto complete what your trying to do. but by changing it to Warlock our code will now run for a Warlock instead of a mage.
the second thing is.
if you scroll down a bit you should find this.
Code:
public override void Combat()
{
//All your code goes here.
//Wrapped Items.
//CastSpell(SpellName) & CastSpell(SpellName, WoWUnit)
if(HaveManaPotion() && ManaPotionReady() && Me.ManaPercent <= 30)
{
UseManaPotion();
}
if (HaveHealthPotion() && HealthPotionReady() && Me.HealthPercent <= 30)
{
UseHealthPotion();
}
}
so say i wanted this cc to get into combat and spam fireball.
heres what i would do.
Code:
public override void Combat()
{
CastSpell("Fireball");
if(HaveManaPotion() && ManaPotionReady() && Me.ManaPercent <= 30)
{
UseManaPotion();
}
if (HaveHealthPotion() && HealthPotionReady() && Me.HealthPercent <= 30)
{
UseHealthPotion();
}
}