Jump to content

Recommended Posts

Hi I'm currently leveling 5 druids to level 80 on a 3.3.5 server. I'm running 1 feral tank, 3 feral dps and 1 resto druid. I'm mostly running grinder on my tank and then party on the other 4 druids which is working really good. I've done a few dungeons with them and that works really good aswell, but then I manually have to controll the druid tank. My goal with this team was to be able to run dungeon/quester profiles on my main druid and then have the 4 druids assist him. Running the dungeons manually on the main character works fine so I surviving is not an issue, problem is for example, searching and also joining the dungeon. I've setup the team so that I can use party chat to send commands to the other bots for example "Drink" and all the bots start drinking. Looking at the party bot it does not have many options so it looks like all the logics will have to be done within the main character so for example if it's going to search dungeon the main character searches for dungeon and it then send a party command "Pick Role" and all druids pick a role and when it detetects queue pop(which will be instant becuase of 5 characters) it will send party command "Accept Dungeon". This feel doable with some LUA perhaps? Help me with this one if it's even possible. The problem I then face is how does it know which dungeon profile to run, I can create dungeon profile for all the dungeons within the random dungeon finder BUT it needs to detect which one it is and then run quester profile accordingly. Is there anyway todo this?

 

Any help is greatly apprecuited! I have not touched any LUA except some basic commands in fight classes and I've never even looked at c++ code. So if c++ or lua is needed some great pointers where to look for guidance would be great! 

 

Thank you!

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/
Share on other sites

you can try to make auto accept dungeon plugin, like i did in Battleground helper.

For this you have to listen Lua event LFG_PROPOSAL_SHOW, and when it fires, call AcceptProposal() function, or, if it disabled, click accept button programmatically. To discover name of button, type /fstack command, join dungeon queue, and when confirm dialog popup, put cursor above button and read it name.

Plugin code should be like this:

using wManager.Wow.Enums;
using wManager.Wow.Helpers;
using System.Collections.Generic;

public class Main : wManager.Plugin.IPlugin {
	public void Initialize() {
		EventsLuaWithArgs.OnEventsLuaWithArgs += MyLuaHandler;
	}
	public void Dispose() {
		EventsLuaWithArgs.OnEventsLuaWithArgs -= MyLuaHandler;
	}
	private void MyLuaHandler(LuaEventsId id, List<string> args) {
		if (id == LuaEventsId.LFG_PROPOSAL_SHOW) {
			Lua.LuaDoString("AcceptProposal()");
			// or Lua.LuaDoString("Button_name_you_found:Click()");
		}
	}
	public void Settings() {
		// no settings
	}
}

Of course, you can handle other events too (like invite accept and role select)

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/#findComment-37740
Share on other sites

12 minutes ago, headcrab said:

you can try to make auto accept dungeon plugin, like i did in Battleground helper.

For this you have to listen Lua event LFG_PROPOSAL_SHOW, and when it fires, call AcceptProposal() function, or, if it disabled, click accept button programmatically. To discover name of button, type /fstack command, join dungeon queue, and when confirm dialog popup, put cursor above button and read it name.

Plugin code should be like this:


using wManager.Wow.Enums;
using wManager.Wow.Helpers;

public class Main : wManager.Plugin.IPlugin {
	public void Initialize() {
		EventsLuaWithArgs.OnEventsLuaWithArgs += MyLuaHandler;
	}
	public void Dispose() {
		EventsLuaWithArgs.OnEventsLuaWithArgs -= MyLuaHandler;
	}
	private void MyLuaHandler(LuaEventsId id, List<string> args) {
		if (id == LuaEventsId.LFG_PROPOSAL_SHOW) {
			Lua.LuaDoString("AcceptProposal()");
			// or Lua.LuaDoString("Button_name_you_found:Click()");
		}
	}
	public void Settings() {
		// no settings
	}
}

Of course, you can handle other events too (like invite accept and role select)

Thank you! I kinda managed to auto accept it by running party command chat plugin to my other 4 characters, but this looks more reliable. But it brings me to a problem I stumbled upon, how do I search for random dungeon or specific dungeon in the first place as the leader? If I want to keep queuing dungeons after I'm finished with one. 

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/#findComment-37741
Share on other sites

There are alot of LFG functions and LFG events (check started with "LFG"). Read documentation, try functions in developer tools, and write code like in pattern above. Much of functions and events undocummented, maybe you can find better source with google

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/#findComment-37745
Share on other sites

I've managed to queue and join a dungeon with my entire party but once I get in i can find what dungeon it is by return (wManager.Wow.Helpers.Usefuls.ContinentId == (int)wManager.Wow.Enums.ContinentId.GruulsLair); I believe but how would I go on about starting a specific quest depending on what dungeon it was?? 

 

Also I tried open some plugin with source files but I just get error on wMananger, does it need to be compiled or should I add some library first? Finding no info on how to make plugins

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/#findComment-37751
Share on other sites

I think you can call GetInstanceInfo.

For example, if you use lua events listener (i never tried, but maybe it possible in grinding profile too), you can call it after PLAYER_ENTERING_WORLD event:

	private void MyLuaHandler(LuaEventsId id, List<string> args) {
		switch (id) {
		case LuaEventsId.LFG_PROPOSAL_SHOW: 
			Lua.LuaDoString("AcceptProposal()");
			break;
		case LuaEventsId.PLAYER_ENTERING_WORLD:
			StartInstance();
			break;
		default: break;
		}
	}
	private void StartInstance() {
		string[] dungeonInfo = Lua.LuaDoString<string[]>("return GetInstanceInfo()");
		// name=dungeonInfo[0] type=dungeonInfo[1] difficulty=dungeonInfo[2] ...
		if (dungeonInfo[1] == "party") {
			// here you can check dungeon name
			switch (dungeonInfo[0]) {
			case "Gruul's Lair": 
				start_quest_1
				break;
			case "another name":
				start_quest_2
				break;
			...
			default: break;
			}
		}
	}

 

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/#findComment-37758
Share on other sites

That sounds like a good plan, but how and where would you use this piece of code? I know how to send lua snippets of code by the lucamacro commands in quester but where would you use this big piece of code? Make a plugin for it? Can the plugins talk to the quester profile? by changing as you writing "start_quest_1" or is that the profiles it will start?

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/#findComment-37759
Share on other sites

  • 10 months later...
  • 1 year later...

Sorry to revive an old thread but I'm having issues with the script above recognizing the queue popping up.

using wManager.Wow.Enums;
using wManager.Wow.Helpers;
using System.Collections.Generic;

public class Main : wManager.Plugin.IPlugin
{
    public void Initialize()
    {
        EventsLuaWithArgs.OnEventsLuaWithArgs += MyLuaHandler;
    }
    public void Dispose()
    {
        EventsLuaWithArgs.OnEventsLuaWithArgs -= MyLuaHandler;
    }
    private void MyLuaHandler(LuaEventsId id, List<string> args)
    {
        if (id == LuaEventsId.LFG_PROPOSAL_SHOW)
        {
            Lua.LuaDoString("LFDDungeonReadyDialogEnterDungeonButton:Click()");
        }
    }
    public void Settings()
    {
        // no settings
    }
}

Is it possible there's a different event other than LFG_PROPOSAL_SHOW ? if so how would I go about finding it? on 3.3.5

58d6b9dc9c.png852c1db180.png

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/#findComment-60436
Share on other sites

This is what i used to handle taking proposal, 

  public static void AcceptProposalHandler(LuaEventsId id, List<string> args)
    {
        if (id == LuaEventsId.LFG_PROPOSAL_SHOW)
        {
            Lua.LuaDoString("AcceptProposal();");
        }
    }

You are going to need a way to check if you are in the que or not.

