Derek-
2007-09-07 19:02:51
<!– BEGIN TEMPLATE: formanswers –>
Derek- - SRL Member Application Form
Derek-
What is the meaning to life?
Trying your best to be "happy"
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Not much
Other Communitys
None
How Long have You Played Runescape
About 2 Years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
About Myself: I like to consider myself very benevolent. I enjoy helping people and love to be of assistance. Not to mention my passion for scripting. I have scripted for a while now and I love the challenges you come to face when scripting and having to overcome them. Having to go around the game-maker's way of trying to stop us is amusing ( =] I like the creativity in going around these obstacles.) Anyway, slightly offtopic, becoming an SRL Member would be a huuggee acheivement for me (as I was one of those people who in the beginning said "there's noo waayy I'll ever be able to do this" but I committed to it and can't believe how far I've come) =]] I also love how "legendary" you guys have made becoming a member to be, like it's everyone's dream to make it to becoming a member. There's lots more I want to say but I don't want to bore you guys =]] Thanks Everyone. =] Derek-
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
MY PEST CONTROL SCRIPT:
MY EVERY-TREE-CUTTER:
——————————————————
<!– END TEMPLATE: formanswers –>
Derek- - SRL Member Application Form
Derek-
What is the meaning to life?
Trying your best to be "happy"
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Not much
Other Communitys
None
How Long have You Played Runescape
About 2 Years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
About Myself: I like to consider myself very benevolent. I enjoy helping people and love to be of assistance. Not to mention my passion for scripting. I have scripted for a while now and I love the challenges you come to face when scripting and having to overcome them. Having to go around the game-maker's way of trying to stop us is amusing ( =] I like the creativity in going around these obstacles.) Anyway, slightly offtopic, becoming an SRL Member would be a huuggee acheivement for me (as I was one of those people who in the beginning said "there's noo waayy I'll ever be able to do this" but I committed to it and can't believe how far I've come) =]] I also love how "legendary" you guys have made becoming a member to be, like it's everyone's dream to make it to becoming a member. There's lots more I want to say but I don't want to bore you guys =]] Thanks Everyone. =] Derek-
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
MY PEST CONTROL SCRIPT:
{NOTE:: This script is P2P and does NOT include use of Anti-Randoms(not
necessary since if a random DOES occur, once you get into the PC boat
again the random cannot affect you), thus I have also posted(see
below) a F2P Every-Tree-PowerCutter which I have made that DOES
demonstrate use of Anti-Randoms.
Thanks, =]
Derek-
{
+ ==================================================================== +
- Welcome to Derek's Ultimate Pcer - Version 2.57 -
+ = + = = = + = = + = = = + =
+ = + + = + + =
+ = + = = + = + = = + = + = =
+ = + = = + = + = = + = + = =
+ = + + = + + =
+ = + = = = + = + = = = + =
+ ==================================================================== +
+ +
+ +
+ Note: +
+ -This script IS compatible with all three Pest Control boats. +
+ Don't worry, you will be prompted asking which boat you would like +
+ to use when starting the script. The only thing you must do is make+
+ sure to start (logged in or out) DIRECTLY BESIDE THE GANKPLANK of +
+ the boat that you will be using. +
+ +
+ -And if you are using the DBAxe Spec function, make sure to have it+
+ in your FIRST invitory slot. +
+ +
+ HOPE YOU ENJOY!!, Derek- +
+ ==================================================================== + } {
}
//____________________________________________________________________\\
//____________________________________________________________________\\
program DereksUltimatePCer;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Prayer.scar}
{.include SRL/SRL/core/users.scar}
type //by iloveit8
BooleanPlus = (True,False,Maybe);
var //Integers
PL, SB, HK, W, Q, x, y, i : Integer;
CrossTimeII, NPCdot, PrayUseII, Attemp, TimeII, Color : Integer;
CrossTime, SpecTime, Portal, Waits, Trie, Tri, Pray, PrayUse : Integer;
EnterTries, Wins, Losses, MoreZeal, GamesPlayed, PcPoints, Turns : Integer;
var //Booleans
PO : BooleanPlus;
Win, Loose, Over, MarkII, Found : Boolean;
var //Forms
v : TVariantArray;
frmDesign : TForm;
Add, Delete1, Finish1 : TButton;
Label1, Label2, Label3, Label4, Label5, Label6, Label7, Label8, Label9 : TLabel;
var //Arrays
BAxe, PrayerBox : array of TCheckBox;
UseBattleAxe, UsePray : array of Boolean;
Username, Password, Edit1 : array of TEdit;
HowMany, SelectedBoat, OnlyOne : array of Integer;
BoatSelect, AttackStyle, WhereAtt : array of TComboBox;
Const //Constants
VersionNumber= '2.57'; //no need to edit
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure ProgressReport;
begin
WriteLn('__________________________Derek-s Ultimate PCer.________________________________');
WriteLn('CURRENT PLAYER: ' +Players[SB].Name+ '.');
WriteLn('Progress Report after ' +TimeRunning+ '.');
WriteLn('You Currently Have ' +IntToStr(PcPoints)+ ' Pest Control Points.');
WriteLn('*******************');
WriteLn('*Games Played: ' +IntToStr(GamesPlayed)+ ' *');
WriteLn('*Games Won: ' +IntToStr(Wins)+ ' *');
WriteLn('*Games Lost: ' +IntToStr(Losses)+ ' *');
WriteLn('*******************');
WriteLn('');
WriteLn('');
WriteLn('');
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure AddPlayer(sender: tobject);
begin
Label1.Visible := True;
Label2.Visible := True;
Label3.Visible := True;
Label4.Visible := True;
Label5.Visible := True;
Label6.Visible := True;
Label8.Visible := True;
Label9.Visible := True;
Finish1.Visible := True;
PL := PL + 1;
Label7.Caption := 'Currently ' +IntToStr(PL)+ ' Player(s)';
Q := GetArrayLength(Username);
HK := GetArrayLength(Username);
SetArrayLength(Username, Q + 1);
SetArrayLength(Password, Q + 1);
SetArrayLength(AttackStyle, Q + 1);
SetArrayLength(BoatSelect, Q + 1);
SetArrayLength(WhereAtt, Q + 1);
SetArrayLength(PrayerBox, Q + 1);
SetArrayLength(OnlyOne, Q + 1);
SetArrayLength(Edit1, Q + 1);
SetArrayLength(BAxe, Q + 1);
SetArrayLength(HowMany, Q + 1);
SetArrayLength(SelectedBoat, Q + 1);
SetArrayLength(UseBattleAxe, Q + 1);
SetArrayLength(UsePray, Q + 1);
SetArrayLength(Players, 12);
Username[Q] := TEdit.Create(frmDesign);
Username[Q].Parent := frmDesign;
Username[Q].Left := 121;
Username[Q].Top := 91;
Username[Q].Width := 121;
Username[Q].Height := 21;
Username[Q].TabOrder := 8;
Password[Q] := TEdit.Create(frmDesign);
Password[Q].Parent := frmDesign;
Password[Q].Left := 121;
Password[Q].Top := 129;
Password[Q].Width := 121;
Password[Q].Height := 21;
Password[Q].TabOrder := 9;
Password[Q].PasswordChar :='*'
BoatSelect[Q] := TComboBox.Create(frmDesign);
BoatSelect[Q].Parent := frmDesign;
BoatSelect[Q].Left := 121;
BoatSelect[Q].Top := 211;
BoatSelect[Q].Width := 145;
BoatSelect[Q].Height := 21;
BoatSelect[Q].ItemHeight := 13;
BoatSelect[Q].TabOrder := 12;
BoatSelect[Q].Text := 'Select Boat';
BoatSelect[Q].Style := csDropDownList;
BoatSelect[Q].Items.Add('40+ Combat Level Boat');
BoatSelect[Q].Items.Add('70+ Combat Level Boat');
BoatSelect[Q].Items.Add('100+ Combat Level Boat');
WhereAtt[Q] := TComboBox.Create(frmDesign);
WhereAtt[Q].Parent := frmDesign;
WhereAtt[Q].Left := 121;
WhereAtt[Q].Top := 171;
WhereAtt[Q].Width := 145;
WhereAtt[Q].Height := 21;
WhereAtt[Q].ItemHeight := 13;
WhereAtt[Q].TabOrder := 19;
WhereAtt[Q].Style := csDropDownList;
WhereAtt[Q].Text := 'Where To Fight';
WhereAtt[Q].Items.Add('Only Attack Near Portals');
WhereAtt[Q].Items.Add('Only Attack In Center');
WhereAtt[Q].Items.Add('Attack Near Both');
AttackStyle[Q] := TComboBox.Create(frmDesign);
AttackStyle[Q].Parent := frmDesign;
AttackStyle[Q].Left := 121;
AttackStyle[Q].Top := 258;
AttackStyle[Q].Width := 145;
AttackStyle[Q].Height := 21;
AttackStyle[Q].ItemHeight := 13;
AttackStyle[Q].TabOrder := 12;
AttackStyle[Q].Text := 'Attack Style';
AttackStyle[Q].Style := csDropDownList;
AttackStyle[Q].Visible := False;
AttackStyle[Q].Items.Add('Melee');
AttackStyle[Q].Items.Add('Range');
AttackStyle[Q].Items.Add('Magic');
Edit1[Q] := TEdit.Create(frmDesign);
Edit1[Q].Parent := frmDesign;
Edit1[Q].Left := 271;
Edit1[Q].Top := 319;
Edit1[Q].Width := 47;
Edit1[Q].Height := 21;
Edit1[Q].TabOrder := 13;
BAxe[Q] := TCheckBox.Create(frmDesign);
BAxe[Q].Parent := frmDesign;
BAxe[Q].Left := 88;
BAxe[Q].Top := 283;
BAxe[Q].Width := 165;
BAxe[Q].Height := 17;
BAxe[Q].Caption := 'Use DBAxe Special Attack';
BAxe[Q].TabOrder := 16;
PrayerBox[Q] := TCheckBox.Create(frmDesign);
PrayerBox[Q].Parent := frmDesign;
PrayerBox[Q].Left := 88;
PrayerBox[Q].Top := 303;
PrayerBox[Q].Width := 97;
PrayerBox[Q].Height := 17;
PrayerBox[Q].Caption := 'Use Prayer';
PrayerBox[Q].TabOrder := 17;
Players[Q].Active := True;
Players[Q].Name := Username[Q].text;
Players[Q].Pass := Password[Q].text;
Players[Q + 1].Active := False;
Players[Q + 2].Active := False;
Players[Q + 3].Active := False;
Players[Q + 4].Active := False;
Players[Q + 5].Active := False;
Players[Q + 6].Active := False;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure FinishForm(sender: tobject);
begin
frmDesign.ModalResult:= mrOk;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure DeclarePlayers; //NOTE: No need to edit anything here,
begin // form does it all =]
HowManyPlayers := PL;
if not (Players[0].Active=True) then
begin
WriteLn('');
WriteLn('You must have at least one active player to begin script.');
WriteLn('');
TerminateScript;
end else
for i := 0 to (PL - 1) do
if (Players[i].Active=True) then
begin
Players[i].Name := Username[i].Text;
Players[i].Pass := Password[i].Text;
HowMany[i] := StrToInt(Edit1[i].Text);
Case BAxe[i].Checked of
True : UseBattleAxe[i] := True;
False : UseBattleAxe[i] := False;
end;
Case PrayerBox[i].Checked of
True : UsePray[i] := True;
False : UsePray[i] := False;
end;
Case WhereAtt[i].ItemIndex of
0 : OnlyOne[i] := 1;
1 : OnlyOne[i] := 2;
2 : OnlyOne[i] := 3;
end;
Case BoatSelect[i].ItemIndex of
0 : SelectedBoat[i] := 1;
1 : SelectedBoat[i] := 2;
2 : SelectedBoat[i] := 3;
end;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 270;
frmDesign.Top := 112;
frmDesign.Width := 358;
frmDesign.Height := 475;
frmDesign.Caption := 'Setup';
frmDesign.Color := clInactiveCaptionText;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 40;
Label1.Top := 96;
Label1.Width := 51;
Label1.Height := 13;
Label1.Caption := 'Username:';
Label1.Visible := False;
Label2 := TLabel.Create(frmDesign);
Label2.Parent := frmDesign;
Label2.Left := 40;
Label2.Top := 134;
Label2.Width := 49;
Label2.Height := 13;
Label2.Caption := 'Password:';
Label2.Visible := False;
Label3 := TLabel.Create(frmDesign);
Label3.Parent := frmDesign;
Label3.Left := 13;
Label3.Top := 323;
Label3.Width := 232;
Label3.Height := 13;
Label3.Caption := 'Number of games before switching to next player:';
Label3.Visible := False;
Label4 := TLabel.Create(frmDesign);
Label4.Parent := frmDesign;
Label4.Left := 45;
Label4.Top := 355;
Label4.Width := 155;
Label4.Height := 13;
Label4.Caption := 'NOTE: Player switching will loop.';
Label4.Visible := False;
Label5 := TLabel.Create(frmDesign);
Label5.Parent := frmDesign;
Label5.Left := 63;
Label5.Top := 372;
Label5.Width := 214;
Label5.Height := 13;
Label5.Caption := 'Ex. 5 games on Player One, 10 on Player Two,';
Label5.Visible := False;
Label6 := TLabel.Create(frmDesign);
Label6.Parent := frmDesign;
Label6.Left := 81;
Label6.Top := 386;
Label6.Width := 164;
Label6.Height := 13;
Label6.Caption := '5 more on Player One, and so on...';
Label6.Visible := False;
Label8 := TLabel.Create(frmDesign);
Label8.Parent := frmDesign;
Label8.Left := 40;
Label8.Top := 176;
Label8.Width := 77;
Label8.Height := 13;
Label8.Caption := 'Where To Fight:';
Label8.Visible := False;
Label9 := TLabel.Create(frmDesign);
Label9.Parent := frmDesign;
Label9.Left := 40;
Label9.Top := 216;
Label9.Width := 58;
Label9.Height := 13;
Label9.Caption := 'Select Boat:';
Label9.Visible := False;
Label7 := TLabel.Create(frmDesign);
Label7.Parent := frmDesign;
Label7.Left := 25;
Label7.Top := 23;
Label7.Width := 140;
Label7.Height := 20;
Label7.Caption := 'Currently ' +IntToStr(PL)+ ' Player(s)';
Label7.Font.Color := clWindowText;
Label7.Font.Height := -16;
Label7.Font.Name := 'MS Sans Serif';
Label7.Font.Style := [];
Label7.ParentFont := False;
Add := TButton.Create(frmDesign);
Add.Parent := frmDesign;
Add.Left := 247;
Add.Top := 23;
Add.Width := 75;
Add.Height := 25;
Add.Caption := 'Add Player';
Add.TabOrder := 10;
Add.OnClick := @AddPlayer;
Delete1 := TButton.Create(frmDesign);
Delete1.Parent := frmDesign;
Delete1.Left := 247;
Delete1.Top := 57;
Delete1.Width := 75;
Delete1.Height := 25;
Delete1.Caption := '';
Delete1.TabOrder := 14;
Delete1.Visible := False;
Finish1 := TButton.Create(frmDesign);
Finish1.Parent := frmDesign;
Finish1.Left := 258;
Finish1.Top := 398;
Finish1.Width := 75;
Finish1.Height := 25;
Finish1.Caption := 'Finished';
Finish1.TabOrder := 15;
Finish1.Visible := False;
Finish1.OnClick := @FinishForm;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure SafeInitForm;
begin
SetArrayLength(V, 0);
ThreadSafeCall('InitForm', v);
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure SafeShowFormModal;
begin
SetArrayLength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure FindPrayer;
begin
if (LoggedIn=False) then
begin
Exit;
end;
Pray := GetSkillLevel('Prayer');
Wait(300 + Random(200));
GameTab(4);
if (Pray >= 1) and (Pray <4) then
begin
PrayUse := 1;
end else
if (Pray >= 4) and (Pray <7) then
begin
PrayUse := 1;
PrayUseII := 2;
end else
if (Pray >= 7) and (Pray <10) then
begin
PrayUse := 2;
PrayUseII := 3;
end else
if (Pray >= 10) and (Pray <13) then
begin
PrayUse := 3;
PrayUseII := 6;
end else
if (Pray >= 13) and (Pray <16) then
begin
PrayUse := 6;
PrayUseII := 7;
end else
if (Pray >= 16) and (Pray <28) then
begin
PrayUse := 7;
PrayUseII := 8;
end else
if (Pray >= 28) and (Pray <31) then
begin
PrayUse := 8;
PrayUseII := 14;
end else
if (Pray >= 31) and (Pray <34) then
begin
PrayUse := 14;
PrayUseII := 15;
end else
begin
PrayUse := 15;
PrayUseII := 16;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure SwitchPlayers;
begin
if (HowManyPlayers < 1) then
begin
TerminateScript;
end else
begin
NextPlayerOrder(True);
SB := CurrentPlayer;
W := 0;
MarkII := False;
GamesPlayed := 0;
PCPoints := 0;
MoreZeal := 0;
Wins := 0;
Losses := 0;
SetRun(True);
SetChat('off', 2);
SetChat('off', 3);
FindPrayer;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure LoadBitmaps;
begin
NPCdot := BitmapFromString2(False, 'a446D578DA958E510E8030' +
'0843AF046C8CFDCE09F73F9274FE18A389F2F1D2B4254044E496A' +
'0C1895A2BD8609431923CA1D57AB2B1800A2D1D4D55C41A5868B2' +
'9AE2CB87AE56D05C7E1BE89B06B8417341930DFAD784877301C95' +
'FD319932434F2913DE7D639D345DF3DD399F374EBDCBDA4FCFDCF' +
'030DC');
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure StartUps;
begin
if not (SRLVersionNumber = '4.00') then
begin
WriteLn('You cannot run this script.')
WriteLn('You do not have SRL Version 4.0')
WriteLn('You can find it at:')
Writeln('http://www.srl-forums.com/forum/download-srl-here-f145.html');
TerminateScript;
end;
SetupSRL;
Disguise('My Computer');
ClearDebug;
ClearReport;
WriteLn('________________________________________________________________________');
WriteLn('+ = + = = = + = = + = = = + =');
WriteLn('+ = + + = + + =');
WriteLn('+ = + = = + = + = = + = + = = ');
WriteLn('+ = + = = + = + = = + = + = = ');
WriteLn('+ = + + = + + = ');
WriteLn('+ = + = = = + = + = = = + = s');
WriteLn('________________________________________________________________________');
WriteLn('Ultimate PCer --- Version '+VersionNumber);
AddToReport('Thank you!');
AddToReport('');
AddToReport('Please tell me');
AddToReport(' what you think');
AddToReport(' of my script.');
AddToReport('');
AddToReport('');
AddToReport(' Thanks,');
AddToReport(' Derek-');
LoadBitmaps;
CurrentPlayer := 0;
MarkII := False;
PO := Maybe;
SafeInitForm;
SafeShowFormModal;
DeclarePlayers;
FreeForm(FrmDesign);
FindWindowTitlePart('Runescape', False);
FindRS;
ActivateClient;
if (LoggedIn=False) then
begin
repeat
NextPlayerOrder(True);
until (LoggedIn=True)
end;
if (LoggedIn=True)then
begin
SetRun(True);
SetChat('off', 2);
SetChat('off', 3);
FindPrayer;
Exit;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure ResetAttackVars;
begin
Attemp := 0;
Tri := 0;
Trie := 0;
Found := False;
Turns := 0;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure AntiBann;
begin
if (LoggedIn=False) then
begin
Exit;
end;
if FindNpcChatText('fend') then
begin
Waits := 0;
Exit;
end else
Case Random(4) of
1 : begin
GameTab(1 + Random(12));
Wait(800 + Random(200));
GameTab(4);
end;
2 : begin
DoEmote(Random(20));
Wait(800 + Random(200));
GameTab(4);
end;
3 : Mouse(242, 56, 150, 150, True);
4 : begin
HoverSkill('random', False);
GameTab(4);
end;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure DBaxeSpec;
begin
if (LoggedIn=False) then
begin
Exit;
end;
if (UseBattleAxe[SB]=False) then
begin
Exit;
end;
if (UseBattleAxe[SB]=True) then
begin
MouseItem(1, True);
Wait(100);
GameTab(1);
Wait(100);
repeat
MouseBox(574, 419, 709, 426, PO);
until IsUpText('cial') or (TimeFromMark(SpecTime) > 15000)
if IsUpText('cial') then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
GameTab(4);
MouseItem(1, True);
Exit;
end;
if (TimeFromMark(SpecTime) > 15000) then
begin
GameTab(4);
MouseItem(1, True);
Exit;
end;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure GetPCPoints;
begin
if (LoggedIn=False) then
begin
Exit;
end;
if (IsTextInAreaEx(13, 77, 114, 97, x, y, 'oints', 100, SmallChars, True,
True, 0, 2, -1)) then
begin
PcPoints := StrToInt(Trim(GetTextAtEx(x + 36, y, 30, SmallChars, True, False, 0, 2,
-1, 4, False, tr_Digits)));
end else
begin
Exit;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure FigurePoints;
begin
if (LoggedIn=False) then
begin
Exit;
end;
if (Win=True) then
Case SelectedBoat[SB] of
1 : PCPoints := PCPoints + 2;
2 : PCPoints := PCPoints + 3;
3 : PCPoints := PCPoints + 4;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure GetInBoat;
begin
if (LoggedIn=False) then
begin
Players[CurrentPlayer].Active := False;
HowManyPlayers := HowManyPlayers - 1;
SwitchPlayers;
end;
if (SelectedBoat[SB]=1) then
begin
MakeCompass('n');
end else
begin
MakeCompass('s');
end;
HighestAngle;
begin
if (MarkII=False) then
begin
MarkTime(CrossTime);
end else
begin
MarkTime(CrossTimeII);
end;
MMouse(310, 175, 0, 0);
GetMousePos(x, y);
if IsUpTextMulti('angpl', 'plank', 'ross') then
begin
Mouse(x, y, 0, 0, False);
Wait(200 + Random(100));
if (ChooseOption('Cross')=True) then
begin
EnterTries := 0;
Exit;
end else
begin
EnterTries := EnterTries + 1;
GetInBoat;
end;
end;
if not IsUpTextMulti('angpl', 'plank', 'ross') then
repeat
MouseBox(284, 148, 335, 211, PO);
Wait(500 + Random(300));
if (MarkII=False) then
begin
TimeII := TimeFromMark(CrossTime);
end else
begin
TimeII := TimeFromMark(CrossTimeII);
end;
until IsUpTextMulti('angpl', 'plank', 'ross') or (TimeII > 30000)
if IsUpTextMulti('angpl', 'plank', 'ross') then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(200 + Random(100));
if ChooseOption('Cross')=True then
begin
EnterTries := 0;
Exit;
end;
if not ChooseOption('Cross')=True then
begin
EnterTries := EnterTries + 1;
if (EnterTries > 5) then
begin
Logout;
WriteLn('Could Not Cross Gangplank.');
Players[CurrentPlayer].Active := False;
HowManyPlayers := HowManyPlayers - 1;
SwitchPlayers;
Exit;
end;
GetInBoat;
end;
end;
if (MarkII=True) then
if (TimeII > 30000 + Random(6000)) then
begin
Logout;
WriteLn('Error Trying To Get In Boat.');
Players[CurrentPlayer].Active := False;
HowManyPlayers := HowManyPlayers - 1;
SwitchPlayers;
Exit;
end;
if (MarkII=False) then
if (TimeII > 30000 + Random(6000)) then
begin
if FindSymbol(x, y, 'anvil') then
begin
MarkII := False;
MMouse(x, y, 0, 0);
Wait(500 + Random(200));
Mouse(x, y, 0, 0, True);
FFlag(10);
if (SelectedBoat[SB]=1) then
begin
MakeCompass('s');
Wait(500 + Random(200));
MMouse(614, 20, 0, 0);
Wait(500 + Random(200));
Mouse(614, 20, 0, 0, False);
FFlag(10);
MMouse(274, 52, 0, 0);
Wait(500 + Random(200));
Mouse(274, 52, 0, 0, True);
GetInBoat;
end;
if (SelectedBoat[SB]=2) then
begin
MakeCompass('w');
MMouse(579, 69, 0, 0);
Wait(500 + Random(200));
Mouse(579, 69, 0, 0, True);
FFlag(10);
GetInBoat;
end;
if (SelectedBoat[SB]=3) then
begin
MakeCompass('w');
Wait(500 + Random(200));
MMouse(618, 37, 0, 0);
Wait(500 + Random(200));
Mouse(618, 37, 0, 0, True);
FFlag(10);
GetInBoat;
end;
end;
end;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Function MakeSureInBoat : Boolean;
begin
if (LoggedIn=False) then
begin
Exit;
end;
if (FindColorAbstract(x, y, 10714989, 2, 395, 168, 416, 180, 399, 190, 415, 192)) or
(FindColorAbstract(x, y, 10583404, 2, 395, 168, 416, 180, 399, 190, 415, 192)) then
begin
Result := True;
if W < 4 then
begin
W := W + 1;
end else
begin
W := 0;
end;
Win := False;
Over := False;
Loose := False;
MarkII := False;
MakeCompass('s');
if (GamesPlayed = 0 or 1) then
begin
GetPCPoints;
end;
Exit;
end else
begin
Wait(5000 + Random(100));
if (FindColorAbstract(x, y, 10912625, 2, 395, 168, 416, 180, 399, 190, 415, 192)) or
(FindColorAbstract(x, y, 10714989, 2, 395, 168, 416, 180, 399, 190, 415, 192)) or
(FindColorAbstract(x, y, 10321004, 2, 395, 168, 416, 180, 399, 190, 415, 192)) then
begin
Result := True;
if W < 4 then
begin
W := W + 1;
end else
begin
W := 0;
end;
Win := False;
Over := False;
Loose := False;
MarkII := False;
if (GamesPlayed = 0 or 1) then
begin
GetPCPoints;
end;
MakeCompass('s');
Exit;
end else
begin
Result := False;
if MakeSureInBoat=False then
begin
GetInBoat;
end else
begin
Result := True;
Exit;
end;
if MakeSureInBoat=False then
begin
WriteLn('Getting In Boat Problem');
SwitchPlayers;
end;
end;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Function IsGameStarted: Boolean;
begin
if (LoggedIn=False) then
begin
Exit;
end;
if (MakeSureInBoat=True) then
begin
repeat
if FindNpcChatText('fend') or (not (IsTextInAreaEx(13, 77, 114, 97, x, y, 'oints', 100, SmallChars, True,
True, 0, 2, -1))) then
begin
Result := True;
end else
begin
Waits := Waits + 1;
if (Waits >= 15) then
begin
AntiBann;
Waits := 0;
end;
end;
until (Result=True)
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Function WhichPortal: Boolean;
begin
repeat
if (OnlyOne[SB] = 2) then
begin
Portal := 5;
Result := True;
Break;
Exit;
end else
Case W of
0 : begin
Portal := 1;
Result := True;
end;
1 : begin
Portal := 2;
Result := True;
end;
2 : begin
Portal := 3;
Result := True;
end;
3 : begin
Portal := 4;
Result := True;
end;
4 : begin
if (OnlyOne[SB]=3) then
begin
Portal := 5;
Result := True;
Exit;
end else
begin
W := 0;
end;
end;
end;
until (Result=True)
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure GoToPortal;
begin
if (LoggedIn=False) then
begin
Exit;
end;
WhichPortal;
if (IsGameStarted=True) then
begin
MakeCompass('s');
end;
if (Portal=1) then
begin
i := 0;
MMouse(633, 14, 2, 2);
GetMousePos(x, y);
Wait(500 + Random(300));
repeat
begin
Mouse(x, y, 2, 2, True);
Wait(3000 + Random(500));
i := i + 1;
end;
until i>=3
end;
if (Portal=2) then
begin
MMouse(633, 14, 2, 2);
GetMousePos(x, y);
Wait(500 + Random(300));
repeat
begin
Mouse(x, y, 2, 2, True);
Wait(3000 + Random(500));
i := i + 1;
end;
until i>=3
Wait(3000 + Random(500));
MMouse(689, 47, 2, 2);
GetMousePos(x, y);
Wait(500 + Random(300));
Mouse(x, y, 0, 0, True);
end;
if (Portal=3) then
begin
MMouse(633, 14, 2, 2);
GetMousePos(x, y);
Wait(500 + Random(300));
Mouse(633, 14, 0, 0, True);
Wait(6000 + Random(3000));
MakeCompass('e');
Wait(100 + Random(100));
MMouse(650, 20, 2, 2);
GetMousePos(x, y);
Wait(500 + Random(300));
Mouse(x, y, 0, 0, True);
Wait(3000 + Random(500));
end;
if (Portal=4) then
begin
i := 0;
MMouse(651, 14, 0, 0);
Wait(500 + Random(300));
Mouse(651, 14, 0, 0, True);
Wait(6000 + Random(3000));
MakeCompass('w');
Wait(100 + Random(100));
MMouse(620, 14, 0, 0);
Wait(500 + Random(200));
repeat
Mouse(620, 14, 0, 0, True);
Wait(2000 + Random(1000));
i := i + 1;
until i>=2
end;
if (Portal=5) then
begin
MMouse(648, 11, 0, 0);
Wait(500 + Random(300));
Mouse(648, 11, 0, 0, True);
Wait(3000 + Random(500));
end;
DBaxeSpec;
if (UsePray[SB]=True) then
begin
ClickPrayer(IntToStr(PrayUseII), True);
ClickPrayer(IntToStr(PrayUse), True);
GameTab(4);
Exit;
end else
begin
Exit;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Function IsGameOver: Boolean;
begin
if (LoggedIn=False) then
begin
Exit;
end;
if not FindNpcChatText('a') then
begin
Exit;
end else
repeat
if FindNpcChatText('tion') then
begin
Wins := Wins + 1;
Win := True;
Break;
end;
if FindNpcChatText('illed') then
begin
Losses := Losses + 1;
Break;
end;
if FindNpcChatText('oticed') then
begin
MoreZeal := MoreZeal + 1;
Break;
end;
until (False)
Result := True;
Over := True;
ClickToContinue;
FigurePoints;
GamesPlayed := GamesPlayed + 1;
Case (GamesPlayed/2) of
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 : ProgressReport;
end;
if (GamesPlayed >= HowMany[SB]) then
begin
ProgressReport;
SwitchPlayers;
end;
Exit;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Function HaveIDied: Boolean;
begin
if (LoggedIn=False) then
begin
Exit;
end;
if not (IsChatBlackTextAnyLine('h dear')) then
begin
Exit;
end;
if (IsChatBlackTextAnyLine('h dear')) then
begin
for i := 0 to 1 do
if (FindColorAbstract(x, y, 10714989, 5, 445, 135, 493, 133, 455, 175, 499, 174)) or
(FindColorAbstract(x, y, 10912625, 5, 445, 135, 493, 133, 455, 175, 499, 174)) or
(FindColorAbstract(x, y, 10321004, 5, 445, 135, 493, 133, 455, 175, 499, 174)) or
(FindColorAbstract(x, y, 10583404, 5, 445, 135, 493, 133, 455, 175, 499, 174)) then
begin
if (IsGameOver=False) then
begin
Result := True;
GoToPortal;
end else
begin
Exit;
end;
end else
begin
Exit;
end;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure FindAndAttack;
begin
ResetAttackVars;
if (IsGameOver=True) or (LoggedIn=False) then
begin
Exit;
end;
if FindBitmapIn(NPCdot, x, y, 566, 10, 694, 155) then
begin
if (IsGameOver=True) then
begin
Exit;
end;
MMouse(x, y, 5, 5);
if (IsGameOver=True) then
begin
Exit;
end;
Wait(500 + Random(200));
if (IsGameOver=True) then
begin
Exit;
end;
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
LowestAngle;
if (IsGameOver=True) then
begin
Exit;
end;
end;
begin
repeat
if (Trie >= 15) then
begin
KeyDown(37);
Wait(700 + Random(700));
KeyUp(37);
Trie := 0;
Tri := Tri + 1;
Turns := Turns + 1;
end;
if (Tri >= 3) then
begin
Tri := 0;
Exit;
end;
if (Turns >= 5) then
begin
HaveIDied;
Turns := 0;
end;
Case Random(18) of
0 : Color := 7754102;
1 : Color := 594514;
2 : Color := 10449595;
3 : Color := 5065737;
4 : Color := 6195109;
5 : Color := 5266553;
6 : Color := 6324648;
7 : Color := 609606;
8 : Color := 11898983;
9 : Color := 1145227;
10 : Color := 4013389;
11 : Color := 9546384;
12 : Color := 10990258;
13 : Color := 5648680;
14 : Color := 2177694;
15 : Color := 7688309;
16 : Color := 10251450;
17 : Color := 65899;
18 : Color := 616541;
end;
if FindColorTolerance(x, y, Color, MSX1, MSY1, MSX2, MSY2, 2) then
begin
MMouse(x, y, 0, 0);
if IsUpText('tta') then
begin
Found := True;
Turns := 0;
end;
end;
Trie := Trie + 1;
until (Found=True) or (IsGameOver=True)
if (Found=True) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(500);
ChooseOption('Attack');
Wait(5000);
end;
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
Procedure CenterAttack;
begin
ResetAttackVars;
repeat
if (Turns >= 5) then
begin
HaveIDied;
Turns := 0;
end;
Case Random(6) of
0 : Color := 6195109;
1 : Color := 1755365;
2 : Color := 192;
3 : Color := 16728128;
4 : Color := 879711;
5 : Color := 3552827;
6 : Color := 5664922;
end;
if FindColorSpiralTolerance(x, y, 1755365, 85, 17, 463, 286, 3) then
begin
MMouse(x, y, 0, 0);
if IsUpText('tta') then
begin
Found := True;
Break;
end else
begin
Attemp := Attemp + 1;
if (Attemp >= 10) then
begin
KeyDown(37);
Wait(500 + Random(600));
KeyUp(37);
Attemp := 0;
Turns := Turns + 1;
end;
end;
end;
until (Found=True) or (IsGameOver=True)
if (Found=True) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(500 + Random(100));
ChooseOption('Attack');
Wait(5000 + Random(1000));
end;
end;
//____________________________________________________________________\\
//____________________________________________________________________\\
// Main Loop
Begin
StartUps;
repeat
GetInBoat;
GoToPortal;
if (Portal=5) then
begin
repeat
CenterAttack;
until (Over=True)
end else
repeat
FindAndAttack;
until (Over=True)
until (HowManyPlayers > 1)
End.MY EVERY-TREE-CUTTER:
{
This script will cut down ANY TREE(up to yew), ANYWHERE depending on your
woodcutting level. It will search for all trees that you can cut and
well... then cut them...
-Just Declare your players(lines 44-65),
(You can add more players in needed)
-Set up Constants(lines 30-39)
-Put your players logged in or out,
(near a place with lots of trees preferably w/ axe in first inv spot)
-And CLICK RUN!! }
{And note YES is DOES check for ENTs even though it may not look like it}
// =]]
program DereksEveryTreePowerCutter;
{.include srl/srl.scar}
var
LesserII, UseDTM, Turns, WCLevel, Loads, Levels : Integer;
x, y, R, Ex, Ey : Integer;
TreeColor : array [0..4] of Integer;
TreeDTM : array [1..5] of Integer;
TreeType : array of String;
FirstTime, Done, Found : Boolean;
I : TPoint;
Const
NumberOfLoads = 1; //Enter # of loads to do before switching players
RegTreeColor = 3171419;//Only change if current colors aren't working
OakColor = 2967881;//Only change if current colors aren't working
WillowColor = 3830377;//Only change if current colors aren't working
MapleColor = 14431; //Only change if current colors aren't working
YewColor = 2711126;//Only change if current colors aren't working
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
Players[0].Name :='Username'; //Username
Players[0].Pass :='Password'; //Password
Players[0].Nick :='user'; //3-4 letters of nickname
Players[0].Active := True; //Do you want to use this player?
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active := False;
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active := False;
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Active := False;
end;
Procedure LoadDTMs;
begin
TreeDTM[1] := DTMFromString('78DA63FCC0C4C0A0C3C80002EC0C10106521C' +
'C2007A441A2CC20FA3BA61AEB6411B81A1060FC02546340841A4D' +
'543546017C7035FF8100007FB40BC1');
TreeDTM[2] := DTMFromString('78DA63BCC9C4C0F08C010CD8211483821A2B8' +
'31C906684F2191F00D53C4155A3E9CB81AAE62E50CD4B54354609' +
'7CA86AEE00D53C4255C30C9484A9F90F040009D20D15');
TreeDTM[3] := DTMFromString('78DA63BCC9C4C0F08C010CD8211483821A2B8' +
'31C906684F2191F00D53C4155A3E9CB81AAE62E50CD4B54354609' +
'7CA86AEE00D53C4255C30C9484A9F90F040009D20D15');
TreeDTM[4] := DTMFromString('78DA63BCCAC4C0F08A010CD82114439426038' +
'31C906684F219EF02D5BC445553E0288CAAE60650CD3354350A6A' +
'ACA86A6E01D5BCC16DCE7F20000037170E00');
TreeDTM[5] := DTMFromString('78DA63FCC0C4C0A0C3C80002EC0C10106521C' +
'C2007A441A2CC20FA3BA61AEB6411B81A1060FC02546340841A4D' +
'543546017C7035FF8100007FB40BC1');
end;
Procedure ProgressReport;
begin
WriteLn('');
WriteLn('CURRENT PLAYER: ' +Players[CurrentPlayer].Name+ '.');
WriteLn('Running for ' +TimeRunning);
WriteLn('Chopped and dropped: ' +IntToStr(Loads)+ ' inventories.');
WriteLn('Gained: ' +IntToStr(Levels)+ ' levels.');
WriteLn('');
Disguise('Loads:'+IntToStr(Loads));
end;
Procedure RandomCheck;
begin
begin
HighestAngle;
SendArrowWait(Random(3),1000);
SendArrowWait(Random(3),500);
FindNormalRandoms;
if FindFight then
begin
MakeCompass('n');
Wait(200 + random(300))
RunAwayDirection('N');
Wait(10000 + Random(1000));
MakeCompass('s');
RunBack;
SetRun(False);
end;
if FindBlackChatMessage('to use') then
begin
Done := True;
WriteLn('PLAYER: ' +Players[CurrentPlayer].Name+ 'broke an axe...');
Exit;
end;
end;
end;
Procedure AntiBann;
begin
Case Random(15) of
1: HoverSkill('random', False);
2: PickUpMouse;
3: GameTab(1 + Random(12));
4: MMouse(Random (500), Random (500), 10 , 10);
//5: TypeSend('laaaag');
end;
end;
Procedure SetUpTreeTypes;
begin
WCLevel := GetSkillLevel('Woodcutting');
GameTab(4);
if (WCLevel >= 1) and (WCLevel < 15) then
begin
SetArrayLength(TreeType, 1);
TreeType[0] := 'Tree';
Exit;
end;
if (WCLevel >=15) and (WCLevel < 30) then
begin
SetArrayLength(TreeType, 2);
TreeType[0] := 'Tree';
TreeType[1] := 'ak';
Exit;
end;
if (WCLevel >=30) and (WCLevel < 45) then
begin
SetArrayLength(TreeType, 3);
TreeType[0] := 'Tree';
TreeType[1] := 'ak';
TreeType[2] := 'illow';
Exit;
end;
if (WCLevel >=45) and (WCLevel < 60) then
begin
SetArrayLength(TreeType, 4);
TreeType[0] := 'Tree';
TreeType[1] := 'ak';
TreeType[2] := 'illow';
TreeType[3] := 'aple';
Exit;
end;
if (WCLevel >= 60) then
begin
SetArrayLength(TreeType, 5);
TreeType[0] := 'Tree';
TreeType[1] := 'ak';
TreeType[2] := 'illow';
TreeType[3] := 'aple';
TreeType[4] := 'ew';
Exit;
end;
end;
Procedure GetTreeColors;
begin
TreeColor[0] := RegTreeColor;
TreeColor[1] := OakColor;
TreeColor[2] := WillowColor;
TreeColor[3] := MapleColor;
TreeColor[4] := YewColor;
end;
Procedure SetPlayers;
begin
Levels := 0;
Loads := 0;
if not LoggedIn then
begin
LoginPlayer;
end;
if (LoggedIn=True) then
begin
MMouse(98, 490, 0, 0);
Wait(200 + Random(300));
Mouse(98, 490, 0, 0, True);
SetUpTreeTypes;
GetTreeColors;
FirstTime := True;
end;
end;
Procedure StartUps;
begin
SetupSRL;
DeclarePlayers;
LoadDTMs;
FindWindowTitlePart('Runescape', False);
FindRS;
ActivateClient;
end;
Procedure NewSearch;
begin
Case ((GetArrayLength(TreeType) + 1) - LesserII) of
1 : UseDTM := TreeDTM[1];
2 : UseDTM := TreeDTM[2];
3 : UseDTM := TreeDTM[3];
4 : UseDTM := TreeDTM[4];
5 : UseDTM := TreeDTM[5];
end;
end;
Function LocateTree : Boolean;
begin
Case (GetArrayLength(TreeType) - 1) of
0 : if FindObjCustom(x, y, [TreeType[0]], [TreeColor[0]], 10) and (not(FindColorTolerance(Ex, Ey, 55769, 85, 15, 115, 15, 20))) then Result := True
1 : if FindObjCustom(x, y, [TreeType[0], TreeType[1]], [TreeColor[0], TreeColor[1]], 10) and (not(FindColorTolerance(Ex, Ey, 55769, 85, 15, 115, 15, 20))) then Result := True
2 : if FindObjCustom(x, y, [TreeType[0], TreeType[1], TreeType[2]], [TreeType[0], TreeType[1], TreeColor[2]], 10) and (not(FindColorTolerance(Ex, Ey, 55769, 85, 15, 115, 15, 20))) then Result := True
3 : if FindObjCustom(x, y, [TreeType[0], TreeType[1], TreeType[2], TreeType[3]], [TreeColor[0], TreeColor[1], TreeColor[2], TreeColor[3]], 10) and (not(FindColorTolerance(Ex, Ey, 55769, 85, 15, 115, 15, 20))) then Result := True
4 : if FindObjCustom(x, y, [TreeType[0], TreeType[1], TreeType[2], TreeType[3], TreeType[4]], [TreeColor[0], TreeColor[1], TreeColor[2], TreeColor[3], TreeColor[4]], 10) and (not(FindColorTolerance(Ex, Ey, 55769, 85, 15, 115, 15, 20))) then Result := True
end;
end;
Function DTMMap: Boolean;
begin
repeat
NewSearch;
if DTMRotated(UseDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
MMouse(x, y, 0, 0);
Wait(200 + Random(500));
Mouse(x, y, 0, 0, True);
FFlag(0);
Result := True;
LesserII := 0;
end else
begin
LesserII := LesserII + 1;
end;
until (Result=True)
end;
Procedure FindTree;
label
Chopper;
begin
if (FirstTime=True) then
begin
DTMMap;
end else
NewSearch;
Chopper:
if (LocateTree=True) then
begin
Mouse(x, y, 0, 0, False);
Wait(300 + random(200));
if (ChooseOption('Chop')) then
begin
FirstTime := False;
Found := True;
Exit;
end else
begin
GoTo Chopper
end;
end else
begin
KeyDown(37);
Wait(700 + Random(700));
KeyUp(37);
Turns := Turns + 1;
end;
if (Turns >= 2) then
begin
FirstTime := True;
DTMMap;
end;
end;
Procedure ChopTree;
begin
repeat
FindTree;
until (Found=True)
Found := False;
Wait(2000);
Case Random(4) of
1: AntiBann;
2: RandomMovement;
3: SleepAndMoveMouse(1000)
4: BoredHuman;
end;
RandomCheck;
Wait(7500 + Random(1000));
if (InvFull) then
begin
for R := 2 to 23 do
begin
DropItem(R);
end;
for R := 24 to 28 do
begin
I := ItemCoords(R);
MMouse(I.x, I.y, 0, 0);
Wait(100 + Random(50));
Mouse(I.x, I.y, 0, 0, False);
Wait(200 + Random(300));
ChooseOption('Drop');
Loads := Loads + 1;
ProgressReport;
end;
end;
if (FindNpcChatText('ongra')) then
begin
Levels := Levels + 1;
ClickToContinue;
end;
if (Loads >= NumberOfLoads) then
begin
Done := True;
end;
end;
//_____________________________________________________________________\\
//MAIN LOOP ___________________________________________________________\\
//_____________________________________________________________________\\
begin
StartUps;
repeat
SetPlayers;
repeat
ChopTree;
until (Done=True)
if (Done=True) and not ((CurrentPlayer + 1) >= HowManyPlayers) then
begin
NextPlayerOrder(False);
end;
until ((CurrentPlayer + 1) >= HowManyPlayers)
Logout;
end.——————————————————
<!– END TEMPLATE: formanswers –>