CATACLYSM READY
Requested by toxic-xi here
It will just queue whatever settings you have already set (dungeons, roles etc). And it will accept the proposal. It is a plugin, so install it as one.
Requested by toxic-xi here
It will just queue whatever settings you have already set (dungeons, roles etc). And it will accept the proposal. It is a plugin, so install it as one.
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Styx.Plugins.PluginClass;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using System.Threading;
using Styx.Helpers;
namespace Styx.Bot.Plugins
{
class AutoDungeonQueue : HBPlugin
{
public override string Author { get { return "exemplar"; } }
public override string ButtonText { get { return null; } }
public override string Name { get { return "AutoDungeonQueue"; } }
public override Version Version { get { return new Version(0, 1); } }
public override bool WantButton { get { return false; } }
public override void Pulse()
{
LocalPlayer me = ObjectManager.Me;
if (!me.IsInInstance && !IsLFGDeserter())
{
if (!InLFDQueue())
{
JoinLFDQueue();
Thread.Sleep(3 * 1000);
}
else if (IsLFGProposal() && !HasRespondedToLFGProposal())
{
AcceptLFGProposal();
Thread.Sleep(3 * 1000);
}
}
}
private bool InLFDQueue()
{
return GetLFDMode() == "queued" || IsLFGProposal();
}
private string GetLFDMode()
{
string s = Lua.GetReturnVal<string>("local m,s = GetLFGMode(); return m;", 0);
return s == null ? "none" : s;
}
private void JoinLFDQueue()
{
Logging.Write("[AutoDungeonQueue] Queuing up");
Lua.DoString("LFDQueueFrame_Join()");
}
private bool IsLFGProposal()
{
return GetLFDMode() == "proposal";
}
private bool HasRespondedToLFGProposal()
{
return Lua.GetReturnVal<int>("local a,b,c,d,e,f,g,h,i,j,k = GetLFGProposal(); return g;", 0) == 1;
}
private void AcceptLFGProposal()
{
Logging.Write("[AutoDungeonQueue] Accepting Proposal");
Lua.DoString("AcceptProposal()");
}
private bool IsLFGDeserter()
{
return Lua.GetReturnVal<bool>("return UnitHasLFGDeserter('player')", 0);
}
}
}
Last edited: