I added some things to Toby1's code to prevent it form getting stuck after Runescape's most recent update.
I don't know how to upload a file because I'm very new with Scar but here's the code! Just copy and paste it!
Any tips/suggestions to improve the code is encouraged although I'm not sure how much time I will have with school.
Warning: Does NOT support randoms although they are very rare. A Runescape ban could result in using this bot.
program RS07_FightCaveFighter;
{$DEFINE RS07}
{$I MSSL\MSSL.scar}
var
X, Y: Integer;
const
USERNAME = '';
PASSWORD = '';
procedure EnterCave;
begin
Wait(2000 + Random(1700));
if (FindColorTol(X, Y, 10921906, RS07_GameActionBx.X1, RS07_GameActionBx.Y1, RS07_GameActionBx.X2, RS07_GameActionBx.Y2, 5)) then
begin
RS07_ClickMouse(X, Y, mbLeft);
MSSL_Wait(800 + Random(3000));
end;
end;
begin
MSSL_Setup;
ClearDebug;
// RS07_SetScreenBrightness(RS07_SCREEN_BRIGHTNESS_VERY_BRIGHT);
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.28, 0.17);
repeat
RS07_AutoRetaliate;
MSSL_Wait(500);
// if not RS07_LoggedIn then
// begin
// RS07_LogIn(username, password);
// MSSL_Wait(3000 + Random(43));
// RS07_SetCompassDir('S');
// end;
if RS07_LoggedIn then
begin
EnterCave;
MSSL_Wait(10000 + Random(5000));
end;
if FindColorTol(x, y, 16711680, 81, 369, 480, 459, 2) then
RS07_ClickMouse(300 + Random(15), 446 + Random(7), mbLeft);
MSSL_Wait(600 + Random(500));
until False;
end.
You can change the waiting times if you know what you are doing!
1000 = 1 second
Enjoy!
Exatox's Fight Caves 1.0.scar