SRL Archive - First Scripts

MattL191's MonkKiller BETA


MattL191

2012-02-14 21:34:55

Monk Killer Beta

Important: This script is still in beta testing. It has not been tested as much as i would like. I have only released it at this stage. So it will be tested quicker and i will get bug info quicker. Use at your own risk!!!

Info
Well title really says it all it works on monks at the monestary next to Dwarven Mines. Will heal if your character goes under 65% health(this hasn't been tested very much if at all.)

Things to be worked on or fixed
Quicker AttackMonk Function
SRL Stats
Set Training Type
Clean up script.

Setup
Fill out info in constents and declare player
Start in center of monestary near water icon
Try and find a empty/near empty world as they are only ones i have tested on
Click run


Please Post Any Bugs So I Can Fix. Thanks


Program MonkKiller;
{$DEFINE SMART}
{$i SRL\SRL.simba}
{$i sps/sps.simba}
{$i SRL\SRL\Misc\Debug.simba}
{$i SRL/SRL/skill/fighting.simba}
Const
SRLStats_Username = '';// Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
NumbOfPlayers = 1; //How many players are you using
StartPlayer = 0; //Player to start auoting with! (0 means first char)
BreakEvery = 120; //How many loads to take a break after.
BreakFor = 15; //How many minutes to break for +random range 5mins
SkillTraining = 'Strength'; // What Skill training for HoverSkill
Version = '2.0'; //Leave Alone
Var
FindMonktimer, BreakTime: Integer;
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Pin := '' //Pin for Bank
Active := True;
Booleans[0] := True; //Take Breaks?
Integers[0] := 50; //Minimum Time before Break
Integers[1] := BreakEvery; //Maximum Time before Break
end;

end;
Procedure ResetBreakTimer;
begin
BreakTime:= GetSystemTime + RandomRange(Players[CurrentPlayer].Integers[0]*60000, Players[CurrentPlayer].Integers[1]*60000);
end;

Procedure Setup;
Begin
Smart_Server:=89;
Smart_Members:=False;
Smart_Signed:=True;
Smart_SuperDetail:=False;
SetupSRL;
Declareplayers;
Wait(2500+(250));
LogInPlayer;
ResetBreakTimer;
Wait(1500+random(500));
Setangle(SRL_ANGLE_HIGH);
End;
procedure Load_Antiban;
begin
case Random(1500) of
1: BoredHuman;
2: HoverSkill('random', False);
3: HoverSkill(SkillTraining, False);
4: PickUpMouse;
5: RandomMovement;
6: RandomRClick;
7: ExamineInv;
8: Wait(1000+random(1000));
end;
end;
Procedure Breaks;
var
H, M, S, Time: Integer;
begin
if (GetSystemTime >= BreakTime) and Players[CurrentPlayer].Booleans[0]then
begin
Logout;
ConvertTime(BreakFor, H, M, S);
Writeln('Break for:'+IntTostr(m)+'m'+IntTostr(s)+'s');
MarkTime(Time);
Repeat
Wait(1000);
until(BreakFor < TimeFromMark(Time))
LogInPlayer;
ResetBreakTimer;
Wait(4000);
FindNormalRandoms;
end;
end;
function MonkHeadColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 1.67);

FindColorsSpiralTolerance(MSCX, MSCY, arP, 7318218, MSX1, MSY1, MSX2, MSY2, 7);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);

if (R >= 180) and (R <= 221) and (G >= 152) and (G <= 186) and (B >= 101) and (B <= 125) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 32.83) and (X <= 50.52) and (Y >= 33.55) and (Y <= 51.39) and (Z >= 17.30) and (Z <= 26.34) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
function MonkBodyColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.43, 1.90);

FindColorsSpiralTolerance(MSCX, MSCY, arP, 2834763, MSX1, MSY1, MSX2, MSY2, 6);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);

