HORDE: Queue for AV, join, leave, rejoin

08/27/2006 05:55 RegeX#1
Note: This script will only work on the ENGLISH version of the game, and your character must be level 60, unless you patch the "bmpN6" bitmap.

Hi,
Long time leecher, first time contributor.

In my grind from Revered->Exalted, I got bored and made this "SCAR" script that queues, joins, afk's in, leaves when done, and requeues. It works very well.

SCAR is a mouse/key cheat made for the game RuneScape that I have used, because I couldn't be bothered finding anything else.

You can find SCAR 2.03 at [Only registered and activated users can see links. Click Here To Register...]

It is mouse/keyboard based, so you can't really use your computer while running it.

Your WoW needs to be configured like:
  • Pretty default UI
  • 1280x1024 COMPUTER resolution
  • WoW in 1024x768 windowed
  • Make sure "UI Scale" is on the default value

Next, in the Orgrimmar (Orgrimmar only) warmaster room, stand in front of the AV Battle master (from the center outwards), and start the script.

Sorry if it's kind of suck in terms of adaptability, I coded it for myself and no one else, and now that I'm exalted I don't need it anymore.

Here is the script:
Code:
{.Script Info:
# ScriptName = AV Queue & AFK
# Author   = [email][Only registered and activated users can see links. Click Here To Register...].au[/email]
# Description = Queues, joins, afks, rejoins AV games.
# Version   = 1.0
# Date    = 27 Aug 06
# Comments  = 
/Script Info}
program AvQueue;

var
 bmpN6, bmpWM, bmpWMTip, bmpEnter, bmpJoin, bmpJoinBg, bmpLeave: Integer;

function InBattlegrounds: Boolean;
var x,y: Integer;
begin
 Result := FindBitmapToleranceIn(bmpN6,x,y,1,1,500,500,10);
end;

function BattlemasterSelected: Boolean;
var x,y: Integer;
begin
 Result := FindBitmapToleranceIn(bmpWM, x,y,10,10,500,500,10);
end;

function MouseOnBattlemaster: Boolean;
var x,y: Integer;
begin
 Result := FindBitmapToleranceIn(bmpWMTip,x,y,10,10,1024,768,50);
end;

procedure EnterBg;
var x,y: Integer;
begin
 If(FindBitmapToleranceIn(bmpEnter,x,y,1,1,1024,768,0)=True) then
 begin
  MoveMouse(x + 3,y + 3);
  Wait(500);
  ClickMouse(x + 3,y + 3,True);
  Wait(1000);
 end;
 if(FindBitmapToleranceIn(bmpJoin,x,y,1,1,1024,768,0)=True) then
 begin
  MoveMouse(x + 3,y + 3);
  Wait(500);
  ClickMouse(x + 3,y + 3,True);
  Wait(1000);
  SendKeysVB('{ESC}', True);
  Wait(500);
 end;
 if(FindBitmapToleranceIn(bmpJoinBg,x,y,1,1,1024,768,0)=True) then
 begin
  MoveMouse(x + 3,y + 3);
  Wait(500);
  Writeln('Joining battlegrounds!');
  ClickMouse(x + 3,y + 3,True);
  Wait(10000);
 end;
end;

procedure MoveCameraTop;
begin
 SendKeys('[');
 Wait(500);
end;

procedure Click(Left: Boolean);
var x,y : Integer;
begin
 GetMousePos(x,y);
 ClickMouse(x,y,Left);
end;

function LeaveBg: Boolean;
var x,y: Integer;
begin
 if(FindBitmapToleranceIn(bmpLeave,x,y,0,0,1024,768,10)=True)then
 begin
  MoveMouse(x,y);
  Wait(500);
  ClickMouse(x,y,True);
  Wait(10000);
  Result := true;
 end
 else
 begin
  Result := False;
 end;
end;

procedure SelectBattlemaster;
var x,y: Integer;
begin
 for y := 300 to 768 do
 begin
 for x := 300 to 1024 do
 begin
  MoveMouse(x,y);
  Wait(1);
  if(MouseOnBattlemaster) then
  begin
   Click(False);
   Wait(500);
   y := 769;
   x := 1025;
  end;
  x := x + 25;
 end;
 y := y + 50;
 end;
end;

procedure LoadBitmaps;
begin
 bmpWM := BitmapFromString(33, 13, 'z78DADD94497' +
    '2E3300C45AF4480F39200A5FB1FA93114CB526C264E7AD31D2D9E' +
    '6DFA0B9F18C85823408F5752CC4071C606FCC421ECA2B9F214520' +
    'A42BE112319F94DE63885E589120F8E7424B83387148D098E1060' +
    '04FCA709C2185098B60CA987F0FFB3D6DFC07EFC06527C4544921' +
    'CCF73C2FAEEEB73F20CA1143AF7EF7E97D7F83F25873D3D0B7F72' +
    '968B288CC1A4BFE44C6937BF8CF00E7B678B36CA5FC4A13D3D8B1' +
    '8515C589B204FB3BAA57457D6CAD259223E97129179FD9B922EF9' +
    'BA3367EFA9D25D88C6B9943BFDCE4B3EE79E1EBFF73A953E45D83' +
    'F7BAB4CED97CE6AAD7EEE08B50EEA7B1CAEF108CED6EF1D176D55' +
    'FDC0BDFED94B56704F8F0F107C0F4D6B52C75D2335F749E345A9D' +
    '2D42C9AF5ABD8AE386BDDD86626CC572EEB61DCEB775E5EAB1DAF' +
    'F15322B05C92466B716964AAC5B1353FA1D13ADEC07A61F3964FD' +
    'D1535DB95E58569EFB27AF75ABFF3927FE62B228EF4B8A380D77A' +
    '29BDEB4D4545BD7AD5EC06D9CAA1F13B6ABF86F7AE6B1F333F345' +
    'E5B38EF5E52CFA8ECA61F61AFDF794936F4190B3DAA542EEBC9E6' +
    'CA4B58ACAA79E81EC0F6166D7A33FA75F0B8CDF2E5AD8F5E00E8A' +
    '700BED67FF4FA0330E113C5');
 bmpWMTip := BitmapFromString(11, 11, 'z78DAA5915B0EC4200845B75481' +
    'AAFDC401F6BFA4A16232EDD826F3F0E3C6001E2E820494ACD42C9' +
    '967254004C5BD46FD86AE3069CF2A2968922C28C0CA85D7D65A6E' +
    '9479D5B57D4ED8B072AD3D62171A04FC85404609C5922DB6B0EC0' +
    'EAD1F5A9C21C10C42C447659F65F8EF1AC90DBC4B39793810BA87' +
    'E29198FA4D475FF5CE8FF937060106E135EF414F04FC8320D71E6' +
    '2F6D8E09C8D5741C89BEF974F35E966CB734D0298F42EFE953E01' +
    'A5619E63');
 bmpEnter := BitmapFromString(6, 1, '95683E94663D93663C96673C97' +
    '683C9C6B3D');
 bmpJoin := BitmapFromString(1, 8, '5D00005900005800005F0102630' +
    '2046202046703066B0408');
 bmpJoinBg := BitmapFromString(14, 7, 'z78DA6D904B1285200C04AF3' +
    '4044870C9F7FE477A24A8F82C5D7459E3D88430613E6C3C38F017' +
    'B9A25F9D4FD28BCE7263CF2502EDC802142F0DA8480590E01310C' +
    'B6EBE482F66CBADDF8B3AA5EBF92E6A42965350866ECDFAE0616C' +
    '70FF1EEE960C65AFE61CEAF465E78BA275A4E0A66F70F5F32EA4C' +
    'DF5FE4CCEBF9ACD69CE31DA4C0669A746DDC0FA3A9BB8CCAB13B3' +
    '6EDBDB9C21EB7E562E02AF1B532E673A778F5B4175DBC46D2791C' +
    'E1CDA790B773B0BE6B6E450F656F872FAA1DB167AD01B6D86A793' +
    'A339699FF503E48D7894');
 bmpN6 := BitmapFromString(8, 1, '2F270D100C08100C08100F060E0D03' +
    '19170A201E1229261F');
 bmpLeave := BitmapFromString(13, 7, 'z78DA8D904B7644210844B754208' +
    '20E7D7EF6BFA40635E94E3209837B3C6559804A60A4D99E0CD854' +
    '06257345B442606A4E5575662322C85A83DC097EC09441EE171AA' +
    '0A36B72A7789A826E9A222169817A4E4341D1C79F97072A5F69BD' +
    '3703C668053429B8A427203778CDFA3D1B6E5AF504BB3464681BD' +
    'E9917C7AB532431DB277FA48D9DC65B5F91694AD399376323BE9B' +
    'B670BA87BCEFFEAB73CE166967CEE35CB4CF1F8AF4F0C80CDA48C' +
    '5BBCFB89D296618A956E78CDD3387E7D0F77957FEADE4BAB97791' +
    'ED6723EFC33D4865EBFA0FEE9C3BE1F8C3F4E60BD56E70AB');
end;

var i : Integer;
begin
 LoadBitmaps;
 FindWindow('World of Warcraft');
 ActivateClient;
 Wait(500);
 while(True) do
  begin
  if(InBattlegrounds) then
  begin
   // In BG
   if not(LeaveBg) then
    if(Random(10) = 4) then
    begin
     i := 0;
     HoldMouse(500 + Random(100),500,True);
     for i := 0 to 50 do
      SendKeys('a');
     Wait(1000);
     ReleaseMouse(500 + Random(100),500,True);
    end
  end
  else
  begin
   // Not in BG
   if not(BattlemasterSelected) then
   begin
    MoveCameraTop;
    SelectBattlemaster;
   end;
   EnterBg;
  end;
  Wait(500);
 end;
