Queue RBG macro

Work with other players to create your own special custom interfaces and macros.
User avatar
Vaxsysl
Posts: 116
Joined: 24 Jan 2013 16:53
Location: Croatia

Re: Queue RBG macro

#16 » Post by Vaxsysl » 29 May 2014 03:18

Any news on this?
Fern / Gaidin (and other alts)

User avatar
Cocopuffs
Donor
Posts: 385
Joined: 14 Dec 2013 20:22
Location: Shadows of the Night

Re: Queue RBG macro

#17 » Post by Cocopuffs » 29 May 2014 03:32

#showtooltip Alliance

/cast factionchange [target=exists]; Human;
/startcast queue rbg

User avatar
Fastor
Posts: 4031
Joined: 16 Dec 2012 17:38

Re: Queue RBG macro

#18 » Post by Fastor » 29 May 2014 12:44

Seems l figured out how this macro work.

Code: Select all

/run TogglePVPFrame()for i=1,GetNumBattlegroundTypes()do local _,_,_,iR,_=GetBattlegroundInfo(i)if iR then JoinBattlefield(i)end end TogglePVPFrame()

No addon is making problem and bugs it out, its changing of locations and forcing loading screen that bugs it out.

So here is short story.

Login and click this macro, play RBG and after finish macro will be bugged.
Dont relog or anything, just queue manually, play RBG and finish it.
From now on, this macro will work as long as you dont do /reload or enter some instance or teleport somewhere.
If you do and bug macro, return to step two.

User avatar
Vaxsysl
Posts: 116
Joined: 24 Jan 2013 16:53
Location: Croatia

Re: Queue RBG macro

#19 » Post by Vaxsysl » 29 May 2014 13:23

Thanks! BTW Fastor you have forum message for a week now, care to reply?
Fern / Gaidin (and other alts)

User avatar
Fastor
Posts: 4031
Joined: 16 Dec 2012 17:38

Re: Queue RBG macro

#20 » Post by Fastor » 29 May 2014 13:44

Um, lf l had l would respond.

Image

User avatar
Vaxsysl
Posts: 116
Joined: 24 Jan 2013 16:53
Location: Croatia

Re: Queue RBG macro

#21 » Post by Vaxsysl » 29 May 2014 14:41

Bah, dunno why it didn't send - short version is sent now. Sorry for the offtopic.
Fern / Gaidin (and other alts)

User avatar
Fastor
Posts: 4031
Joined: 16 Dec 2012 17:38

Re: Queue RBG macro

#22 » Post by Fastor » 24 Jun 2014 17:07

Ok so l think l got idea how this should work.

First thing, Honor window if used always close on Battleground tab.

Second thing, use this macro:

Code: Select all

/run TogglePVPFrame()for i=1,GetNumBattlegroundTypes()do local _,_,_,iR,_=GetBattlegroundInfo(i)if iR then JoinBattlefield(i)end end TogglePVPFrame()
[/color]

Macro wont work if you checked your HK or honor or what ever and didnt close on Battleground tab, but yes, all is working.

User avatar
Brennus
Posts: 533
Joined: 17 Jan 2013 05:25
Location: Argent Tournament Grounds

Re: Queue RBG macro

#23 » Post by Brennus » 29 Nov 2016 00:49

Have not tested, but this should work (238 characters)

Code: Select all

/run for i = 1, GetNumBattlegroundTypes() do local v1, v2, _, v4, v5 = GetBattlegroundInfo(i); if (v1=="Random Battleground") and (v2) and (v4) and (v5==32) then PVPBattlegroundFrame.selectedBG = i; break; end end JoinBattlefield(0,false)
This one works only for US English clients though.



This has potential too, and doesn't require any specific language (205 characters)

Code: Select all

/run for i = 1, GetNumBattlegroundTypes() do local _, v2, _, v4, v5 = GetBattlegroundInfo(i); if (v2) and (v4) and (v5==32) then PVPBattlegroundFrame.selectedBG = i; break; end end JoinBattlefield(0,false)
Edit: code typo


