Hi all,
My first post to this forum but a long time honorbuddy user. I am unsure as to whether this is the correct place to ask this. I have come across the following healing sphere script(?). As I know nothing of how these things work I wondered whether someone could take up the challenge.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Styx;
using Styx.Common;
using Styx.CommonBot;
using Styx.CommonBot.POI;
using Styx.CommonBot.Profiles;
using Styx.CommonBot.Routines;
using Styx.Helpers;
using Styx.Pathing;
using Styx.WoWInternals.WoWObjects;
using Styx.TreeSharp;
using Action = Styx.TreeSharp.Action;
using Sequence = Styx.TreeSharp.Sequence;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
namespace HSphereBuddy
{
class HSphereBuddy : BotBase
{
static int healOrbType = 0;
WoWPoint target;
public override string Name
{
get { return "HSphereBuddy"; }
}
public override PulseFlags PulseFlags
{
get { return PulseFlags.All; }
}
public override void Pulse()
{
if (Me.CurrentTarget == null){
Lua.DoString("healOrbNum = 0;");
healOrbType = 0;
return;
}
if (healOrbType == 1)
{
target = getPoint();
SpellManager.Cast("Healing Sphere");
SpellManager.ClickRemoteLocation(target);
Lua.DoString("healOrbNum = 0;");
healOrbType = 0;
}
}
private Composite _root;
public override Composite Root
{
get
{
return _root ?? (_root =
new PrioritySelector(
logic()
)
);
}
}
public override void Start()
{
ProfileManager.LoadEmpty();
}
private static LocalPlayer Me { get { return StyxWoW.Me; } }
private static Composite logic()
{
return new Action(delegate { healOrbType = Lua.GetReturnVal("return healOrbNum", 0); });
}
static WoWPoint getPoint()
{
WoWUnit focus = Me.CurrentTarget;
return focus.Location;
}
}
}
I then use the macro
#showtool Healing Sphere
/script healOrbNum =1;
to heal my target. Is there a way to change it in any way so i can specific a name in the script and macro to cast orbs on a player with that name? so basically i press "1" and heal Swifty and press "2" and heal Bajheera with Healing Sphere. Hunters have a similar thing where the traps can be placed on a focus target, is it a big step to specify the name of that target?
Looking forward to your replies, once again apologies if this is in the wrong place.
Regards
Rob
My first post to this forum but a long time honorbuddy user. I am unsure as to whether this is the correct place to ask this. I have come across the following healing sphere script(?). As I know nothing of how these things work I wondered whether someone could take up the challenge.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Styx;
using Styx.Common;
using Styx.CommonBot;
using Styx.CommonBot.POI;
using Styx.CommonBot.Profiles;
using Styx.CommonBot.Routines;
using Styx.Helpers;
using Styx.Pathing;
using Styx.WoWInternals.WoWObjects;
using Styx.TreeSharp;
using Action = Styx.TreeSharp.Action;
using Sequence = Styx.TreeSharp.Sequence;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
namespace HSphereBuddy
{
class HSphereBuddy : BotBase
{
static int healOrbType = 0;
WoWPoint target;
public override string Name
{
get { return "HSphereBuddy"; }
}
public override PulseFlags PulseFlags
{
get { return PulseFlags.All; }
}
public override void Pulse()
{
if (Me.CurrentTarget == null){
Lua.DoString("healOrbNum = 0;");
healOrbType = 0;
return;
}
if (healOrbType == 1)
{
target = getPoint();
SpellManager.Cast("Healing Sphere");
SpellManager.ClickRemoteLocation(target);
Lua.DoString("healOrbNum = 0;");
healOrbType = 0;
}
}
private Composite _root;
public override Composite Root
{
get
{
return _root ?? (_root =
new PrioritySelector(
logic()
)
);
}
}
public override void Start()
{
ProfileManager.LoadEmpty();
}
private static LocalPlayer Me { get { return StyxWoW.Me; } }
private static Composite logic()
{
return new Action(delegate { healOrbType = Lua.GetReturnVal("return healOrbNum", 0); });
}
static WoWPoint getPoint()
{
WoWUnit focus = Me.CurrentTarget;
return focus.Location;
}
}
}
I then use the macro
#showtool Healing Sphere
/script healOrbNum =1;
to heal my target. Is there a way to change it in any way so i can specific a name in the script and macro to cast orbs on a player with that name? so basically i press "1" and heal Swifty and press "2" and heal Bajheera with Healing Sphere. Hunters have a similar thing where the traps can be placed on a focus target, is it a big step to specify the name of that target?
Looking forward to your replies, once again apologies if this is in the wrong place.
Regards
Rob