Jad Jad Jad, there isn't a single anti-bot thing in there… tzzzz…
Lol, I am just joking, you are doing great, I have no clue of Java, but I thought to myself: what is a good Java program without the corresponding Scar script to beat it? So, I just put one together ;):
program JadQuestBot;
{.include srl/srl.scar}
var
x,y,Died,Won,did: Integer;
attack, merchant, BuyHealth, over, back, WinBMP, full, lost, outofcashbmp: Integer;
JMSX1,JMSY1,JMSX2,JMSY2: Integer;
const
HowOftenDoYouWantToRunThis = 3;
procedure JADGlobals;
begin
JMSX1:=0;
JMSY1:=0;
JMSX2:=799;
JMSY2:=549;
end;
procedure LoadJadBitmaps;
begin
attack := BitmapFromString(17, 23, 'beNr7/588wMCAgsjQNaoFa0iimYb' +
'HFlxW49dCkl/w+A6PFlK9T3yIERPgmOFJUBcuW0jyPhlaCOoiJsGQ' +
'FJXEJz+SApDKAADmXYWl');
merchant := BitmapFromString(26, 23, 'beNr7/5+egIEBO0JWQKo5+K0g3ig' +
'y7CLVKOKVkeEFIsOciqYRH+lUcRhJSWvUNCqahivbEsyAVLea8iwz' +
'mJURqZLU2Mevnry0RHx6GOwAAETn1HI=');
BuyHealth := BitmapFromString(100, 101, 'beNrt3UEKwCAMAMH+/' +
'9O24EmxkINixFnyABkEvaUUSTqxR6P+rFyYoEkKq+8MdVgFodJwsW' +
'LFihUrVqxYsWLFihUrVqxYsWLFihUrVqxYsWLFihUrVqxYsWLFihU' +
'rVqxYsWLFihUrVmdYdWe+beJWl0O1XKxYbbDC5R30Z2DFihUrVqxY' +
'sWLFihUrVqxYsWLFihUrVqxYsWLFihUrVqxYsWLFihUrVqxYsWLFi' +
'hUrVqyWcuXI3qUpVgru85KkvL3emwjY');
back := BitmapFromString(21, 25, 'beNr7/3/IAwYGEhCR5uAxn1T' +
'txMhSrmAYayfbcDIijorJhkgHEO93ygMHvwtHtVMl5PEnHqqUVPQH' +
'AMeCqJA=');
WinBMP := BitmapFromString(42, 35, 'beNrtl0sKwCAMRL3/pZVuXF' +
'RJ40SJlDdkOeaJP8Za0c0q5alVf68g199kNGtzeM3fM3xqljss0Q2' +
'ns0k3pNDllbedwiGEfj/90xm8vNChQ4eu0Xnnf0PPzTbp9C2Z1k62' +
'R/O8EaflXYj8ZRDarwaA8M7o');
lost := BitmapFromString(32, 50, 'beNrtl0kSABAMBPP/T3N1U' +
'rGEEd33aUlRQikA8BBmgWbkV+RB/jNyNb8zOOdvU53sluKz+j0FrG' +
'zcon+0R/z4j51P7p8tftn5ojPfc7QQ/X5jCZ3/C3xHBYKTObY=');
Full := BitmapFromString(56, 29, 'beNrtlkEKwCAMBP3/p+3Bi1Cz' +
'aoxF6gw9aVwGS5PmDAAAkaSktsoze3wxs1lvHam3RE14phVoXUi9L' +
'srCM6degcMzKnPc873erBQy7kw8D/fUXzSev/R0jJsdnt1e5xuL3/' +
'f5czzFLO7+luyb7/oGRtrmYiYA3MkDQqn55w==');
OutOfCashBMP := BitmapFromString(92, 29, 'beNrtl0sOgCAMBbn/pev' +
'OhQT6AUs1M2FFAOmjPIsIAABUonXt7g+ssDLG/qEENdY3b5myGFHs' +
'vHZpXlCTx8Q3ssWY6mjSj7F7gqV/flVdu91uLAHH6O1X3eRoSnFNw' +
'qkrZk3slv4tTSyxqIm0EgiaVPOTNm0/1kRdMxAgmiRrklOfeOvYs/' +
'+dNE3EU4DtrU9ityDhvTP3VZc5q/G28eG6LlTCuxgAAAAATnABq27' +
'B1g==');
over := BitmapFromString(32, 33, 'beNrtllEOADAEQ93/0nYD2mLx' +
'QfY5T1pJN/erDWUGHaq3cjPuZYVQJgheTfPxLnndjXBBAsunRgjwD' +
'3xwhAxHFl2EpxLq/EBCCzyNvtF0HU3v6Qfi+Mc//uZ8AD917V4tqg' +
'eluowB');
end;
function OutOfCash: Boolean;
begin
if FindBitmap(OutOfCashBMP,x,y) Then
Result := True;
end;
function FullHealth: Boolean;
begin
if FindBitmap(Full,x,y) Then Result := True else
Result := false;
end;
function FightOver: Boolean;
begin
if FindBitmap(over,x,y) Then Result := True else
Result := false;
end;
procedure PrepareForNextFight;
begin
if not FullHealth then
if FindBitmap(merchant,x,y) then
begin
Mouse(x,y,0,0,true);
Wait(1000);
if FindBitmap(BuyHealth,x,y) then
begin
repeat
Mouse(x+20,y+20,0,0,true);
Wait(1000);
until FullHealth or OutOfCash;
if FindBitmap(back,x,y) then
Mouse(x,y,0,0,true);
end;
end;
end;
procedure NextFight;
begin
if Findbitmap(attack,x,y) Then
begin
Mouse(x,y,0,0,true);
Wait(1000);
if FindColor(x,y,26112,JMSX1,JMSY1,JMSX2,JMSY2) Then
begin
Mouse(x+10,y+20,0,0,true);
repeat
wait(3000);
until FightOver;
Did := did + 1;
end;
end;
end;
procedure ClaimFameOrLose;
begin
If FindBitmap(winbmp,x,y) then
begin
Writeln('Hooray, we won, we gained exp and gold :)');
Won := won + 1;
end else
begin
Writeln('Oh damn it, we died and lost all our gold :(');
Died := Died + 1;
end;
repeat
wait(100);
until FindColor(x,y,65535,JMSX1,JMSY1,JMSX2,JMSY2)
Mouse(x,y,0,0,true);
end;
procedure proggy;
begin
Writeln('==============================================');
Writeln('This bot was brought to you by Stur Pure');
Writeln('The game was created by JAD');
Writeln('I hope you enjoyed both these programs ;)');
Writeln('==============================================');
Writeln('You have died ' +IntToStr(died)+ ' times');
Writeln('You have won ' +IntToStr(won)+ ' times');
Writeln('This means that you won '+IntToStr((won / (won + died) * 100))+ '% of all the battles');
Writeln('==============================================');
end;
begin
MouseSpeed := 12;
wait(2000);
JadGlobals;
LoadJadBitmaps;
repeat
PrepareForNextFight;
NextFight;
ClaimFameOrLose;
Until (Did = HowOftenDoYouWantToRunThis)
proggy;
end.
enjoy. :D
EDIT: My Best proggy so far:
==============================================
This bot was brought to you by Stur Pure
The game was created by JAD
I hope you enjoyed both these programs ;)
==============================================
You have died 0 times
You have won 4 times
This means that you won 100% of all the battles
==============================================
Successfully executed
EDIT :
well, while I was eating, I ran it again, here is my new proggy:
Successfully compiled
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
Hooray, we won, we gained exp and gold :)
==============================================
This bot was brought to you by Stur Pure
The game was created by JAD
I hope you enjoyed both these programs ;)
==============================================
You have died 0 times
You have won 21 times
This means that you won 100% of all the battles
==============================================
Successfully executed
By the way, I just realized that I didn't say anything about where to start it: just have the window open on which your person is standing there, with the merchant and attack options, make the scar window so small that you can see the hp points, and the merchant and attack options. then just drag the crosshair onto the screen, and press play. Also, choose how often you want to repeat it on line 8.