markuska815
2008-06-05 01:20:44
<!– BEGIN TEMPLATE: formanswers –>
markuska815 - SRL Member Application Form
markuska815
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Java, a little BASIC
Other Communitys
None related to Runescape or Scar
How Long have You Played Runescape
3ish yrs on and off
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Hello,
My name is markuska815 (mark for short, its my real name anyways haha). I got into SRL over a year ago through moparscape's website (I noticed the scar scripts on there) and ever since then I have been basically addicted to scripting and the community. Although I do not have an enormous post count or any badges or what have you, I think you'll notice I dont not spam and in general try to make useful posts, of which I am either trying to better myself as a scripter, or which help the community. If you look into previous scripts I have written, I think it is fairly obvious how I have advanced as a scripter. Therefore, I am finally proud to present you my SRL Members Application with my own SVC Script, of which I have been working on for quite sometime.
I believe my script shows that I am a well qualified scripter. It shows I have great knowlege in TPAs, Cases, DTMs, DDTMs, Bitmaps, For loops, Variables, Functions and Procedures, The SRL library, The SCAR library, and much more. I think the things that you may consider voting no for, the lack of multiplayer and the fact that the script is not completely finished, are well made up for with everything else. As I said its not completely finished… However it is fully functionable for maples and will compile. As for the multiplayer, I felt it was unneccesary as this is a members script. However, I have implemented ways to add multiplayer easily.
As far as experience other that SCAR, I just completed an AP Java course at my school (AP results are pending :P). I also wrote a hefty conics program on my calculator (TI 83). I just like to code. I enjoy it and think I am fairly decent at it now, which is why I would like to become an SRL member.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
——————————————————
<!– END TEMPLATE: formanswers –>
markuska815 - SRL Member Application Form
markuska815
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Java, a little BASIC
Other Communitys
None related to Runescape or Scar
How Long have You Played Runescape
3ish yrs on and off
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Hello,
My name is markuska815 (mark for short, its my real name anyways haha). I got into SRL over a year ago through moparscape's website (I noticed the scar scripts on there) and ever since then I have been basically addicted to scripting and the community. Although I do not have an enormous post count or any badges or what have you, I think you'll notice I dont not spam and in general try to make useful posts, of which I am either trying to better myself as a scripter, or which help the community. If you look into previous scripts I have written, I think it is fairly obvious how I have advanced as a scripter. Therefore, I am finally proud to present you my SRL Members Application with my own SVC Script, of which I have been working on for quite sometime.
I believe my script shows that I am a well qualified scripter. It shows I have great knowlege in TPAs, Cases, DTMs, DDTMs, Bitmaps, For loops, Variables, Functions and Procedures, The SRL library, The SCAR library, and much more. I think the things that you may consider voting no for, the lack of multiplayer and the fact that the script is not completely finished, are well made up for with everything else. As I said its not completely finished… However it is fully functionable for maples and will compile. As for the multiplayer, I felt it was unneccesary as this is a members script. However, I have implemented ways to add multiplayer easily.
As far as experience other that SCAR, I just completed an AP Java course at my school (AP results are pending :P). I also wrote a hefty conics program on my calculator (TI 83). I just like to code. I enjoy it and think I am fairly decent at it now, which is why I would like to become an SRL member.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
////////////////////////////////////////////////////////////////////////////////
// //
// NAME : Seer's Village Chopper - S.V.C. //
// WRITER : Markuska815 //
// CATEGORY : Woodcutting //
// DESCRIPTION : Chops any type of tree in Seer's Village //
// USAGE : Start at Seers bank. //
// AUTOCOLOR : Yes //
// NOTES : Version = 0.53 //
// SCAR VERSION : 3.15 //
// SRL VERSION : 4 Rev #16 //
// //
//----------------------------- Instructions! --------------------------------//
// //
// 1. Start the script. Don't press anything until the form is loaded. //
// 2. Log in. Click to play. //
// 3. Position your character at Seer's bank, with your axe weilded (or //
// in the first slot of your inventory. //
// 4. Fill out the form and press start. //
// //
//-------------------------------- Thanks! -----------------------------------//
// //
// JAD - Inspiration and help //
// Neilse95 - Help with some functions //
// SRL Devs - SRL //
// Starblaster100 + Stupid3ooo - FindBitmapsProgressiveTol //
// PriSoner - DropUnwanted DTMs + Procedure //
// //
////////////////////////////////////////////////////////////////////////////////
program SVC;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.include srl/srl/misc/path.scar}
{.include srl/srl/skill/Woodcutting.scar}
////////////////////////////////////////////////////////////////////////////////
//---> Form Stuff
////////////////////////////////////////////////////////////////////////////////
var
frmDesign : TForm;
PickYourTree : TGroupBox;
TreeList : TComboBox;
SetupYourChar : TGroupBox;
NickLabel : TLabel;
PinLabel : TLabel;
Name : TEdit;
Password : TEdit;
Pin : TEdit;
Nickname : TEdit;
Options : TGroupBox;
LoadsLabel : TLabel;
LoadstoDo : TEdit;
HighestTree : TCheckBox;
AxeWielded : TCheckBox;
RunToTree : TCheckBox;
TeleBack : TCheckBox;
StartButton : TButton;
CancelButton : TButton;
procedure StartScript(sender: TObject);
begin
WriteLn('Let''s Start Chopping.');
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;
end;
procedure CancelScript(sender: TObject);
begin
WriteLn('Script Has Been Canceled.');
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;
TerminateScript;
end;
procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 394;
frmDesign.Height := 348;
frmDesign.Caption := 'Seer'#39's Village Cutter Setup';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
PickYourTree := TGroupBox.Create(frmDesign);
PickYourTree.Parent := frmDesign;
PickYourTree.Left := 19;
PickYourTree.Top := 19;
PickYourTree.Width := 91;
PickYourTree.Height := 93;
PickYourTree.Caption := 'Pick Your Tree ';
PickYourTree.Color := clSilver;
PickYourTree.Ctl3D := True;
PickYourTree.ParentColor := False;
PickYourTree.ParentCtl3D := False;
PickYourTree.TabOrder := 0;
TreeList := TComboBox.Create(PickYourTree);
TreeList.Parent := PickYourTree;
TreeList.Left := 10;
TreeList.Top := 25;
TreeList.Width := 73;
TreeList.Height := 49;
TreeList.ItemHeight := 13;
TreeList.TabOrder := 8;
TreeList.Items.Add('Regular');
TreeList.Items.Add('Oak');
TreeList.Items.Add('Willow');
TreeList.Items.Add('Maple');
TreeList.Items.Add('Yew');
TreeList.Items.Add('Magic');
TreeList.Text := LoadSetting('FormSaver','Tree');
if (TreeList.Text = '') then
TreeList.Text := 'Pick It';
SetupYourChar := TGroupBox.Create(frmDesign);
SetupYourChar.Parent := frmDesign;
SetupYourChar.Left := 123;
SetupYourChar.Top := 19;
SetupYourChar.Width := 244;
SetupYourChar.Height := 93;
SetupYourChar.Caption := 'Setup Your Character';
SetupYourChar.TabOrder := 1;
NickLabel := TLabel.Create(SetupYourChar);
NickLabel.Parent := SetupYourChar;
NickLabel.Left := 125;
NickLabel.Top := 44;
NickLabel.Width := 110;
NickLabel.Height := 13;
NickLabel.Caption := '3-4 letters of your name';
PinLabel := TLabel.Create(SetupYourChar);
PinLabel.Parent := SetupYourChar;
PinLabel.Left := 125;
PinLabel.Top := 68;
PinLabel.Width := 81;
PinLabel.Height := 13;
PinLabel.Caption := 'Enter 0 for no pin';
Name := TEdit.Create(SetupYourChar);
Name.Parent := SetupYourChar;
Name.Left := 8;
Name.Top := 17;
Name.Width := 110;
Name.Height := 21;
Name.TabOrder := 0;
Name.Text := LoadSetting('FormSaver','Name');
if (Name.Text = '') then
Name.Text := 'Username';
Password := TEdit.Create(SetupYourChar);
Password.Parent := SetupYourChar;
Password.Left := 124;
Password.Top := 17;
Password.Width := 110;
Password.Height := 21;
Password.TabOrder := 1;
Password.Text := LoadSetting('FormSaver','Pass');
if (Password.Text = '') then
Password.Text := 'Password';
Pin := TEdit.Create(SetupYourChar);
Pin.Parent := SetupYourChar;
Pin.Left := 8;
Pin.Top := 65;
Pin.Width := 110;
Pin.Height := 21;
Pin.TabOrder := 2;
Pin.Text := LoadSetting('FormSaver','Pin');
if (Pin.Text = '') then
Pin.Text := 'Pin';
Nickname := TEdit.Create(SetupYourChar);
Nickname.Parent := SetupYourChar;
Nickname.Left := 8;
Nickname.Top := 41;
Nickname.Width := 110;
Nickname.Height := 21;
Nickname.TabOrder := 3;
Nickname.Text := LoadSetting('FormSaver','Nick');
if (Nickname.Text = '') then
Nickname.Text := 'Nickname';
Options := TGroupBox.Create(frmDesign);
Options.Parent := frmDesign;
Options.Left := 19;
Options.Top := 120;
Options.Width := 348;
Options.Height := 136;
Options.Caption := 'Options';
Options.TabOrder := 2;
LoadsLabel := TLabel.Create(Options);
LoadsLabel.Parent := Options;
LoadsLabel.Left := 10;
LoadsLabel.Top := 20;
LoadsLabel.Width := 107;
LoadsLabel.Height := 13;
LoadsLabel.Caption := 'Number of loads to do:';
LoadstoDo := TEdit.Create(Options);
LoadstoDo.Parent := Options;
LoadstoDo.Left := 125;
LoadstoDo.Top := 18;
LoadstoDo.Width := 50;
LoadstoDo.Height := 21;
LoadstoDo.ParentShowHint := False;
LoadstoDo.ShowHint := False;
LoadstoDo.TabOrder := 0;
LoadstoDo.Text := LoadSetting('FormSaver','Loads');
if (LoadstoDo.Text = '') then
LoadstoDo.Text := '5';
HighestTree := TCheckBox.Create(Options);
HighestTree.Parent := Options;
HighestTree.Left := 10;
HighestTree.Top := 40;
HighestTree.Width := 267;
HighestTree.Height := 17;
HighestTree.Caption := 'Check to cut the highest possble tree you can.';
HighestTree.TabOrder := 1;
AxeWielded := TCheckBox.Create(Options);
AxeWielded.Parent := Options;
AxeWielded.Left := 10;
AxeWielded.Top := 62;
AxeWielded.Width := 331;
AxeWielded.Height := 17;
AxeWielded.Caption := 'Check if the axe is wielded. (Script works better when wielded)';
AxeWielded.Checked := True;
AxeWielded.TabOrder := 2;
RunToTree := TCheckBox.Create(Options);
RunToTree.Parent := Options;
RunToTree.Left := 10;
RunToTree.Top := 84;
RunToTree.Width := 264;
RunToTree.Height := 17;
RunToTree.Caption := 'Check to run to the tree you are cutting.';
RunToTree.Checked := True;
RunToTree.TabOrder := 3;
TeleBack := TCheckBox.Create(Options);
TeleBack.Parent := Options;
TeleBack.Left := 10;
TeleBack.Top := 106;
TeleBack.Width := 292;
TeleBack.Height := 17;
TeleBack.Caption := 'Check to attempt to tele back to seer'#39's.';
TeleBack.Checked := True;
TeleBack.TabOrder := 4;
StartButton := TButton.Create(frmDesign);
StartButton.Parent := frmDesign;
StartButton.OnClick := @StartScript;
StartButton.Left := 98;
StartButton.Top := 270;
StartButton.Width := 75;
StartButton.Height := 25;
StartButton.Caption := 'Start';
StartButton.TabOrder := 3;
CancelButton := TButton.Create(frmDesign);
CancelButton.Parent := frmDesign;
CancelButton.OnClick := @CancelScript;
CancelButton.Left := 191;
CancelButton.Top := 270;
CancelButton.Width := 75;
CancelButton.Height := 25;
CancelButton.Caption := 'Cancel';
CancelButton.TabOrder := 4;
end;
procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
////////////////////////////////////////////////////////////////////////////////
//---> Variables (Don't Touch)
////////////////////////////////////////////////////////////////////////////////
type
TreeProfile = record
Color : array[0..2] of integer;
SpLogsCut : integer;
TreeText : string;
DTMs : array of integer;
end;
var
BankGlassArray : array[0..3] of integer;
LevelsGained, Loads, BankDTM1, BankDTM2, AxeDTM, x, y, BankGlass,
LogsBanked, LogsCut, LogsCutCurrent, ChatFreq, LogDTM, CurrentTree,
Unfilled : integer;
Dead, GoodAxe : boolean;
Tree : array [0..5] of TreeProfile;
Filled : array[0..2] of integer;
TreePt : TPoint;
////////////////////////////////////////////////////////////////////////////////
//---> FormSave
////////////////////////////////////////////////////////////////////////////////
procedure FormSave;
begin
SaveSetting('FormSaver', 'Name', Name.Text);
SaveSetting('FormSaver', 'Pass', Password.Text);
SaveSetting('FormSaver', 'Nick', Nickname.Text);
SaveSetting('FormSaver', 'Tree', TreeList.Text);
SaveSetting('FormSaver', 'Loads', LoadstoDo.Text);
SaveSetting('FormSaver', 'Pin', Pin.Text);
end;
////////////////////////////////////////////////////////////////////////////////
//---> Declare Players (My Logic: Members = 1 Player)
////////////////////////////////////////////////////////////////////////////////
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Number of PLAYERS.
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //Player to start on.
Players[0].Name := Name.Text;
Players[0].Pass := Password.Text;
Players[0].Nick := Nickname.Text;
case HighestTree.State of //Cut highest tree possible?
cbUnchecked : Players[0].Booleans[0] := False;
cbChecked : Players[0].Booleans[0] := True;
end;
case AxeWielded.State of
cbUnchecked : Players[0].Booleans[1] := False; //Is the axe wielded?
cbChecked : Players[0].Booleans[1] := True;
end;
case TeleBack.State of
cbUnchecked : Players[0].Booleans[2] := False; //Teleback to seers?
cbChecked : Players[0].Booleans[2] := True;
end;
case RunToTree.State of
cbUnchecked : Players[0].Booleans[3] := False;
cbChecked : Players[0].Booleans[3] := True;
end;
case TreeList.Text of
'Regular' : Players[0].Integers[0] := 0; //Which tree
'Oak' : Players[0].Integers[0] := 1;
'Willow' : Players[0].Integers[0] := 2;
'Maple' : Players[0].Integers[0] := 3;
'Yew' : Players[0].Integers[0] := 4;
'Magic' : Players[0].Integers[0] := 5;
end;
CurrentTree := Players[0].Integers[0];
Players[0].Strings[0] := Pin.Text; //Bank pin if any; leave 0000 for none
Players[0].Integers[1] := StrtoInt(LoadstoDo.Text); //How many loads to do before switching players?
Players[0].Active := True;
Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Nick, UpChars);
end;
procedure FormDPTest;
begin
WriteLn('Name : ' + Players[CurrentPlayer].Name);
WriteLn('Pass : ' + Players[CurrentPlayer].Pass);
WriteLn('Nick : ' + Players[CurrentPlayer].Nick);
WriteLn('Pin : ' + Players[CurrentPlayer].Strings[0]);
WriteLn('Tree : ' + InttoStr(CurrentTree));
WriteLn('Loads to Do : ' + InttoStr(Players[CurrentPlayer].Integers[1]));
WriteLn('Highest Tree : ' + BooltoStr(Players[CurrentPlayer].Booleans[0]));
WriteLn('Axe Wielded : ' + BooltoStr(Players[CurrentPlayer].Booleans[1]));
WriteLn('Tele Back : ' + BooltoStr(Players[CurrentPlayer].Booleans[2]));
WriteLn('Run : ' + BooltoStr(Players[CurrentPlayer].Booleans[3]));
end;
////////////////////////////////////////////////////////////////////////////////
//---> Loads Tree Colors, Text, DTMs, Bmps
////////////////////////////////////////////////////////////////////////////////
procedure LoadStuff(TreeNumber: integer);
begin
case TreeNumber of
0 : Players[CurrentPlayer].Integers[2] := BitmapFromString(6, 6, 'beNpLsFzfHwhE5aGyrWm2' + //Regular
'QNScYgPhAhlA1JBkBUTV4bLFgbIQNhBFu2kBubUJlml+enCU4yOV6' +
'SlVHGEKQQVhJhBdBX5SQJUgBABonCVh');
1 : Players[CurrentPlayer].Integers[2] := BitmapFromString(6, 6, 'beNrLsl/eHgdEzYl6U4qcgWhi' + //Oak
'gTOEC2QAUV+eExC1JhvUROsAGd05DkCU5qcH5AIZxRGmQFQQZgJEp' +
'WFa2X5qDUlWcATRBRTvyLIHIQA32Slh');
2 : Players[CurrentPlayer].Integers[2] := BitmapFromString(6, 6, 'beNrzki1MtweicD95OELjA' + //Willow
'lF2kk2IlywE2ZiKAhGQ4WQlgYxiw0y9nKWQEVBXSowlXGMIAP5kGy' +
'g=');
3 : Players[CurrentPlayer].Integers[2] := BitmapFromString(6, 6, 'beNrz5O1JNwKizlSDAh9eCE' + //Maple
'LjQkSaE/VyPXkhyMeEE8INs+KEo5ponaIQjRRnTghKcOCE6AKKQzU' +
'CALoZHpo=');
4 : Players[CurrentPlayer].Integers[2] := BitmapFromString(6, 6, 'beNrz4GzNtQ004kzwQCAg10eP' + //Yew
'M9oZipwMGCBcD1MkpAVCgbZICKwLWSPQZAiCmg8A2jIXjA==');
5 : Players[CurrentPlayer].Integers[2] := BitmapFromString(6, 6, 'beNqr8NRaNVdj4VS12f1Te1' + //Magic
'J/f98PJCEiBWkmxZmmlQWuQARkALlABOHCRSDsslznkmyn1tooIII' +
'rACIgt77UozDdHkgCURMAC78tag==');
end;
Tree[0].Color[0] := 3631199; //Regular
Tree[0].Color[1] := 1720889;
Tree[0].Color[2] := 3499099;
Tree[0].TreeText := 'ree';
Tree[1].Color[0] := 3631199; //Oak
Tree[1].Color[1] := 1720889;
Tree[1].Color[2] := 3499099;
Tree[1].TreeText := 'ak';
SetArrayLength(Tree[1].DTMs, 3);
Tree[2].Color[0] := 6334616; //Willow
Tree[2].Color[1] := 4214856;
Tree[2].Color[2] := 7831680;
Tree[2].TreeText := 'illow';
Tree[3].Color[0] := 10336; //Maple
Tree[3].Color[1] := 20608;
Tree[3].Color[2] := 8272;
Tree[3].TreeText := 'aple';
SetArrayLength(Tree[3].DTMs, 1);
Tree[4].Color[0] := 000000; //Yew
Tree[4].Color[1] := 000000;
Tree[4].Color[2] := 000000;
Tree[4].TreeText := 'ew';
Tree[5].Color[0] := 000000; //Magic
Tree[5].Color[1] := 000000;
Tree[5].Color[2] := 000000;
Tree[5].TreeText := 'agic';
BankDTM1 := DTMFromString('78DA63CC6660600865C000FF8198114403016' +
'32E90E105116786CAFFF9C304A619A17CC63420E147404D2511E6' +
'C411A18618F71412A1268AB09B01558B18A7');
{BankDTM2 := DTMFromString('78DA633CC2C2C070890103FC076246100D048' +
'CF7806AEE43C499A1F2EF5FBF649084AA0101B09AFD04D46C03AA' +
'394C8439E78830E72A84CD82430D0032D81D1C');}
AxeDTM := DTMFromString('78DA63E4626060E063C000FF8198114403012' +
'33790C182AE82118904D212408295801A905DC204D480EC91C2AF' +
'060019140589');
LogDTM := DTMFromString('78DA63B4646060E067C000FF819811440301A' +
'30590C18EAE82118904D2BA40828F801A7D202141408D1D116A9C' +
'8004377E3500667406B9');
end;
////////////////////////////////////////////////////////////////////////////////
//---> Find Dead Procedure (From JAD's VL)
////////////////////////////////////////////////////////////////////////////////
function MyFindDead: Boolean; //SRL's FindDead but modified for death tele
begin //Taken from JAD; Thanks JAD
Result := False;
if (GetColor(30, 418) = 0) and (GetColor(72, 429) = 0) then
begin
Deaths := Deaths + 1;
Result := True;
SaveToChatLog;
end;
end;
////////////////////////////////////////////////////////////////////////////////
//---> Autoresponder
////////////////////////////////////////////////////////////////////////////////
function AutoResponder:boolean;
begin
{
if (FindChatText('oodcutting')) or (FindChatText('wc')) and
(FindChatText('lvl')) or (FindChatText('level')) and
(not(FindChatText('do not'))) then
begin
SendText2(InttoStr(GetSkillLevel('woodcutting')));
Talks := Talks + 1;
GameTab(4);
Result := true;
end;
if (FindChatText('macro')) or (FindChatText('bot')) or (FindChatText('autoer'))then
begin
SendText2('No I''m not. Be quiet noob');
Talks := Talks + 1;
Result := true;
end;
}
end;
////////////////////////////////////////////////////////////////////////////////
//---> GameTabFKey(Tabnumber:integer;); - Swithches tabs using the F Keys - Doesn't work with SMART
////////////////////////////////////////////////////////////////////////////////
function GameTabFKey(tabnumber: Integer): Boolean;
begin
if GetCurrentTab = tabnumber then // This first bit is borrowed from gametab
begin // in SRL's directory
Result := True;
Exit;
end;
if not TabExists(tabnumber) then
begin
Result := False;
Exit;
end;
case tabnumber of
1: SendKeysVB('{F1}',false); //Combat
2: SendKeysVB('{F2}',false); //Stats
3: SendKeysVB('{F3}',false); //Quest
4: SendKeysVB('{ESC}',false); //Inventory
5: SendKeysVB('{F4}',false); //Equipment
6: SendKeysVB('{F5}',false); //Prayer
7: SendKeysVB('{F6}',false); //Mage
8: SendKeysVB('{F8}',false); //Friends
9: SendKeysVB('{F9}',false); //Ignore
10: SendKeysVB('{F10}',false); //Options
11: SendKeysVB('{F11}',false); //Emotes
12: SendKeysVB('{F12}',false); //Music
end;
Result := True;
Wait(100+random(100));
end;
////////////////////////////////////////////////////////////////////////////////
//---> RandomChat - Says random things
////////////////////////////////////////////////////////////////////////////////
procedure RandomChat;
begin
ChatFreq := random(50);
case ChatFreq of
0: TypeSend(IntToStr(XpTillNextLevel('woodcutting')) + 'xp to go');
1: TypeSend('Woodcutting goes sooo slow..');
2: TypeSend('Woodcutting levels?');
3: TypeSend('Almost at a wc level!! Finally..');
4: TypeSend('wc lvls?');
5: TypeSend('wc levels?');
6: TypeSend('I''ve been chopping for suhc a longgggggg time.');
7: TypeSend('I have to get' + InttoStr(XpTillNextLevel('woodcutting'))
+ 'xp to lvl up');
8: TypeSend('I want a birds nest.');
9: TypeSend('I want to get 99 wc');
10: TypeSend('I''m sooooo bored');
end;
if(ChatFreq < 11)then
Inc(Talks);
end;
////////////////////////////////////////////////////////////////////////////////
//---> NoBansForMe - Says and Does random things
// <--- add into form the amount of anti ban
////////////////////////////////////////////////////////////////////////////////
procedure NoBansForMe;
begin
Status('Performing Antiban...');
case random(60) of
0: begin
GameTab(1 + Random(12));
wait(2000+random(1000));
GameTab(4);
end;
1: MouseBox(MCX1,MCY2,MCX2,MCY2,3);
2: RandomRClick;
3: PickUpMouse;
4: HoverSkill('random',false);
5: MouseBox(10+random(100),10+random(50),110+random(100),60+random(100),3);
6: HoverSkill('woodcutting',false);
7: RandomChat;
8: begin
MouseBox(MSX1,MSY1,MSX2,MSY2,3);
wait(200+random(1500));
MouseBox(MIX1,MIY1,MIX2,MIY2,3);
wait(200+random(1200));
end;
9: {begin
GameTabFKey(1 + Random(12));
wait(2000+random(1000));
GameTabFKey(4);
end;}
end;
end;
////////////////////////////////////////////////////////////////////////////////
//---> AutoColor - Autocolors a set color in a specified box with a max tol)
////////////////////////////////////////////////////////////////////////////////
function AutoColor(Color, Step, MaxTol, X1, Y1, X2, Y2:integer): Integer;
var
Tol:integer;
begin
Tol := 1;
repeat
if (FindColorSpiralTolerance(x,y,Color,X1,Y1,X2,Y2,Tol)) then
begin
Result := GetColor(x,y);
WriteLn('The Color is ' + inttostr(GetColor(x,y)));
Exit;
end;
if (Tol >= MaxTol) then
begin
Result := Color;
WriteLn('Could not find color');
Exit;
end;
Tol := Tol + Step;
until (false);
end;
////////////////////////////////////////////////////////////////////////////////
//---> MyFindRoadColor - Finds the road color when in bank
////////////////////////////////////////////////////////////////////////////////
function MyFindRoadColor : Integer;
var
BaseC, Tol, BigArray, i, AmountLength, ColorsLength, Color : Integer;
ColorTPA : TPointArray;
Colors, MyAmount : TIntegerArray;
begin
BaseC := 5987170; //7171445;
Tol := 50;
FindColorsPie(ColorTPA, BaseC, Tol, 85, 95, 35, MMX2-MMCX, MMX1, MMY1, MMX2, MMY2, MMCX, MMCY);
//WriteLn('ColorTPA has a length of ' + InttoStr(High(ColorTPA)+1));
Colors := GetColors(ColorTPA);
//WriteLn('Colors has a length of ' + InttoStr(High(Colors)+1));
ClearSameIntegers(Colors);
SetArrayLength(MyAmount, GetArrayLength(Colors));
ColorsLength := GetArrayLength(Colors);
WriteLn(InttoStr(ColorsLength));
for i := 0 to (ColorsLength - 1) do
MyAmount[i] := CountColor(Colors[i], MMCX, MMCY, MMX2, MMY2);
BigArray := 0;
AmountLength := High(MyAmount);
for i := 1 to AmountLength do
begin
if (MyAmount[i] > MyAmount[BigArray]) then
BigArray := i;
end;
WriteLn('I is : ' + InttoStr(BigArray));
Color := Colors[BigArray];
WriteLn('The color is ' + InttoStr(Color));
Result := Color;
end;
////////////////////////////////////////////////////////////////////////////////
//---> CheckAxe - returns true if axe is broken
////////////////////////////////////////////////////////////////////////////////
function CheckAxe: Boolean;
begin
result := false;
if (IsChatBlackTextAnyLine('have an axe')) then
begin
if (FindAxe) then
Exit
else
begin
result := true;
GoodAxe := false;
end;
end;
end;
function LocateTree: Boolean; forward;
////////////////////////////////////////////////////////////////////////////////
//---> My Find Ent Function - Returns true if ent is found and avoided. Called
// on when script finds a yellow npc dot close to player and then
// searches for the yellow text.
////////////////////////////////////////////////////////////////////////////////
function MyFindEnt:boolean; //looks for yellow npc dot color close to player
var // indicating an ent then searches for yellow text
I, mark :integer;
YellowDot : Boolean;
begin
Result := false;
YellowDot := FindColor(x, y, 195836, MMCX - 8, MMCY - 8, MMCX + 8, MMCY + 8);
if not(YellowDot) then
begin
Result := False;
Exit;
end else
if (YellowDot) then
begin
if (FindNormalRandoms) then
begin
Wait(2000+random(500));
Result := true;
Exit;
end;
WriteLn('Found a yellow dot next to us...It might be an ent.');
Status('Maybe an ent...Looking for it...');
MMouse(TreePt.x, TreePt.y, 2, 2);
if (not(IsUpText(Tree[CurrentTree].TreeText))) then
begin
for I := 0 to 2 do
begin
if (FindColorSpiralTolerance(x, y, Tree[CurrentTree].Color[I], x-30, y-30, x+30, y+30, 7)) then
begin
MMouse(x, y, 1, 1);
if (IsUpText(Tree[CurrentTree].TreeText)) then
Break;
end;
end;
end;
if (FindColorTolerance(x, y, 55769, 85, 15, 115, 15, 15)) then
begin
WriteLn('Found ENT!!! Avoiding it now.');
Mouse(MSCX, MSCY, 2, 2, true);
Result := true;
EntsAvoided := EntsAvoided + 1;
MarkTime(mark);
repeat
Wait(100+random(500));
until (TimeFromMark(mark) > 20000)
or not(FindColor(x, y, 195836, MMCX-8, MMCY-8, MMCX+8, MMCY+8))
or LocateTree;
end else
begin
WriteLn('Did not find an ent. It might have been an impling or ' +
'another players random. Worst case: we have a broken axe. :(');
end;
end;
end;
{*******************************************************************************
Function FindBitmapsProgressiveTol(var x, y: Integer; BMP: Array of Integer; TolMax, Step,
xs, ys, xe, ye: Integer): Boolean;
By: By Starblaster100, Based off of the Ideas of Stupid3ooo
Description: Finds Bitmaps in order in the boundaries you set
*******************************************************************************}
function FindBitmapsProgressiveTol(var x, y: Integer; BMP: TIntegerArray; TolMax, Step,
xs, ys, xe, ye: Integer): Boolean;
var
Temp, c: Integer;
begin
for Temp := 0 to GetArrayLength(BMP)-1 do
begin
C := 0;
while (c < TolMax) do
begin
C := C + Step;
if(FindBitmapSpiralTolerance(BMP[Temp], x, y, xs, ys, xe, ye, c))then
begin
Result := True;
Exit;
end;
end;
end;
end;
{*******************************************************************************
function IsChatBlackTextAnyLine(ChatTxt: String): Boolean;
By: Wizzup?
Description: Returns true if ChatTxt is found in any of the 8 lines in ChatBox.
Modified to return the line of which the message is found in... If the message
is not found it returns -1
*******************************************************************************}
function IsChatBlackTextWhatLine(ChatTxt: string): Integer;
var
TheLines: array of string;
I: Byte;
begin
TheLines := ChatsBlackText;
for I := 1 to 8 do
if (Pos(ChatTxt, TheLines[I]) <> 0) then
begin
Result := I;
Exit;
end;
Result := -1;
end;
////////////////////////////////////////////////////////////////////////////////
//---> DropUnwnated - Drops unwanted items - credits to PriSoner
////////////////////////////////////////////////////////////////////////////////
procedure DropUnwanted;
var
i, DTMu: integer;
UnwantedDTM: Array of Integer;
begin
SetLength(UnwantedDTM, 11);
UnwantedDTM[0] := DTMFromString('78DA63E4656060E0624001F764EF307000694' + // Security Book
'620FE0F048C4C408610031A60442281340F906021A0460A487010' +
'50230C24C4F1AB0100A6DF0671');
UnwantedDTM[1] := DTMFromString('78DA631461606010604001CB26C7337000694' + // Baguette
'620FE0F048CEC408604031A60442281B434906021420D1F013502' +
'84ED020096E3065E');
UnwantedDTM[2] := DTMFromString('78DA631460606010624001FC45CE0C1C409A1' + // Frog Token
'188FF0301232B90C1C4800618914820AD00245808A89103120A04' +
'D480EC91C3AF06000AB00582');
UnwantedDTM[3] := DTMFromString('78DA63E46160601067400117CF9B31B002694' + // Strength Potion (2)
'620FE0F048C1C40060F031A60442281343F906025A0461848C812' +
'50C34A580D00B1530683');
UnwantedDTM[4] := DTMFromString('78DA63E4606060006124505815CCC006A4198' + // Spinach Roll
'1F83F103082E49918D000231209A4F98850C30324B809A8612252' +
'8D207E3500026305B3');
UnwantedDTM[5] := DTMFromString('78DA631467606010624001B37A3C185881342' + // Triangle Sandwich
'310FF0702466E20839F010D302291405A09487010502307242409' +
'A81101122AF8D500008613065A');
UnwantedDTM[6] := DTMFromString('78DA6314646060E0614001829D620C6C409A1' + // Kebab
'188FF0301233F90C1CC800618914820CD0224F809A8E102129204' +
'D44813360700F2D80550');
UnwantedDTM[7] := DTMFromString('78DA63E46560601064400197E74931B002694' + // Beer
'620FE0F048C2C40063F031A60442281B414116A40763113A14686' +
'801A3620C14A408D109090C2AF0600467D066B');
UnwantedDTM[8] := DTMFromString('78DA63E4656060E06140017545D60C6C409A1' + // Bread Roll
'188FF0301230790C1C68006189148202D4C841A7120C14D400DC8' +
'3D4204D4B0020901FC6A000D0605D5');
UnwantedDTM[9] := DTMFromString('78DA6314626060E0614001930A5D18D880342' + // Pie
'310FF070246901A660634C0884402692520C147408D30901027A0' +
'861548F0E35703005E7D05F9');
UnwantedDTM[10]:= DTMFromString('78DA63E4656060E061400173BA23195881342' + // Square Sandwich
'310FF0702460120439C010D302291405A02D31C0C35FC40829580' +
'1A7620C149400DC80C21FC6A005AC00632');
GameTab(4);
for i := 0 to 10 do
begin
DTMu := UnwantedDTM[i];
if FindDTM(DTMu, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 2, 2, false);
Wait(500 + Random(500));
ChooseOption('rop');
Wait(1000 + Random(1000));
end;
FreeDTM(DTMu);
end;
end;
////////////////////////////////////////////////////////////////////////////////
//---> LoadNestDTMs - Loads the birds nest DTMs
////////////////////////////////////////////////////////////////////////////////
procedure LoadNestDTMs;
begin
Unfilled := DTMFromString('78DA63BCCEC2C0A0CFC4800C1CACB419FE036' +
'94620FE0F048CB7816AD451D540646124907E0254A34340CD0DA0' +
'1A0B026A1E01D5181350738E4835DA04D45C06AAD1C0AF0600024' +
'F0E1A');
Filled[0] := DTMFromString('78DA63E4636060E06240013B168A33F003694' + //Ring
'620FE0F048CEC40062B031A60442281B430906021A0461A48F011' +
'5003B25884801A2620C18B5F0D00489B0623');
Filled[1] := DTMFromString('78DA6314646060E0614001FE11DC0CFC409A1' + //Seed
'188FF0301232790C1CA8006189148202D0C245808A891C1B40B43' +
'8D08901025A006E41E61FC6A00BFF8057E');
Filled[2] := DTMFromString('78DA63E4656060106040014E363A0C2C409A1' + //Egg
'188FF03012388C3C38006189148202D08249809A8110312AC04D4' +
'C802097E026A40EE15C1AF0600ADB10568');
end;
////////////////////////////////////////////////////////////////////////////////
//---> FreeNestDTMs - Frees the birds nest DTMs
////////////////////////////////////////////////////////////////////////////////
procedure FreeNestDTMs;
var
i:integer;
begin
FreeDTM(Unfilled);
for i := 0 to 2 do
FreeDTM(Filled[i]);
end;
////////////////////////////////////////////////////////////////////////////////
//---> MyFindBirdNest - Finds and picks up the bird's and attempts to figure out
// what was inside of it.
////////////////////////////////////////////////////////////////////////////////
function MyFindBirdsNest: String;
var
ChatTxt : array of String;
BirdNestText, BirdsNestInInv : Boolean;
BirdsNestBmp : array[0..1] of integer;
i, TheLine : integer;
itemMessage, itemText : String;
begin
LoadNestDTMs;
ChatTxt := ChatsBlackText;
BirdsNestInInv := DTMRotated(Unfilled,x,y,MIX1,MIY1,MIX2,MIY2) or
DTMRotated(Filled[0],x,y,MIX1,MIY1,MIX2,MIY2) or
DTMRotated(Filled[1],x,y,MIX1,MIY1,MIX2,MIY2) or
DTMRotated(Filled[2],x,y,MIX1,MIY1,MIX2,MIY2);
BirdNestText := (pos('bird''s nest', ChatTxt[8]) <> 0) or
(pos('nest falls', ChatTxt[8]) <> 0) or
(pos('bird''s nest', ChatTxt[7]) <> 0) or
(pos('nest falls', ChatTxt[7]) <> 0);
if not(BirdNestText) then
begin
result := 'null';
FreeNestDTMs;
exit;
end else
if (BirdsNestInInv) then
begin
result := 'null';
FreeNestDTMs;
exit;
end else
begin
Inc(BirdsNest);
Status('Bird''s Nest!!!');
BirdsNestBmp[0] := BitmapFromString(3, 4, 'beNozV7YzV7a3NlJXkXK' +
'21dPXUVWUE4sMcQeygSgpxg+I7ACG2Qgt');
BirdsNestBmp[1] := BitmapFromString(3, 4, 'beNrztrAzV3a21YMgX09' +
'bIDfAx8HLxRiI7C21g7wtggCdSgi5');
repeat
Inc(i);
if (FindBitmapsProgressiveTol(x,y,BirdsNestBmp,35,5,MSCX-100,MSCY-80,MSCX+100,MSCY+80)) then
begin
MMouse(x,y,3,3);
if (IsUpText('est')) then
begin
Mouse(x,y,1,1,true);
break;
end;
end;
until (i>10);
if (i>10) then
begin
WriteLn('Bird''s nest could not be located.');
result := 'null';
FreeNestDTMs;
Exit;
end;
Wait(500+random(500));
for i:= 0 to 2 do
begin
if (DTMRotated(Filled[i],x,y,MIX1,MIY1,MIX2,MIY2)) then
begin
MMouse(x,y,3,3);
if (not (InvCount = 28)) then
begin
Mouse(x,y,1,1,true);
Break;
end else
if (InvCount = 28) then
begin
Result := 'Inventory full... unable to open bird''s nest';
FreeNestDTMs;
Exit;
end;
end;
end;
Wait(1000);
i := 0;
itemMessage := '';
repeat
Inc(i);
Wait(100);
ChatTxt := ChatsBlackText;
for TheLine := 8 downto 1 do
begin
if (Pos('out of', ChatTxt[TheLine]) <> 0) then
begin
itemMessage := ChatTxt[TheLine];
Break;
end;
end;
if (Length(itemMessage) > 0) then
break;
until (i>10);
if (i>10) then
begin
WriteLn('Bird''s nest text could not be located.');
result := '';
FreeNestDTMs;
Exit;
end;
itemText := Trim(Between('take','out',itemMessage));
if (Length(itemText) < 2) then
itemText := 'a ring';
Result := itemText;
WriteLn('You found a bird''s nest with ' + itemText + ' in it.');
FreeNestDTMs;
end;
end;
////////////////////////////////////////////////////////////////////////////////
//---> UpdateXY - Updates the x and y coords where the tree is found while the
// flag is present.
////////////////////////////////////////////////////////////////////////////////
procedure UpdateXY;
var
i, TreeNum : Integer;
ColorTPA : TPointArray;
ColorTPAs : array [0..2] of TPointArray;
TreeMidPoints : TPointArray;
TreeTPAs : T2DPointArray;
begin
if (FlagPresent) then
begin
i := 70;
Status('Updating the x and y coordinates');
Flag;
Wait(400);
WriteLn('Updating the x and y coordinates');
FindColorsSpiralTolerance(MSCX, MSCY, ColorTPAs[0],
Tree[CurrentTree].Color[0], MSCX - i, MSCY - i,
MSCX + i, MSCY + i, 5);
FindColorsSpiralTolerance(MSCX, MSCY, ColorTPAs[1],
Tree[CurrentTree].Color[1], MSCX - i, MSCY - i,
MSCX + i, MSCY + i, 5);
FindColorsSpiralTolerance(MSCX, MSCY, ColorTPAs[2],
Tree[CurrentTree].Color[2], MSCX - i, MSCY - i,
MSCX + i, MSCY + i, 5);
ColorTPA := CombineTPA(ColorTPAs[0],CombineTPA(ColorTPAs[1],ColorTPAs[2]));
SortTPAFrom(ColorTPA, InttoPoint(MSCX, MSCY));
TreeTPAs := SplitTPA(ColorTPA, 12);
TreeNum := High(TreeTPAs) + 1;
WriteLn('There are ' + InttoStr(TreeNum) + ' trees in the vicinity');
SetArrayLength(TreeMidPoints, TreeNum);
if (TreeNum > 0) then
begin
for i := 0 to TreeNum - 1 do
TreeMidPoints[i] := MiddleTPA(TreeTPAs[i]);
SortTPAFrom(TreeMidPoints, InttoPoint(MSCX, MSCY));
TreePt := TreeMidPoints[0];
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////
//---> FindRandoms - Returns true if a random is found.
////////////////////////////////////////////////////////////////////////////////
function FindRandoms: boolean;
begin
Result := false;
Status('Finding Randoms...');
if (MyFindEnt) then
begin
Result := true;
Exit;
end;
if (FindNormalRandoms) then
begin
Result := true;
Exit;
end;
if not (MyFindBirdsNest = 'null') then
begin
Result := true;
Exit;
end;
if (FindFight) then
begin
Retaliate(False);
RunAway('W', True, 1, 15000);
Result := true;
end;
end;
////////////////////////////////////////////////////////////////////////////////
//---> HandleRandoms - Handles the randoms and gets back to cutting the tree.
////////////////////////////////////////////////////////////////////////////////
procedure HandleRandoms;
begin
repeat
WriteLn('Clicking to Continue');
Wait(100+random(100));
until not(ClickToContinue);
WriteLn('Waiting...');
Wait(1000+random(500));
DropUnwanted;
//DwarfItem;
WriteLn('Locating Tree');
if (LocateTree) then
Mouse(TreePt.x, TreePt.y, 0, 0, true)
else
begin
WriteLn('Couln''t find the tree. Waiting until we find it.');
repeat
FTWait(4);
until(LocateTree);
WriteLn('Found Tree');
Mouse(TreePt.x, TreePt.y, 0, 0, true);
end;
UpdateXY;
end;
////////////////////////////////////////////////////////////////////////////////
//---> FixScreen - Makes compass north and puts screen at highest angle.
////////////////////////////////////////////////////////////////////////////////
procedure FixScreen;
begin
Status('Fixing the screen...');
MakeCompass('n');
Wait(200+random(100));
SetAngle(True);
Wait(200+random(100));
MakeCompass('n');
end;
////////////////////////////////////////////////////////////////////////////////
//---> HandleContinue - Looks for a level up and adds a level to levels gained
////////////////////////////////////////////////////////////////////////////////
function HandleContinue:boolean;
begin
if (FindNPCChatText('now reached', Nothing)) then
begin
ClickContinue(True, False);
LevelsGained := LevelsGained + 1;
result := true;
end else
result := false;
end;
////////////////////////////////////////////////////////////////////////////////
//---> CountLogs - CountsLogs in real time
////////////////////////////////////////////////////////////////////////////////
function CountLogs : Integer;
var
i, LogsCutTemp: Integer;
LogInvBox: Tbox;
begin
GameTab(4);
for i := 1 to 28 do
begin
LogInvBox := InvBox(i);
if ExistsItem(i) then
if (DTMRotated(LogDTM,x,y,LogInvBox.x1,LogInvBox.y1,LogInvBox.x2,LogInvBox.y2)) then
Inc(LogsCutTemp);
end;
Result := LogsCutTemp;
end;
////////////////////////////////////////////////////////////////////////////////
//---> LocateTree - Counts Trees and returns the location of the closest in Pt
//---> returns false if there are no trees
////////////////////////////////////////////////////////////////////////////////
function LocateTree:Boolean;
var
i, TreeNum : Integer;
ColorTPA, TreeMidPoints : TPointArray;
ColorTPAs : array [0..2] of TPointArray;
TreeTPAs : T2DPointArray;
begin
Status('Finding Colors');
//Find All Tree Colors
FindColorsSpiralTolerance(MSCX, MSCY,ColorTPAs[0], Tree[CurrentTree].Color[0],
MSX1, MSY1, MSX2, MSY2, 5);
FindColorsSpiralTolerance(MSCX, MSCY,ColorTPAs[1], Tree[CurrentTree].Color[1],
MSX1, MSY1, MSX2, MSY2, 5);
FindColorsSpiralTolerance(MSCX, MSCY,ColorTPAs[2], Tree[CurrentTree].Color[2],
MSX1, MSY1, MSX2, MSY2, 5);
//Combine the tree color TPAs
ColorTPA := CombineTPA(ColorTPAs[0],CombineTPA(ColorTPAs[1],ColorTPAs[2]));
SortTPAFrom(ColorTPA, InttoPoint(MSCX, MSCY));
//Split the TPAs by distance
TreeTPAs := SplitTPA(ColorTPA, 15);
TreeNum := High(TreeTPAs) + 1;
SetArrayLength(TreeMidPoints, TreeNum);
//Get the midpoints
for i := 0 to TreeNum - 1 do
TreeMidPoints[i] := MiddleTPA(TreeTPAs[i]);
//Sort by distance
SortTPAFrom(TreeMidPoints, InttoPoint(MSCX, MSCY));
if (High(TreeMidPoints) < 0) then
begin
result := false;
Exit;
end else
begin
TreePt := TreeMidPoints[0];
MMouse(TreePt.x,TreePt.y,2,2);
if (IsUpText(Tree[CurrentTree].TreeText)) then
begin
if (FindColorTolerance(x, y, 55769, 85, 15, 115, 15, 15)) then //Auto-Checks if the closest tree is an ent
if (High(TreeMidPoints) > 0) then //If it is it goes to the second closest tree
begin //if there is more than one tree of course
TreePt := TreeMidPoints[1];
end else
begin
Result := false;
Exit;
end;
end else
begin
for i := 1 to TreeNum - 1 do
begin
MMouse(TreeMidPoints[i].x, TreeMidPoints[i].y, 3, 3);
if (IsUpText(Tree[CurrentTree].TreeText)) then
begin
if (FindColorTolerance(x, y, 55769, 85, 15, 115, 15, 15)) then
begin
//Inc(i);
Continue;
end;
TreePt := TreeMidPoints[i];
Break;
end;
if (i = TreeNum - 1) then
begin
Result := false;
Exit;
end;
end;
end;
Result := true;
end;
end;
////////////////////////////////////////////////////////////////////////////////
//---> TreeRemains - True if TreeRemains
////////////////////////////////////////////////////////////////////////////////
function TreeRemains:boolean;
var
ColorTPA : TPointArray;
ColorTPAs : array [0..2] of TPointArray;
begin
Status('Finding Colors');
FindColorsSpiralTolerance(TreePt.x, TreePt.y,ColorTPAs[0], Tree[CurrentTree].Color[0],
TreePt.x - 15, TreePt.y - 15, TreePt.x + 15, TreePt.y + 15, 5);
FindColorsSpiralTolerance(TreePt.x, TreePt.y,ColorTPAs[1], Tree[CurrentTree].Color[1],
TreePt.x - 15, TreePt.y - 15, TreePt.x + 15, TreePt.y + 15, 5);
FindColorsSpiralTolerance(TreePt.x, TreePt.y,ColorTPAs[2], Tree[CurrentTree].Color[2],
TreePt.x - 15, TreePt.y - 15, TreePt.x + 15, TreePt.y + 15, 5);
Status('Combining TPAs');
ColorTPA := CombineTPA(ColorTPAs[0],CombineTPA(ColorTPAs[1],ColorTPAs[2]));
if (High(ColorTPA) > 30) then
result := true else
result := false;
end;
////////////////////////////////////////////////////////////////////////////////
//---> MyInPin - Enters in pin #; I think SRL's is too specific in movement
////////////////////////////////////////////////////////////////////////////////
function MyInPin(pin: string): Boolean;
var
iNumber: Integer;
begin
if (PinScreen) then
begin
Result := True;
for iNumber := 1 to Length(pin) do
begin
case random(2) of
0: MouseBox(377, 78, 500, 322, 3);
1: MouseBox(303, 175, 500, 322, 3);
end;
Wait(200 + Random(200));
ClickText(pin[iNumber], upchars, 1, 1, 512, 336, True);
Wait(500 + Random(500));
end;
repeat
Wait(100);
until BankScreen or not LoggedIn;
end;
end;
////////////////////////////////////////////////////////////////////////////////
//---> WithdrawAxe - Will withdraw the best axe from the bank
////////////////////////////////////////////////////////////////////////////////
function WithdrawAxe: boolean;
var
AxeNumber, AxeIndex : Integer;
AxePoint : TPoint;
begin
if (GoodAxe) then
begin
Result := false;
Exit;
end;
if not(BankScreen) then
begin
Result := false;
Exit;
end;
srl_LoadBitmaps([47, 48, 49, 50, 51, 52, 53]);
FixBank;
for AxeNumber := 0 to 6 do
if FindBitmapToleranceIn(srl_GetBitmap(53-AxeNumber), x, y, MSX1, MSY1, MSX2, MSY2, 10) then
break;
if (AxeNumber = 7) then
begin
Result := False;
Writeln('No axe was found.');
srl_FreeBitmaps;
Exit;
end;
case AxeNumber of
0: WriteLn('Found Rune axe');
1: WriteLn('Found Addy axe');
2: WriteLn('Found Mith axe');
3: WriteLn('Found Black axe');
4: WriteLn('Found Steel axe');
5: WriteLn('Found Iron axe');
6: WriteLn('Found Bronze axe');
end;
AxeIndex := MSTPointToBankIndex(InttoPoint(x,y));
AxePoint := BankIndexToBankPoint(AxeIndex);
Withdraw(AxePoint.x, AxePoint.y, 1);
Result := true;
srl_FreeBitmaps;
end;
////////////////////////////////////////////////////////////////////////////////
//---> UnequipAxe - Will unequip an axe that is broken
////////////////////////////////////////////////////////////////////////////////
function UnequipAxe: boolean;
var
BrokenAxeDtm : integer;
EqCoords : TPoint;
begin
BrokenAxeDtm := DTMFromString('78DA6314646060E06340015D19820C1A409A1' +
'188FF0301A33490C1C98006189148202D83690E861A5920C14A40' +
'8D10906021A0860B48C81250C30324E408A811001262F8D50000E' +
'86D065B');
GameTab(4);
if (FindDTM(BrokenAxeDtm, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Result := true;
FreeDTM(BrokenAxeDtm);
Exit;
end;
GameTab(5);
if (WearingItem(5)) then
begin
EqCoords := EquipmentCoords(5);
MMouse(EqCoords.x, EqCoords.y, 4, 4);
GetMousePos(x, y);
if (IsUpText('xe')) then
begin
Mouse(x, y, 1, 1, true);
Result := true;
end else
begin
Result := false;
WriteLn('Couldn''t find an axe in the inv or equipped.');
end;
end;
FreeDTM(BrokenAxeDtm);
end;
////////////////////////////////////////////////////////////////////////////////
//---> EquipNewAxe - Will equip a new axe that we took out of the bank
////////////////////////////////////////////////////////////////////////////////
function EquipNewAxe: boolean;
var
AxeDtm : integer;
begin
Result := false;
if not(GoodAxe) then
Exit;
AxeDtm := DTMFromString('78DA63646560601063400153F285183480342' +
'310FF07024641208399010D302291405A1448B01350230C247808' +
'A861C3740F861A26202143400DC8BDC204D480FCCE8B5F0D00D08' +
'8061D');
GameTab(4);
if (FindDTM(AxeDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x, y, 1, 1, true);
Result := true;
end;
FreeDTM(AxeDtm);
end;
////////////////////////////////////////////////////////////////////////////////
//---> DeathTele - Will Tele back to Seer's from Lumbridge in the case of death
////////////////////////////////////////////////////////////////////////////////
function DeathTele:boolean;
//var
// xx, yy, DTM1, K:integer;
begin
{
FixScreen;
K := 1
repeat
wait(100+random(100));
K := K + 1;
if (K >= 20) then
begin
WriteLn('I don''t think we are in Lumbridge');
result := false;
Exit;
end;
until (FindSymbol(xx, yy, 'water')) or (FindSymbol(xx, yy, 'guide'))
or (FindSymbol(xx, yy, 'quest'));
begin
DTM1 := DTMFromString('78DA63BCCAC4C0E0CCC8800EFE033148F43F1' +
'0307E05AA7904116782CABFFDF28C4104AA060418799919187E12' +
'50C30F54E3CE885FCD0FA04C3C7E3500779E162B');
if (DtmRotated(DTM1, x, y, MMX1, MMY1, MMX2, MMY2)) then
Mouse(x, y, -1, -1, true);
Flag;
}
end;
////////////////////////////////////////////////////////////////////////////////
//---> Oak Walking
////////////////////////////////////////////////////////////////////////////////
//Assemble Oak notes:
//for Which = 2 it finds the colors of the tree mm symols and groups them by
//distance and finds the largest grouping
function AssembleOak(Which : integer) : Boolean;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..6] of TDTMPointDef;
TempTDTM: array[0..2] of TDTM;
i, TreeNum, LargestGroup, NorthMost : Integer;
ColorTPA, TreeMidPoints, SymbolTPA : TPointArray;
ColorTPAs : array [0..2] of TPointArray;
TreeTPAs : T2DPointArray;
TreeMidPoint : TPoint;
begin
if (Which < 2) then
RoadColor := MyFindRoadColor;
dtmMainPoint.x := 1207;
dtmMainPoint.y := 273;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 0;
dtmMainPoint.Tolerance := 255;
dtmSubPoints[0].x := 1160;
dtmSubPoints[0].y := 246;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := RoadColor;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 1197;
dtmSubPoints[1].y := 242;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RoadColor;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 1236;
dtmSubPoints[2].y := 238;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := RoadColor;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 1252;
dtmSubPoints[3].y := 226;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := RoadColor;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 1249;
dtmSubPoints[4].y := 246;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := RoadColor;
dtmSubPoints[4].Tolerance := 0;
dtmSubPoints[5].x := 1213;
dtmSubPoints[5].y := 243;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := RoadColor;
dtmSubPoints[5].Tolerance := 0;
dtmSubPoints[6].x := 1254;
dtmSubPoints[6].y := 206;
dtmSubPoints[6].AreaSize := 0;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := RoadColor;
dtmSubPoints[6].Tolerance := 0;
TempTDTM[0].MainPoint := dtmMainPoint;
TempTDTM[0].SubPoints := dtmSubPoints;
dtmMainPoint.x := 1209;
dtmMainPoint.y := 270;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 0;
dtmMainPoint.Tolerance := 255;
dtmSubPoints[0].x := 1157;
dtmSubPoints[0].y := 181;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := RoadColor;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 1181;
dtmSubPoints[1].y := 177;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RoadColor;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 1257;
dtmSubPoints[2].y := 215;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := RoadColor;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 1268;
dtmSubPoints[3].y := 195;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := RoadColor;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 1231;
dtmSubPoints[4].y := 178;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := RoadColor;
dtmSubPoints[4].Tolerance := 0;
dtmSubPoints[5].x := 1248;
dtmSubPoints[5].y := 168;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := RoadColor;
dtmSubPoints[5].Tolerance := 0;
dtmSubPoints[6].x := 1251;
dtmSubPoints[6].y := 185;
dtmSubPoints[6].AreaSize := 0;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := RoadColor;
dtmSubPoints[6].Tolerance := 255;
TempTDTM[1].MainPoint := dtmMainPoint;
TempTDTM[1].SubPoints := dtmSubPoints;
if (Which = 0) then
begin
Tree[1].DTMs[0] := AddDTM(TempTDTM[0]);
Result := true;
end else
if (Which = 1) then
begin
Tree[1].DTMs[1] := AddDTM(TempTDTM[1]);
Result := true;
end else
if (Which = 2) then
begin
Status('Finding Colors');
FindColorsSpiralTolerance(MSCX,MSCY,ColorTPAs[0],942888,MMX1,MMCY + 10,MMX2,MMY2,15);
FindColorsSpiralTolerance(MSCX,MSCY,ColorTPAs[1],1134427,MMX1,MMCY + 10,MMX2,MMY2,15);
FindColorsSpiralTolerance(MSCX,MSCY,ColorTPAs[2],2516023,MMX1,MMCY + 10,MMX2,MMY2,15);
Status('Combining TPAs');
ColorTPA := CombineTPA(ColorTPAs[0],CombineTPA(ColorTPAs[1],ColorTPAs[2]));
Status('Splitting TPAs');
TreeTPAs := SplitTPA(ColorTPA, 10);
TreeNum := High(TreeTPAs) + 1;
LargestGroup := 0;
if (TreeNum > 0) then
begin
for i := 1 to TreeNum - 1 do
begin
if (High(TreeTPAs[i]) > High(TreeTPAs[LargestGroup])) then
LargestGroup := i;
end;
end;
ColorTPA := TreeTPAs[LargestGroup];
TreeMidPoint := MiddleTPA(ColorTPA);
WriteLn('X is ' + InttoStr(TreeMidPoint.x) + ' and Y is ' + InttoStr(TreeMidPoint.y));
x := TreeMidPoint.x;
y := TreeMidPoint.y;
Result := true;
Exit;
end else
if (Which = 3) then
begin
FindSymbols(SymbolTPA, 'tree');
WriteLn('Found ' + InttoStr(GetArrayLength(SymbolTPA)) + ' symbols');
if (GetArrayLength(SymbolTPA) = 1) then
begin
x := SymbolTPA[0].x + 15 + random(5);
y := SymbolTPA[0].y;
Result := true;
end else
if (GetArrayLength(SymbolTPA) = 2) then
begin
if (SymbolTPA[0].y < SymbolTPA[1].y) then
begin
x := SymbolTPA[1].x + 15 + random(5);
y := SymbolTPA[1].y;
Result := true;
end else
if (SymbolTPA[0].y > SymbolTPA[1].y) then
begin
x := SymbolTPA[0].x + 15 + random(5);
y := SymbolTPA[0].y;
Result := true;
end;
end else
if (GetArrayLength(SymbolTPA) = 2) then
begin
Result := false;
Exit;
end;
end else
if (Which = 4) then
begin
Status('Finding Colors');
FindColorsSpiralTolerance(MSCX,MSCY,ColorTPAs[0],942888,MMCX - 5,MMCY,MMX2,MMCY,15);
FindColorsSpiralTolerance(MSCX,MSCY,ColorTPAs[1],1134427,MMCX - 5,MMCY,MMX2,MMY2,15);
FindColorsSpiralTolerance(MSCX,MSCY,ColorTPAs[2],2516023,MMCX - 5,MMCY,MMX2,MMY2,15);
Status('Combining TPAs');
ColorTPA := CombineTPA(ColorTPAs[0],CombineTPA(ColorTPAs[1],ColorTPAs[2]));
Status('Splitting TPAs');
TreeTPAs := SplitTPA(ColorTPA, 10);
TreeNum := High(TreeTPAs) + 1;
SetArrayLength(TreeMidPoints, TreeNum);
for i := 0 to TreeNum - 1 do
TreeMidPoints[i] := MiddleTPA(TreeTPAs[i]);
NorthMost := 0;
if (TreeNum > 0) then
begin
for i := 1 to TreeNum - 1 do
begin
if (TreeMidPoints[i].y < TreeMidPoints[NorthMost].y) then
NorthMost := i;
end;
end;
x := TreeMidPoints[NorthMost].x;
y := TreeMidPoints[NorthMost].y;
Result := true;
end else
if (Which = 5) then
begin
dtmMainPoint.x := 1218;
dtmMainPoint.y := 145;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 0;
dtmMainPoint.Tolerance := 255;
dtmSubPoints[0].x := 1218;
dtmSubPoints[0].y := 145;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 0;
dtmSubPoints[0].Tolerance := 255;
dtmSubPoints[1].x := 1168;
dtmSubPoints[1].y := 175;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RoadColor;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 1205;
dtmSubPoints[2].y := 171;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := RoadColor;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 1238;
dtmSubPoints[3].y := 168;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := RoadColor;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 1249;
dtmSubPoints[4].y := 162;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := RoadColor;
dtmSubPoints[4].Tolerance := 0;
dtmSubPoints[5].x := 1256;
dtmSubPoints[5].y := 174;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := RoadColor;
dtmSubPoints[5].Tolerance := 0;
dtmSubPoints[6].x := 1261;
dtmSubPoints[6].y := 201;
dtmSubPoints[6].AreaSize := 0;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := RoadColor;
dtmSubPoints[6].Tolerance := 0;
TempTDTM[2].MainPoint := dtmMainPoint;
TempTDTM[2].SubPoints := dtmSubPoints;
Tree[1].DTMs[2] := AddDTM(TempTDTM[2]);
Result := true;
end;
end;
function WalkToOaks : boolean;
begin
AssembleOak(0);
AssembleOak(1);
if (DTMRotated(Tree[1].DTMs[0], x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(x,y,3,3,true);
Flag;
end else
begin
WriteLn('Could not find Oak DTM... Unsuccessful Walk');
Result := false;
Exit;
end;
if (DTMRotated(Tree[1].DTMs[1], x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(x,y,3,3,true);
Flag;
end else
begin
WriteLn('Could not find Oak DTM... Unsuccessful Walk');
Result := false;
Exit;
end;
AssembleOak(2);
MouseFlag(x, y, 2, 2);
FreeDTM(Tree[1].DTMs[0]);
FreeDTM(Tree[1].DTMs[1]);
end;
function WalkBackOaks : boolean;
begin
if (AssembleOak(3)) then
begin
Mouse(x,y,3,3,true);
Wait(1000+random(500));
Flag;
end else
begin
WriteLn('Could not find Oak DTM... Unsuccessful Walk');
Result := false;
Exit;
end;
if (AssembleOak(4)) then
begin
Mouse(x,y,3,3,true);
Wait(random(500));
Flag;
end else
begin
WriteLn('Could not find Oak DTM... Unsuccessful Walk');
Result := false;
Exit;
end;
AssembleOak(5);
if (DTMRotated(Tree[1].DTMs[2], x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(x - random(3), y, 3, 3, true);
FFlag(6 + random(4));
end else
begin
WriteLn('Could not find Oak DTM... Unsuccessful Walk');
Result := false;
Exit;
end;
if (DTMRotated(BankDTM1, x, y, MMX1, MMY1, MMX2, MMY2))
or (DTMRotated(BankDTM2, x, y, MMX1, MMY1, MMX2, MMY2))then
begin
WriteLn('Found Bank!');
MouseFlag(x + random(5), y - random(3), 1, 1);
Result := true;
Exit;
end else
begin
WriteLn('Didn''find bank');
Result := false;
end;
FreeDTM(Tree[1].DTMs[2]);
end;
////////////////////////////////////////////////////////////////////////////////
//---> Willow Walking
////////////////////////////////////////////////////////////////////////////////
var SubPoints: array[0..4] of TDTMPointDef;
var MainPoint : TDTMPointDef;
var TDTMWillow: TDTM;
var DTMWillow3:Integer;
procedure AssembleWillow;
begin
MainPoint .x:=1241;
MainPoint .y:=249;
MainPoint .areasize:=1;
MainPoint .areashape:=0;
MainPoint .color:=0;
MainPoint .tolerance:=255;
SubPoints[0].x:=1179;
SubPoints[0].y:=200;
SubPoints[0].areasize:=1;
SubPoints[0].areashape:=0;
SubPoints[0].color:=WaterColor;
SubPoints[0].tolerance:=3;
SubPoints[1].x:=1274;
SubPoints[1].y:=212;
SubPoints[1].areasize:=1;
SubPoints[1].areashape:=0;
SubPoints[1].color:=WaterColor;
SubPoints[1].tolerance:=3;
SubPoints[2].x:=1239;
SubPoints[2].y:=189;
SubPoints[2].areasize:=1;
SubPoints[2].areashape:=0;
SubPoints[2].color:=WaterColor;
SubPoints[2].tolerance:=3;
SubPoints[3].x:=1222;
SubPoints[3].y:=256;
SubPoints[3].areasize:=4;
SubPoints[3].areashape:=0;
SubPoints[3].color:=15591668;
SubPoints[3].tolerance:=35;
SubPoints[4].x:=1199;
SubPoints[4].y:=259;
SubPoints[4].areasize:=4;
SubPoints[4].areashape:=0;
SubPoints[4].color:=15591668;
SubPoints[4].tolerance:=35;
TDTMWillow.MainPoint := MainPoint;
TDTMWillow.SubPoints := SubPoints;
DTMWillow3:= AddDTM(TDTMWillow);
end;
function WalkToWillows : boolean;
var
DTMWillow1, DTMWillow2, DTMWillow4 : integer;
begin
DTMWillow1 := DTMFromString('78DA639CC7C2C0B08A0103FC076246100D048' +
'C17806A3642C4B9A0F29C5D8C0C22503520C0781FA8E60084CD02' +
'157BF9E12BA69AFB04D46C05CADC25A0661350E6107E350089BB1' +
'A96');
DTMWillow2 := DTMFromString('78DA63DCC5C2C0B0860103FC076246100D048' +
'C0F816A6E41C499A1F21FDE3E639084AA0101C60940359B885073' +
'9A809AF940353709A8390554F388809A9B4035F7F1AB010021D12' +
'0FA');
DTMWillow4 := DTMFromString('78DA635CC4C2C0B0960103FC076246100D048' +
'CBB806A0E43C499A1F2EF3F7F639083AA0101C6E94035C708A899' +
'0654B38B809A4D44D8F508A8E6147E3500B7B51C97');
if (DTMRotated(DTMWillow1, x, y, MMX1, MMY1, MMX2, MMY2))
or (DTMRotated(DTMWillow4, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(x,y,3,3,true);
Wait(4000+random(1000));
Flag;
end else
begin
WriteLn('Could not find the willow DTM... Unsuccessful Walk');
Result := false;
Exit;
end;
if (FindSymbolIn(x, y, 'tree', MMX1, MMY1, MMCX + 20, MMY2))
or (DTMRotated(DTMWillow2, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
WriteLn('Found Willows!');
Result := true;
Mouse(x, y, 3, 3, true);
Flag;
end else
begin
WriteLn('Could not find the willow DTM... Unsuccessful Walk');
Result := false;
end;
end;
function WalkBackWillows : boolean;
begin
WaterColor := FindWaterColor;
AssembleWillow;
if (DTMRotated(DTMWillow3, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(x, y, 3, 3, true);
Flag;
end else
begin
WriteLn('Could not find the willow dtm... Unsuccessful Walk');
Result := False;
Exit;
end;
if (DTMRotated(BankDTM1, x, y, MMX1, MMY1, MMX2, MMY2))
or (DTMRotated(BankDTM2, x, y, MMX1, MMY1, MMX2, MMY2))
or (FindSymbolIn(x, y, 'bank', MMX1, MMY1, MMX2, MMY2)) then
begin
WriteLn('Found Bank!');
Mouse(x, y, 1, 1, true);
Flag;
Result := True;
Exit;
end else
begin
WriteLn('Didn''find bank');
Result := False;
end;
end;
////////////////////////////////////////////////////////////////////////////////
//---> Maple Walking
////////////////////////////////////////////////////////////////////////////////
function AssembleMaple: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..6] of TDTMPointDef;
TempTDTM: TDTM;
begin
RoadColor := MyFindRoadColor;
dtmMainPoint.x := 129;
dtmMainPoint.y := 60;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 255;
dtmMainPoint.Tolerance := 255;
dtmSubPoints[0].x := 129;
dtmSubPoints[0].y := 60;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := RoadColor;
dtmSubPoints[0].Tolerance := 255;
dtmSubPoints[1].x := 161;
dtmSubPoints[1].y := 84;
dtmSubPoints[1].AreaSize := 2;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RoadColor;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 149;
dtmSubPoints[2].y := 82;
dtmSubPoints[2].AreaSize := 2;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := RoadColor;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 151;
dtmSubPoints[3].y := 105;
dtmSubPoints[3].AreaSize := 2;
dtmSubPoints[3].AreaShape := 2;
dtmSubPoints[3].Color := RoadColor;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 146;
dtmSubPoints[4].y := 124;
dtmSubPoints[4].AreaSize := 2;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := RoadColor;
dtmSubPoints[4].Tolerance := 0;
dtmSubPoints[5].x := 128;
dtmSubPoints[5].y := 117;
dtmSubPoints[5].AreaSize := 2;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := RoadColor;
dtmSubPoints[5].Tolerance := 0;
dtmSubPoints[6].x := 89;
dtmSubPoints[6].y := 116;
dtmSubPoints[6].AreaSize := 2;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := RoadColor;
dtmSubPoints[6].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function WalkToMaples : boolean;
begin
Tree[3].DTMs[0] := AssembleMaple;
try
if (DTMRotated(Tree[3].DTMs[0], x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
WriteLn('Found Maples!');
Mouse(x, y - random(10), 2, 2, true);
Wait(3000+random(1000));
Flag;
Result := true;
end;
except
if (FindSymbolIn(x, y, 'tree', MMX1, MMY1, MMX2, MMCY)) then
begin
WriteLn('Found Maples!');
Mouse(x + random(15), y, 2, 2, true);
Wait(3000+random(1000));
Flag;
Result := true;
end else
begin
WriteLn('Could not find Maple DTM... Unsuccessful Walk');
Result := false;
end;
end;
FreeDTM(Tree[3].DTMs[0]);
end;
function WalkBackMaples : boolean;
begin
if (DTMRotated(BankDTM1, x, y, MMX1, MMY1, MMX2, MMY2))
{or if (DTMRotated(BankDTM2, x, y, MMX1, MMY1, MMX2, MMY2))} then
begin
WriteLn('Found Bank!');
Mouse(x + random(5), y, 1, 1, true);
Flag;
Result := true;
Exit;
end else
begin
WriteLn('Didn''find bank');
Result := false;
end;
end;
////////////////////////////////////////////////////////////////////////////////
//---> Magic Walking
////////////////////////////////////////////////////////////////////////////////
function WalkToMagics: Boolean;
var
i : Integer;
begin
RoadColor := MyFindRoadColor;
Path[0].Mainpoint.x:=594;
Path[0].Mainpoint.y:=121;
Path[0].Subpoints[0].x:=674;
Path[0].Subpoints[0].y:=81;
Path[0].Subpoints[1].x:=667;
Path[0].Subpoints[1].y:=125;
Path[0].Subpoints[2].x:=650;
Path[0].Subpoints[2].y:=117;
Path[0].Subpoints[3].x:=615;
Path[0].Subpoints[3].y:=118;
Path[1].Mainpoint.x:=577;
Path[1].Mainpoint.y:=87;
Path[1].Subpoints[0].x:=687;
Path[1].Subpoints[0].y:=83;
Path[1].Subpoints[1].x:=650;
Path[1].Subpoints[1].y:=82;
Path[1].Subpoints[2].x:=596;
Path[1].Subpoints[2].y:=83;
Path[1].Subpoints[3].x:=558;
Path[1].Subpoints[3].y:=84;
Path[1].Subpoints[4].x:=578;
Path[1].Subpoints[4].y:=99;
Path[2].Mainpoint.x:=575;
Path[2].Mainpoint.y:=76;
Path[2].Subpoints[0].x:=688;
Path[2].Subpoints[0].y:=78;
Path[2].Subpoints[1].x:=646;
Path[2].Subpoints[1].y:=79;
Path[2].Subpoints[2].x:=595;
Path[2].Subpoints[2].y:=74;
Path[2].Subpoints[3].x:=620;
Path[2].Subpoints[3].y:=101;
Path[3].Mainpoint.x:=570;
Path[3].Mainpoint.y:=112;
Path[3].Subpoints[0].x:=680;
Path[3].Subpoints[0].y:=95;
Path[3].Subpoints[1].x:=679;
Path[3].Subpoints[1].y:=108;
Path[3].Subpoints[2].x:=641;
Path[3].Subpoints[2].y:=82;
Path[3].Subpoints[3].x:=591;
Path[3].Subpoints[3].y:=75;
Path[3].Subpoints[4].x:=575;
Path[3].Subpoints[4].y:=101;
Path[4].Mainpoint.x:=610;
Path[4].Mainpoint.y:=133;
Path[4].Subpoints[0].x:=683;
Path[4].Subpoints[0].y:=62;
Path[4].Subpoints[1].x:=650;
Path[4].Subpoints[1].y:=36;
Path[4].Subpoints[2].x:=636;
Path[4].Subpoints[2].y:=78;
Path[4].Subpoints[3].x:=644;
Path[4].Subpoints[3].y:=109;
Path[5].Mainpoint.x:=600;
Path[5].Mainpoint.y:=130;
Path[5].Subpoints[0].x:=654;
Path[5].Subpoints[0].y:=38;
Path[5].Subpoints[1].x:=663;
Path[5].Subpoints[1].y:=61;
Path[5].Subpoints[2].x:=569;
Path[5].Subpoints[2].y:=92;
Path[5].Subpoints[3].x:=599;
Path[5].Subpoints[3].y:=128;
Path[6].Mainpoint.x:=642;
Path[6].Mainpoint.y:=93;
Path[6].Subpoints[0].x:=629;
Path[6].Subpoints[0].y:=102;
Path[6].Subpoints[1].x:=649;
Path[6].Subpoints[1].y:=82;
Path[6].Subpoints[2].x:=630;
Path[6].Subpoints[2].y:=80;
Path[6].Subpoints[3].x:=601;
Path[6].Subpoints[3].y:=54;
Path[6].Subpoints[4].x:=661;
Path[6].Subpoints[4].y:=51;
Path[6].Subpoints[5].x:=610;
Path[6].Subpoints[5].y:=122;
MouseSpeed := 15 - random(5)
for i := 0 to 3 do
FindPath(i, True);
RoadColor := FindRoadColor;
for i := 4 to 6 do
FindPath(i, True);
end;
procedure Report; forward;
////////////////////////////////////////////////////////////////////////////////
//---> Handles which tree to walk to
////////////////////////////////////////////////////////////////////////////////
function WalkTo(Tree:integer):boolean;
begin
FixScreen;
if (Players[CurrentPlayer].Booleans[3]) then
SetRun(True);
Status('Walking to trees...');
case (Tree) of
0: begin
Result := WalkToOaks;
end;
1: begin
Result := WalkToOaks;
end;
2: begin
Result := WalkToWillows;
end;
3: begin
Result := WalkToMaples;
end;
4: begin
end;
5: begin
end;
end;
if (Players[CurrentPlayer].Booleans[3]) then
SetRun(False);
Report;
end;
////////////////////////////////////////////////////////////////////////////////
//---> Cuts the tree
////////////////////////////////////////////////////////////////////////////////
procedure CutTree;
begin
repeat
if (not (LoggedIn)) then
Exit;
Status('Finding a tree');
if (LocateTree) then
begin
MMouse(TreePt.x, TreePt.y, 0, 0);
if (IsUpText(Tree[CurrentTree].TreeText)) then
begin
Mouse(TreePt.x, TreePt.y, 0, 0, true);
if (FlagPresent) then
UpdateXY;
repeat
Status('Chopping');
if (InvCount = 28) then
begin
LogsCutCurrent := CountLogs;
LogsCut := LogsCutCurrent + LogsBanked;
Report;
Exit;
end;
if (CheckAxe) then
Exit;
if (HandleContinue) then
Mouse(TreePt.x, TreePt.y, 0, 0, true);
if(MyFindDead)then
begin
Dead := True;
Exit;
end;
if (FindRandoms) then
HandleRandoms;
LogsCutCurrent := CountLogs;
LogsCut := LogsCutCurrent + LogsBanked;
Report;
Status('Chopping');
AutoResponder;
NoBansForMe;
case random(4) of
0,2: SleepandMoveMouse(random(4000));
end;
until (not (TreeRemains));
end;
end else
begin
repeat
if (InvFull) then
Exit;
if (HandleContinue) then
Exit;
Wait(1000+random(500)-random(500));
FindRandoms;
NoBansForMe;
AutoResponder;
until (LocateTree);
end;
until (InvFull);
LogsCutCurrent := CountLogs;
LogsCut := LogsCutCurrent + LogsBanked;
Report;
end;
////////////////////////////////////////////////////////////////////////////////
//---> Handles the walk back to bank
////////////////////////////////////////////////////////////////////////////////
function WalkBack(Tree:integer):boolean;
begin
if (not(LoggedIn)) then
Exit;
if (Dead) then
Exit;
Status('Walking Back to Bank...');
WriteLn('Walking Back to Bank...');
case (Tree) of
0: begin
Result := WalkBackOaks;
end;
1: begin
Result := WalkBackOaks;
end;
2: begin
Result := WalkBackWillows;
end;
3: begin
Result := WalkBackMaples;
end;
4: begin
end;
5: begin
end;
end;
Report;
end;
////////////////////////////////////////////////////////////////////////////////
//---> Banks the logs
////////////////////////////////////////////////////////////////////////////////
procedure Bank;
var
i, Times : integer;
begin
Status('Banking');
BankGlassArray[0] := BitmapFromString(13, 6, 'beNpNzGELwiAQgOF/HayaiyC3' +
'XLdON02dW/RPuzi4hOfjy2uVGw8eGrEFLYr/q5vX8yQinsk7DuSTT' +
'ZiOos6SbcXqOjBXwhkfWLZKUObdfcZ+wYEZfak/2SlW4rQnZGl55A' +
'AM4WZBk9/wCzhPgZg=');
BankGlassArray[1] := BitmapFromString(9, 6, 'beNpdyd0KQDAYANBH9SC7wIWiKe' +
'OLYcMkMz+JN/SJptS5O8SpU/chwLMk+JR89VssFgfAQkhfeRZxoAh' +
'L8sRSEiysURVIKz715cMM1aoF1m4adMztbbmdW4foBcpRXZI=');
BankGlassArray[2] := BitmapFromString(10, 6, 'beNpNx10LgyAYBtC/XW3ZINe3' +
'pk4rkwoKdrUf2QMvyODcnG8IloMdEpjHR7QaBk6k0TI+yaoZcTKNv' +
'M7/ib6cZEbQtipIV70m00HNc2jeDKxuwJkWjqBBCU7CLDevzv1Drt' +
'3+bshzY0Y=');
BankGlassArray[3] := BitmapFromString(10, 8, 'beNo9wo0KgjAUBtAHnzZFbaZO3' +
'a44nRaVZPT3jn0wuIfzXBslUKsI60KgVjG3OuHUpqaRIekUnc3Cye' +
'Z8piIcW+G6iE99zL2RKjvwMpdYHROsVYrUKRz6Ekd7QkcVv8zd1Ru' +
'8LRbvK/HtPLy2Cd+P+bN7/t0X/P0Bg0OGjQ==');
Status('Opening Bank');
if(not(LoggedIn))then
Exit;
if(Dead)then
begin
Dead := False;
if(not(DeathTele))then
begin
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;
end;
if not(GoodAxe) then
UnequipAxe;
Wait(200+random(50));
LogsBanked := LogsBanked + CountLogs;
Status('Finding Bank Booth');
repeat
Times := Times + 1;
if (FindBitmapsProgressiveTol(x,y,BankGlassArray,60,5,MSCX-60,MSY1,MSCX+60,MSCY - 5)) then
MMouse(x + randomRange(3, 5), y + randomRange(7, 10), 2, 2);
if (Times > 25) then
begin
WriteLn('Could not find bank booth; we must have messed up walking.');
Logout;
TerminateScript;
end;
Wait(random(10));
until (IsUpText('ooth'));
Mouse(x, y + 10, 1, 1, false);
FreeBitmap(BankGlass);
ChooseOption('uickly');
Flag;
Wait(1000+random(500)-random(500));
if (PinScreen) then
begin
Status('Entering Pin');
MyInPin(Players[CurrentPlayer].Strings[0]);
Wait(1000);
end;
if not (PinScreen) and (BankScreen) then
begin
Status('Banking');
Wait(200+random(200));
if not(Players[CurrentPlayer].Booleans[1]) and (GoodAxe) then
Deposit(2,28,true) else
DepositAll;
if not(GoodAxe) then
if (WithdrawAxe) then
GoodAxe := true;
CloseBank;
Inc(Players[CurrentPlayer].Banked);
Inc(Banks);
WriteLn('Banked Successfully.');
Report;
for i := 0 to 2 do
FreeBitmap(BankGlassArray[i]);
end;
if not(GoodAxe) then
begin
Logout;
WriteLn('Couldn''t find a new axe');
TerminateScript;
end else
EquipNewAxe;
end;
////////////////////////////////////////////////////////////////////////////////
//---> Restarts Vars and sets up the player
////////////////////////////////////////////////////////////////////////////////
function SetupPlayer:boolean;
begin
Loads := 0;
FixScreen;
if(LoggedIn)then
Result := True else
TerminateScript;
SetRun(False);
Players[CurrentPlayer].Integers[4] := GetSkillInfo('woodcutting',false);
GameTab(4);
end;
procedure MySig; forward;
////////////////////////////////////////////////////////////////////////////////
//---> Sets up the script and form
////////////////////////////////////////////////////////////////////////////////
procedure SetupScript;
begin
ClearDebug;
SetupSRL;
SRLRandomsReport;
MySig;
Status('Running form');
SafeInitForm;
Status('Loading SMART');
smartSetup('world28', False, True);
While Not (SmartReady) Do
Wait(100);
SetTargetDC(SmartGetDC);
If Not (LoggedIn) Then
While Not (SmartGetColor(386, 249) = 65535) Do
Wait(100);
SafeShowFormModal;
FormSave;
DeclarePlayers;
GoodAxe := true;
FormDPTest;
LoadStuff(Players[CurrentPlayer].Integers[0]);
Loads := 0;
ActivateClient;
MouseSpeed := (15 - random(5));
Wait(1000);
//LoginPlayer;
//SetupPlayer;
FreeForm(frmDesign);
end;
////////////////////////////////////////////////////////////////////////////////
//---> Proggy
////////////////////////////////////////////////////////////////////////////////
procedure Proggy;
begin
WriteLn('Progress Report for ' + Players[CurrentPlayer].Name);
WriteLn(' | Player has worked for ' + TimeRunning + ' minute[s].');
WriteLn(' | Player has cut ' + InttoStr(LogsCut) + ' log[s].');
WriteLn(' | Player has banked ' + InttoStr(Players[CurrentPlayer].Banked) + ' time[s].');
if (Talks > 0) then
WriteLn(' | Player has talked ' + InttoStr(Talks) + ' time[s]');
WriteLn(' | Post your proggies and comments at SRL-Forums.com.');
end;
function CalculateXP : integer; forward;
////////////////////////////////////////////////////////////////////////////////
//---> Report
////////////////////////////////////////////////////////////////////////////////
procedure Report;
var
H, M, S: Integer;
begin
case (Players[CurrentPlayer].Integers[0]) of
0 : Tree[0].SpLogsCut := LogsCut - (Tree[1].SpLogsCut + Tree[2].SpLogsCut +
Tree[3].SpLogsCut + Tree[4].SpLogsCut + Tree[5].SpLogsCut);
1 : Tree[1].SpLogsCut := LogsCut - (Tree[0].SpLogsCut + Tree[2].SpLogsCut +
Tree[3].SpLogsCut + Tree[4].SpLogsCut + Tree[5].SpLogsCut);
2 : Tree[2].SpLogsCut := LogsCut - (Tree[1].SpLogsCut + Tree[0].SpLogsCut +
Tree[3].SpLogsCut + Tree[4].SpLogsCut + Tree[5].SpLogsCut);
3 : Tree[3].SpLogsCut := LogsCut - (Tree[1].SpLogsCut + Tree[2].SpLogsCut +
Tree[0].SpLogsCut + Tree[4].SpLogsCut + Tree[5].SpLogsCut);
4 : Tree[4].SpLogsCut := LogsCut - (Tree[1].SpLogsCut + Tree[2].SpLogsCut +
Tree[3].SpLogsCut + Tree[0].SpLogsCut + Tree[5].SpLogsCut);
5 : Tree[5].SpLogsCut := LogsCut - (Tree[1].SpLogsCut + Tree[2].SpLogsCut +
Tree[3].SpLogsCut + Tree[4].SpLogsCut + Tree[0].SpLogsCut);
end;
ConvertTime(GetTimeRunning, H, M, S);
SRLRandomsReport;
AddToReport('| The S.V.C. |');
AddToReport('| by Markuksa815 |');
AddToReport('|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|');
if (LogsCut > 0) then
AddToReport('Total Logs Cut : ' + IntToStr(LogsCut));
if (Tree[0].SpLogsCut > 0) then
AddToReport('Normals Cut : ' + IntToStr(Tree[0].SpLogsCut));
if (Tree[1].SpLogsCut > 0) then
AddToReport('Oaks Cut : ' + IntToStr(Tree[1].SpLogsCut));
if (Tree[2].SpLogsCut > 0) then
AddToReport('Willows Cut : ' + IntToStr(Tree[2].SpLogsCut));
if (Tree[3].SpLogsCut > 0) then
AddToReport('Maples Cut : ' + IntToStr(Tree[3].SpLogsCut));
if (Tree[4].SpLogsCut > 0) then
AddToReport('Yews Cut : ' + IntToStr(Tree[4].SpLogsCut));
if (Tree[5].SpLogsCut > 0) then
AddToReport('Magics Cut : ' + IntToStr(Tree[5].SpLogsCut));
if (LogsCut > 0) then
AddToReport('Experience Gained : ' + IntToStr(CalculateXP));
if (Players[CurrentPlayer].Banked > 0) then
AddToReport('Banked : ' + IntToStr(Players[CurrentPlayer].Banked));
if (LevelsGained > 0) then
AddToReport('Levels Gaind : ' + IntToStr(LevelsGained));
AddToReport('Time Running: '+IntToStr(H)+' hr '+IntToStr(M)+' min '+IntToStr(S)+' sec');
end;
function CalculateXP:integer;
begin
result := Round((Tree[0].SpLogsCut * 25) + (Tree[1].SpLogsCut * 37.5) +
(Tree[2].SpLogsCut * 67.5) + (Tree[3].SpLogsCut * 100) +
(Tree[4].SpLogsCut * 175) + (Tree[5].SpLogsCut * 250));
end;
////////////////////////////////////////////////////////////////////////////////
//---> MySig
////////////////////////////////////////////////////////////////////////////////
procedure MySig;
begin
WriteLn(' ## ## ### # # 888 1 5555');
WriteLn(' # # # ## # # # 8 8 11 5');
WriteLn(' ## ## # # ## #### ## ## # # # ## ## ## 888 1 555');
WriteLn(' # # # # # # # ### ## # # # ### # # 8 8 1 5');
WriteLn(' # # # ## # # # # # # # # ## ## # # # # ## # # 8 8 1 5');
WriteLn(' # # ## ## # ## # ### ### ### #### # ### ## ### 888 111 555');
end;
////////////////////////////////////////////////////////////////////////////////
//---> Switches players
////////////////////////////////////////////////////////////////////////////////
function MyPlayer(Active: Boolean): Boolean;
begin
NextPlayer(Active);
Loads := 0;
FixScreen;
if(LoggedIn)then
Result := True else
TerminateScript;
SetRun(False);
GameTab(4);
end;
////////////////////////////////////////////////////////////////////////////////
//---> Main Loop
////////////////////////////////////////////////////////////////////////////////
begin
SetupScript;
repeat
LoadStuff(Players[CurrentPlayer].Integers[0]);
WalkTo(Players[CurrentPlayer].Integers[0]);
CutTree;
WalkBack(Players[CurrentPlayer].Integers[0]);
Bank;
Proggy;
Inc(Loads);
{
if (Loads >= (Players[CurrentPlayer].Integer1)) then
MyPlayer(true);
if (not(LoggedIn)) then
MyPlayer(false);
}
until (Loads >= Players[CurrentPlayer].Integers[1]);
Logout;
WriteLn('Script is finished. Post progress reports on SRL-Forums.com.');
WriteLn('Script by Markuska815');
MySig;
end.
{
## ## ### # # 888 1 5555
# # # ## # # # 8 8 11 5
## ## # # ## #### ## ## # # # ## ## ## 888 1 555
# # # # # # # ### ## # # # ### # # 8 8 1 5
# # # ## # # # # # # # # ## ## # # # # ## # # 8 8 1 5
# # ## ## # ## # ### ### ### #### # ### ## ### 888 111 555
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Variables:
Players[CurrentPlayer].Strings[0] = Pin String
Players[CurrentPlayer].Integers[0] = CurrentTree
Players[CurrentPlayer].Integers[1] = Loads to do
Players[CurrentPlayer].Integers[2] = LogBMP
Players[CurrentPlayer].Booleans[0] = Cut the highest tree
Players[CurrentPlayer].Booleans[1] = AxeWielded
Players[CurrentPlayer].Booleans[2] = Tele Back to Seers
Players[CurrentPlayer].Booleans[3] = Run to Tree
Tree[].Color[0] = First Tree Color;
Tree[].Color[1] = Second Tree Color;
Tree[].Color[2] = Third Tree Color;
Tree[].TreeText = Tree Text;
Tree[].SpLogsCut = Specific Logs Cut;
Tree[].LogBmp = Log Bitmap;
Tree[].DTMs = Dtm Array;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tree Numbers
0 = Regular
1 = Oad
2 = Willow
3 = Maple
4 = Yew
5 = Magic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Version Notes
0.4 - Bank Funcion tweaked, HandleContinue fixed, BirdsNest tweaked, Tweaked FindEnt, SMART added - FindNormalRandoms isnt called, CountLogs and such need more failsafes
0.45 - Found out why FindRandoms wasn't working - Was starting logged in without declaring nickTPA
0.5 - Randoms function tweaked, FindBirdsNest tweaked (It finds the nest great but problems w/ opening it), WalkToMaples bug fixed
0.51 - FindBirdsNest tweaked to work for all three types of nests, Added HandleRandoms to make it look nicer, Added MyInPin, Freed some memory considering it was basically crashing once you used it enough
0.52 - HandleContinue tweaked, HandleRandoms tweaked, FindBirdsNest tweaked, Talks removed from my Report, DropUnwanted added
0.53 - Added all axe functions : CheckAxe, WithdrawAxe, UnequipAxe, EquipNewAxe - they might need some work
}——————————————————
<!– END TEMPLATE: formanswers –>