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

API question

tjhasty

Member
Joined
May 16, 2010
Messages
183
Reaction score
4
How do you check to see if the party leader has started combat, and if he does to target his target and attack?
I can not for the life of me figure it out. Here is what I have so far. It locks up HB so it wont process any other plugins, and I cant find what I need to make it detect what im after and start combat. What am I doing wrong?

Code:
 using System;
using System.Collections.Generic;
using System.Threading;
using System.Diagnostics;
using System.Globalization;
using System.Text;
using Styx;
using Styx.Plugins.PluginClass;
using Styx.Logic.BehaviorTree;

using Styx.Helpers;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using Styx.Patchables;
using Styx.Logic;
using Styx.Plugins;


namespace Combatattack
{
    class RunMacro : HBPlugin
    {
        static public string name = "CombatAttack";
        public override string Name { get { return name + " " + Version.ToString(); } }
        public override string Author { get { return "Tjhasty"; } }
        private readonly Version _version = new Version(0, 1);
        public override Version Version { get { return _version; } }
        public override string ButtonText { get { return "CombatAttack"; } }
        
        public override void Pulse()
        {
            
                if (RaFHelper.Leader != null)
                {
                    if (RaFHelper.Leader.Combat)
                    {
                        
                    }
                }
            }
        }
    }
 
RafHelper.Leader.CurrentTarget.Target()

Will target the leaders target. (Check for null before doing it though)
 
I tried that, From what little I know the above, when what you just posted is included, it does nothing. Just sits like a lump on a log and does nothing, I cant figure it out makes no sense to me
 
Eureka, I got it working. Problem was I didnt realize raf leader wasnt set automatically. I use it in conjunction with the mod Set the Leader and works great. Now I just have to figure out how to make it attack. Any help would be glorious
 
Back
Top