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

LoS and HandleFalling?

jim87

New Member
Joined
Aug 26, 2011
Messages
445
Reaction score
7
Hello!

I'm playing with my CC I'm building. While I succeded targeting multiple mobs, I can't currently understand how to move away in order to be in LoS. Any hint?

Also, what's wrong with the HandleFalling? AFAIK it's called when... you're falling, but it doesn't cast Levitate.

Here is by far what I've done (strips of code). I know, I need to clear the code up, it's just a sketch for fast farming low level mobs instead of focusing on DPS and long-term fights. BTW, are those returns necessary (making one spell per pulse), or may I let it run all the code per pulse?

Range check
Code:
        private void RangeCheck(int range)
        {
            if (!Me.GotTarget || Me.CurrentTarget.Dead) return;

            Logging.WriteDebug("JSP RangeCheck ("+range+")");
            if(!Me.GotTarget)
                return;
            if ((Me.CurrentTarget.Distance > range || !Me.CurrentTarget.InLineOfSight) && !Me.IsMoving)
            {
                WoWPoint toMove = WoWMovement.CalculatePointFrom(Me.CurrentTarget.Location, (float)(range-1));
                Navigator.MoveTo(toMove);
            }
        }

CastSpell:
Code:
        private Boolean CastSpell(String spellName)
        {
            if (SpellManager.CanCast(spellName))
            {
                SpellManager.Cast(spellName);
                return true;
            }
            else return false;
        }

HandleFalling (not working):
Code:
        public void HandleFalling() {
            if(!SpellManager.HasSpell("Levitate"))
                CastSpell("Levitate");
        }

Combat:
Code:
        public override void Combat()
        {
            if ((!Me.GotTarget || Me.CurrentTarget.Dead) && Me.Combat && !Targeting.Instance.FirstUnit.Dead)
                Targeting.Instance.FirstUnit.Target();
            if (!Me.GotTarget || Me.CurrentTarget.Dead) return;

            // Shadow Word: Death
            if (Me.CurrentTarget.HealthPercent <= 25 || Me.CurrentTarget.CurrentHealth <= 3000)
            {
                RangeCheck(40);
                if (CastSpell("Shadow Word: Death")) return;
            }
            // Must tune up this conditional to best fit the SP playing - configurable?
            if (Me.CurrentTarget.Level <= 60)
            {
                RangeCheck(40);
                if (CastSpell("Mind Spike")) return;
            }
            
        }

Thanks :)

EDIT: continue in this unified thread: http://www.thebuddyforum.com/honorb...-]-shadow-priest-burst-fast-farming-help.html
 
Last edited:
Back
Top