if (R >= 57) and (R <= 88) and (G >= 50) and (G <= 80) and (B >= 27) and (B <= 59) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 3.17) and (X <= 7.51) and (Y >= 3.35) and (Y <= 7.94) and (Z >= 1.67) and (Z <= 5.16) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;

Procedure AttackMonk;
var
MyTPA: TPointArray;
MyPoint: TPoint;
x, y, i: Integer;
begin
begin
if InFight then
begin
repeat
FindNormalRandoms;
Load_Antiban;
until Not Infight
end;
begin
MarkTime(FindMonkTimer);
x:= MSCx;
y:= MSCy;
FindColorsSpiralTolerance(x, y, MyTPA, 7778513, MSx1, MSy1, MSx2, MSy2, 5);
if Length(MyTPA) = 0 then
begin
x := MMCX;
y :=MMCY;
if FindColorSpiralTolerance(x, y, 258295, MMX1, MMY1, MMX2, MMY2, 5) then
Mouse(x, y, 5, 5, Mouse_Left);
Flag;
wait(1000+random(500));
FindColorsSpiralTolerance(x, y, MyTPA, 7380935, MSx1, MSy1, MSx2, MSy2, 5);
end;
end;
if Length(MyTPA) = 0 then
begin
x := MMCX;
y :=MMCY;
if FindColorSpiralTolerance(x, y, 780530, MMX1, MMY1, MMX2, MMY2, 5) then
Mouse(x, y, 5, 5, Mouse_Left);
Flag;
wait(850+random(150));
FindColorsSpiralTolerance(x, y, MyTPA, MonkHeadColor, MSx1, MSy1, MSx2, MSy2, 5);
end;
if Length(MyTPA) = 0 then FindColorsSpiralTolerance(x, y, MyTPA, MonkBodyColor, MSx1, MSy1, MSx2, MSy2, 5);
if TimeFromMark(FindMonkTimer) > (120000) then
begin
Logout;
writeLn('Couldnt find monk');
TerminateScript;
end;
if Length(MyTPA) = 0 then
begin
Logout;
writeln('Couldnt find Monk');
TerminateScript;
end;
for I:=0 to High(MyTPA) do
begin
MyPoint:= MyTPA[i]
MMouse(Mypoint.x, MyPoint.y, 5, 5);
if (IsUpTextMultiCustom(['ttack', 'onk', 'monk'])) then
begin
GetMousePos(x,y);
Mouse(x, y, 0, 0, Mouse_Right);
ChooseOption('ttack Monk');
Wait(500+Random(350));
exit;
end;
end;
begin
if InFight then
begin
repeat
FindNormalRandoms;
Load_Antiban;
until Not Infight
end;
Flag;
Wait(5000+random(250));
end;
end;
end;
Procedure HealMonk;
var
MyTPA: TPointArray;
MyPoint: TPoint;
x, y, i: Integer;
begin
begin
if InFight then
begin
repeat
FindNormalRandoms;
Load_Antiban;
until Not Infight
end;
MarkTime(FindMonkTimer);
x:= MSCx;
y:= MSCy;
FindColorsSpiralTolerance(x, y, MyTPA, 7778513, MSx1, MSy1, MSx2, MSy2, 5);
if Length(MyTPA) = 0 then
begin
x := MMCX;
y :=MMCY;
if FindColorSpiralTolerance(x, y, 258295, MMX1, MMY1, MMX2, MMY2, 5) then
Mouse(x, y, 5, 5, Mouse_Left);
Flag;
wait(1000+random(500));
FindColorsSpiralTolerance(x, y, MyTPA, 7380935, MSx1, MSy1, MSx2, MSy2, 5);
end;
end;
if Length(MyTPA) = 0 then
begin
x := MMCX;
y :=MMCY;
if FindColorSpiralTolerance(x, y, 780530, MMX1, MMY1, MMX2, MMY2, 5) then
Mouse(x, y, 5, 5, Mouse_Left);
Flag;
wait(850+random(150));
FindColorsSpiralTolerance(x, y, MyTPA, MonkHeadColor, MSx1, MSy1, MSx2, MSy2, 5);
end;
if Length(MyTPA) = 0 then FindColorsSpiralTolerance(x, y, MyTPA, MonkBodyColor, MSx1, MSy1, MSx2, MSy2, 5);
if TimeFromMark(FindMonkTimer) > (120000) then
begin
Logout;
writeLn('Couldnt find monk');
TerminateScript;
end;
if Length(MyTPA) = 0 then
begin
Logout;
writeln('Couldnt find Monk');
TerminateScript;
end;
for I:=0 to High(MyTPA) do
begin
MyPoint:= MyTPA[i]
MMouse(Mypoint.x, MyPoint.y, 5, 5);
if (IsUpTextMultiCustom(['ttack', 'onk', 'monk'])) then
begin
GetMousePos(x,y);
Mouse(x, y, 0, 0, Mouse_Right);
WaitOptionMulti(['alk', 'Talk'], 200+random(200));
Wait(1000+Random(100));
ClickContinue(True, False);
Wait(850+Random(250));
Case Random(5) of
0: Mouse(141, 395, 5, 5, Mouse_Left);

1: Mouse(229, 400, 5, 5, Mouse_Left);

2: Mouse(296, 399, 5, 5, Mouse_Left);

3: Mouse(368, 395, 5, 5, Mouse_Left);

4: Mouse(254, 399, 5, 5, Mouse_Left);
end;
Wait(850+random(150));
ClickContinue(True, False);
Wait(850+random(150));
ClickContinue(True, False);
Wait(850+random(150));
exit;
end;
Wait(350+random(350));
end;
end;
procedure WalkToSpawns;
var ax, ay, x, y: Integer;
begin
case Random(3) of
0: begin
FindSymbol(ax, ay, 'water');
Mouse(ax, ay, 5, 5, Mouse_left);
Flag;
wait(850+random(150));
end;
1: begin
x := MMCX;
y :=MMCY;
if FindColorSpiralTolerance(x, y, 780530, MMX1, MMY1, MMX2, MMY2, 5) then
Mouse(x, y, 5, 5, Mouse_Left);
Flag;
wait(850+random(150));
end;
2: begin
x := MMCX;
y :=MMCY;
if FindColorSpiralTolerance(x, y, 780530, MMX1, MMY1, MMX2, MMY2, 5) then
Mouse(x, y, 5, 5, Mouse_Left);
Flag;
wait(850+random(150));
end;
end;
end;
begin;
Setup;
repeat
AttackMonk;
if not Infight then
WalkToSpawns;
if (HPPercent < 65) then
repeat
HealMonk;
until (HPPercent >= 100);
breaks;
until(false)
end.

Sin

2012-02-14 21:38:51

Awwwww….
I was so excited to see TPA's then I realized it was AutoColour ;c

Laz

2012-02-14 21:47:30

From: Sin
Awwwww….
I was so excited to see TPA's then I realized it was AutoColour ;c


more than tihs cactus ??

and gratz for the release i will try it on my pure.

MattL191

2012-02-14 22:01:53

From: Sin
Awwwww….
I was so excited to see TPA's then I realized it was AutoColour ;c



I only used 2 for AutoColour just incase the other 2 do not work. found it was the best failsafe.

kingsleyeng

2012-02-18 05:10:27

haven't tried it but is there a function where when ur low on hp it ask monks too heal u? if not can u add?

one1988

2012-02-18 06:02:21

i will test this for you on a prayer, def summ chaotic acc i am making

MattL191

2012-02-25 02:19:30

yeah there is a function that it heals you if u go under 60% prayer.

cezzq

2012-02-27 16:42:36

nice script. nice idea. like it you should work on it and make it faster i love it btw :)