• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [REQUEST]Plugin to loot if 3 or more mobs are dead with loot

    Discussion in 'Requests' started by tozededao, Oct 4, 2012.

    1. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      Currently I'm griding a nonstop spawning mob, it would be awesome if there was a plugin that would force loot even if we are in combat if there are 3 or more mobs dead on the ground.

      Thanks in advance.
       
    2. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      It doesnt even need to be if there are more than 3 corpses, just want something to replace loot over compat in priorities.
       
    3. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      Ive been looking through forum and I was able to edit Kamilche's LootItAll in order to work in combat, it tries to loot but since it doesnt pause the bot for a bit it doesn't loot can anyone help?

      Code:
      /* * LootItAll by Kamilche
       * 
       * This is an add-on that will 
       * 
       *   1. Loot all mobs
       *   2. Skin all mobs
       *
       * 2012/09/14  v1.0.0.0 - First version.
       * 
       */
      using Styx;
      using Styx.Common;
      using Styx.CommonBot;
      using Styx.CommonBot.POI;
      using Styx.Helpers;
      using Styx.WoWInternals;
      using Styx.WoWInternals.WoWObjects;
      using Styx.Plugins;
      
      
      using System;
      using System.Collections.Generic;
      using System.Diagnostics;
      using System.Drawing;
      using System.IO;
      using System.Linq;
      using System.Net;
      using System.Threading;
      using System.Windows.Forms;
      
      
      namespace LootItAll
      {
      
      
          public class LootItAll : HBPlugin
          {
              public override string Name { get { return "LootItAll"; } }
              public override string Author { get { return "Kamilche"; } }
              public override Version Version { get { return _version; } }
              private readonly Version _version = new Version(1, 0, 0, 0);
              private static DateTime NextTime = DateTime.Now;
              private int CheckFrequency = 2;
      
      
              public override void Pulse()
              {
      
      
                  
      
      
                  NextTime = DateTime.Now.AddSeconds(CheckFrequency);
      
      
                  CheckForLoot();
                  CheckForSkin();
              }
      
      
      
      
              public void CheckForLoot()
              {
                  WoWUnit target = null;
                  if (CharacterSettings.Instance.LootMobs == true && BotPoi.Current.Type == PoiType.None)
                  {
                      target = (from u in ObjectManager.GetObjectsOfType<WoWUnit>(false, false)
                                where u.Distance < 20 && u.IsDead && u.CanLoot && !Blacklist.Contains(u)
                                orderby u.Distance ascending
                                select u).ToList().FirstOrDefault();
                      if (target != null)
                      {
                          log("[LootItAll] Setting {0} as lootable", target.Name);
                          BotPoi.Current = new BotPoi(target, PoiType.Loot);
                      }
                  }
              }
      
      
              public void CheckForSkin()
              {
                  WoWUnit target = null;
                  if (CharacterSettings.Instance.SkinMobs == true && BotPoi.Current.Type == PoiType.None)
                  {
                      target = (from u in ObjectManager.GetObjectsOfType<WoWUnit>(false, false)
                                where u.Distance < 20 && u.IsDead && !u.CanLoot && u.CanSkin && !Blacklist.Contains(u)
                                orderby u.Distance ascending
                                select u).ToList().FirstOrDefault();
                      if (target != null)
                      {
                          log("[LootItAll] Setting {0} as skinnable", target.Name);
                          BotPoi.Current = new BotPoi(target, PoiType.Skin);
                      }
                  }
              }
      
      
              private void log(String fmt, params object[] args)
              {
                  String s = String.Format(fmt, args);
                  log(Color.CornflowerBlue, fmt, args);
              }
      
      
              private void log(Color color, String fmt, params object[] args)
              {
                  String s = String.Format(fmt, args);
                  Logging.Write(System.Windows.Media.Color.FromRgb(color.R, color.G, color.B), String.Format("[{0}]: {1}", Name, s));
                  fmt = @"getglobal(""ChatFrame1""):AddMessage(""{0}"", {1}, {2}, {3}, 0);";
                  Lua.DoString(string.Format(fmt, s, color.R / 255.0, color.G / 255.0, color.B / 255.0));
              }
      
      
          }
      
      
      }
      
      
      
       
    4. curtisakatoyo

      curtisakatoyo New Member

      Joined:
      Oct 3, 2012
      Messages:
      9
      Likes Received:
      0
      Trophy Points:
      0
      I would like to add to this request.
       
    5. hweasel

      hweasel New Member

      Joined:
      Jan 28, 2011
      Messages:
      16
      Likes Received:
      0
      Trophy Points:
      1
      testing some code changes now, will let you know
       
    6. fearless84

      fearless84 New Member

      Joined:
      Apr 8, 2012
      Messages:
      43
      Likes Received:
      0
      Trophy Points:
      0
      I want this too, can anyone help us out?
       
    7. Scorp188

      Scorp188 New Member

      Joined:
      Oct 18, 2012
      Messages:
      2
      Likes Received:
      0
      Trophy Points:
      0
      +1 to this Request
       
    8. Dark57

      Dark57 New Member

      Joined:
      Jun 6, 2012
      Messages:
      500
      Likes Received:
      7
      Trophy Points:
      0

    Share This Page