public static bool Qued(string GetLFGType)
    {
        return Lua.LuaDoString<bool>("local mode, submode = GetLFGMode(LE_LFG_CATEGORY_LFD); if mode == '" + GetLFGType + "' then return true; end");
    }

we are both working on the same project, wanna work together on this? two brains better then one LOL Message me if your up for it.

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/#findComment-60440
Share on other sites

  • 1 year later...

@cometttorSource Code (Plugin)

using robotManager.Helpful;
using System;
using System.Collections.Generic;
using System.Windows;
using wManager.Plugin;
using wManager.Wow.Helpers;

public class Main : IPlugin
{
    public void Initialize()
    {
        EventsLuaWithArgs.OnEventsLuaStringWithArgs += AcceptDungeon;
    }
    public void Dispose()
    {
        EventsLuaWithArgs.OnEventsLuaStringWithArgs -= AcceptDungeon;
    }

    public void Settings()
    {
        MessageBox.Show("No Settings.");
    }

    private void AcceptDungeon(String EventName, List<String> Args)
    {
        try
        {
            if(EventName.ToString() == "LFG_PROPOSAL_SHOW")
            {
                Lua.LuaDoString("AcceptProposal();");
            }
        }
        catch (Exception ex)
        {
            Logging.WriteError("Main > AcceptDungeon > " + ex.StackTrace);
        }
    }
}

 

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/#findComment-66688
Share on other sites

On 9/21/2022 at 3:19 AM, Nax said:

@cometttorSource Code (Plugin)

using robotManager.Helpful;
using System;
using System.Collections.Generic;
using System.Windows;
using wManager.Plugin;
using wManager.Wow.Helpers;

public class Main : IPlugin
{
    public void Initialize()
    {
        EventsLuaWithArgs.OnEventsLuaStringWithArgs += AcceptDungeon;
    }
    public void Dispose()
    {
        EventsLuaWithArgs.OnEventsLuaStringWithArgs -= AcceptDungeon;
    }

    public void Settings()
    {
        MessageBox.Show("No Settings.");
    }

    private void AcceptDungeon(String EventName, List<String> Args)
    {
        try
        {
            if(EventName.ToString() == "LFG_PROPOSAL_SHOW")
            {
                Lua.LuaDoString("AcceptProposal();");
            }
        }
        catch (Exception ex)
        {
            Logging.WriteError("Main > AcceptDungeon > " + ex.StackTrace);
        }
    }
}

 

how Can i Use that?

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/#findComment-66698
Share on other sites

On 9/21/2022 at 3:19 AM, Nax said:

@cometttorSource Code (Plugin)

using robotManager.Helpful;
using System;
using System.Collections.Generic;
using System.Windows;
using wManager.Plugin;
using wManager.Wow.Helpers;

public class Main : IPlugin
{
    public void Initialize()
    {
        EventsLuaWithArgs.OnEventsLuaStringWithArgs += AcceptDungeon;
    }
    public void Dispose()
    {
        EventsLuaWithArgs.OnEventsLuaStringWithArgs -= AcceptDungeon;
    }

    public void Settings()
    {
        MessageBox.Show("No Settings.");
    }

    private void AcceptDungeon(String EventName, List<String> Args)
    {
        try
        {
            if(EventName.ToString() == "LFG_PROPOSAL_SHOW")
            {
                Lua.LuaDoString("AcceptProposal();");
            }
        }
        catch (Exception ex)
        {
            Logging.WriteError("Main > AcceptDungeon > " + ex.StackTrace);
        }
    }
}

 

will be grateful for some explaination

thanks in advance,
Adrian

 

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/#findComment-66716
Share on other sites

5 hours ago, Zan said:

What do you need explained?

there is I code which should be used in right place. im total amateur and I just watned to know how can i Use it. If its not too professional or too complicated for you - please, mase some desciprtiom how to add this code to my wrobot.

Link to comment
https://wrobot.eu/forums/topic/8271-5-bot-dungeon-accept/#findComment-66719
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...