Code:
//TO DO
//more efficient method on finding objects
//704 cache editor
//add using prayer/potions
//special attack toggling
//auto buy multiplier
//If I want to make it so i can start
//--the bot from the log in screen
//--call setcamera; in the login function
//NOTES
//in anti afk interface
//when you click the x
//it randomizes the answer again.
//CLIENT REQUIREMENTS
//*log in
//*brightness all the way up
//*fixed screen
//*use range (it is the best way ive tried)
//--object will attack back if you melee
//*make sure you have enough arrows!!!
//use msb (you can get msb(i) from
//--the scroll in slayer token shop: 15 tasks
program Bot;
{$I srl-6/srl.simba}
var
//Coordinate finding
X, Y:Integer; //Find coordinates
//Results
loyalCount:Integer:= 0; //Count loyal points gained
//Login
loginButton:Integer; //To detect login button
back:Integer; //To detect server update
user:= 'username'; //Your username here
pass:= 'password'; //Your password here
clickHere:Integer; //To find click here button
clickhereButton:Boolean; //Find click here button until boolean is true
//Loyalty interface bitmaps
loyal:Integer; //To detect interface
yesLower:Integer; //Button
yesUpper:Integer; //Button
//Anti-AFK interface bitmaps
antiAFK:Integer; //To detect interface
pie:Integer; //Text
chocbar:Integer; //Text
donut:Integer; //Text
baguette:Integer; //Text
trisandwich:Integer; //Text
sandwich:Integer; //Text
bread:Integer; //Text
const
chatboxArea:= IntToBox(1, 338, 519, 479); //Chatbox coord defining
clientArea:= IntToBox(1, 1, 760, 500); //Client coord defining
AntiAFKtextArea:= IntToBox(62, 270, 449, 314); //AntiAFK text area coord defining
//srl-6 client ready override
function waitClientReady(): boolean;override;
begin
result:= true;
end
procedure results;
begin
clearDebug();
writeln('********************************');
writeln('Time ran: ', timeRunning);
writeln('Loyalty points gained: ', loyalCount);
writeln('********************************');
end;
procedure targetObject;
begin
//Attack object
wait(250 + Random(100));
MoveMouse(260, 109);
wait(250 + Random(100));
ClickMouse(260, 109, mouse_Left);
wait(250 + Random(100));
end
procedure clickButton;
begin
if FindBitmapToleranceIn(clickHere, X, Y, chatboxArea, 5) then
begin
wait(500 + Random(51));
MoveMouse(X, Y);
wait(500 + Random(51));
ClickMouse(X, Y, mouse_Left);
wait(2500 + Random(51));
targetObject; //Re-target object after relog
clickhereButton:= true;
end else
repeat
clickButton;
until(clickhereButton:= true);
end
procedure login;
begin
writeln('Logging in...');
MoveMouse(381, 187);
wait(500 + Random(30));
Mouse(381, 187, mouse_Left);
wait(500 + Random(30));
Mouse(381, 187, mouse_Left);//double click to make sure its on the line
wait(500 + Random(30));
SendKeys(user, 50 + Random(26), 30 + Random(30));
wait(500 + Random(30));
PressKey(13);
SendKeys(pass, 50 + Random(26), 30 + Random(30));
wait(500 + Random(30));
PressKey(13);
wait(100);
clickButton; //will repeat until possible
end
Function Gain:Boolean; //Main function
begin
//"The server is being updated" detection
if FindBitmapToleranceIn(back, X, Y, clientArea, 5) then
begin
MoveMouse(X, Y);
wait(100);
ClickMouse(X, Y, mouse_Left);
wait(100);
end else
//Login screen detection
if FindBitmapToleranceIn(loginButton, X, Y, clientArea, 5) then
begin
login;
end else
//Loyalty interface
if FindBitmapToleranceIn(loyal, X, Y, chatboxArea, 5) then //If loyalty interface is detected
begin
wait(420);
writeln('Loyalty Screen Detected.');
If FindBitmapToleranceIn(yesLower, X, Y, chatboxArea, 7) then //If the button is detected on the bottom
begin
writeln('Attempt 1 to click yes...'); //Click top button
wait(730 + Random(42));
MoveMouse(X, Y);
wait(730 + Random(42));
ClickMouse(X, Y, mouse_Left);
end else
If FindBitmapToleranceIn(yesUpper, X, Y, chatboxArea, 4) then //If the button is detected on the top
begin
writeln('Attempt 2 to click yes...'); //Click bottom button
wait(730 + Random(42));
MoveMouse(X, Y);
wait(730 + Random(42));
ClickMouse(X, Y, mouse_Left);
end
loyalCount:= loyalCount + 1;
results;
wait(2500); //Stops it from repeating so fast
end else
if FindBitmapToleranceIn(antiAFK, X, Y, clientArea, 5) then
begin
writeln('Anti-AFK interface detected.');
if FindBitmapToleranceIn(pie, X, Y, AntiAFKtextArea, 5) then
begin
wait(100);
MoveMouse(181, 159);
wait(730 + (Random(42)));
ClickMouse(181, 159, mouse_Left);
wait(730 + (Random(42)));
targetObject;
end else
if FindBitmapToleranceIn(chocbar, X, Y, AntiAFKtextArea, 5) then
begin
wait(100);
MoveMouse(300, 152);
wait(730 + (Random(42)));
ClickMouse(300, 152, mouse_Left);
wait(730 + (Random(42)));
targetObject;
end else
if FindBitmapToleranceIn(donut, X, Y, AntiAFKtextArea, 5) then
begin
wait(100);
MoveMouse(422, 153);
wait(730 + (Random(42)));
ClickMouse(422, 153, mouse_Left);
wait(730 + (Random(42)));
targetObject;
end else
if FindBitmapToleranceIn(baguette, X, Y, AntiAFKtextArea, 5) then
begin
wait(100);
MoveMouse(128, 215);
wait(730 + (Random(42)));
ClickMouse(128, 215, mouse_Left);
wait(730 + (Random(42)));
targetObject;
end else
if FindBitmapToleranceIn(trisandwich, X, Y, AntiAFKtextArea, 5) then
begin
wait(100);
MoveMouse(225, 218);
wait(730 + (Random(42)));
ClickMouse(225, 218, mouse_Left);
wait(730 + (Random(42)));
targetObject;
end else
if FindBitmapToleranceIn(sandwich, X, Y, AntiAFKtextArea, 5) then
begin
wait(100);
MoveMouse(348, 225);
wait(730 + (Random(42)));
ClickMouse(348, 225, mouse_Left);
wait(730 + (Random(42)));
targetObject;
end else
if FindBitmapToleranceIn(bread, X, Y, AntiAFKtextArea, 5) then
begin
wait(100);
MoveMouse(427, 228);
wait(730 + (Random(42)));
ClickMouse(427, 228, mouse_Left);
wait(730 + (Random(42)));
targetObject;
end
results;
end
end
procedure loadMaps;
begin
//Loyalty interface
loyal := BitmapFromString(68, 8, 'meJyVlEtOQzEMRbt0toHeoGUAy0A' +
'VFWJcVQWxm7rvkMOtQwdIVuQ4TnKvf7vD527I0/tXE4zL2C5v51q3' +
'+6Oy2TzUWm4o5VA6Fq6k82o53TvF3iyzvT56fL1+VKuntUVJFi8f3' +
'wme0/JEdGtcUHAGs/H5E087mn3aqbARwDQjGEpAiF5Snup1RToahc' +
'pd7Rzd06VJGJMCMdE5sQlDI0RK8pbp5i8Ug8+thF0r1KRz9RnOBBC' +
'ogs+UgccibPGUQsLjzQZbSyOeOKVAmcmLMBLSlhoUwC9RWvmmipFp' +
'5WReMk1pkYv9kgRnLi0drPaIMUl4ncsKVcDW2Oj6mx5M5Ka1cTGPv' +
'vYvLomhTbPWJr78W2wxxLIFBOycSbeZixdzUrmd+0V7Rts5ZhdIpD' +
'W4NfBTkCuL7PHnw9mAjIF8optSknibEs2YX8ArYbC9ADltxQA=');
yesLower := BitmapFromString(23, 10, 'meJxlktENg0AMQ9l/g4qP0kUq1K' +
'oD8EG7DoZXHuE4RSiyfI7jY3h/h3P1n1//mlPp7+NErfgO3p4TjRW' +
'k206av8hGAFRHfTnhN/qpXHE616sTyI8iIkEF/KQJSJ+v3g4n+11t' +
'wK84OtiomQByGAregM51ETPUGLgEZ5lDzRPzdZfufCDowWwhO9Qkt' +
'Y0m69f3uq6DtxqaIv4k1bPPCtgEdc2/Waciub4Ao4KSUg==');
yesUpper := BitmapFromString(22, 9, 'meJx9kdENgCAMRLv/Fv7oJEacwPj' +
'BLrZeuJwtkRACF/raXs1ircet+9VsO/uyX6r7k5sKQzQcFyckskL+' +
'CTV1IkxpgOAMvXXWYGNpCEXC/T+flQyF5fEn7NJctXH7LqLULhC87' +
'OpAqiGm0zp74cgwNShkworqTBAkl5pTnZk2kj77/QHZyFYn');
loginButton := BitmapFromString(40, 16, 'meJzFkKEKAkEQhvchTFoEi8Visp' +
'qtFh/inkQwWGwWg1wwqEEEkbskJosIvoGP4Q8/DMPu3oB7wi0fxz/' +
'//jNzbPb6ZE0wu70bxDn3x1E8dmxSPgFi031BXR9OsweOzw/AJLXG' +
'qRM1ta8DnMbbaHJ0vAMmqQWY+PLPAcvQjDbS5DrJU5NhXgAmqQXPZ' +
'Bk1qxrlwcPwYHsFdKgFz9R7qzKeaYT7mwugQy14pt5blfFMI9xbnw' +
'AdasEz9V5x7MboBOru6gBccEIfJbq0SU1TMG7DMGd6hH4YtkfJr+o' +
'ris5yVwfuTWhsL/Jf0Y+PEnsThrTmKejHT5vQFF/YsYug');
clickHere := BitmapFromString(63, 9, 'meJyNVEsKwlAQ8/5bN4qL6sJLKIh' +
'UulQo/o6j0UAImVcRQhnTOC8zb6bdcVyfHq/ZzAEG6I4jYjwdm+G5' +
'7a94OlllU2Dy7nsosOrvwPIwEuAVOJwMQT1aTA3oP8R/mqdyM1yrN' +
'7mqaJrnT52Lfv4wz3YF2D1eXNTlDhGLp5L/8iaEfycjdsHvpvEtxH' +
'6oD1gt1usVxHBsXIbknlNVMBuPZiBSjPNTIxo+NbRh3vtQnfNemqn' +
'oQZ0JkxIoIPh2vjuLWewvfn0SR+DNjIZzGJrmqcSGuvn6uYjOO0IZ' +
'ApgHGFTP3qUw7xfh5utVah2aM+kT7gmjh3LrjNJK7PkVxDY1P0rVP' +
'L4JzLwabox935mQTO18GPM5mboOX5nYSoK1N5fX4dMVeerkfKrr78' +
'3BiMl5A2ZXMvQ=');
back := BitmapFromString(28, 10, 'meJylkD0KwkAQhfcOVqYIImkiKR' +
'QEsQiCVQ7tYdLnEg48+Bjm2ajDY5n95uctOz+X+T+91s0Jut4fPyg' +
'GW2tOFJFPl9u30gYnw3gO5VxXCfIRlg25R4rq/jCG+uEUJ+8XUQJU' +
'D1MiKrUUmpLcK5tqORA7yK47SlwjiRMjYG5mBN+yxHd6T4G5KuviI' +
'ultXnJIpxvx5wTfVUoOy8eSvwGKHfvD');
//Anti-AFK interface
antiAFK := BitmapFromString(20, 6, 'meJx1z8cOg0AMRdGPDwQEU5Bo+c6' +
'E6ucFeBiamEh36WPLqmRVsa7ZNBJPe+MZBqAHOuAH+lJiECt6ZaRK' +
'1hUbZ+3VTmG79rS28fEc2HDlYdtKYh/cW8dT663ennW2aCVv/3Fn3' +
'xpRTuvMcbf4SKe9c4y4c1oAbSw2Aw==');
pie := BitmapFromString(18, 10, 'meJyLq5kahw3Jz/gPRFilkBVgKm' +
'MAA6xqIAyIAmSNmGxkNXARZFmCbFJVkmEXHGBqx9SFyzpkc7CGIZy' +
'LbBeyLDGIPF0A7mPivA==');
chocbar := BitmapFromString(90, 11, 'meJztVEEOwzAIy0/2s75k35i036' +
'5TIyGEgZg0kXZYlUNiLOMAzfF8HbAe7893Ib5k7RPfpNxlW2v7POf' +
'ic/faZPtHqlE18K/GcttdRE+mIDixQ3xINp6RU009bVuOZtOuz/gR' +
'sIqTZFIwV3Nno2S7H3VUkhqTE/uSCDbU5eQKDCfPgjVnZMkLToiYv' +
'kTVwBuVMpJZJHq/GqtEIp/6q1aDb6L8PvzI4YxpkYjMzLARdJnRu5' +
'HbG1ZD3hCN66Mbwu7kYCRuOC4+ZDIEN2RoJwuq+YM=');
donut := BitmapFromString(37, 11, 'meJyLq5kaB0PyM/4DURySCE0RxD' +
'oGBgaqm0ln67CaSR/rICJwBJdCFsSlGGugwdmYKuFWAAGydZjiuNR' +
'j+gKXOcQooyJ72FtHZFIhGPjEmAO3kQEVYBVHE8RkE2MOAIaTBZY=');
baguette := BitmapFromString(59, 13, 'meJzVUtsNgDAI7CbdrJO4hkm3rU' +
'k/CHpy0uCr5D7wADkoubZcW0qpLOubyL0vZ0jhV4J1X6eSSQULrNA' +
'lrz9PQ5jAGZ6Zut3CWz75j4eRWqsRLp+ICfqeIxHfv5mIMD44F3yo' +
'fXp7enCx0Q1rwxH4ScR5XKCH0TyOL7BCeCqefMJ7GJQ3ChT8Q+inm' +
'UJw2d9V/JlGsQGSy+X7');
trisandwich := BitmapFromString(98, 13, 'meJztVNsNgDAI7CZu1klcw8Rt1d' +
'iENBSuSK0a1fCBBK7HM45TbJZhXjZpx3kCh365JOQQwu1VaufQL5e' +
'/Si+rUnWhRJxkZLG5kWECf0LWYjUc7emjfIiDGE6/Yf9YOH4rIW8f' +
'M/rswEfsV/61vEt2hqPRE8PBW6AX5+pgloyz4dDzHKv0MA7uhU8vM' +
'y3FNxs+DvYmgir1mB+2TfhA9eBACRpDcJUOFbzqrx1AvFZ2fAufmN' +
'3bUhfD8cbR5LO+azrbFOwDZgk4+PiUUEAXw0UHjb9R8M35soiX9nZ' +
'WF8gKYQx8Uw==');
sandwich := BitmapFromString(58, 11, 'meJzlU9sJwDAIdJNulkm6RqHbNq' +
'GCiF6MDfkIVPyw5s5XtZxXWarH/TTdJ04mCxFtEueH1Q5/NIzDTlH' +
'oH4L9E2eBdPmkVww9zsWRtei+mhhw0m/i+HEF9CDXxKwmbJ0rpvDM' +
'A8DcrPL2p8bh3nrAkhn2qpWuM5SgHtO1X/vkQCBe34W3IT3eBH9i5' +
'mbNU8/u4SU7tCEdAtiuGdAqXg==');
bread := BitmapFromString(37, 11, 'meJyTn/Fffsb/uJqpNEXyMFsgDA' +
'YGBjpYB7RlJFgHR7hCG1lQHiO6iRFH8x2cjaYSyEaWxaWSGHG0wMT' +
'KhoczLpVYfYFLPUEFuEIGq8Oobh0DKsCjC491yA7GZR2mB/EkCTzi' +
'mA6GIDQusiAuxQTFASQOAT0=');
end
procedure setCamera
begin
//Clicks compass
wait(1250 + Random(100));
MoveMouse(545, 24);
wait(250 + Random(100));
ClickMouse(545, 24, mouse_Left);
wait(250 + Random(100));
ClickMouse(545, 24, mouse_Left);
wait(250 + Random(100));
end
begin
setupsrl();
clearDebug();
setCamera;
targetObject;
loadMaps;
repeat
Gain;
until(iskeydown(vk_f1));
results;
FreeBitmap(loyal);
FreeBitmap(yesLower);
FreeBitmap(yesUpper);
FreeBitmap(loginButton);
FreeBitmap(clickHere);
Freebitmap(back);
FreeBitmap(antiAFK);
FreeBitmap(pie);
FreeBitmap(chocbar);
FreeBitmap(donut);
FreeBitmap(baguette);
FreeBitmap(trisandwich);
FreeBitmap(sandwich);
FreeBitmap(bread);
end.
//Coded by Mustakrakish @ https://villavu.com/forum/member.php?u=158858
You have to stand in this exact spot because I am handling the object clicking with coordinates until I figure out how to find objects.
Once you are here, and you have entered your information (user & pass) and you are standing in this spot, make sure you have the GAME INTERFACE selected, not the entire client itself.
This is because it loads with this weird extra on the bottom and I cant stand it.
The reason I am releasing this so early is because I am off to learn more advanced things, and composing scripts for an RSPS thats more worth my time.
If anyone has any questions PM me.