Required AddOns: BankStack Purpose: Things should be neat. ToDo: this could be used as a place to start a plugin that lets you setup a list of commands to run at specific or "random" times. The plugin will simply run the /sort command for BankStack every 15-30 minutes. PHP: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Windows.Forms; using Styx; using Styx.Logic; using Styx.Helpers; using Styx.Logic.Combat; using Styx.Logic.Pathing; using Styx.WoWInternals; using Styx.Combat.CombatRoutine; using Styx.WoWInternals.WoWObjects; using Styx.Plugins.PluginClass; namespace xsol.toolkit { public class BagSort: HBPlugin { private Random rGen = new Random(); private static LocalPlayer Me { get { return ObjectManager.Me; } } public override string Name { get { return "BagSort"; } } public override string Author { get { return "xsol"; } } public override Version Version { get { return new Version(0, 0); } } public override bool WantButton { get { return false; } } public override string ButtonText { get { return " "; } } public void Log(String sText) { Logging.Write("[" + Name + "] " + sText); } DateTime lastSort = DateTime.MaxValue; public override void Pulse() { if (lastSort > DateTime.Now) { Logging.Write(System.Drawing.Color.Beige, "Sorting Bags"); Lua.DoString("SlashCmdList[\"SORT\"]();"); lastSort = DateTime.Now; } else { if (lastSort.AddMinutes(rGen.Next(15, 30)) < DateTime.Now) { Logging.Write(System.Drawing.Color.Beige, "Sorting Bags"); Lua.DoString("SlashCmdList[\"SORT\"]();"); lastSort = DateTime.Now; } } } } }
didnt know wow had a built in sort function, interesting. i thought you would of had to manually write an old school bubble sort method.
Thanks for a nice addon. As I am total noob when it comes to codding,w as thinking to modify your code and use it maybe for some other things to. If I wanna execute other commads I just need to edit this line: and instead of SORT write something like "2 WTS mom/dad and whole family"