Jump to content

Implement auto Need/Greed loot?


HandHurts

Recommended Posts

  • 1 year later...

1 problem. Needs a way to automaticly accept item that has bind warning (if someone is interested, this picture includes 1 hint of what i'm working on. Note that i'm using 4 shamans and 1 druid and this hasn't been released by anyone yet on any version at wrobot)

n2LPmj1.jpg

Link to comment
Share on other sites

Quote

using wManager.Plugin;
using wManager.Wow.Helpers;
using robotManager.Helpful;

public class Main : IPlugin
{
    public void Dispose()
    {
    }

    public void Initialize()
    {
        try
        {
            // Subscribe event
            EventsLua.AttachEventLua(wManager.Wow.Enums.LuaEventsId.LOOT_BIND_CONFIRM, this.OnLootBindConfirm);
        }
        catch (Exception exception)
        {
            Logging.WriteError($"Event subscription failed! -> Exception: {exception.Message}", false);
        }
    }

    public void Settings()
    {
    }

    private void OnLootBindConfirm(object context)
    {
        try
        {
            // Create lua command
            string luaCommand = "ConfirmLootSlot(1)";

            // Execute lua command
            Lua.LuaDoString(luaCommand);

            Logging.WriteDebug("Accept item.");
        }
        catch (Exception exception)
        {
            Logging.WriteError(exception.Message);
        }
    }
}

If i'm not wrong this should do the job. Save it in a.cs file and put it under plugins. Since i have no clue what kind of object the delegate returns i don't know how to set the slot id dynamicly.

 

Hope it helps

Link to comment
Share on other sites

ACTUALLY! it does work but only with 1 bot o.o

On my healer it works properly but others it passes always. The group loot plugin file was updated before bots were started so it's not because of that it...

log from healer:
 

[D] 15:42:48 - [Info] Operating System Details: Microsoft Windows NT 6.1.7601 Service Pack 1
[D] 15:42:48 - [Info] Lang: Finnish (Finland)
[D] 15:42:48 - Warning: TeamViewer is launched on your computer, this software can cause problems with WRobot, I recommend to close all TeamViewer process when you use WRobot.
[D] 15:42:48 - LockFrame disabled by default for lua stability raison, to use LockFrame you can launch WRobot with the shortcut 'WRobot Lock Frame' (LockFrame increment WRobot reactivity).
[D] 15:42:48 - -nodx arg activated.
[D] 15:42:50 - [WarGuard] Launching...
[D] 15:43:02 - [Blacklist] Added, 20 uniques Npcs, 52 Blackspots and 0 Npcs types (Training dummy ignored = True).
[D] 15:43:02 - [Blacklist] Added, 20 uniques Npcs, 52 Blackspots and 0 Npcs types (Training dummy ignored = True).
[D] 15:43:02 - [Blacklist] Added, 20 uniques Npcs, 52 Blackspots and 0 Npcs types (Training dummy ignored = True).
[D] 15:43:02 - [Keyboard Hook] Couldn’t register the hot key.
[D] 15:43:02 - [Keyboard Hook] Couldn’t register the hot key.
[D] 15:43:02 - [Info] Wow Version: 12340
[D] 15:43:02 - [Info] Player found: True
[D] 15:43:02 - [SpellManager] List of id found in spellbook:
Auto Attack (6603)
Block (107)
Dodge (81)
Gemcutting (28875)
Gift of the Naaru (59547)
Heroic Presence (28878)
Shadow Resistance (59540)
Call of the Ancestors (66843)
Call of the Elements (66842)
Chain Lightning (930)
Earth Shock (10412)
Earthbind Totem (2484)
Fire Nova (8499)
Flame Shock (10447)
Frost Shock (8058)
Lightning Bolt (10391)
Magma Totem (10585)
Purge (8012)
Searing Totem (6365)
Stoneclaw Totem (6392)
Wind Shear (57994)
Astral Recall (556)
Far Sight (6196)
Fire Resistance Totem (8184)
Flametongue Totem (8249)
Flametongue Weapon (16339)
Frost Resistance Totem (10478)
Frostbrand Weapon (10456)
Ghost Wolf (2645)
Grounding Totem (8177)
Lightning Shield (8134)
Nature Resistance Totem (10595)
Rockbiter Weapon (10399)
Sentry Totem (6495)
Stoneskin Totem (10406)
Strength of Earth Totem (8161)
Water Breathing (131)
Water Walking (546)
Windfury Totem (8512)
Windfury Weapon (8235)
Ancestral Spirit (20610)
Chain Heal (1064)
Cleanse Spirit (51886)
Cleansing Totem (8170)
Cure Toxins (526)
Earthliving Weapon (51988)
Healing Stream Totem (6377)
Healing Wave (8005)
Lesser Healing Wave (8010)
Mana Spring Totem (10495)
Mana Tide Totem (16190)
Nature's Swiftness (16188)
Reincarnation (20608)
Totemic Recall (36936)
Tremor Totem (8143)
Water Shield (52131)
Gray Elekk (35710)

[D] 15:43:02 - [Keybindings]
Sit / Stand: N
Backward: S
Forward: W
Jump: SPACE
Strafe Left: J
Strafe Right: K
[D] 15:43:06 - Init
[D] 15:43:06 - [Spell] spellName=Lesser healing Wave, Id found: 8010, Name found: Lesser Healing Wave, NameInGame found: Lesser Healing Wave, know = True
[D] 15:43:06 - [Spell] spellName=Healing Wave, Id found: 8005, Name found: Healing Wave, NameInGame found: Healing Wave, know = True
[D] 15:43:06 - [Spell] spellName=Call of the Elements, Id found: 66842, Name found: Call of the Elements, NameInGame found: Call of the Elements, know = True
[D] 15:43:06 - [Spell] spellName=Totemic Recall, Id found: 36936, Name found: Totemic Recall, NameInGame found: Totemic Recall, know = True
[D] 15:43:06 - [Spell] spellName=Water Shield, Id found: 52131, Name found: Water Shield, NameInGame found: Water Shield, know = True
[D] 15:43:06 - [Spell] spellName=Chain Heal, Id found: 1064, Name found: Chain Heal, NameInGame found: Chain Heal, know = True
[D] 15:43:06 - GroupLoot => initialize
[D] 15:43:30 - [WarGuard] Warden found, protection activated.
[D] 15:59:48 - GroupLoot => dispose
[D] 15:59:49 - Init
[D] 15:59:49 - [Spell] spellName=Lesser healing Wave, Id found: 8010, Name found: Lesser Healing Wave, NameInGame found: Lesser Healing Wave, know = True
[D] 15:59:49 - [Spell] spellName=Healing Wave, Id found: 8005, Name found: Healing Wave, NameInGame found: Healing Wave, know = True
[D] 15:59:49 - [Spell] spellName=Call of the Elements, Id found: 66842, Name found: Call of the Elements, NameInGame found: Call of the Elements, know = True
[D] 15:59:49 - [Spell] spellName=Totemic Recall, Id found: 36936, Name found: Totemic Recall, NameInGame found: Totemic Recall, know = True
[D] 15:59:49 - [Spell] spellName=Water Shield, Id found: 52131, Name found: Water Shield, NameInGame found: Water Shield, know = True
[D] 15:59:49 - [Spell] spellName=Chain Heal, Id found: 1064, Name found: Chain Heal, NameInGame found: Chain Heal, know = True
[D] 15:59:50 - GroupLoot => initialize
[D] 16:10:14 - [MovementManager] Avoid wall: StrafeLeft
[D] 16:10:17 - [MovementManager] Current pos: 2371,849 ; 936,1605 ; 41,30023 ; "None" - Target pos: 2384,865 ; 926,8032 ; 41,60546 ; "None" Continent: RazorfenDowns Tile: 30.2447_27.55278
[D] 16:10:17 - [StuckResolver] Started.
[D] 16:10:18 - [StuckResolver] Done - Stuck count updated, new value: 1.
[D] 16:10:21 - [MovementManager] Avoid wall: StrafeRight
[D] 16:11:38 - [Mount] No aquatic mount selected.
[D] 16:11:38 - [Mount] No flying mount selected.
[D] 16:16:24 - GroupLoot => Loot roll started. LootType: GREED
[D] 16:16:24 - GroupLoot => Button: GroupLootFrame1GreedButton IsVisible => click it
[D] 16:16:24 - GroupLoot => Button: GroupLootFrame2GreedButton Not IsVisible
[D] 16:16:24 - GroupLoot => Button: GroupLootFrame3GreedButton Not IsVisible
[D] 16:16:24 - GroupLoot => Button: GroupLootFrame4GreedButton Not IsVisible
[D] 16:16:24 - GroupLoot => Button: GroupLootFrame5GreedButton Not IsVisible
[D] 16:18:33 - [Info] Continent change, RazorfenDowns to Azeroth
[D] 16:18:34 - [Blacklist] Added, 20 uniques Npcs, 52 Blackspots and 0 Npcs types (Training dummy ignored = True).

Log from 1 of my other chars that it didn't work on:

 

[D] 14:16:54 - [Info] Log file created: 8 huhti 2016 14H16 - OCMeoax.log.html
[D] 14:16:54 - [Info] WRobot Version: 1.5.8 (21759) for wow: 3.3.5a_12340
[D] 14:16:54 - [Info] Offical website: http://wrobot.eu/
[D] 14:16:54 - [Info] Operating System Details: Microsoft Windows NT 6.1.7601 Service Pack 1
[D] 14:16:54 - [Info] Lang: Finnish (Finland)
[D] 14:16:54 - Warning: TeamViewer is launched on your computer, this software can cause problems with WRobot, I recommend to close all TeamViewer process when you use WRobot.
[D] 14:16:54 - LockFrame disabled by default for lua stability raison, to use LockFrame you can launch WRobot with the shortcut 'WRobot Lock Frame' (LockFrame increment WRobot reactivity).
[D] 14:16:54 - -nodx arg activated.
[D] 14:16:56 - [WarGuard] Launching...
[D] 14:17:07 - [Blacklist] Added, 20 uniques Npcs, 52 Blackspots and 0 Npcs types (Training dummy ignored = True).
[D] 14:17:07 - [Blacklist] Added, 20 uniques Npcs, 52 Blackspots and 0 Npcs types (Training dummy ignored = True).
[D] 14:17:07 - [Blacklist] Added, 20 uniques Npcs, 52 Blackspots and 0 Npcs types (Training dummy ignored = True).
[D] 14:17:07 - [Keyboard Hook] Couldn’t register the hot key.
[D] 14:17:07 - [Keyboard Hook] Couldn’t register the hot key.
[D] 14:17:07 - [Info] Wow Version: 12340
[D] 14:17:07 - [Info] Player found: True
14:17:07 - [SpellManager] Initializing SpellBook - (Wait few seconds)
14:17:07 - [SpellManager] Initialize SpellBook Finished (55 spell found)
[D] 14:17:07 - [SpellManager] List of id found in spellbook:
Auto Attack (6603)
Block (107)
Dodge (81)
Gemcutting (28875)
Gift of the Naaru (59547)
Heroic Presence (28878)
Shadow Resistance (59540)
Call of the Ancestors (66843)
Call of the Elements (66842)
Chain Lightning (930)
Earth Shock (10412)
Earthbind Totem (2484)
Elemental Mastery (16166)
Fire Nova (8499)
Flame Shock (10447)
Frost Shock (8058)
Lightning Bolt (10391)
Magma Totem (10585)
Purge (8012)
Searing Totem (6365)
Stoneclaw Totem (6392)
Wind Shear (57994)
Astral Recall (556)
Far Sight (6196)
Fire Resistance Totem (8184)
Flametongue Totem (8249)
Flametongue Weapon (16339)
Frost Resistance Totem (10478)
Frostbrand Weapon (10456)
Ghost Wolf (2645)
Grounding Totem (8177)
Lightning Shield (8134)
Nature Resistance Totem (10595)
Rockbiter Weapon (10399)
Sentry Totem (6495)
Stoneskin Totem (10406)
Strength of Earth Totem (8161)
Water Breathing (131)
Water Walking (546)
Windfury Totem (8512)
Windfury Weapon (8235)
Ancestral Spirit (20610)
Chain Heal (1064)
Cleansing Totem (8170)
Cure Toxins (526)
Earthliving Weapon (51988)
Healing Stream Totem (6377)
Healing Wave (8005)
Lesser Healing Wave (8010)
Mana Spring Totem (10495)
Reincarnation (20608)
Totemic Recall (36936)
Tremor Totem (8143)
Water Shield (52131)
Gray Elekk (35710)

14:17:07 - [SpellManager] Please wait, loading spellbook...
14:17:07 - [SpellManager] Spellbook loaded.
[D] 14:17:07 - [Keybindings]
Sit / Stand: X
Backward: S
Forward: W
Jump: SPACE
Strafe Left: Q
Strafe Right: E
[F] 14:17:10 - [FightClass] Loading Fight class: C:\Program Files (x86)\Wrobot\WRobot Wotlk\FightClass\3.3.5a Elemental Shaman by BetterSister.xml
[D] 14:17:11 - [Spell] spellName=Water Shield, Id found: 52131, Name found: Water Shield, NameInGame found: Water Shield, know = True
[D] 14:17:11 - [Spell] spellName=Wind Shear, Id found: 57994, Name found: Wind Shear, NameInGame found: Wind Shear, know = True
[D] 14:17:11 - [Spell] spellName=Flametongue Weapon, Id found: 16339, Name found: Flametongue Weapon, NameInGame found: Flametongue Weapon, know = True
[D] 14:17:11 - [Spell] spellName=Call of the Elements, Id found: 66842, Name found: Call of the Elements, NameInGame found: Call of the Elements, know = True
[D] 14:17:11 - [Spell] spellName=Searing Totem, Id found: 6365, Name found: Searing Totem, NameInGame found: Searing Totem, know = True
[D] 14:17:11 - [Spell] spellName=Lightning Shield, Id found: 8134, Name found: Lightning Shield, NameInGame found: Lightning Shield, know = True
[D] 14:17:11 - [Spell] spellName=Healing Wave, Id found: 8005, Name found: Healing Wave, NameInGame found: Healing Wave, know = True
[D] 14:17:11 - [Spell] spellName=Fire Nova, Id found: 8499, Name found: Fire Nova, NameInGame found: Fire Nova, know = True
[D] 14:17:11 - [Spell] spellName=Flame Shock, Id found: 10447, Name found: Flame Shock, NameInGame found: Flame Shock, know = True
[D] 14:17:11 - [Spell] spellName=Earth Shock, Id found: 10412, Name found: Earth Shock, NameInGame found: Earth Shock, know = True
[D] 14:17:11 - [Spell] spellName=Elemental Mastery, Id found: 16166, Name found: Elemental Mastery, NameInGame found: Elemental Mastery, know = True
[D] 14:17:11 - [Spell] spellName=Chain Lightning, Id found: 930, Name found: Chain Lightning, NameInGame found: Chain Lightning, know = True
[D] 14:17:11 - [Spell] spellName=Lightning Bolt, Id found: 10391, Name found: Lightning Bolt, NameInGame found: Lightning Bolt, know = True
[D] 14:17:11 - [Mount] No aquatic mount selected.
[D] 14:17:11 - [Mount] No flying mount selected.
14:17:11 - [PartyChatCommand] Started.
14:17:12 - [Party] Started
[D] 14:17:12 - GroupLoot => initialize
[D] 14:17:36 - [WarGuard] Warden found, protection activated.
14:17:47 - [PartyChatCommand] Run [CSharp] pause > robotManager.Products.Products.InPause = true; wManager.Wow.Helpers.Fight.StopFight(); wManager.Wow.Helpers.MovementManager.StopMove();
14:17:48 - [Pause] started
14:20:36 - [PartyChatCommand] Run [CSharp] unpause > robotManager.Products.Products.InPause = false;
14:20:36 - [Pause] Stoped
14:20:38 - [Mount] Dismount
[D] 14:22:07 - [Info] Continent change, Azeroth to RazorfenDowns
[D] 14:22:07 - [Blacklist] Added, 20 uniques Npcs, 52 Blackspots and 0 Npcs types (Training dummy ignored = True).
[D] 15:45:14 - [MovementManager] Avoid wall: StrafeLeft
[D] 16:10:55 - [Fight] Mob has moved more than 45 yards
[D] 16:10:55 - [Fight] BlackList Splinterbone Captain during 30 sec
[D] 16:11:02 - [Fight] Mob has moved more than 45 yards
[D] 16:11:02 - [Fight] BlackList Splinterbone Centurion during 30 sec
[D] 16:11:08 - [Fight] Mob has moved more than 45 yards
[D] 16:11:08 - [Fight] BlackList Splinterbone Centurion during 30 sec
[D] 16:11:18 - [Fight] Mob has moved more than 45 yards
[D] 16:11:18 - [Fight] BlackList Splinterbone Centurion during 30 sec
[D] 16:11:26 - [Fight] Mob has moved more than 45 yards
[D] 16:11:26 - [Fight] BlackList Splinterbone Captain during 30 sec
[D] 16:11:33 - [Fight] Mob has moved more than 45 yards
[D] 16:11:33 - [Fight] BlackList Splinterbone Captain during 30 sec
[D] 16:13:55 - [MovementManager] Avoid wall: StrafeLeft
[D] 16:15:19 - [MovementManager] Avoid wall: StrafeLeft
[D] 16:15:23 - [MovementManager] Avoid wall: StrafeLeft
[D] 16:16:12 - [MovementManager] Avoid wall: StrafeLeft
[D] 16:18:39 - [Info] Continent change, RazorfenDowns to Azeroth
[D] 16:18:39 - [Blacklist] Added, 20 uniques Npcs, 52 Blackspots and 0 Npcs types (Training dummy ignored = True).

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...