Jandurson
New Member
- Joined
- Dec 9, 2011
- Messages
- 162
- Reaction score
- 0
Please see this for the original update request. I'm under the impression that the plugin structure has changed, and I'd like to request this be updated. Here's the last version I had that worked:
This example used Dizzying Haze but the original used orbs (which I think are no longer used this way). I hope to used this for any of those pesky AOE manual click spells (Death and Decay, Distract etc). Thanks in advance.
Code:
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;
using Styx.Plugins;
using System.Windows.Media;
using System.Diagnostics;
namespace HSphereBuddy
{
class HSphereBuddy : HBPlugin
{
private static LocalPlayer Me { get { return StyxWoW.Me; } }
public override string Name { get { return "HSpherePlugin"; } }
public override string Author { get { return "xxx /randomstraw"; } }
public override Version Version { get { return new Version(0, 1, 0, 0); ; } }
public override string ButtonText { get { return "magic"; } }
public override bool WantButton { get { return false; } }
private static Stopwatch spamDelay = new Stopwatch();
static int healOrbType = 0;
WoWPoint target;
bool init = false;
public override void Initialize()
{
if (init)
return;
init = true;
Logging.Write(Colors.Gold, "+ {0}", Name);
}
public override void Pulse()
{
if (spamDelay.ElapsedMilliseconds < 100)
return;
spamDelay.Reset();
spamDelay.Start();
if (Me.CurrentTarget == null)
{
Lua.DoString("healOrbNum = 0;");
healOrbType = 0;
return;
}
healOrbType = Lua.GetReturnVal<int>("return healOrbNum", 0);
if (healOrbType == 1)
{
target = Me.CurrentTarget.WorldLocation;
SpellManager.Cast("Dizzying Haze");
SpellManager.ClickRemoteLocation(target);
Lua.DoString("healOrbNum = 0;");
healOrbType = 0;
}
}
}
}
This example used Dizzying Haze but the original used orbs (which I think are no longer used this way). I hope to used this for any of those pesky AOE manual click spells (Death and Decay, Distract etc). Thanks in advance.