Hiya folks! Here is a very simple plugin for those of you who make profiles for GB2 but don't want to use auto-generated paths. You know how normally you need to alt-tab back and forth between WoW and HB to click the "My Location" button as you fly around and create your profile? Not any more. When this plugin is enabled, it spots out the standard Hotspot syntax to your log every 5 seconds. Disable the plugin to stop the behavior. Crude, yes, but that's all you need to make a sexy gathering profile by hand. Enjoy. - Ben
is it possible to optimize it this way? Code: using System; using Styx; using Styx.Logic.Combat; using Styx.Helpers; using Styx.Plugins.PluginClass; using Styx.Logic; using Styx.WoWInternals; using System.Collections; using System.Globalization; namespace HBPlugins { class CrudeHotspots : HBPlugin { public override string Name { get { return "CrudeHotspots"; } } public override string Author { get { return "benkoren"; } } public override Version Version { get { return new Version(0, 0, 0, 1); } } private static DateTime HotspotTimer = DateTime.MinValue; static CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US"); private static WoWLocation _lastSpot = new WoWLocation(0,0,0); public override void Pulse() { if (DateTime.Now.CompareTo(HotspotTimer) >= 0 && _lastSpot != StyxWoW.Me.Location && StyWoW.Me.Location.Distance(_lastSpot)>10) { var location = StyxWoW.Me.Location; Logging.Write(string.Format(culture, "<Hotspot X=\"{0}\" Y=\"{1}\" Z=\"{2}\" />", location.X, location.Y, location.Z)); _LastSpot = location; HotspotTimer = DateTime.Now.AddSeconds(5); } } } } i haven't tested it yet, because i'm at work But i think this should work This version should only "log" the Hotspots if the timer expired AND the distance between the last spot and the Current Location is bigger than 10y, so u haven't to disable it while looking for something (maybe looking at the map or something like that)
Looks sexy. However, to be honest with you I'd feel guilty putting your code into something with my name on it - it's clear you've already put more time into this than I did. My code was just a crude way to fill a void in the GB2 functionality, but I think yours has a bit more potential. I think that a plugin that has the distance logic in there (and the timer removed) would be the best option - that way the behavior will be consistent regardless of mount speed. Even better, you could have the "precision" of the hotspots based on the rate you are moving. If the player is moving very fast (generally for long & straight stretches), pull a hotspot every 50y. If they're moving slowly (for navigating through trees), pull a hotpot every 20y. That way if the profile writers simply move their character slowly through trees the resulting hotspots will reflect that precision. The definition of moving "slow" vs. moving "fast" should be based on a percentage of maximum mount travel speed, of course. If you do do get the distance logic working, please post here and I'll update the opening post to recommend your plugin over this one. - Ben