EngageTheRage
2013-06-05 09:47:49
How Long have You Played Runescape?
8 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
I have used Java for projects/coursework but not that much unfortunately. I have used C, Assembly, HTML, Bash Scripting and SQL but in no way claim to be an expert. I have also done quite a bit in Objective-C now as i am looking into mobile applications and am currently moving on to openGL i order to create games (just started a 2D iOS game project), because of this i am looking into improving my Java in order to do Andriod also.
Are you a member of any other communities?
Not Currently, i used to be on sythe as TurtleHead - http://www.sythe.org/vouches-forum/768351-turtleheads-vouches.html
also was on se7ensins as EngageTheRage and used to do the JTag'ed Xbox thing
Tell us about yourself…
Please show us one (or multiple) of your scripts.
8 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
I have used Java for projects/coursework but not that much unfortunately. I have used C, Assembly, HTML, Bash Scripting and SQL but in no way claim to be an expert. I have also done quite a bit in Objective-C now as i am looking into mobile applications and am currently moving on to openGL i order to create games (just started a 2D iOS game project), because of this i am looking into improving my Java in order to do Andriod also.
Are you a member of any other communities?
Not Currently, i used to be on sythe as TurtleHead - http://www.sythe.org/vouches-forum/768351-turtleheads-vouches.html
also was on se7ensins as EngageTheRage and used to do the JTag'ed Xbox thing
Tell us about yourself…
From: EngageTheRage
Hey!
So im EnageTheRage, i am from England and just about to finish my second year of a Computer Science MEng. I am quite interested in mobile applications development and am also just getting into networks and security, im reading a few good books and networks and hacking at the moment. I enjoy coding but also like to hit the gym most days, and love a good session in the pub :p
I am also a MASSIVE fan of the halo series (the games). Halo 2 was the first game i played on xbox live and i got that back in the spring of 07 and played it religiously! Then when Halo 3 came out i could actually play the game and loved it with a passion. I'm an extremely competitive person the the whole true skill thing really turned me on (eventually got my first 50 in 2009 i think it was in SWAT first then slayer after) :p i hate reach and am not really a fan of halo 4, although i have completed it, i just dont like the ranking system and the new CSR thing.
I also used to be on the JTAG'ed Xbox scene and had my own. I was absolutely useless and just copied everyone else code but one thing i did myself was the actual JTAG'ing and then customised the xbox with some cool LEDs and a hole in the top and a sweet new fan. Absolutely ruined call of duty for me but oh well, got me to move on from xbox :p
I used to play RuneScape back in 06/07/08 and started botting with perfectus scripts :) i stopped just before EOC came out and have just come back when i saw about OldSchool. I then stumbled across the script and really liked the idea of learning to create my own scripts, so instead of actually focusing on RuneScape i ended up not caring and just worrying about the actual script instead :p I have really enjoyed it here so far and have learnt a lot and would like to think i have helped a few out along the way as well! With all the projects on OGL and pulseBot etc i would like to get into some of that for myself over the summer!
For info on the script and how to use please go to my thread for it: http://villavu.com/forum/showthread.php?t=103604
There are some files you need before it will work :)
Please show us one (or multiple) of your scripts.
{ ********* (= Made By EngageTheRage =) *********
For the script to work the txt file monsterProfiles.txt must also
be downloaded and placed in ~/simba/scripts/
There is no need to edit the script, to add new monsters, refer to
the information in the thread:
http://villavu.com/forum/showthread.php?t=103604
}
program Fighter;
{$DEFINE SMART8}
{$i SRL-OSR/Srl.simba}
{$i SRL-OSR/SRL/Misc/SmartGraphics.simba}
const
DeBugConsole = True;
DeBugFile = False;
var
lobsterDTM, swordieDTM, monkfishDTM, sharkDTM, teletabDTM: Integer;
fightStance, numberOfLoops, attempts: Integer;
startXP, currentXp, xpGained, xpPerHour, timer1, timer2, fileName: Integer;
proggy, x, foodType: Integer;
cbSkill, starttime, tmp: String;
lastTimeCombat, away: Boolean;
monsterATPA: T2DPointArray;
closestNpc, player: TPoint;
killBox, playerBox: TBox;
npcs, playersMM: T2DPointArray;
playRange, breakRange: Array[0..1] of Integer;
nextBreak, breakLength, breakTime: Integer;
frmDesign: TForm;
Buttons: Array [0..3] of TButton;
Labels: Array [0..14] of TLabel;
text: Array of TLabel;
Edits: Array [0..3] of TEdit;
breakEdits: Array [0..3] of TEdit;
Lists: Array [0..4] of TListBox;
profilesList: TListBox;
LabelName: Array of String;
Start: Boolean;
guiBackground: Integer;
monsters, playersP: T2DStringArray;
monsterfileName, monsterPrimary, monsterSecondary, playersFileName: integer;
{***** ReadMonsterProfiles *****
This procedure reads in the data from the monsterProfiles.txt file into
the 2D Array monsters. each row is then an individual monster profile.
if the file does not exist then the script is terminated.
}
procedure ReadMonsterProfiles;
var
i, k, index: integer;
tmp, tmp2: String;
monster: Array of String;
tmp2D: T2DStringArray;
lastSpace: Boolean;
begin
monsterfileName := OpenFile(AppPath + 'Scripts\monsterProfiles.txt', false);
if monsterfileName = -1 then
begin
writeln('You do not have monsterProfiles.txt in ~\Simba\Scripts\');
terminateScript;
end;
i := 0;
setlength(monsters, 1);
repeat
ReadFileString(monsterfileName, tmp, 1);
if (ExecRegExpr('[A-Za-z0-9 ]', tmp)) then
begin
lastSpace := False;
tmp2 := tmp2 + tmp;
end else if (ExecRegExpr('[\]\[.]', tmp)) then
begin
lastSpace := False;
tmp2 := tmp2 + tmp;
end else if (ExecRegExpr('[\]\[,]', tmp)) then
begin
index := length(monsters) -1;
k := length(monsters[index]);
setlength(monster, k);
for i := 0 to k-1 do
begin
monster[i] := monsters[length(monsters) -1][i];
end;
SetLength(monsters[length(monsters) -1], k+1);
for i := 0 to k-1 do
begin
monsters[length(monsters) -1][i] := monster[i];
end;
monsters[length(monsters) -1][k] := tmp2;
lastSpace := False;
tmp2 := '';
end else if (ExecRegExpr('[\t\r\n\v\f]', tmp)) then
begin
if lastSpace then
begin
// do nothing ...
end else
begin
lastSpace := True;
k := length(monsters);
setlength(tmp2D, k);
for i := 0 to k-1 do
begin
tmp2D[i] := monsters[i];
end;
SetLength(monsters, k+1);
for i := 0 to k-1 do
begin
monsters[i] := tmp2D[i];
end;
i := 0;
end;
end;
until(EndOfFile(monsterfileName));
CloseFile(monsterfileName);;
end;
{***** ReadPlayerProfiles *****
This procedure reads in the data from playerProfiles.txt into the 2D
Array playersP. each row is a player profile. if the file does not exist
then it is created.
}
procedure ReadPlayerProfiles;
var
i, k, index: integer;
tmp, tmp2: String;
player: Array of String;
tmp2D: T2DStringArray;
lastSpace: Boolean;
begin
playersFileName := OpenFile(AppPath + 'Scripts\playerProfiles.txt', false);
if playersFileName = -1 then
begin
playersFileName := createFile(AppPath + 'Scripts\playerProfiles.txt');
end;
setlength(playersP, 1);
playersP[0] := [];
i := 0;
repeat
ReadFileString(playersFileName, tmp, 1);
if (ExecRegExpr('[A-Za-z0-9 ]', tmp)) then
begin
lastSpace := False;
tmp2 := tmp2 + tmp;
end else if (ExecRegExpr('[\]\[-]', tmp)) then
begin
lastSpace := False;
tmp2 := tmp2 + tmp;
end else if (ExecRegExpr('[\]\[,]', tmp)) then
begin
index := length(playersP) -1;
k := length(playersP[index]);
setlength(player, k);
for i := 0 to k-1 do
begin
player[i] := playersP[length(playersP) -1][i];
end;
SetLength(playersP[length(playersP) -1], k+1);
for i := 0 to k-1 do
begin
playersP[length(playersP) -1][i] := player[i];
end;
playersP[length(playersP) -1][k] := tmp2;
lastSpace := False;
tmp2 := '';
end else if (ExecRegExpr('[\t\r\n\v\f]', tmp)) then
begin
if lastSpace then
begin
// do nothing ...
end else
begin
lastSpace := True;
k := length(playersP);
setlength(tmp2D, k);
for i := 0 to k-1 do
begin
tmp2D[i] := playersP[i];
end;
SetLength(playersP, k+1);
for i := 0 to k-1 do
begin
playersP[i] := tmp2D[i];
end;
i := 0;
end;
end;
until(EndOfFile(playersFileName));
CloseFile(playersFileName);;
end;
{***** ButtonClick *****
This procedure is called whenever a button on the form is clicked. it copes
with all the buttons and depending on which one, carries out a number of
tasks. These include, starting/canceling the script and adding/deleting player
profiles.
}
procedure ButtonClick(Sender: TObject);
var
i, index, k: integer;
startScript: Boolean;
tmp: Array of String;
Image1: TImage;
profile: String;
begin
startScript := True;
LabelName := [];
case Sender of
Buttons[0]: begin
WriteLn('starting ...');
frmDesign.ModalResult:= mrOk;
Start := TRUE;
end;
Buttons[1]: begin
WriteLn('canceling ...');
frmDesign.ModalResult:= mrOk;
Start := FALSE;
end;
Buttons[2]: begin
WriteLn('saving ...');
playersFileName := AppendFile(AppPath + 'Scripts\playerProfiles.txt');
profile := Edits[0].TEXT + ',' + Edits[1].TEXT + ',' + Edits[2].TEXT +
',' + Edits[3].TEXT + ',' + IntToStr(Lists[0].ITEMINDEX) +
',' + IntToStr(Lists[1].ITEMINDEX) + ',' +
IntToStr(Lists[2].ITEMINDEX) + ',' + IntToStr(Lists[3].ITEMINDEX)
+ ',' + IntToStr(Lists[4].ITEMINDEX) + ',' + breakEdits[0].TEXT
+ ',' + breakEdits[1].TEXT + ',' + breakEdits[2].TEXT + ','
+ breakEdits[3].TEXT + ',' + #13 + #10;
writeFileString(playersFileName, profile);
CloseFile(playersFileName);
ReadPlayerProfiles;
profilesList.CLEAR;
for index := 0 to high(playersP) do
begin
if length(playersP[index]) = 13 then
begin
profilesList.Items.Add(playersP[index][0]);
end;
end;
end;
Buttons[3]: begin
index := profilesList.ITEMINDEX;
WriteLn('deleting profile at index: ' + inttostr(index));
if index > -1 then
begin
deleteFile(AppPath + 'Scripts\playerProfiles.txt');
playersFileName := CreateFile(AppPath + 'Scripts\playerProfiles.txt');
for i := 0 to high(playersP) do
begin
profile := '';
if i = index then
begin
// dont put back in file
end else if length(playersP[i]) = 13 then
begin
for k := 0 to 12 do
begin
profile := profile + playersP[i][k] + ',';
end;
profile := profile + #13 + #10;
writeFileString(playersFileName, profile);
end;
end;
CloseFile(playersFileName);
ReadPlayerProfiles;
profilesList.CLEAR;
for index := 0 to high(playersP) do
begin
if length(playersP[index]) = 13 then
begin
profilesList.Items.Add(playersP[index][0]);
end;
end;
end;
end;
end;
end;
{***** ProfileClick *****
This is called when a profile in the list at the top of the form is clicked.
it then completes te form my filling it in with all the information stored
in the profile.
}
procedure ProfileClick(Sender: TObject);
var
i: integer;
begin
i := profilesList.ITEMINDEX;
if i >= 0 then
begin
Edits[0].TEXT := playersP[i][0];
Edits[1].TEXT := playersP[i][1];
Edits[2].TEXT := playersP[i][2];
Edits[3].TEXT := playersP[i][3];
Lists[0].ITEMINDEX := StrToInt(playersP[i][4]);
Lists[1].ITEMINDEX := StrToInt(playersP[i][5]);
Lists[2].ITEMINDEX := StrToInt(playersP[i][6]);
Lists[3].ITEMINDEX := StrToInt(playersP[i][7]);
Lists[4].ITEMINDEX := StrToInt(playersP[i][8]);
breakEdits[0].TEXT := playersP[i][9];
breakEdits[1].TEXT := playersP[i][10];
breakEdits[2].TEXT := playersP[i][11];
breakEdits[3].TEXT := playersP[i][12];
end;
end;
{***** FillFormMain *****
This is called in order to fill out the main screen of the form. it creates
all the labels, buttons, text fields and lists and fills them with the correct
information
}
procedure FillFormMain;
var
index, k, n: integer;
image1: TImage;
begin
Image1 := TImage.Create(FrmDesign);
Image1.Parent := FrmDesign;
Image1.Left := 0;
Image1.Top := 0;
Image1.Width := 500;
Image1.Height := 500;
DrawBitmap(guiBackground, Image1.canvas, 0, 0);
profilesList := TListBox.Create(FrmDesign);
profilesList.Parent := FrmDesign;
profilesList.Height := 63;
profilesList.Top := 70;
profilesList.Left := 30;
profilesList.Width := 200;
profilesList.OnClick := @profileClick;
ReadPlayerProfiles;
for index := 0 to high(playersP) do
begin
if length(playersP[index]) = 13 then
begin
profilesList.Items.Add(playersP[index][0]);
end;
end;
k := 0;
for index := 0 to 3 do
begin
Buttons[index] := TButton.Create(FrmDesign);
Buttons[index].Parent := FrmDesign;
if index < 2 then
begin
Buttons[index].Height := 40;
Buttons[index].Width := 215;
Buttons[index].Left := 25 + index * 235;
Buttons[index].Top := 435;
Buttons[index].OnClick := @ButtonClick;
end else
begin
Buttons[index].Height := 20;
Buttons[index].Width := 90;
Buttons[index].Left := 25 + (index-2) * 110;
Buttons[index].Top := 145;
Buttons[index].OnClick := @ButtonClick;
end;
end;
Buttons[0].Caption := 'Start Script';
Buttons[1].Caption := 'CANCEL';
Buttons[2].Caption := 'Save Profile';
Buttons[3].Caption := 'Delete Profile';
k := 0;
LabelName := ['Profile Name:', 'Username:', 'Password:', 'Nickname:',
'Monsters:', 'Food:', 'FightStyle:', 'CombatSkill:', ' ',
'Break Between:', 'and', 'mins', 'For:', 'to', 'mins'];
for index := 0 to 14 do
begin
Labels[index] := TLabel.Create(FrmDesign);
Labels[index].Parent := FrmDesign;
Labels[index].Left := 25;
if index = 4 then
begin
Labels[index].Top := 290;
end else
begin
Labels[index].Top := 170 + (30 * Index)+k;
end;
case index of
3: begin
k := 20;
end;
8: begin
Labels[index].Top := 145;
Labels[index].Left := 265;
end;
9: begin
Labels[index].Top := 145;
Labels[index].Left := 265;
end;
10: begin
Labels[index].Top := 145;
Labels[index].Left := 380;
end;
11: begin
Labels[index].Top := 145;
Labels[index].Left := 440;
end;
12: begin
Labels[index].Top := 175;
Labels[index].Left := 265;
end;
13: begin
Labels[index].Top := 175;
Labels[index].Left := 320;
end;
14: begin
Labels[index].Top := 175;
Labels[index].Left := 365;
end;
end;
Labels[index].Caption := LabelName[Index];
end;
k := 0;
for index := 0 to 3 do
begin
breakEdits[index] := TEdit.Create(FrmDesign);
breakEdits[index].Parent := FrmDesign;
breakEdits[index].Width := 30;
breakEdits[index].Height := 15;
case index of
0: begin
breakEdits[index].Top := 145;
breakEdits[index].Left := 348;
end;
1: begin
breakEdits[index].Top := 145;
breakEdits[index].Left := 408;
end;
2: begin
breakEdits[index].Top := 175;
breakEdits[index].Left := 288;
end;
3: begin
breakEdits[index].Top := 175;
breakEdits[index].Left := 333;
end;
end;
end;
k := 0;
for index := 0 to 3 do
begin
Edits[index] := TEdit.Create(FrmDesign);
Edits[index].Parent := FrmDesign;
Edits[index].Top := 170 + (30 * Index);
Edits[index].Left := 105;
Edits[index].Width := 120;
Edits[index].Height := 20;
end;
k := 0;
for index := 0 to 4 do
begin
Lists[index] := TListBox.Create(FrmDesign);
Lists[index].Parent := FrmDesign;
Lists[index].Height := 20;
if index < 2 then
begin
Lists[index].Top := 310;
Lists[index].Left := 25 + index * 105;
Lists[index].Width := 95;
end else
begin
Lists[index].Top := 310 + ((index -1) * 30);
Lists[index].Left := 105;
Lists[index].Width := 120;
end;
end;
Lists[1].Items.Add('N/A');
for index := 0 to high(monsters) do
begin
if length(monsters[index]) = 10 then
begin
Lists[0].Items.Add(monsters[index][0]);
Lists[1].Items.Add(monsters[index][0]);
end;
end;
Lists[2].Items.Add('Lobster');
Lists[2].Items.Add('Sword Fish');
Lists[2].Items.Add('Shark');
Lists[3].Items.Add('1');
Lists[3].Items.Add('2');
Lists[3].Items.Add('3');
Lists[3].Items.Add('4');
Lists[4].Items.Add('Attack');
Lists[4].Items.Add('Strength');
Lists[4].Items.Add('Defence');
Lists[4].Items.Add('Range');
k := 0;
LabelName := ['**********',
' Version 1.5',
'**********',
'You do not have to fill in youre',
'Username and Password, you can do',
'it manually if you wish. However,',
'you must give a Nickname.',
'',
'Then you must select (click) an',
'option from each list.',
'',
'Then hit "Start Script" and watch',
'the magic = )'];
setlength(text, length(LabelName));
for index := 0 to high(text) do
begin
text[index] := TLabel.Create(FrmDesign);
text[index].Parent := FrmDesign;
text[index].Left := 265;
text[index].Top := 210 + (15 * Index);
text[index].Caption := LabelName[Index];
end;
end;
{***** InitForm *****
instantiates the form, sets the width nad hieght, places it and removes
borders. Then calls FillFormMain in order to fill it with the desired
information
}
procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 300;
frmDesign.Top := 100;
frmDesign.Width := 500;
frmDesign.Height := 500;
frmDesign.Caption := 'EngageTheRage Fighter!';
frmDesign.Color := ClWhite;
frmDesign.BorderStyle := bsNone;
FillFormMain;
end;
{***** SafeInitForm *****
}
procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
{***** ShowFormModal *****
}
procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
{***** SafeShowFormModal *****
}
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
{***** DeclarePlayers *****
This declares the players by getting the information that was entered into the
form. if no nickname is entered, the script is ended with an error message, also
if any of the drop own lists were not completed an error message is shown and
the script is terminated (except for seondary monster). from the form, user,
pass, nickname, food, monster, fightstyle, and combat skill are all set here.
}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := Edits[1].text;
Players[0].Pass := Edits[2].text;
Players[0].Nick := Edits[3].text;
Players[0].Active := TRUE;
if (breakEdits[0].TEXT = '')or (breakEdits[1].TEXT = '') or
(breakEdits[2].TEXT = '') or (breakEdits[3].TEXT = '') then
begin
writeln('break entry incomplete, no breaks will be taken.');
playRange[0] := 0;
playRange[1] := 0;
breakRange[0] := 0;
breakRange[1] := 0;
end else
begin
playRange[0] := StrToInt(breakEdits[0].TEXT) * 60 * 1000;
playRange[1] := StrToInt(breakEdits[1].TEXT) * 60 * 1000;
breakRange[0] := StrToInt(breakEdits[2].TEXT) * 60 * 1000;
breakRange[1] := StrToInt(breakEdits[3].TEXT) * 60 * 1000;
end;
if Edits[3].TEXT = '' then
begin
writeln('no Nickname given, terminating.');
terminatescript;
end;
if Lists[0].ItemIndex = -1 then
begin
writeln('no monster selected, terminating.');
terminatescript;
end else
begin
monsterPrimary := Lists[0].ItemIndex;
writeln('index: ' + inttostr(monsterPrimary));
writeln('name: ' + monsters[monsterPrimary][1]);
end;
if Lists[1].ItemIndex < 1 then
begin
writeln('no secondary monster selected.');
monsterSecondary := -1;
end else
begin
monsterSecondary := Lists[1].ItemIndex - 1;
writeln('index: ' + inttostr(monsterSecondary));
writeln('name: ' + monsters[monsterSecondary][1]);
end;
case Lists[2].ItemIndex of
-1: begin
writeln('no food selected, terminating.');
terminatescript;
end;
0: begin
foodType := lobsterDTM;
end;
1: begin
foodType := swordieDTM;
end;
2: begin
foodType := sharkDTM;
end;
end;
if Lists[3].ItemIndex = -1 then
begin
writeln('no fightstyle selected, terminating.');
terminatescript;
end else
begin
fightStance := Lists[3].ItemIndex + 1;
end;
case Lists[4].ItemIndex of
-1: begin
writeln('no skill selected, terminating.');
terminatescript;
end;
0: begin
cbSkill := 'attack';
end;
1: begin
cbSkill := 'strength';
end;
2: begin
cbSkill := 'defence';
end;
3: begin
cbSkill := 'range';
end;
end;
end;
{***** MyDebug *****
This is called instead of WiteLn(''); if at the top, DebugConsole is true, then
information will be written out and is DebugFile is true, then it will be
written to a log.txt so that if anything goes wrong it can be analysed.
}
procedure MyDeBug(text: String);
var
msg: String;
begin
if DeBugConsole then
begin
Writeln(text);
end;
if DeBugFile then
begin
msg := TimeRunning + ' - ' + text;
writeFileString(fileName, msg + #13 + #10);
end;
end;
{***** MyGetXp *****
the function can get either current xp or xp till next level. it takes a boolean
'topBottom' which if true will get current xp. the string is the name of the
skill for which you want the xp.
}
function MyGetXp(topBottom: Boolean; skill: String): Integer;
begin
gameTab(tab_stats);
Result := 0;
if topBottom then
begin
case skill of
'attack': begin
MMouse(574, 219, 15, 5);
wait(randomrange(600,1500));
Result := strToIntDef(getNumbers(getTextAtExWrap(608, 240, 677, 256, 0, 5, 1, 0, 0, 'smallchars07')), -1);
end;
'strength': begin
MMouse(574, 250, 15, 5);
wait(randomrange(600,1500));
Result := strToIntDef(getNumbers(getTextAtExWrap(608, 272, 677, 288, 0, 5, 1, 0, 0, 'smallchars07')), -1);
end;
'defence': begin
MMouse(574, 281, 15, 5);
wait(randomrange(600,1500));
Result := strToIntDef(getNumbers(getTextAtExWrap(608, 304, 677, 320, 0, 5, 1, 0, 0, 'smallchars07')), -1);
end;
'range': begin
MMouse(574, 312, 15, 5);
wait(randomrange(600,1500));
Result := strToIntDef(getNumbers(getTextAtExWrap(608, 336, 677, 352, 0, 5, 1, 0, 0, 'smallchars07')), -1);
end;
end;
end else
begin
case skill of
'attack': begin
MMouse(574, 219, 15, 5);
wait(randomrange(600,1500));
Result := strToIntDef(getNumbers(getTextAtExWrap(608, 256, 677, 272, 0, 5, 1, 0, 0, 'smallchars07')), -1);
end;
'strength': begin
MMouse(574, 250, 15, 5);
wait(randomrange(600,1500));
Result := strToIntDef(getNumbers(getTextAtExWrap(608, 288, 677, 304, 0, 5, 1, 0, 0, 'smallchars07')), -1);
end;
'defence': begin
MMouse(574, 281, 15, 5);
wait(randomrange(600,1500));
Result := strToIntDef(getNumbers(getTextAtExWrap(608, 320, 677, 336, 0, 5, 1, 0, 0, 'smallchars07')), -1);
end;
'range': begin
MMouse(574, 312, 15, 5);
wait(randomrange(600,1500));
Result := strToIntDef(getNumbers(getTextAtExWrap(608, 352, 677, 368, 0, 5, 1, 0, 0, 'smallchars07')), -1);
end;
end;
end;
end;
{***** MyGetTimeRunning *****
Converts time in MS into a string form of the time:
'Xhrs Ymins Zsecs'
}
function MyGetTimeRunning(time: integer): String;
var
hours, minutes, seconds: Integer;
begin
seconds := time/1000;
while ( seconds >= 3600) do
begin
seconds := seconds - 3600;
inc(hours);
end;
while ( seconds >= 60) do
begin
seconds := seconds - 60;
inc(minutes);
end;
Result := (inttostr(hours) + 'hrs ' + inttostr(minutes) + 'mins ' + inttostr(seconds) + 'secs');
end;
{***** SetUpSmartClient *****
as it says, it sets up the client and also SRL and calls DeclarePlayers
}
procedure SetupSmartClient;
begin
SMART_FixSpeed := True;
ClearDebug;
DeclarePlayers;
SetupSRL;
ActivateClient;
WriteLn('players declared ...');
LoginPlayer;
WriteLn('logged in.');
SRL_COMBATRANDOMS := False;
SetScreenName(Players[0].Nick);
end;
{***** SetUpCharacter *****
Once the player is logged in the procedure is called, its sets up the character
by setting the compass to north, setting camera angle to high by pressing the
up arrow key, setting the fightsyale as the one specified in the form,
ensuring there is a teleport tab in their inventory, and getting the starting
xp of the selected combat skill.
}
procedure SetUpCharacter;
var
retries, xc, yc: Integer;
begin
Retaliate(True);
MakeCompass('N');
KeyDown(38);
wait(RandomRange(900, 1750));
KeyUp(38);
SetFightMode(fightStance);
wait(randomrange(50, 120));
gametab(tab_inv);
if FindDTM(teletabDTM, xc, yc, MIX1, MIY1, MIX2, MIY2) then
begin
// this is good, you have teletab :D
end else
begin
writeln('you MUST have a teletab in your inv to use this script!');
writeln('Terminating.');
terminateScript;
end;
GameTab(tab_stats);
while(startXp < 1) do
begin
if retries>2 then
break;
startXp := MyGetXp(True, cbSkill);
inc(retries);
end;
end;
{***** LoadVars *****
loads up DTMs and BitMaps needed for the script. also creates a log.txt if
DebugFile is TRUE
}
procedure LoadVars;
begin
lobsterDTM := DTMFromString('mwQAAAHic42RgYEgF4jwgzgLiMCCOAeIcIM4E4gIgjgbiDUC8AIh3A/FmIF4NFdsKxEuAeB0Q3y2TBpKMKFhUSIhhb6oEw9MqaYY5wUIMXEBRQpiRCAwHANWvD3w=');
swordieDTM := DTMFromString('mggAAAHicY2NgYJjFxMAwG4iXAnEPEE8F4rlALMfIwCAOxKpArAPEMowQsflFK4C6GFEwSEwEyMKGGXFgCAAA7gIIZQ==');
teletabDTM := DTMFromString('mrAAAAHic42BgYHBjYmBwB+IAILYFYisgDgVifyB2AuI/QDVfgPgvA4TNxsjA8ANIcwHp90A6KzmZQVLxDhwzMDCi4P9AUgQPZiSAYQAAVigOPg==');
sharkDTM := DTMFromString('mlwAAAHicY2dgYFBmYmCQAWJdINaHsk2AWBKIVRgZGAygWBaKTYBYA4gzA60ZZtamMVTEuABNYUTBIkASF2bEg6EAAFuyBls=');
if DeBugFile then
begin
starttime := theTime;
for x := 1 to 8 do
begin
if (x = 3) or (x = 6) then
begin
tmp := tmp + '-';
end else
tmp := tmp + starttime[x];
end;
tmp := AppPath + 'Scripts\fighterLog_' + TheDate(Date_Day)+ '_' + tmp + '.txt';
fileName := createFile(tmp);
end;
proggy := BitmapFromString(216, 130, 'meJztnT1O5EwQhuc+pBvtPQg3' +
'3XMgTsAZJpiACBGQEZCNtBESARLJJEgOkEBoJAICf62voLap/vWMx' +
'/aax3oCmJlud1e9rur2XzfLRQMAAAAAAAAAAAAAAAAAMAZPy0X7fN' +
'K27dPt3eiNwQI7026O22Brbs5Hb5jy4hrZnoeNdNu7M/7lyT5eCLv' +
'v6mwuTwbr3fvtUaoB0rbtc9ssjzI1zECH2oV/VIdvzvjL4351OLAF' +
'UgeCumZ/Hb7dLMRWzfJ4dG/mu/CyaUdvTL3X/NbuGQ1MzFHNF73fb' +
'4/22d28dSh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DT' +
'LSQoMSXTw0PUS+SyTMgyMkWLXsDa/+74AAAAAAAAAAAAAAAAAAAAA' +
'AADA5z8+trza');
guiBackground := BitmapFromString(500, 500, 'meJzt3TuO4+aax+FelNfjrUzg' +
'VXgFDpzMAjo70UmcO7BhA4MGXED34Bgw0MEBNAUIR0Pz8vHjpf6S3' +
'npePFF3tUhR5K8o6tIfPhhjjDHGGGOMMcYYY4wx5sz5L2OMMU872m' +
'6MMfVG240xpt5ouzHG1JuetvdfpTfGGHOv0XZjjKk32m6MMfVG240' +
'xpt5ouzHG1JuDbf/v//lfAO5O2wHq0XaAerQdoB5tB6hH2wHqeeu2' +
'L92IMcaYE0fbjTGm3mi7McbUm3u1/eXn7wE4l7YD1KPtAPVoO0A92' +
'g5Qj7YD1KPtAPVoO0A92g5Qj7YD1KPtNFz+/Hj5z/z19fLy8493X6' +
'Ua/v35x9uG/fz5y93X5y3Yee5L22lweAY27IO0/fRfN3ae+3rktv/' +
'12/eXy5fL2vz7cnn57ae7b8mHNTzEOud2JN7l8Ox53B+kh7u99Xl7' +
'57FzW/S/Xh/ry6+3P//6ekz9/PHgOmj7fT1y24f7f3tePv169y35m' +
'D6/HmJff+rcjNND+y6H59dP33eu5/MW/q3b3nns/OvPy/XnR78LTj' +
'lf0vb70vbaarf98rR5f7S2P9p5+2i/va0n/Qq03TWZtqe7JrOp7U/' +
'66A/v41ucmXQeO8NfKw91vV3bj3uitjs5P8sono0N+whtH63etFrP' +
'eOCH236XY0fb70vb36GnbvvLZMd4xmu52t6m7cfVa/ttjxo+Wx9dl' +
'2jvKj3XqKe3sPQsuP30dt+ylpbYeZn0YNs3bcwdq7q6eqMX/ma78e' +
'APx+0+Ll1Tmn2jS/+lkh3HzmqKt26cfTvP6hW5pV8Tm7b/tBL1PnF' +
'Qvu1Lx/jSMdV5dXq4g/Vc25xd+R3L6tn/Vwu/u+1fP23bmPtW9WDb' +
'n+LhuN2F6aYbvay5uvSzjp1223dsnH07z+rDN92eO7b/sBKff/t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RoO4RpOwHaDmHaToC' +
'2Q5i2E6DtEKbtBGg7hGk7AdoOYdpOgLZDmLYToO0Qpu0EaDuEaTsB' +
'2g5h2k6AtkOYthOg7RCm7QRoO4RpOwHaDmHaToC2Q5i2E6DtEKbtB' +
'Gg7hGk7AdoOYdpOgLZDmLYToO0Qpu0EaDuEaTsB2g5h/zAmOEf2VW' +
'2Hfvc+1s37miP7qrZDv3sf6+Z9zZF9VdsB6tF2gHq0HaAebQeoR9s' +
'B6tF2gHq0HaAebQeoR9sB6tF2gHq0HaAebQeoR9sB6tF2gHq0HaAe' +
'bQeoR9sB6tF2gHq0HaAebQeoR9sB6tF2gHq0HaAebQeoR9sB6tF2g' +
'Hq0HaAebQeoR9sB6tF2gHq0HaAebQeoR9sB6tF2gHq0HaAebQeoR9' +
'sB6tF2gHq0HaAebQeoR9sB6tF2gHq0HaAebQeoR9sB6tF2gHq0HaA' +
'ebQeoR9sB6tF2gHq0HaAebQeoR9sB6tF2gHq0HaAebQeoR9sB6tF2' +
'gHq0HaAebQeoR9sB6tF2gHq0HaAebQeoR9sB6tF2gHq0HaAebQeoR' +
'9sB6tF2gHrObbsxxpgHHG03xph6o+3GGFNvtN0YY+qNthtjTL3Z2n' +
'ZjjDHPNdpujDH1RtuNMabeaLsxxtSb/qv0xhhjjDHGGGOMMcYYY4z' +
'pmf8DM7Y+dQ==');
end;
{***** FreeVars *****
frees DTMs and BitMaps needed for the script.
}
procedure FreeVars;
begin
FreeDTM(lobsterDTM);
FreeDTM(teletabDTM);
FreeDTM(swordieDTM);
FreeDTM(sharkDTM);
FreeBitmap(proggy);
FreeBitmap(guiBackground);
closeFile(fileName);
end;
{***** WalkToCentre *****
This is called when out of combat for too long, it finds a group of 3+ npcs
on the mini map that are close together and walks to them.
}
function WalkToCentre: Boolean;
var
tmpTPA: TPointArray;
tmpCTS: Integer;
group: T2DPointArray;
tmpBox: TBox;
begin
Result := False;
tmpCTS := GetToleranceSpeed;
setColorToleranceSpeed(2);
setToleranceSpeed2Modifiers(0.00,0.12);
if FindColorsTolerance(tmpTPA, 126702, MMX1, MMY1, MMX2, MMY2, 7) then
begin
group := SplitTPAEx(tmpTPA, 12, 12);
SortATPAFromMidpoint(group, point(MSCX, MSCY));
tmpBox := getTPABounds(group[0]);
if countcolortolerance(126702, tmpBox.X1, tmpBox.Y1, tmpBox.X2, tmpBox.Y2, 7) > 29 then
begin
MMouse((tmpBox.X1 + tmpBox.X2) / 2, (tmpBox.Y1 + tmpBox.Y2) /2, 2, 2);
clickmouse2(true);
result := true;
end;
end;
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
end;
{***** ProduceProgressReport *****
Draws the progress report onto the screen with time running and xp/hr.
if breaking is on displays time until next break as well.
}
procedure ProduceProgressReport;
begin
MyDeBug(' producing proggy');
SMART_ClearCanvas;
SMART_DrawBitmap(false, proggy, Point(300, 345));
SMART_DrawTextEx(false, 365, 385, 'UpChars07', MyGetTimeRunning(GetTimeRunning - breakTime), 255);
SMART_DrawTextEx(false, 365, 405, 'UpChars07', IntToStr(xpPerHour), 255);
if playRange[1] > 0 then
begin
SMART_DrawTextEx(false, 314, 425, 'UpChars07', 'Break:', 16777215);
if nextBreak - GetTimeRunning < 0 then
begin
SMART_DrawTextEx(false, 365, 425, 'UpChars07', 'Now!', 255);
end else
begin
SMART_DrawTextEx(false, 365, 425, 'UpChars07', MyGetTimeRunning(nextBreak - GetTimeRunning), 255);
end;
end;
end;
{***** AreNoobsTalking *****
checks for blue text in the chat box. this indicates that somone is talking
so the script plays a beeping sound to warn you.
also checks for you nickname on the mainscreen. this could either be a random
as most say your name, or it could be another user saying your name. in either
case a fog horn sound is played to alert you to the potential danger!
}
function AreNoobsTalking: Boolean;
var
xc, yc, n: Integer;
gameText: String;
TPA: TPointArray;
ATPA: T2DPointArray;
textBox: TBox;
begin
FindNonInventoryRandoms;
MyDeBug('checking for nooblets .... ');
Result := False;
if FindColor(xc, yc, 16711680, 6, 345, 494, 457) then
begin
MyDeBug('Noobs be Talking!');
PlaySound('C:\Simba\noobsTalking.wav');
Result := True;
end;
if FindColorsTolerance(TPA, 65535, MSX1, MSY1, MSX2, MSY2, 0) then
begin
ATPA := SplitTPAEx(TPA, 10, 10);
for n := 0 to length(ATPA)-1 do
begin
textBox := GetTPABounds(TPA);
gameText := GetTextAtExWrap(textBox.x1, textBox.y1, textBox.x2, textBox.y2, 0, 6, 2, 65535, 10, 'UpChars07');
MyDeBug(gameText);
if (ExecRegExpr('.*'+Players[0].Nick+'.*', gameText)) then
begin
MyDeBug('Did someone say my name?!?!');
PlaySound('C:\Simba\whoSaidMyName.wav');
wait(1000);
end;
end;
end;
end;
{***** GetMeOutOfHere *****
this teleports away using the teletab in your inventory, waits for 10-13secs
to ensure you are out of combat, and then logs out.
}
procedure GetMeOutOfHere;
var
xc, yc: integer;
begin
MyDeBug('Im A Noob, GetMeOutOfHere!');
gametab(tab_inv);
if FindDTM(teletabDTM, xc, yc, MIX1, MIY1, MIX2, MIY2) then
begin
MyDeBug('found teletab!');
MMouse(xc, yc, 5, 5);
wait(randomrange(50,150));
ClickMouse2(True);
end;
FreeVars;
wait(randomrange(10500, 13500));
logout;
terminatescript;
end;
{***** AntiBan *****
called whenever in combat, a variety of different actions in order to prevent
a ban. includes a 'getCurrentXp' which updates xp/hr
}
procedure AntiBan;
var
retries, tmp: Integer;
begin
MyDeBug('youve entered, the AntiBan Zone!');
retries := 0;
case random(1000) of
0..6: begin
while(retries < 2) do
begin
tmp := currentXp;
currentXp := MyGetXp(True, cbSkill);
if currentXp > tmp then
begin
xpGained := currentXP - startXp;
xpPerHour := ((xpGained * 3600) / ((GetTimeRunning - breakTime) / 1000));
break;
end;
inc(retries);
end;
end;
7..10: begin
hoverskill(skill_hitpoints, false)
sleep(800+random(500))
end;
11..16: begin
MouseBox(MSX1, MSY1, MSX2, MSY2, 3)
sleep(800+random(500))
end;
17: begin
wait(2000+ random(8000))
end;
18: begin
adjustmousespeed(2, 10, 20)
sleep(800+random(500))
end;
19: begin
randomRClick;
sleep(800+random(500))
end;
20: begin
hovermovingobject;
sleep(800+random(500))
end;
21: begin
MMouseOffClient('top');
sleep(800+random(500))
end;
22: begin
MMouseOffClient('left');
sleep(800+random(500))
end;
23: begin
MMouseOffClient('right');
sleep(800+random(500))
end;
24: begin
MMouseOffClient('bottom');
sleep(800+random(500))
end;
end;
wait(200);
end;
{***** Eat *****
this method is called at the start of every MainLoop iteration. it obtains
your current hp and then depending of the value carries out the appropiate
action.
<10 GetMeOutOfHere
<30 eat some food
>=30 nothing
if there is no food left it will also call GetMeOutOfHere
}
procedure Eat;
var
hitpoints, xc, yc: Integer;
begin
gametab(tab_stats);
MyDeBug('Started eat');
while hitpoints < 1 do
begin
gametab(tab_stats);
MyDeBug('hitpoints <1 ... re-acquiring ...');
hitpoints:= getskillinfo('hp', True);
end;
if hitpoints < 10 then
begin
MyDeBug('hp <10 getting out!');
GetMeOutOfHere;
end;
if hitpoints < 30 then
begin
MyDeBug('hp below 30, time to eat');
gametab(tab_inv);
FindNormalRandoms;
if FindDTM(foodType, xc, yc, MIX1, MIY1, MIX2, MIY2) then
begin
MyDeBug('found food so about to eat it!');
MMouse(xc, yc+5, 2, 2);
wait(randomrange(50,150));
ClickMouse2(True);
wait(randomrange(400,800));
end else
begin
MyDeBug('no food! runnnnn');
GetMeOutOfHere;
end;
gametab(tab_stats);
end;
end;
{***** FindMonster *****
This procedure looks for the first color of the selected monster on the
mainscreen, it then creates a TPA at this location and searches within that
TPA for the second color of the monster. if it is found then that location is
added to the monstersATPA.
if a second monster has been selected it is also searched for.
}
procedure FindMonster;
var
tmpCTS, k, len, i: Integer;
monsterTPA: TPointArray;
tmp1ATPA, tmp2ATPA, transfer: T2DPointArray;
tmpBox: TBox;
centre:TPoint;
begin
MyDeBug('Started FindMonster');
setlength(monsterATPA,0);
tmpCTS := GetToleranceSpeed;
setColorToleranceSpeed(2);
setToleranceSpeed2Modifiers(StrToFloat(monsters[monsterPrimary][2]), StrToFloat(monsters[monsterPrimary][3]));
if FindColorsTolerance(monsterTPA, StrToInt(monsters[monsterPrimary][4]), MSX1, MSY1, MSX2, MSY2, StrToInt(monsters[monsterPrimary][5])) then
begin
tmp1ATPA := SplitTPAEx(monsterTPA, 3, 3);
for k := 0 to length(tmp1ATPA)-1 do
begin
tmpBox := GetTPABounds(tmp1ATPA[k]);
setToleranceSpeed2Modifiers(StrToFloat(monsters[monsterPrimary][6]), StrToFloat(monsters[monsterPrimary][7]));
if FindColorsTolerance(monsterTPA, StrToInt(monsters[monsterPrimary][8]), tmpBox.X1, tmpBox.Y1, tmpBox.X2, tmpBox.Y2, StrToInt(monsters[monsterPrimary][9])) then
begin
len := length(monsterATPA);
transfer := CopyATPA(monsterATPA);
setLength(monsterATPA, len+1);
for i := 0 to len-1 do
begin
monsterATPA[i] := transfer[i];
end;
monsterATPA[len] := tmp1ATPA[k];
end;
end;
end;
if (monsterSecondary > -1) then
begin
setToleranceSpeed2Modifiers(StrToFloat(monsters[monsterSecondary][2]), StrToFloat(monsters[monsterSecondary][3]));
if (FindColorsTolerance(monsterTPA, StrToInt(monsters[monsterSecondary][4]), MSX1, MSY1, MSX2, MSY2, StrToInt(monsters[monsterSecondary][5]))) then
begin
tmp2ATPA := SplitTPAEx(monsterTPA, 3, 3);
for k := 0 to length(tmp2ATPA)-1 do
begin
tmpBox := GetTPABounds(tmp2ATPA[k]);
setToleranceSpeed2Modifiers(StrToFloat(monsters[monsterSecondary][6]), StrToFloat(monsters[monsterSecondary][7]));
if FindColorsTolerance(monsterTPA, StrToInt(monsters[monsterSecondary][8]), tmpBox.X1, tmpBox.Y1, tmpBox.X2, tmpBox.Y2, StrToInt(monsters[monsterSecondary][9])) then
begin
len := length(monsterATPA);
transfer := CopyATPA(monsterATPA);
setLength(monsterATPA, len+1);
for i := 0 to len-1 do
begin
monsterATPA[i] := transfer[i];
end;
monsterATPA[len] := tmp2ATPA[k];
end;
end;
end;
end;
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
centre := Point((MSX1 + MSX2) / 2, (MSY1 + MSY2) / 2);
monsterTPA := MergeATPA(monsterATPA);
monsterATPA := SplitTPAEx(monsterTPA, 25, 25);
SortATPAFromMidPoint(monsterATPA, centre);
end;
{***** AttackMonster *****
calls FindMonster and then moves through each index, if there is a hp just
above the monster location, then it is in combat and not attacked, otherwise
the mouse is moved to the centre of the location and the uptext is checked
for the monsters upText
}
procedure AttackMonster;
var
bounds: TBox;
i, cx, cy: Integer;
theUpText: String;
begin
MyDeBug('started AttackMonster');
i := 0;
FindMonster;
while (i < length(monsterATPA)) do
begin
bounds := getTPABounds(monsterATPA[i]);
if(bounds.Y1 > 10) then
begin
if(FindColor(cx, cy, 255, bounds.X1, bounds.y1-10, bounds.X2, bounds.Y1 + 30)) then
begin
MyDeBug('that monster in combat');
AreNoobsTalking;
wait(randomrange(200,500));
inc(i);
continue;
end else
begin
MMouse((bounds.X1 +bounds.X2) /2, (bounds.Y1 +bounds.Y2) / 2, 5, 5);
theUpText := GetTextAtExWrap(55, 2, 94, 21, 0, 6, 2, 122074, 40, 'UpChars07');
MyDeBug('up text over monster is: ' + theUpText);
if (ExecRegExpr('.*'+monsters[monsterPrimary][1]+'.*', theUpText)) then
begin
clickmouse2(true);
MyDeBug('just clicked a monster');
wait(randomrange(2000, 6000));
AreNoobsTalking;
break;
end;
end;
end;
inc(i);
end;
wait(randomrange(1000, 3000));
end;
{***** FindNPC *****
this is called by InCombat in order to get the location of the closest NPC
and also an accurate location for the character by converting its MiniMap
location into a mainscreen one.
}
procedure FindNpc;
var
tmpTPA: TPointArray;
tmpCTS: Integer;
tmpTP: TPoint;
begin
MyDeBug('Started FindNpc.');
tmpCTS := GetToleranceSpeed;
setColorToleranceSpeed(2);
setToleranceSpeed2Modifiers(0.00,0.00);
if FindColorsTolerance(tmpTPA, 16777215, MMX1, MMY1, MMX2, MMY2, 5) then
begin
MyDeBug('player(s) found on MM');
playersMM := SplitTPAEx(tmpTPA, 1, 1);
tmpTP := Point((MMX1 + MMX2) / 2, (MMY1 + MMY2) / 2);
SortATPAFromMidPoint(playersMM, tmpTP);
player := MMtoMS(MiddleBox(GetTPABounds(playersMM[0])));
if (player.x > 60) and (player.y > 60) then
begin
MyDeBug('player is on screen, drawing box');
playerBox := IntToBox(player.x-60, player.y-60, player.x+60, player.y+60);
end;
end;
setToleranceSpeed2Modifiers(0.00,0.12);
if FindColorsTolerance(tmpTPA, 126702, MMX1, MMY1, MMX2, MMY2, 7) then
begin
MyDeBug('found NPC(s) on MM ...');
npcs := SplitTPAEx(tmpTPA, 1, 1);
SortATPAFromMidPoint(npcs, MiddleBox(GetTPABounds(playersMM[0])));
closestNpc := MMtoMS(MiddleBox(GetTPABounds(npcs[0])));
if (closestNpc.x > 60) and (closestNpc.y > 60) then
begin
MyDeBug('NPC on MS so can draw box');
killBox := IntToBox(closestNpc.x-60, closestNpc.y-60, closestNpc.x+60, closestNpc.y+60);
end;
end;
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
end;
{***** InCombat *****
using the location of the closest NPC and the character, it searches for hp bars
in their locations. doing this means that as soon as a monster is killed, the
character is seenas out of combat instead of having to wait for the characters
hp bar to disappear.
}
function InCombat: Boolean;
var
tmpTPA: TPointArray;
healthBars, tmpATPA: T2DPointArray;
tmpBox, tmp2Box: TBox;
begin
MyDeBug('started InCombat');
FindNpc;
Result := false;
setLength(tmpATPA, 2);
tmpATPA[0] := TPAFromBox(killBox);
tmpATPA[1] := TPAFromBox(playerBox);
tmpTPA := MergeATPA(tmpATPA);
tmpBox := GetTPABounds(tmpTPA);
if(FindColors(tmpTPA, 65280, tmpBox.X1, tmpBox.Y1, tmpBox.X2, tmpBox.Y2)) then
begin
MyDeBug('found green of hpBar');
tmpATPA[0] := tmpTPA;
if(FindColors(tmpTPA, 255, tmpBox.X1, tmpBox.Y1, tmpBox.X2, tmpBox.Y2)) then
begin
MyDeBug('found red');
tmpATPA[1] := tmpTPA;
tmpTPA := MergeATPA(tmpATPA);
healthBars := SplitTPAEx(tmpTPA, 1, 1);
end;
end;
if (length(healthBars) = 2) then
begin
tmpBox := GetTPABounds(healthBars[0]);
if ((CountColor(65280, tmpBox.X1 , tmpBox.Y1, tmpBox.X2, tmpBox.Y2) + CountColor(255, tmpBox.X1 , tmpBox.Y1, tmpBox.X2, tmpBox.Y2)) > 120) then
begin
tmpBox := GetTPABounds(healthBars[1]);
if ((CountColor(65280, tmpBox.X1 , tmpBox.Y1, tmpBox.X2, tmpBox.Y2) + CountColor(255, tmpBox.X1 , tmpBox.Y1, tmpBox.X2, tmpBox.Y2)) > 120) then
begin
Result := true;
end;
end;
end;
end;
{***** MainLoop *****
this is continually called over and over.
it calls some methods to start to check characters safety/update proggy.
then it establishes whether in combat or not and dependant upon the result,
carries out the required methods.
if out of combat for a certain amount of time, this methd calls WalkToCentre
then moves compass and eventually if out of combat for too long, it will
logout and terminate the script.
}
procedure MainLoop;
begin
MyDeBug('started mainloop');
Eat;
AreNoobsTalking;
FindNonInventoryRandoms;
ProduceProgressReport;
if(InCombat) then
begin
MyDeBug('In Combat');
Eat;
AntiBan;
numberOfLoops := 0;
lastTimeCombat := True;
away := True;
end else
begin
MyDeBug('not in combat');
if lastTimeCombat then
begin
lastTimeCombat := False;
timer1 := GetTimeRunning/1000;
end else
begin
timer2 := (GetTimeRunning/1000) - timer1;
if (away) then
begin
if (timer2 > 10) then
begin
MyDeBug('timer > 10, walk back to centre');
WalkToCentre;
away := False;
timer1 := GetTimeRunning/1000;
end;
end else if timer2 > 10 then
begin
MyDeBug('time to move compass');
CompassMovement(90, 180, false);
timer1 := GetTimeRunning/1000;
inc(numberOfLoops);
end;
if numberOfLoops >= 6 then
begin
MyDeBug('too long out of combat, ending!');
Logout;
TerminateScript;
end;
end;
AttackMonster;
end;
end;
{***** BreakLoop *****
this is called once it is time to break. it continually checks if incombat
and eats whilst it is. once out it waits for 13secs, checks for combat again
and if out, then logs out.
the wait is needed as you cannot log out of combat for 10secs after battle.
if after the 13secs you are back in combat, it checks and eats again until out.
once logged out, the time of the break and the time remains are displayed on
the mainscreen.
}
procedure BreakLoop(length: Integer);
var
timeLeft: integer;
begin
timeLeft := length;
MyDebug('starting break for: ' + inttostr(timeLeft));
while(Incombat) do
begin
while(Incombat) do
begin
eat;
ProduceProgressReport;
wait(500);
end;
wait(13000);
end;
Logout;
SMART_DrawTextEx(false, 50, 50, 'UpChars07', 'Breaking For:', 62207);
SMART_DrawTextEx(false, 50, 75, 'UpChars07', MyGetTimeRunning(timeLeft), 62207);
SMART_DrawTextEx(false, 50, 125, 'UpChars07', 'Break Time Left:', 62207);
while (timeLeft > 0) do
begin
SMART_ClearCanvasArea(IntToBox(45,145,250,175));
SMART_DrawTextEx(false, 50, 150, 'UpChars07', MyGetTimeRunning(timeLeft) , 62207);
timeLeft := timeLeft - 1000;
wait(1000);
end;
breakTime := breakTime + length;
end;
begin
ClearDebug;
loadVars;
AddOnTerminate('FreeVars');
readMonsterProfiles;
SafeInitForm;
SafeShowFormModal;
if Start then
begin
writeln('Script started!');
end else
begin
writeln('script canceled');
terminatescript;
end;
SetupSmartClient;
SetUpCharacter;
nextBreak := GetTimeRunning + RandomRange(playRange[0], playRange[1]);
breakLength := RandomRange(breakRange[0], breakRange[1]);
repeat
if (nextbreak < GetTimeRunning) and (playRange[1] > 0) then
begin
MyDebug('starting to break');
breakLoop(breakLength);
nextBreak := GetTimeRunning + RandomRange(playRange[0], playRange[1]);
breakLength := RandomRange(breakRange[0], breakRange[1]);
end;
if not LoggedIn then
begin
if attempts >3 then
begin
terminatescript;
end;
LogInPlayer;
inc(attempts);
end;
attempts := 0;
MainLoop;
until(false)
end.