i tried changing the lua part to try and make it loot green and higher quality as well, but doesnt seem to be working 100% Lua.DoString("for i=1,GetNumLootItems() do if LootSlotIsCoin(i) then LootSlot(i) ConfirmLootSlot(i) elseif LootSlotIsItem(i) _,_,_,q,l=GetLootSlotInfo(i) if q>1 then LootSlot(i) ConfirmLootSlot(i) end end end");
i would love this plugin if it was possible to make a option to what it should loot. Because i would love a plugin that would make u only loot quest items >.<! Great job making this one though!
Lootfilter understands colour of loot, combuctor understands colour of lot, can you just "borrow" some code :0 G
I finally got round to updating this, it's faster at looting and now loots blues and purples. Code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Styx.Plugins.PluginClass; using Styx; using Styx.WoWInternals.WoWObjects; using Styx.Helpers; using Styx.Logic.Pathing; using System.Threading; using Styx.Logic.Inventory.Frames.LootFrame; using System.Drawing; using Styx.WoWInternals; namespace OnlyLootGold { class OnlyLootGold : HBPlugin { public OnlyLootGold() { BotEvents.Player.OnMobKilled += OnMobKilled; Bots.Gatherbuddy.GatherbuddySettings.Instance.LootMobs = false; CharacterSettings.Instance.LootMobs = false; CharacterSettings.Instance.LootChests = false; } public override string Author { get { return "Vastico"; } } public override string Name { get { return "OnlyLootGold"; } } public override Version Version { get { return new Version(0, 0, 0, 2); } } private LocalPlayer Me = StyxWoW.Me; private WaitTimer lootTimer = new WaitTimer(TimeSpan.FromSeconds(15)); private Queue<WoWUnit> KilledUnits = new Queue<WoWUnit>(); private IDictionary<ulong, WaitTimer> Blacklist = new Dictionary<ulong, WaitTimer>(); public override void Pulse() { if (Me.Combat || Me.Dead || Me.IsGhost) { return; } List<ulong> removals = new List<ulong>(); foreach (KeyValuePair<ulong, WaitTimer> unit in Blacklist) { if (unit.Value.IsFinished) { removals.Add(unit.Key); } } foreach (ulong remove in removals) { Blacklist.Remove(remove); } while (KilledUnits.Count > 0) { WoWUnit target = KilledUnits.Dequeue(); if (Blacklist.ContainsKey(target.Guid) || target.Distance > Styx.Logic.LootTargeting.LootRadius) { continue; } WaitTimer lootableTimer = new WaitTimer(TimeSpan.FromMilliseconds(1500)); lootableTimer.Reset(); while (!lootableTimer.IsFinished) { if (target.Lootable) { break; } System.Threading.Thread.Sleep(20); } if (!target.Lootable) { Logging.Write(Color.Crimson, "Blacklisted [loot][lootable] " + target.Name + "."); Blacklist.Add(target.Guid, new WaitTimer(TimeSpan.FromMinutes(30))); continue; } WaitTimer movementTimer = new WaitTimer(TimeSpan.FromSeconds(30)); movementTimer.Reset(); Logging.Write(Color.Crimson, "Moving to loot items from " + target.Name + "."); while (target.Distance > 4 || !target.InLineOfSpellSight && !movementTimer.IsFinished) { Navigator.MoveTo(target.Location); System.Threading.Thread.Sleep(20); } if (target.Distance > 4) { Logging.Write(Color.Crimson, "Blacklisted [loot][movement] " + target.Name + "."); Blacklist.Add(target.Guid, new WaitTimer(TimeSpan.FromMinutes(30))); } else { Navigator.PlayerMover.MoveStop(); StyxWoW.SleepForLagDuration(); target.Interact(); StyxWoW.SleepForLagDuration(); WaitTimer lootTimer = new WaitTimer(TimeSpan.FromSeconds(5)); lootTimer.Reset(); Logging.Write(Color.Crimson, "Looting items from " + target.Name + "."); while ((LootFrame.Instance == null || !LootFrame.Instance.IsVisible) && !lootTimer.IsFinished) { System.Threading.Thread.Sleep(20); } if (LootFrame.Instance == null || !LootFrame.Instance.IsVisible) { Blacklist.Add(target.Guid, new WaitTimer(TimeSpan.FromMinutes(30))); Logging.Write(Color.Crimson, "Blacklisted [loot] " + target.Name + "."); } else { StringBuilder builder = new StringBuilder(); builder.Append("for i=1,GetNumLootItems() do "); builder.Append("if LootSlotIsCoin(i) then "); builder.Append("LootSlot(i) ConfirmLootSlot(i) "); builder.Append("elseif LootSlotIsItem(i) and select(4, GetLootSlotInfo(i)) > 2 then "); builder.Append("LootSlot(i) ConfirmLootSlot(i) "); builder.Append("end "); builder.Append("end"); Lua.DoString(builder.ToString()); lootTimer = new WaitTimer(TimeSpan.FromMilliseconds(1500)); lootTimer.Reset(); while (!lootTimer.IsFinished) { System.Threading.Thread.Sleep(20); Lua.DoString(builder.ToString()); } Lua.DoString("CloseLoot()"); Logging.Write(Color.Crimson, "Looted items and closed loot frame."); } } } } public void OnMobKilled(BotEvents.Player.MobKilledEventArgs args) { KilledUnits.Enqueue(args.KilledMob); } } } Post any issues/bug as usual.
there is a wow addon called lootfilter, set up the filter to delete all item that has been looted. Then u will only loot gold.
if you could make it only loot item upgrades via autoequip plugin somehow, blues, epics and quest items this would become an essential plugin for every leveller. perhaps make it modify the looting rules based on the bot base?
Hey Vastico, could you either edit this to also include greens or post the proper code and where to place it? This is extremely helpful while I'm farming for rep and such, but I notice that I'm missing a shit ton of green items that can be DE'd or posted on the AH. I'm just trying to pull in every copper that I can get.
You can change 'elseif LootSlotIsItem(i) and select(4, GetLootSlotInfo(i)) > 2' to 'elseif LootSlotIsItem(i) and select(4, GetLootSlotInfo(i)) > 1' Should work