Code:
program RoguesAFKBloodbath;
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\skill\Fighting.Scar}
const
monsterstokill = 50; // placeholder will use time later
greenatt = 65280; //dont touch this one
var
howmany,total,totnames,totcolors,foodcolor,tolerance:integer;
foodname:String;
mcolor: Array of Integer;
mname: Array of String;
procedure declareplayers;
begin
howmany:= 1; // How many characters??? currently it only supports one
CurrentPlayer:= 0;
NumberOfPlayers(howmany);
totnames:= 1; // number of names -1 placeholder until i get length to work
totcolors := 2; // number of colors -1
mname:=['inotaur','olf'];
mcolor:=[9345434,8488587,11319223]; // monster colors
foodcolor := 0; // color of the food
foodname := ' '; // name of the food
tolerance := 40;
Players[0].Name := ''; //User Name
Players[0].Pass := ''; //Password
Players[0].Nick := 'irty'; //Nick Name
Players[0].Active := True; //Use This Player [ True / False ]
// Players[0].Strings[0] := 'strength'; //attack,strength,defence
end;
procedure report;
begin
Writeln('------------------------');
Writeln('...- AFK Blood Bath -...');
Writeln('...- By:Rogue Poser -...');
Writeln(' ');
Writeln('.-Ran for: ' +TimeRunning+ '-.');
// Writeln('.-Total exp gained: ' +intToStr(expgained)+ '');
Writeln('------------------------');
end;
Procedure antiban;
begin
if not LoggedIn then Exit;
case random(7) of
0: MakeCompass('E');
1: PickUpMouse;
2: HoverSkill('Random', false);
3: BoredHuman;
4: MakeCompass('N');
5: MakeCompass('W');
6: MakeCompass('S');
end;
wait(300+random(30));
end;
procedure findmob;
Var
i,j,x,y,tempx,tempy:Integer;
found:boolean;
begin
if not LoggedIn then Exit;
found := False;
repeat
tempx := 25 + random(430);
tempy := 25 + random(245);
for i:=0 to totcolors do
if(FindColorTolerance(x,y,mcolor[i],tempx,tempy,tempx+50,tempy+50,tolerance)) then
begin
if(found) then exit;
MMouse(x,y,1,1)
for j := 0 to totnames do
begin
wait(200+random(50));
if(isuptext(mname[j])) then
begin
case random(3) of
0..1: Mouse(x,y,2,2,True);
2: begin
Mouse(x,y,2,2,False);
ChooseOption('ttack');
end;
end;
found := True;
wait(4000+random(500));
repeat
wait(3000+random(500));
until(not(InFight));
if(found) then exit;
end;
end;
end;
until(found);
end;
procedure hplow;
var
ytop,ybottom,x,y:integer;
begin
if not LoggedIn then Exit;
ytop :=210;
ybottom:=240;
if(Findcolor(x,y,255,721,21,739,34)) then
repeat
Mouse(642,182,9,9,True);
wait(300+random(80));
if(Findcolor(x,y,foodcolor,551,ytop,733,ybottom))then
begin
Mouse(x,y,3,3,True);
ybottom := 500;
wait(300+random(80));
end;
ytop := ytop +30;
ybottom := ybottom +30;
if(ybottom = 480)then
begin
Writeln('Out of food, low hp, Exiting');
total:=monsterstokill + 1;
end;
until(ybottom > 460);
end;
begin
setupSRL;
MouseSpeed := 16;
total:=0;
clearDebug;
declareplayers;
ActivateClient;
if not LoggedIn then LoginPlayer;
if loggedin then writeln(LoggedIn); //*****heres the issue, it returns 1 here wether im logged in or not, so its always returning true?
repeat
findmob;
antiban;
hplow;
FindNormalRandoms;
until(total > monsterstokill)
logout;
report;
end.
im fairly certain its an error on my part.... any suggestions?