--------------------------------------------------
Edit 2:

After some testing, looks like this macro will never be perfect because it is affected by latency, and LUA doesn't offer any "sleep" function natively.

So, this macro is instantly selecting RBG from the BG list and pressing the Queue button, but, the Queue button is queueing you for the previously selected BG.

The right way to make that work would be
/run
for i = 1, GetNumBattlegroundTypes() do
local _, v2, _, v4, v5 = GetBattlegroundInfo(i);
if (v2) and (v4) and (v5==32) then
PVPBattlegroundFrame.selectedBG = i;
break;
end
end
local _, _, ping = GetNetStats();
sleep(ping);

JoinBattlefield(0, false)
But, as I said, there is no sleep command :(

Theoretically, such command would stop everything and "sleep" the code by some amount of time (e.g. 1200 ms = 1 second and 200 milliseconds).



The best you can get is splitting it in two macros.
The first one would "select" RBG from BG list. After that you may press the second macro.

If your latency is somewhere below 1 second (1000ms) then you should be just fine smashing them buttons.
If not, then you should wait a little before pressing the second button.

1st macro (180 characters)

Code: Select all

/run for i = 1, GetNumBattlegroundTypes() do local _, v2, _, v4, v5 = GetBattlegroundInfo(i); if (v2) and (v4) and (v5==32) then PVPBattlegroundFrame.selectedBG = i; break; end end
2nd macro (30 characters)

Code: Select all

/run JoinBattlefield(0, false)
--------------------------------------------------
Edit 3:

"Implementing" a sleep timer doesn't seem to work very well, because it freezes the client while it's "sleeping".

Code: Select all

/run local function wait(milliseconds) local start = (GetTime()*1000); repeat until (GetTime()*1000) > start + milliseconds end; print("TIMER STARTED"); wait(5000); print("TIMER FINISHED")
Spoiler:
and I believe that macro may also trigger the Anti-Cheat system :lol:

If so, sorry for that admins.
So, sorry, not even with an addon I could do that.


Sleep Timer Idea from here.



Also, looks like it's not a latency issue, but queueing for RBG kind of makes a request to the server and the client must receive the answer before queuing properly. That's why it is not queueing for RBG, but the last selected BG instead.
I'll look into it and (probably) come up with an AddOn to solve it all.
•     Currently No longer Once again retired (now it's for real)     •
 
Image

User avatar
Brennus
Posts: 533
Joined: 17 Jan 2013 05:25
Location: Argent Tournament Grounds

Re: Queue RBG macro

#24 » Post by Brennus » 29 Nov 2016 07:36

Got it now.

Implemented a slash command with an AddOn.

Put this in a macro

Code: Select all

/queuerbg

Now, to create the AddOn:



Create the folder QueueRBG in your AddOns folder (WoW Installation Folder/Interface/AddOns/).

Create QueueRBG.lua file and put the following code inside.
[hide="AddOn Code"]

Code: Select all

local me = CreateFrame("Frame", "QueueRBG")

local function QueueWSG()

print("Queuing for Warsong Gulch")

if ( me:IsEventRegistered("PVPQUEUE_ANYWHERE_SHOW") ) then
print("Error: A join battleground request is already being processed");
else
me:RegisterEvent("PVPQUEUE_ANYWHERE_SHOW");
for i = 1, GetNumBattlegroundTypes() do
local _, canIQueue, _, isRBG, bgID = GetBattlegroundInfo(i)
if ( canIQueue ) and ( bgID == 2 ) then
PVPBattlegroundFrame.selectedBG = i
RequestBattlegroundInstanceInfo(i)
break
end
end
end
end

local function QueueRBG()

print("Queuing for Random Battleground")

if ( me:IsEventRegistered("PVPQUEUE_ANYWHERE_SHOW") ) then
print("Error: A join battleground request is already being processed");
else
me:RegisterEvent("PVPQUEUE_ANYWHERE_SHOW");
for i = 1, GetNumBattlegroundTypes() do
local _, canIQueue, _, isRBG, bgID = GetBattlegroundInfo(i)
if ( canIQueue ) and ( isRBG ) and ( bgID == 32 ) then
PVPBattlegroundFrame.selectedBG = i
RequestBattlegroundInstanceInfo(i)
break
end
end
end
end

me:SetScript("OnEvent", function(self, event, ...)
JoinBattlefield(0, false)
self:UnregisterEvent("PVPQUEUE_ANYWHERE_SHOW")
end)

SLASH_QUEUERBG1 = "/queuerbg"
local function slashHandler(param)
if ( UnitLevel("player") >= 80 ) then
QueueRBG()
elseif ( UnitLevel("player") <= 79 ) then
QueueWSG()
end
end
SlashCmdList["QUEUERBG"] = slashHandler
[/hide]


Now, create QueueRBG.toc and put the following inside.
[hide="TOC file contents"]

Code: Select all

## Interface: 30300
## Title: QueueRBG
## Version: 1.0
## Notes: Macro command to queue for RBG
## Author: Brennus
## DefaultState: Enabled
## SavedVariables:

QueueRBG.lua
[/hide]
How it works:

- Press enter and type /queuerbg in your chat and press enter again.
- Or put that slash command in a macro.

It will queue you for RBG (if you are lvl 80) or WSG (if you are lvl 79-).
And that's it!!!
I'll finish this this thing tomorrow (like adding support to keybinding and zipping it all together).



I'm getting some sleep now guys.
•     Currently No longer Once again retired (now it's for real)     •
 
Image

User avatar
Fastor
Posts: 4031
Joined: 16 Dec 2012 17:38

Re: Queue RBG macro

#25 » Post by Fastor » 29 Nov 2016 10:06

Well, someone has been busy :)

PS, when lm in game gonna delete "queue" and leave "/rbg" because its shorter since some of us dont have any macro space left and having less things to type is nice to us.

User avatar
Brennus
Posts: 533
Joined: 17 Jan 2013 05:25
Location: Argent Tournament Grounds

Re: Queue RBG macro

#26 » Post by Brennus » 29 Nov 2016 20:54

- Implemented support for key bindings
Image

- Changed slash command to /rbg.

- AddOn licensed under Do Whatever the F*ck You Want to Public License (WTFPL-2.0) :lol:

Download link (sorry, no curse/curseforge for us :cry: - they don't like private servers).
•     Currently No longer Once again retired (now it's for real)     •
 
Image

User avatar
Fastor
Posts: 4031
Joined: 16 Dec 2012 17:38

Re: Queue RBG macro

#27 » Post by Fastor » 30 Nov 2016 00:21

Faking GG!

User avatar
iceshock
Posts: 158
Joined: 09 May 2014 15:37

Re: Queue RBG macro

#28 » Post by iceshock » 02 Dec 2016 18:30

Holy shit a que bg key bind that's epic!

Nice work :o
Bangarang - Inquisition - Guild Leader

Guild Inquisition Website: http://the-inquisition.enjin.com/

Chars:
Spoiler:
Bangarang, Dumont, Shotzfired, Moto, Banearang, Iceshock, Crosshatch, Gopro, SMS, Hdmi, Shotzrfired.
Anybody with a name like me but not listed here ISN'T ME.

User avatar
Brennus
Posts: 533
Joined: 17 Jan 2013 05:25
Location: Argent Tournament Grounds

Re: Queue RBG macro

#29 » Post by Brennus » 02 Dec 2016 19:37

^_^
•     Currently No longer Once again retired (now it's for real)     •
 
Image

User avatar
Gnurg
Posts: 2420
Joined: 28 Jan 2013 19:38
Location: Oslo, Norway

Re: Queue RBG macro

#30 » Post by Gnurg » 02 Dec 2016 20:18

Well done! :-)
HAI
CAN HAZ STDIO?
VISIBLE "HAI WORLD, IZ GNURF!"
KTHXBYE

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest