Amberleaf Posted January 19, 2013 Share Posted January 19, 2013 (edited) My first script of 2013! Start the script facing north in the position shown in the picture below with either a bow or crossbow equip and plenty of arrows/bolts in your bag. If you wish to use the alarm you'll need to place a .wav file in your c: directory or equivalent directory. Enjoy. [sCAR]//AmberGuardRanger v0.2 //Amberleaf //http://www.scar-divi.com {.include OSI\OSI.scar} const USERNAME = 'jimbob'; PASSWORD = 'jones'; WAITBEFORELOGIN = 0; // minutes to wait before logging back in procedure ScriptTerminate; begin FreeOSI; end; procedure LogIn; var x, y: Integer; begin If FindColor(x, y, 0, 274, 267, 274, 267) then begin Writeln('Logging In') Mouse(355, 281, 0, 0, True); Wait(150); TypeText(USERNAME); Wait(1000); Mouse(193, 309, 0, 0, True); Wait(60000 * WAITBEFORELOGIN); TypeText(PASSWORD); Mouse(411, 250, 0, 0, True); Wait(6000); Mouse(264, 196, 0, 0, True); Wait(150); end; end; procedure FindTarget; var x, y: Integer; begin If FindColors(x, y, [10727147, 10858731, 11121644, 10661355, 10990060], 252, 191, 502, 323) then begin MMouse(x, y, 0, 0); Wait(5); Mouse(x, y, 0, 0, False); end; end; procedure Atttack; var x, y: Integer; begin If FindColor(x, y, 65280, 23, 28, 490, 301) then begin MMouse(x, y, 0, 0); GetMousePos(x, y); Mouse(x, y, 0, 0, false); Wait(2500); end else begin MMouse(377, 281, 15, 15); end; end; procedure InCombat; var x, y: Integer; begin repeat If FindColors(x, y, [10727147, 10858731, 11121644, 10661355, 10990060], 244, 147, 353, 223) then begin MMouse(x, y, 15, 15); Wait(1000); WriteLn('in combat...'); end; If GetKeyState(VK_F12) then begin TerminateScript; end; until (FindColors(x, y, [10727147, 10858731, 11121644, 10661355, 10990060], 244, 147, 353, 223) = False); Wait(500); end; procedure Alarm; var x, y: Integer; begin If FindColor(x, y, 65280, 242, 250, 300, 321) then begin PlaySound('c:\siren.wav'); //change to your own wave in your own directory Wait(1000); TerminateScript; end; end; begin SetupOSI; MouseSpeed := 25; repeat LogIn; Alarm; FindTarget; Atttack; InCombat; until GetKeyState(VK_F12); end. [/sCAR] Edited January 20, 2013 by Amberleaf Quote Link to comment Share on other sites More sharing options...
Janilabo Posted January 20, 2013 Share Posted January 20, 2013 Welcome back Al! Nice job. Quote Link to comment Share on other sites More sharing options...
Ballaa Posted January 22, 2013 Share Posted January 22, 2013 Hey i get this error when i ty to run: Include not found: OSI/OSI.scar My first time so not a supprise but cud use some help. Thanks Quote Link to comment Share on other sites More sharing options...
Janilabo Posted January 22, 2013 Share Posted January 22, 2013 Hey i get this error when i ty to run: Include not found: OSI/OSI.scar My first time so not a supprise but cud use some help. Thanks Hello, download OSI from Includes Manager SCAR Divi => File => Includes Manager -Jani Quote Link to comment Share on other sites More sharing options...
Ballaa Posted January 22, 2013 Share Posted January 22, 2013 Hello, download OSI from Includes Manager SCAR Divi => File => Includes Manager -Jani Worked like charm. Thanks! Quote Link to comment Share on other sites More sharing options...
bitter Posted January 30, 2013 Share Posted January 30, 2013 (edited) it works for higher lv combat than guards? Edited January 30, 2013 by bitter Quote Link to comment Share on other sites More sharing options...