• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Plugin] - BankStack - Bag Sorting

    Discussion in 'Archives' started by xsol, Dec 2, 2011.

    1. xsol

      xsol Member

      Joined:
      Nov 7, 2011
      Messages:
      503
      Likes Received:
      12
      Trophy Points:
      18
      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 
      BagSortHBPlugin
          
      {
              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(00); } }
              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(1530)) < DateTime.Now)
                      {
                          
      Logging.Write(System.Drawing.Color.Beige"Sorting Bags");
                          
      Lua.DoString("SlashCmdList[\"SORT\"]();");
                          
      lastSort DateTime.Now;
                      }
                  }
              }
          }
      }
       
      Ama likes this.
    2. xsol

      xsol Member

      Joined:
      Nov 7, 2011
      Messages:
      503
      Likes Received:
      12
      Trophy Points:
      18
      *reserved*
       
    3. Ama

      Ama New Member

      Joined:
      Jun 6, 2011
      Messages:
      1,171
      Likes Received:
      33
      Trophy Points:
      0
      nice work! this solves my problem
       
    4. CodenameG

      CodenameG New Member

      Joined:
      Jan 15, 2010
      Messages:
      38,369
      Likes Received:
      231
      Trophy Points:
      0
      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.
       
    5. Stormchasing

      Stormchasing Community Developer

      Joined:
      Jan 15, 2011
      Messages:
      4,029
      Likes Received:
      48
      Trophy Points:
      48
      wow has no built-in function for sorting. This function comes from the addon BankStack
       
    6. ygf1975

      ygf1975 New Member

      Joined:
      Apr 13, 2012
      Messages:
      55
      Likes Received:
      0
      Trophy Points:
      0
      Where is the plugin download?
       
    7. nate8282

      nate8282 Member Legendary

      Joined:
      Dec 4, 2011
      Messages:
      737
      Likes Received:
      23
      Trophy Points:
      18
    8. dearik

      dearik New Member

      Joined:
      Apr 19, 2011
      Messages:
      62
      Likes Received:
      0
      Trophy Points:
      0
      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"
       

    Share This Page