Central Forums Helpbot
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1]   Go Down
Print
Topic: Command/Function idea: loot order  (Read 1682 times)
« on: September 13, 2007, 03:11:58 PM »
Apprentice

View Profile
***

Epeen: 1
Posts: 112


I'm cross-posting this from my suggestion on helpbot, in case folks have an interest.  Personally, I think that raffles handle this for org, private and raid bots, but you never know if there might be an interest.

With the variety of drops we are dealing with lately, I have an idea for a new command.

First the examples:

/tell yourbot lootorder 6
[yourbot] Loot order: 2 - 5 - 1 - 6 - 3 - 4

/tell yourbot lootorder 4
[yourbot] Loot order: 4 - 3 - 1 - 2


Now the explanation
The use is for teams to set a loot order for times when there are multiple items of interest.  It's like a raffle, but doesn't require folks to join, it just sets a loot order (like doing multiple !rolls all at once) based on the number passed to it.

Here is an example of how a team might use it:
Team: Alpha, Beta, Charlie, Foxtrox, Omega, Zeta
They kill something that drops 4 items of interest.

/tell yourbot lootorder 6
[yourbot] Loot order: 2 - 5 - 1 - 6 - 3 - 4


Beta opens loot, picks something or passes, then Omega, Alpha, Zeta, Charlie and finally Foxtrox.

I'm runnning into more folks who prefer this method for the time it saves when there are multiple items of interest.

An advanced version might accept arguments with names or letters and sort them randomly in a loot order, like this:
/tell yourbot lootorder a b c f o z
[yourbot] Loot order: b - o - a - z - c - f

....or...
/tell yourbot lootorder ar ax ch fo ox zui
[yourbot] Loot order: ax - ox - ar - zui - ch - fo
Fayelure,
President of 3305 Local
Logged
« Reply #1 on: September 27, 2007, 02:49:38 AM »
Apprentice

View Profile
***

Epeen: 1
Posts: 112


I created this for my bot, but for another day or two, I have it mixed into vh_CommonTools.cs.  I'll work on a plugin version tomorrow.
If you want to add this to your common tools, you need to add the following to the commands area:

Code:
                new Command("lootorder", true, UserLevel.Guest),
                new Command("looter", "lootorder"),

Then add this where you like in the code below.  I added it below the aggdef/init section which uses the stuff I posted last year or so for helpbot:

Code:
        private void OnLootorderCommand(BotShell bot, CommandArgs e)
        {
            if (e.Args.Length < 2)
            {
                bot.SendReply(e, "Correct Usage: [name] [name] [[name]]...");
                return;
            }

            string [] looters = e.Args;
            string [] lootOrder = new string[e.Args.Length];
            string output = "";

            for (int iter1 = 0; iter1 < e.Args.Length; iter1++)
            {
                lootOrder[iter1] = this._random.Next(0, 10000000).ToString();
            }

            Array.Sort(lootOrder,looters);

            for (int iter2 = 0; iter2 < e.Args.Length; iter2++)
            {
              output = output + " " + (iter2+1).ToString() + "-" + looters[iter2];
            }
            lock (this._results)
            {
                int verify = 0;
                if (this._results.Count > 0)
                {
                    verify = new List<int>(this._results.Keys)[this._results.Keys.Count - 1] + 1;
                }
                string reply = "Loot order: " + HTML.CreateColorString(bot.ColorHeaderHex, output);
                this._results.Add(verify, new Verify(e.Sender, reply));
                bot.SendReply(e, reply + ". To verify this use: " + HTML.CreateColorString(bot.ColorHeaderHex, "/tell " + bot.Character + " verify " + verify));
            }

        }
Fayelure,
President of 3305 Local
Logged
« Reply #2 on: September 27, 2007, 02:50:18 AM »
Apprentice

View Profile
***

Epeen: 1
Posts: 112


p.s.  I have it working on looter and lootorder because I like less typing, but folks in my org seem to like lootorder better.
Fayelure,
President of 3305 Local
Logged
Pages: [1]   Go Up
Print
Jump to: