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

[CC][W.I.P.] Shadow Priest BURST for fast farming - HELP!

jim87

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

I'm little by little implementing my shadow priest for one-shotting little mobs and bursting high level ones (NIY).

This first development version doesn't work as intended, and does not fight against high level mobs (very early version).

I haven't implemented nothing but three spells just to understand how it works, and it's not working right.

BUGS:
1. doesn't cast Levitate when falling (see HandleFalling() method)
2. doesn't face the mob
3. at least in archaeology mode, it starts going around the target (probably linked to point 2)
4. I can't find any way to go in LoS in case the character isn't in.
5. I'd like to be able to find out what's the spell damage of some ones (i.e. Shadow Word: Death), as it's a dynamic value I can guess it via a formula (which I don't have), or to get it from the game itself (reading memory?).
6. I'd like to add a subclass check (Shadow Priest)

Also, are the returns correct or not (specially speaking of Combat() method)?

May you please help me? I'll update the CC as soon as I'll make some progress.

Thanks

Code:
/*
 Jim's Shadow Priest
 * Thought to fight against
 * low level and quest mobs!
 * 
 * Note: written with level 85
 * Shadow Priest in mind!
 * 
 * All farmings reserved
 * 
 * Jim87
 */

using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using Styx;
using Styx.Combat.CombatRoutine;
using Styx.Helpers;
using Styx.Logic;
using Styx.Logic.Combat;
using Styx.Logic.Pathing;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;

namespace JimShadowPriest
{
    class Classname : CombatRoutine
    {
        public override sealed string Name { get { return "Jim's Shadow Priest v0.1 (grinding lvl 85 only)"; } }

        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
        {
            Logging.Write(format, args);
        }

        public override bool WantButton
        {
            get
            {

                return true;
            }
        }

    

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

        #region Some pretty variables

        #endregion

        #region Some pretty methods
        
        private Boolean CastSpell(String spellName)
        {
            if (SpellManager.CanCast(spellName))
            {
                SpellManager.Cast(spellName);
                return true;
            }
            else return false;
        }

        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);
            }
        }

        #endregion

        #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() {
            if(!SpellManager.HasSpell("Levitate"))
                CastSpell("Levitate");
        }

        #endregion

        #region Combat

        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;

            if (!Me.IsFacing(Me.CurrentTarget))
                Me.CurrentTarget.Face();

            // 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;
            }
            
        }

        #endregion
       
   
        #region Spells


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

        }
      #endregion
    }   
}
 
Back
Top