Advertisement
Guest User

Untitled

a guest
Jul 28th, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.02 KB | None | 0 0
  1.   public override void OnPull(Anthrax.WoW.Classes.ObjectManager.WowUnit unit)              //Called once to start the combat, put starter spell / combo here
  2.         {
  3.             if (unit.Position.Distance3DFromPlayer <= 7)                                         //Evaluate distance between target (unit) and player
  4.             {
  5.                 if (Anthrax.AI.Controllers.Spell.CanCast((int)Spells.EasytoUseNameSpell))        //Evaluate if the spell can be cast (Mana, rage, energy...)
  6.                 {
  7.                     Anthrax.Logger.WriteLine("Casting Spell EasytoUseNameSpell");                //Write something in the log
  8.                     Anthrax.AI.Controllers.Spell.Cast((int)Spells.EasytoUseNameSpell, unit);     //casting the spell on the unit (target)
  9.                     return;
  10.                 }
  11.  
  12.             }
  13.             else
  14.             {
  15.                 Anthrax.AI.Controllers.Mover.MoveToObject(unit);                                 //Target is too far, this will get closer
  16.             }
  17.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement