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 post
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 post
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 post
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 post
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 post
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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...