SRL Archive - Outdated / Broken

Hermpie's Monk Killer + Healer + boneburrier.


ShowerThoughts

2008-04-30 11:15:51

Hermpie's Monk Killer + Healer + boneburrier.

No time for writing an release

I am going on camp!
and proggy's or bugs or anything appreciated for when im back!

Program LMAO;
{.Include SRL/SRL/Misc/SMART.Scar}
{.Include SRL/SRL.Scar}
{.Include SRL/SRL/Skill/Fighting.Scar}

Var
X, Y, MonksKilled, MaxPlayerTime, ProggyI : Integer;
WUpper, WLower:Boolean;
Const
{=========================]
Main Const
[=========================}
DetailedDebug = True;//True If You Want To See A Full Detailed Debug
Warning = True;//Let This...

{=========================]
Standard Const// Change NOT NEEDED!
[=========================}
MonkColor = 8300243;//Change This If Having Trouble Finding A Monk(3234692)
BoneColor = 13092814;
procedure DeclarePlayers;
begin
HowManyPlayers:=1;//Fil this in!

ProggyI:=HowManyPlayers;
CurrentPlayer:=0;
NumberOfPlayers(HowManyPlayers);
{==========================================]

NOTE: Only Fill in The Lines With Comments.

[==========================================}
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Integers[0]:=100;//How Many Monks To Kill.
Players[0].Integers[1]:=60;//Seconds
Players[0].Integers[2]:=50;//Below Which Hp Percent, We Go Heal.
Players[0].Integers[3]:=15;//Minutes Before Switches To Next Player.
Players[0].Strings[1]:='StrenghtA';//Which Style? Attack, StrenghtA, StrenghtB, Defensive.
Players[0].Booleans[0]:=True;//True To Heal At Monks.
Players[0].Booleans[1]:=False;//True To Burry Bones.

{Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Integers[0]:=5;//Monks To Kill.
Players[1].Integers[1]:=70;//TimeToKillMonk In Seconds.
Players[1].Integers[2]:=50;//Below Which Hp Percent, We Go Heal.
Players[1].Integers[3]:=15;//Minutes Before Switches To Next Player.
Players[1].Strings[1]:='Attack';//Which Style? Attack, StrengthA, StrengthB, Defensive.
Players[1].Booleans[0]:=True;//True To Heal At Monks.
Players[0].Booleans[1]:=True;//To Burry Bones.}
end;
{===========================================================================================]

NOTE: END OF SETUP ONLY CHANGE STUFF BELOW IF YOU KNOW WHAT YOU ARE DOING!!!

[===========================================================================================}



Procedure HW(WaitTime:integer);
Begin
Wait(WaitTime)
End;

Procedure HWL(TextLine:String);
Begin
If DetailedDebug Then Writeln(TextLine);
End;

Function HUpText(Uptext:String):boolean;
Var
MaxTime:Integer;
Begin
MarkTime(MaxTime);
Repeat
Wait(1);
Result:=IsUpText(Uptext);
Until(TimeFromMark(MaxTime)>100) Or Result;
End;

Function HpBelow(Percent:integer):boolean;
Begin
Result:=HPPercent < Percent-Random(10);;
end;

Procedure HSetRun(BooleanX:Boolean);
Var
S:Integer;
ColorSign:String;
Begin
S := GetMMLevels('run', ColorSign);//Good Idea Dude Richard!
If (S > 30) Or HPBelow(Players[CurrentPlayer].Integers[2]) then SetRun(True) else SetRun(False);
End;

Function AtMonastery:Boolean;//Will Check If The Character Is At Monks Or Not.
Var
Monastery:integer;
Begin
if Not LoggedIn Then Exit;
Monastery := DTMFromString('78DA63CC676260B06100034608C5B07DD36A8' +
'6FF50FE7F2060AC01AAF186C83141D54486CD609044D2C3980294' +
'F125A0260928A347404D2550461BBF1A001D4C1004');
Result:=DTMRotated(Monastery, X, Y, MMX1, MMY1, MMX2, MMY2);
FreeDTM(Monastery);
If Not Result then
begin
HWL('Location = Not At The Monastery');
Result:=FindSymbol(X, Y, 'Water');
If Result Then HWL('Location = Could Not Find DTM Clicked Water Symbol.');
End Else
HWL('Location = Monastery');
End;


Function ToMonastery(Where:string):Boolean;//Will Check If The Character Is At Monks Or Not.
Var
DTM:integer;
Begin
if Not LoggedIn Then Exit;
HSetRun(True);
Case LowerCase(Where) of
'middle' : DTM := DTMFromString('78DA632C636260086500034608C5101E10C0F' +
'01FCAFF0F048CD940354E103966A89AD8FC9D0C92487A1833806A' +
'9208A86900AA4921A0A619A8C605BF1A00DC631079');
'upper left' : DTM := DTMFromString('78DA638C656260306500034608C5101E10C0F' +
'01FCAFF0F048CD940354E103966A89AD8FC9D0C92487A1833806A' +
'9208A86900AA4921A0A619A8C605BF1A00B5081040');
'lower left' :DTM := DTMFromString('78DA630C636260C86200034608C5101E10C0F' +
'01FCAFF0F048CD940354E103966A89AD8FC9D0C92487A1833806A' +
'9208A86900AA4921A0A619A8C605BF1A00D45E106E');
End;
Result:=DTMRotated(DTM, X, Y, MMX1, MMY1, MMX2, MMY2);
if Not result then Result:=FindSymbol(X, Y, 'Water');
If Not Result then HWL('Location = Not At The Monastery') Else HWL('Location = Monastery At The '+Where);
If Where='Upper Left' then X:= X - 2;
If Where='Upper Left' then Y:= Y + 2;

If Where='Lower Left' then Y:= Y + 2;
If Result Then
Begin
Mouse(X, Y, 0, 0,True);
FFlag(20);
End;
If Result then Players[CurrentPlayer].Loc:= Where;
HSetRun(False);
FreeDTM(DTM);
End;


Procedure OtherPlace(Opposite:Boolean);
begin
If Opposite Then
Begin
Case LowerCase(Players[CurrentPlayer].Loc) of
'middle':Case Random(3) of
0: ToMonastery('Upper Left');
1: ToMonastery('Upper Left');
2: ToMonastery('Lower Left');
3: ToMonastery('Lower Left');
end;
'lower left':Case Random(2) of
0:ToMonastery('Middle');
1: ToMonastery('Upper Left');
2:ToMonastery('Middle');
End;
'upper left':Case Random(2) of
0:ToMonastery('Middle');
1:ToMonastery('Lower Left');
2:ToMonastery('Middle');
End;


End;
End else
Begin
Case LowerCase(Players[CurrentPlayer].Loc) of
'middle':Case Random(3) of
0: ToMonastery('Upper Left');
1: ToMonastery('Upper Left');
2: ToMonastery('Lower Left');
3: ToMonastery('Lower Left');
end;
'lower left':Case Random(4) of
0: ToMonastery('Upper Left');
1: ToMonastery('Upper Left');
2:ToMonastery('Middle');
3:ToMonastery('Middle');
End;
'upper left':Case Random(3) of
0: ToMonastery('Lower Left');
1: ToMonastery('Lower Left');
2:ToMonastery('Middle');
End;

End;
End;
If Not WLower And WUpper Then Logout;
End;

Function FindMonk:Boolean;//This Finds The Monk Using Tpa.
Var
MonkTpa: TpointArray;
Monk: T2DPointArray;
H, Hx, Hy, CTS, I, Timer:Integer;
Begin
MouseSpeed:=30;
Timer:=GetSystemTime;
if not LoggedIn Then Exit;
CTS := GetColorToleranceSpeed;
If not CTS = 2 Then ColorToleranceSpeed(2);
FindColorsSpiralTolerance(X, Y, MonkTPA, MonkColor, MSX1, MSY1, MSX2, MSY2, 10);
Monk:= TPAtoATPAEx(MonkTPA, 17, 18);
H:=High(Monk);
For I := 0 To H Do
Begin
MiddleTPAEx(Monk[i], X, Y);
HWL('Took '+ IntToStr(GetSystemTime - Timer) +' MiliSecs To Find The Monk.');
If Not InFight Then If Not FindColorSpiralTolerance(Hx,HY,255,X-30,Y-30,X+30,Y+30,15) And
Not FindColorSpiralTolerance(Hx,HY,65280,X-30,Y-30,X+30,Y+30,15) Then
Begin
MMouse(X, Y, 0, 0);
Wait(30+random(10));
Result:=HUpText('onk');
If Result Then Break;
If Not Result Then Wait(1000 + Random(500));
End;
End;
If Not result Then HWL('Monk Not Found.');
If Not result Then OtherPlace(False);
ColorToleranceSpeed(CTS);
MouseSpeed:=15;
End;

Function FindBone(MainScreen:Boolean):Boolean;//This Finds The Monk Using Tpa.
Var
MonkTpa: TpointArray;
Monk: T2DPointArray;
H, CTS, I, Timer:Integer;
Begin
MouseSpeed:=30;
Timer:=GetSystemTime;
if not LoggedIn Then Exit;
CTS := GetColorToleranceSpeed;
If not CTS = 2 Then ColorToleranceSpeed(2);
If MainScreen Then FindColorsSpiralTolerance(X, Y, MonkTPA, BoneColor, MSX1+100 , MSY1+100 , MSX2-100, MSY2-100 , 10) else FindColorsSpiralTolerance(X, Y, MonkTPA, BoneColor, MIX1 , MIY1 , MIX2, MIY2, 10);
Monk:= TPAtoATPAEx(MonkTPA, 15, 15);
H:=High(Monk);
For I := 0 To H Do
Begin
MiddleTPAEx(Monk[i], X, Y);
MMouse(X, Y, 0, 0);
Result:=HUpText('one');
If Result Then Break;
End;
ColorToleranceSpeed(CTS);
MouseSpeed:=15;
End;






Procedure Heal;//Will Heal At Monks.
Var
MaxTime:integer;
Begin
if Not LoggedIn Then Exit;
If Players[CurrentPlayer].Booleans[0]Then//If You Want To Get Healt When Fighting Then It Will Heal.
Begin
OtherPlace(True);
Repeat
If FindMonk Then
begin
Mouse(X, Y, 0, 0, False);
Wait(25+random(10));
If ChooseOption('alk') then
Begin
MarkTime(MaxTime)
Repeat
If FindTalk Then Break;
Until(TimeFromMark(MaxTime)>8000) or ClickToContinue;
If Not (TimeFromMark(MaxTime)>8000) Then
Begin
ClickToContinue;
FindNPCChatText('you heal me',ClickLeft);
ClickToContinue;
ClickToContinue;
ClickToContinue;
ClickToContinue;
ClickToContinue;
end;
end;
end;
FindNormalRandoms;
If InFight then OtherPlace(True);
Until Not HPBelow(99);
End;
End;

Procedure BurryBones;
Begin
Repeat
if FindBone(False) Then Mouse(X,Y,0,0,True);
FindNormalRandoms;
Wait(1000);
Until Not FindBone(False);
ClicktoContinue;
End;

Function FightMonk:Boolean;
Var
MaxTime:integer;
Begin
if Not LoggedIn Then Exit;
MarkTime(MaxTime);
Repeat
if FindMonk Then
Begin
Case Random(2) of
0:Begin
Mouse(X,Y,0,0,False);
Hw(20+ Random(10));
Result:=ChooseOption('ttack');
End;
1:Begin
Mouse(X,Y,0,0,True);
Result:=FindColorTolerance(X, Y,255,X-10,Y-10,X+10,Y+10,5)
End;
end;
If InFight Then Break;
If Result Then Break;
end else
Wait(2500);
Until(TimeFromMark(MaxTime)>7500)
ClicktoContinue;
End;

Procedure KillMonk;
Var
MaxTime:integer;
Begin
If Not LoggedIn Then Exit;
If HpBelow(Players[CurrentPlayer].Integers[2]) then Heal;
FindNormalRandoms;
If FightMonk Then
Begin
Wait(2500);
MarkTime(MaxTime);
Repeat
FindNormalRandoms;
Until (InFight)or(TimeFromMark(MaxTime)>10000);
MarkTime(MaxTime);
Repeat
Wait(100);
FindNormalRandoms;
Until (Not InFight) or HpBelow(Players[CurrentPlayer].Integers[2]) or (TimeFromMark(MaxTime)>Players[CurrentPlayer].Integers[1]*1000)
If Not LoggedIn Then Exit;
If Not InFight then MonksKilled:=MonksKilled + 1;
HWL(IntToStr(MonksKilled));
If HpBelow(Players[CurrentPlayer].Integers[2]) then Heal;
If Not InvFull Then
Begin
If FindBone(True) Then Mouse(X, Y, 0, 0, True);
FFlag(1);
Wait(500+random(250));
If Not InvFull Then If FindBone(True) Then Mouse(X, Y, 0, 0, True);
FFlag(1);
Wait(500+random(250));
end;
If InvFull Then If Players[CurrentPlayer].Booleans[1]Then BurryBones;
FindNormalRandoms
End;
End;

Procedure SetVars;//Thanks Evil Chicken!(really good idea)
var
F: Integer;

begin
for F := 0 to HowManyPlayers - 1 do
begin
Players[F].Loc := 'Middle';
Players[F].Active := True;
end;
end;


Procedure SetUpPlayer;
Var
TotalMonksKilled:Integer;
Begin
MonksKilled:=0;
TotalMonksKilled:=TotalMonksKilled + MonksKilled;
HWL(IntToStr(TotalMonksKilled)+' Monks Killed In Total(AllPlayers)');
Wait(1000);
LoginPlayer;
Wait(1000 + Random(500));
SetAngle(True);
MakeCompass('N');
FindNormalRandoms;
GameTab(1);
Case LowerCase(Players[CurrentPlayer].Strings[1]) of
'attack': SetFightMode(1);
'strengtha':SetFightMode(2);
'strengthb':SetFightMode(3);
'defensive':SetFightMode(4);
End;
GameTab(4);
Case Random(3) of
0:ToMonastery('Middle');
1:ToMonastery('Upper Left');
2:ToMonastery('Lower Left');
End;

End;


Procedure SetUpClient;
Var
MaxTime :Integer;
Begin
SetVars;
If Warning then
begin
MaxTime:= 0;
MarkTime(MaxTime);
ClearDebug;
Repeat
Writeln('');
Writeln('Make Sure That Your Accounts Are High Enough To Fight The Monks,');
Writeln('This Script Haves Healing But Level < 10s Will Die');
Writeln('');
wait(500);
ClearDebug;
Wait(500);
Until(timeFromMark(MaxTime)>2500);
ClearDebug;
Writeln('');
Writeln('Make Sure That Your Accounts Are High Enough To Fight The Monks,');
Writeln('This Script Haves Healing But Level < 10s Will Die');
Writeln('');
Wait(5000);
ClearDebug;
Writeln('To Turn This Warning Off Set Warning In The Main Const To False, Thank You.');
Writeln('If You Turn The Warning To Off(False) The Script Will Run');
Writeln('If You Do Not Know How Go Cry...');
Writeln('');
Writeln('');
Writeln('');
Writeln('');
Writeln('I Hope You Will Enjoy This Script!');
end else
DeclarePlayers;
ActivateClient;
SetVars;
End;

Function AllFalse: Boolean;
Var
I: Integer;
Begin
For I := 0 To High(Players) Do
If Players[CurrentPlayer].Active Then
Exit;
Result := True;
End;

Procedure Switch(StatesLMAO:Boolean);
Begin
If ALLFalse Then
Begin
Writeln('ALL Players Are False, Thanks For Using My Script!');
TerminateScript;
End;
If StatesLMAO Then
Begin
HWL('Killed The Amount Of Monks Requested Next Player or Ran For The Time Requested.');
logout;
NextPlayer(True);
SetUpPlayer;
End Else
Begin
HWL('Error! NextPlayer False')
Logout;
NextPlayer(False);
SetUpPlayer;
End;
End;

Procedure Proggy(Detailed:boolean);
Begin
If Not Detailed then
Begin
Writeln('');
Writeln('');
Writeln('Script Ran For = '+TimeRunning);
Writeln('Monks Killed = '+IntToStr(MonksKilled));
Writeln('');
Writeln('');
Disguise('Monks Killed = '+IntToStr(MonksKilled));
End else
If Detailed Then
Begin

Writeln('//////////////////////////////////////////////');
Writeln('// Script Ran For = '+TimeRunning);
Writeln('// Monks Killed = '+IntToStr(MonksKilled));
Writeln('// Player 1 Gained :');
Writeln('// Att Levels =');
Writeln('// Str Levels =');
Writeln('// Def Levels =');
If Not ProggyI > 1 Then Writeln('/////////////////////////////////////////////');
If Not ProggyI > 1 Then Exit;
Writeln('// Player 2 Gained :');
Writeln('// Att Levels =');
Writeln('// Str Levels =');
Writeln('// Def Levels =');
If Not ProggyI > 2 Then Writeln('/////////////////////////////////////////////');
If Not ProggyI > 2 Then Exit;
Writeln('// Player 3 Gained :');
Writeln('// Att Levels =');
Writeln('// Str Levels =');
Writeln('// Def Levels =');
If Not ProggyI > 3 Then Writeln('/////////////////////////////////////////////');
If Not ProggyI > 3 Then Exit;
Writeln('// Player 4 Gained :');
Writeln('// Att Levels =');
Writeln('// Str Levels =');
Writeln('// Def Levels =');
If Not ProggyI > 4 Then Writeln('/////////////////////////////////////////////');
If Not ProggyI > 4 Then Exit;
Writeln('// Player 5 Gained :');
Writeln('// Att Levels =');
Writeln('// Str Levels =');
Writeln('// Def Levels =');
Writeln('// ');

End;
Disguise('Monks Killed = '+IntToStr(MonksKilled));
End;



{=========================]
MainLoop
[=========================}
Begin
SmartSetupEx(11, false, True);
Wait(1000);
SetTargetDC(SmartGetDC);
While not(SmartReady) do Wait(100);
SetUpSRL;
SetUpClient;
SetUpPlayer;
Repeat
MarkTime(MaxPlayerTime);
Repeat
If Not Loggedin Then Break;
KillMonk;
Proggy(False);
Until (Not LoggedIn)or (MonksKilled > (Players[Currentplayer].Integers[0]))or (TimeFromMark(MaxPlayerTime)>Players[Currentplayer].Integers[2]*60000+Random(60000));
If (MonksKilled > (Players[Currentplayer].Integers[0]))or (TimeFromMark(MaxPlayerTime)>Players[Currentplayer].Integers[2]*60000) Then Switch(True);
If Not LoggedIn Or Not (MonksKilled > (Players[Currentplayer].Integers[0]))or (TimeFromMark(MaxPlayerTime)>Players[Currentplayer].Integers[2]*60000) Then Switch(False);
Proggy(True);
Until(AllFalse);
If AllFalse Then Writeln('All Players False!');
If AllFalse Then TerminateScript;
End.

Choose an not crowded world or it keeps running!!

Bye
Hermpie!

Pure1993

2008-04-30 11:20:48

I'll run this as soon as I get a chance, first post reserved for proggy. ^^
Nice Script, and have fun on the camp^^

ShowerThoughts

2008-04-30 11:36:04

From: Pure1993
I'll run this as soon as I get a chance, first post reserved for proggy. ^^
Nice Script, and have fun on the camp^^


Bot: Thanks…

Naum

2008-04-30 11:44:41

Nice Hermpie but to save space and lagging and code you can do:



Repeat
ClickToContinue
Until(Not(ClickToContinue))

But GJ !

ShowerThoughts

2008-05-03 08:38:21

From: NaumanAkhlaQ
Nice Hermpie but to save space and lagging and code you can do:



Repeat
ClickToContinue
Until(Not(ClickToContinue))

But GJ !


You again… :p I thought that was an endless loop but oaf course not -.-

itSchRis917

2008-05-05 17:27:30

oooo looking good.. ill test this assuming i still have my army..

ShowerThoughts

2008-05-05 17:33:07

IT WORKS GREAT, one bug the multiplayer doesn't works it logs out when the nextplayer logs in :S

P1nky

2008-05-06 10:10:50

theres no chances to get randoms right? so why need multiplayer :S

im test this too :)
maybe add a range option :P?

ShowerThoughts

2008-05-06 10:11:56

From: P1NKY
theres no chances to get randoms right? so why need multiplayer :S

im test this too :)
maybe add a range option :P?


Wtf why should it not get randoms?
and no the multiplayer is not working somehow