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

Seeking updated blank CC template

hweasel

New Member
Joined
Jan 28, 2011
Messages
16
Reaction score
0
Hey all, time to give this cc thing a go. Looking for any info on the dev change list (I thought I saw a post a day or two ago regarding some of the api updates) and possibly an updated blank.cs cc template if anyone has managed to cobble one together.

Thanks much from a 'hopefully future contributor' to the HB community.

Cheers,

Hweasel
 
I would also like this. I would love to be able to create my own cc. Thanks!
 
Thta's the one I use now :)

using System;
using System.Collections.Generic;
using System.Linq;

using System.Text;
using Bots.BGBuddy.Helpers;
using Styx;

using Styx.Common;
using Styx.Common.Helpers;
using Styx.CommonBot;
using Styx.CommonBot.POI;
using Styx.CommonBot.Routines;
using Styx.Helpers;
using Styx.Pathing;
using Styx.Plugins;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using Styx.TreeSharp;

namespace Spriest
{
class Classname : CombatRoutine
{
public override sealed string Name { get { return "Shadow Priest v0.10"; } }

public override WoWClass Class { get { return WoWClass.Priest; } }

private static LocalPlayer Me { get { return ObjectManager.Me; } }

private void slog(string format, params object[] args) //use for slogging
{
Logger.Write(format, args);
}

public override bool WantButton{ get { return false; } }

public override void OnButtonPress() { /*ConfigForm.ShowDialog();*/ }

#region CC_Begin


public override bool NeedRest{ get { return false; } }

public override void Rest(){ }

#endregion

#region Pull

public override void Pull() { }

#endregion

#region Pull Buffs

public override bool NeedPullBuffs { get { return false; } }

public override void PullBuff() { }

#endregion

#region Pre Combat Buffs

public override bool NeedPreCombatBuffs { get { return false; } }

public override void PreCombatBuff()
{
return;
}

#endregion

#region Combat Buffs

public override bool NeedCombatBuffs { get { return false; } }

public override void CombatBuff() { }

#endregion

#region Heal

public override bool NeedHeal { get { return false; } }

public override void Heal() { }

#endregion

#region Falling

public void HandleFalling() { }

#endregion

#region Combat

public override void Combat()
{



}

#endregion


#region Spells


private void AutoAttack()
{
if (!Me.IsAutoAttacking)
{
Lua.DoString("StartAttack()");
}

}
#endregion Spells

#region CastSpell Method

public bool CastSpell(string spellName, WoWPlayer target)
{
if (SpellManager.CanCast(spellName, target) && !SpellManager.GlobalCooldown && !Me.IsCasting)
{
if (target == Me)
{
return false;
}
else
{
SpellManager.Cast(spellName, target);
return true;
}
}
return false;
}


public bool CastSpell(string spellName)
{
if (SpellManager.CanCast(spellName) && !SpellManager.GlobalCooldown && !Me.IsCasting)
{
SpellManager.Cast(spellName);
return true;
}
return false;
}



public bool CastSpell(int spellID)
{
if (SpellManager.CanCast(spellID) && !SpellManager.GlobalCooldown && !Me.IsCasting)
{
SpellManager.Cast(spellID);
return true;
}
return false;
}
#endregion CastSpell Methods

#region AddCounting
public static bool Adds()
{

List<WoWUnit> mobList = ObjectManager.GetObjectsOfType<WoWUnit>(false).FindAll(unit =>
unit.Guid != Me.Guid
&& unit.IsAlive
&& unit.IsHostile
&& unit.Attackable
&& !unit.IsFriendly
&& (unit.Location.Distance(Me.CurrentTarget.Location) <= 10 || unit.Location.Distance2D(Me.CurrentTarget.Location) <= 10));

if (mobList.Count > 2)
{
return true;
}
return false;

}
#endregion AddCounting

}
}
 
Back
Top