I improved your fighter cause im bored and got nothing else to do :p
New Added Features
# Progress Report
# You Can Set Your Fighting Style
# A Little More Setup Options
Hope you like it :D
///Made By Krazy_Meerkat\\\
/// Edited By -Chaos- \\\
///......................\\\
program KM_MiracleFighter;
{.include SRL\SRL.scar}
{.include Anti-Idle.scar}
var Killed, Ate, PBone:integer;
const
Monster = 'Skeleton'; //Name of monster, use 'Attack' for any
Color = 12172995; //Colour of monster
percent = 20; //Percent of HP to eat or run at
killcount = 90000; //Amount of monsters to kill
Bonecolour = 14277086; //Change this to 0 if you don't want bones buried
AnyItem = False; //Set True to pick up any item dropped with bones
dirr = 'S'; //Direction to run while escapeing combat
sp = 1; //Amount of items to specifically pick (enter items below)
//0 for none
FightMode=2; //1= Attack 2= Strength 3=Strength 4=Defence
Nick='Nickname'; //Part Of Your Runescape Name
//3 letters
var
SpecificItems: array[0..sp] of String;
bones, killz, SpecLength, tol, bonebmp : Integer;
donttake : Boolean;
procedure Specifics;
begin
SpecificItems[0] := 'Coins'; //Enter items here
end;
procedure GetSpecLength;
var
c : Integer;
begin
c:= -1;
repeat
SpecLength:= SpecLength + 1;
c:= c + 1;
until(SpecificItems[c] = '')
SpecLength:= SpecLength - 1;
end;
procedure FMode;
begin
GameTab(1);
SetFightMode(FightMode);
end;
function FindObjective2(var cx, cy : Integer; color, tolerance : Integer) : Boolean; // by Stupid3ooo
var
x, y, a, c, i, x1, y1, x2, y2 : Integer;
begin
if (FindMSColorTol(x, y, color, tolerance)) then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if (not (Loggedin)) then
break;
a := a + 1;
if (a = 1) then
c := c + 1;
if (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end;
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end;
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end;
if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
if (FindColorTolerance(x, y, color, x1, y1, x2, y2, tolerance)) then
begin
MMouse(x, y, 3, 3)
cx:=x;cy:=y;
wait(10 + random(10));
Result := True;
Break;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;
procedure DoBones;
begin
tol:= 0;
bonebmp := BitmapFromString(27, 20, 'z78DACD55D18EE3200CFC254' +
'2626C3FDA06FEFF93CEC559295136DDF4D2DE6D90AC1642187B66' +
'0C94A52E196EC4F478A68870FB6BEF8D81AA529D6B962659F211E' +
'7FF45BE22EC55ABAA48971E3373CA29167D359998FC4B9C5B4E23' +
'366AD0C0B2B2D276BE629DEAA4A659BFD9F53954552A54B06EE40' +
'3FC7C8BEA05CB3E99E9ABB65C7DB3BF952C297A21551626266AB4' +
'D0F22ACE638EDB6866E0C3CFF101E28FFFC878BA6BC772759D121' +
'752526C58B014840E3B3D5CC1164CADF519785C5A8B2E9219B960' +
'2A5428E211C9316E6B18199D657105E116672F9E1CD4D9315A645' +
'AE0017CC772F39339EA79E65CCF3359DF623BCBE5EFF4A6E49AAA' +
'67AC757E8CE06E54BA1EEB13393E57CEF3F843F7D8F48723773B8' +
'F8C5CBCA49973E821566346270181F04838DA6675BB8477E24D77' +
'52B316EA8A5DC83861BA82F3C8C58A707495389D1BCF3CBB07264' +
'A2BFB6A8BCDAC9C38C9C4C0208585F991B2A415F3603F3A80762D' +
'FE7F64F7AA4ACF564FFD3E2A23E2A8DB7536A3B611792121BEEEF' +
'1E771E7D9B853467D9EFBE2CCF5CCD4A9BDDA85AE77CE50DAB657' +
'BFFAFD3B5DE81B1F8DBBCCF58D56C2CBD139EF7FFFCEDE1DC2E1B' +
'EF52ECB825208D050DFA59FF7DED1E1534A4848BF07E11667F410' +
'62ECD87E1BC2F72AFCD3F1D3D8FE0087C3AEDF');
repeat
FindItemBmpTol(bonebmp, 20)
MMouse((x + 6), (y + 6), 2, 2);
wait2(50 + random(50));
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
wait2(50 + random(50));
until(not(FindItemBmpTol(bonebmp, 20)))
FreeBitMap(bonebmp);
PBone:=PBone+1
end;
procedure Escape;
begin
{e:= 0;
repeat
e:= e + 1;
until(FindObj(x, y, 'adder', 2316400, e))
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);}
SetRun(true);
RunAwayDirection(dirr);
wait2(2000 + random(1000));
RunAwayDirection(dirr);
wait2(7000 + random(1000));
logout;
Terminatescript;
writeln('Escaped from death');
end;
procedure Eat;
var
x, y, one : Integer;
begin
if(FindItemName('Eat'))then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
if(random(2)=1)then
begin
wait2(100 + random(100));
end else
wait2(500 + random(200));
end else
repeat
wait2(20);
one:= one + 1;
if(FindColorTolerance(x, y, 192, 3, 3, 515, 336, 1) or FindColorTolerance(x, y, 167728128, 3, 3, 515, 336, 1))then
if(x < 305) and (x > 205) and (y < 216) and (y > 116)then
begin
Escape;
one:= 51;
end;
if(FindFight)then
begin
Escape;
one:= 51;
end;
until(one > 50)
Ate:=Ate+1
end;
Function Findhitsandeat : Boolean;
var
a, x, y : Integer;
begin
a:= getsystemtime;
repeat
wait2(20 + random(20));
if(HpPercent < percent)then
begin
if(InvCount > 0)then
begin
repeat
Eat;
until(HpPercent > 85)
end else
Escape;
end;
if(FindColorTolerance(x, y, 192, 3, 3, 515, 336, 1) or FindColorTolerance(x, y, 167728128, 3, 3, 515, 336, 1))then
if(x < 305) and (x > 205) and (y < 216) and (y > 116)then
result:= True;
until(result = True) or ((getsystemtime - a) > (1000 + random(500)))
end;
Procedure Fight;
var
l, tol, col : Integer;
brake : Boolean;
begin
if (Loggedin) then
begin
repeat
if(random(4) + 1 = 1)then
begin
col:= Bonecolour;
end else
col:= Color;
if(not(FindObjective2(x, y, col, tol)))then
begin
tol:= tol + 1;
end else
begin
tol:= 0;
if(isuptext('Take'))or(isuptext(Monster))then
brake:= True;
if(not(SpecificItems[0] = ''))then
for l:=0 to SpecLength do
begin
if (isuptext(SpecificItems[l]))then
brake:= True;
end;
end;
until(brake = True)or(tol > 40)
if (tol > 40) then
begin
writeln('Timed out');
Logout;
Terminatescript;
end;
if (isuptext(Monster)) then
begin
if(not (Loggedin)) or (WeAreDead) then exit;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
FFlag(10);
Wait2(2000);
repeat
if(not (Loggedin)) or (WeAreDead) then break;
until ( (not (FindFight) and not (Findhitsandeat)) or (WeAreDead) );
killz:= killz + 1;
if(not (Loggedin)) then Terminatescript;
if (WeAreDead) then begin Logout; Terminatescript; end;
end else
begin
if (isuptext('Bones'))and(donttake = False)and(Bonecolour > 0) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
wait2(200 + random(200));
bones:= bones + 1;
end;
if(not(SpecificItems[0] = ''))then
for l:=0 to SpecLength do
begin
if (isuptext(SpecificItems[l]))and(donttake = False) then
begin
GetMousePos(x, y);
Mouse(x, y, 3, 3, True);
wait2(200 + random(200));
end;
end;
if (isuptext('Take'))and(donttake = False)and(not(isuptext('Bones')))and(AnyItem = True) then
begin
GetMousePos(x, y);
Mouse(x, y, 3, 3, True);
wait2(200 + random(200));
end;
if (random(9) + 1 < 3)and(bones > 0)then
begin
Gametab(4);
DoBones;
end;
if(IsChatMessage('You don'))then
begin
Gametab(4);
bonebmp := BitmapFromString(27, 20, 'z78DACD55D18EE3200CFC254' +
'2626C3FDA06FEFF93CEC559295136DDF4D2DE6D90AC1642187B66' +
'0C94A52E196EC4F478A68870FB6BEF8D81AA529D6B962659F211E' +
'7FF45BE22EC55ABAA48971E3373CA29167D359998FC4B9C5B4E23' +
'366AD0C0B2B2D276BE629DEAA4A659BFD9F53954552A54B06EE40' +
'3FC7C8BEA05CB3E99E9ABB65C7DB3BF952C297A21551626266AB4' +
'D0F22ACE638EDB6866E0C3CFF101E28FFFC878BA6BC772759D121' +
'752526C58B014840E3B3D5CC1164CADF519785C5A8B2E9219B960' +
'2A5428E211C9316E6B18199D657105E116672F9E1CD4D9315A645' +
'AE0017CC772F39339EA79E65CCF3359DF623BCBE5EFF4A6E49AAA' +
'67AC757E8CE06E54BA1EEB13393E57CEF3F843F7D8F48723773B8' +
'F8C5CBCA49973E821566346270181F04838DA6675BB8477E24D77' +
'52B316EA8A5DC83861BA82F3C8C58A707495389D1BCF3CBB07264' +
'A2BFB6A8BCDAC9C38C9C4C0208585F991B2A415F3603F3A80762D' +
'FE7F64F7AA4ACF564FFD3E2A23E2A8DB7536A3B611792121BEEEF' +
'1E771E7D9B853467D9EFBE2CCF5CCD4A9BDDA85AE77CE50DAB657' +
'BFFAFD3B5DE81B1F8DBBCCF58D56C2CBD139EF7FFFCEDE1DC2E1B' +
'EF52ECB825208D050DFA59FF7DED1E1534A4848BF07E11667F410' +
'62ECD87E1BC2F72AFCD3F1D3D8FE0087C3AEDF');
if(not(FindItemBmpTol(bonebmp, 20)))then
begin
donttake:= True;
FreeBitMap(bonebmp);
Killed:=Killed+1
end else
DoBones;
end;
end;
end;
end;
procedure ProgressReport;
begin
Writeln('<=========================================================>');
Writeln('This Script Was Made By Krazy_Meerkat')
Writeln(' ~Edited By -Chaos-~ ')
Writeln('Killed '+inttostr(Killed)+' Monsters So Far');
Writeln('Ate '+inttostr(Ate)+' Times So Far');
Writeln('Picked '+inttostr(PBone)+' Bones So Far');
Writeln('Buried '+inttostr(PBone)+' Bones So Far');
Writeln('<=========================================================>');
end;
begin
if(sp > 0)then
Specifics;
bones:= 0
SetupSRL;
HowManyPlayers:= 1;//number of players you are going to use
NumberOfPlayers(HowManyPlayers);//Leave this alone
CurrentPlayer:= 0;//the starting player
Players[0].Nick := 'Nick' //Part of your username
FMode;
repeat
Fight;
ProgressReport;
until(killz >= killcount)
writeln('Killed all '+ Monster +'s!');
Logout;
Terminatescript;
end.