end.
In terms of being detectable, warden doesn't detect scar, and in 40v40 no one should really notice ;).
08/27/2006 13:08 Weedor#2
realmpool 2 (insta join for horde) + recorder (for antiafk) is the easier way ;)
but seems to be a nice idea, if it works
08/27/2006 14:05 Ennea#3
My brother just farmed the whole last night and got exalted :P And its not even detectable if you farm yourself! Wohoo! xD
I dont think you really need something like this. Get some time and do this yourself...no banrisk. But good job anyways.
08/27/2006 17:02 Kazoooka#4
hey there, I'd like to ask if it is possible to do this script for Warsong? If yes, what do i have to change or could you script me somethin?
Thanks in before
Flo

btw... my char is lvl 19 and i got the german version of wow, but thats not the prob,... whats with lvl 19? can i do it also?
08/27/2006 20:38 hoaxx#5
Hmm, could be a really great thing to get a lot of honor while afk. And since 1.12 AV is running 24/7 with no waiting time.

I consider using this as a honor-farm bot, running when I'm not on the machine.
08/27/2006 21:27 hoaxx#6
*edit* sry 4 dbl post
08/27/2006 22:27 hoaxx#7
Code:
procedure MoveCameraTop;
begin
 SendKeys('[');
 Wait(500);
end;
What exactly is this supposed to do? What should be set as '[' for this to work?

Edit:

I got step 1 to work, it selects the battlemaster and opens the "I would like to go to the battleground."-window.
But then it stops again and does nothing.

I assume no FindBitmapToleranceIn turns true in procedure EnterBg.
Any Idea why?
08/28/2006 07:40 RegeX#8
Oh guys I am sorry about the '['.
You need to bind it to "Set View 4".

As for the bitmap not matching, make _sure_ that you are using the default UI.
If worst comes to worst you can always make your own bitmap for bmpJoin ("Join" on the BG selection screen), with "Script->Picture to String, String to Picture".
08/28/2006 07:43 DonSisto#9
Quote:
Originally posted by RegeX@Aug 27 2006, 05:55
Note: This script will only work on the ENGLISH version of the game, and your character must be level 60, unless you patch the "bmpN6" bitmap.
How do i patch it? :O my character is lvl 53
08/28/2006 07:47 RegeX#10
Quick guide to bitmaps.
Basically, bmpN6 is the number "6" picture in your portrait frame.

Code:
 bmpN6 := BitmapFromString(8, 1, '2F270D100C08100C08100F060E0D03' +
    '19170A201E1229261F');
Basically, take a picture of WoW, go into paint.
Select the "5" and maybe the "3", too, and copy it onto a new picture.
Making sure the picture is cropped very small, save it as a bmp.
In SCAR, go Script->Picture to string, and load the picture you saved, press OK, and just copy the new bitmap data into where the old bitmap was.

Sorry if you haven't coded before =p.

@hoaxx, try, where there is FindBitmapToleranceIn, make the last argument (0), to something like 10.
08/28/2006 12:44 valvia#11
How could we change this to make it work for WSG?
08/28/2006 13:14 RegeX#12
You'd need to change the bmpWM, bmpWMTip bitmaps, which are basically: part of the warmaster's unit frame, and the 2nd one is the warmaster's say "Frostwolf PvP blah blah" tooltip when your mouse is over them.
08/28/2006 15:33 xorxis#13
Everyting works but then it stops when the - i would like to join the bg window pops, it wont click it........
08/28/2006 15:42 xorxis#14
EDIT from previous post: Everyting works but then it stops when the - i would like to join the bg window pops, but it want to click but he is 1 mm under the ' i would like to join ' sentence.... so he cant click it... how can i make it 1 mm higher
08/28/2006 17:50 hoaxx#15
Changing the Tolerance value makes it somehow.

I can configure it to successfully enter AV. But then again the script starts the find_battlemaster routine inside the bg, unless I set the tolerance in InBattlegrounds to 20+.

Doing this, the script runs the AntiAFK routine and exits the BG when the fight's over, all fine, but this again prevents going back to step 1 (re-enter queue), as the AntiAFK routine continues in Orgrimmar without searching for the battlemaster.

I hardly understand, why some of the bitmaps are either 1 pixel in height or width. Is that accurate enough?

I run it on an absolute virgin version, no Addons, no not-default settings (aside from the set view4 '[' keybinding). Windowed mode 1024x768 is up, UI scale is off. Something does not work out for me. I don't know what it is, but I'm pretty sure, it is not able to determine the state it has to go through (InBattleground / outsideBattleGround) by picking from the bitmaps.