EDIT: Oh and btw, if you're using this for Arcanium Arena, some bot files will have to be modified or you will get a player.class1 error because duelists aren't listed as a class. you'll have to add the class to your pawn.lua and add it to settings.lua. I'll just post a tutorial in the next post to not clutter the OP.
List of valid arguments for use in most of the functions in this userfunction or simply (bgcode list):
Code: Select all
1 vs 1 Arena = "1v1"
Windrunner Race = "wr"
3 vs 3 Arena = "3v3"
6 vs 6 Arena = "6v6"
Karros Canyon = "kc"
Visdun Fortress = "vf"
Tyrefen Mountain Range = "tmr"
Arcanium Arena = "aa"
Syntax:
[color=#0000FF][size=150]joinBG(bgcode, waittime)[/size][/color]
-- this function queues for a battleground that you specify. It waits for the BG queue popup and accepts it when it appears. It then uses waitForLoadingScreen(), so waittime determines the argument for said function.
Examples:
joinBG("aa", 60) -- joins Arcanium arena, max wait time for loading screen is 60 seconds
joinBG("1v1") -- joins 1 vs 1 arena, waits indefinitely for loading screen
[color=#0000FF][size=150]quitBG(bgcode)[/size][/color]
-- this function cancels queues for a battleground that you specify. If you don't put any argument, it will cancel all battleground queues.
Examples:
quitBG("6v6") -- cancels the queue for 6 vs 6 arena.
quitBG() -- cancels all queues
[color=#0000FF][size=150]inBG(bgcode)[/size][/color]
-- this function uses getZoneId() to check the zone you're in, if it matches the bgcode argument, then it returns true, otherwise it returns false.
Example:
[code]if inBG("tmr") then
print("Char is in TMR.")
else
print("Char is not in TMR.")
end
-- this function lets the char leave the battleground. Like joinBG(), waittime is the argument for waitForLoadingScreen().
Example:
leaveBG(30) -- leaves battleground and waits for the loading screen for 30 seconds.
BGqtime(bgcode)
-- this function returns how many minutes you have been queued for the specified BG (bgcode). If it returns 0, then it means you're not queued.
Example:
Code: Select all
if BGqtime("kc") == 0 then -- not queued
print("Not queued for Karros Canyon")
else
print("You've been in queue for %s minutes.", BGqtime("kc"))
end
-- if arg is "ok", it will accept a BG queue popup, anything other than "ok" will return true or false, true if a BG queue popup is visible and false if there isn't one.
Example:
Code: Select all
if BGPopup() then -- no argument
BGPopup("ok") -- accept BG queue popup
else
print("No BG Queue Popup detected.")
end