d34th20n
2011-12-26 16:35:41
OK this is a script that i have been working on, grim was kind enough to let me use his base to expand on and thus he receives full credit for the gnome basic!
i plan to expand on this asap to make it fully functional with all courses!
any faults please let me know
issue with this line
Integers[1];= 2; //1 for basic 2 for adv
how do i fix?
i plan to expand on this asap to make it fully functional with all courses!
program D3Agility;
{$I SRL/SRL/misc/smart.scar}
{$I SRL/SRL.scar}
//Start the script standing within a few squares of Starting obsticle
//Quiet world and minimal lag is best for this to work
//thankyou to Grim for the base work and gnome basic script.
//currently supports gnome basic and advnaced.
//Intergrated Antiban
//No eating supported YET! do not attempt Gnome advanced unless 89+ Agility
var
x, y, i, Time, StartTime:Integer;
LoopBegin:Integer;ClickRed : Boolean;
MyTPA : TPointArray;
MyPoint : TPoint;
Const
NumbOfPlayers= 1;
StartPlayer= 0;
Version= '1.3';
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'name here';
Players[0].Pass := 'pass here';
Players[0].Active := True;
Integers[1] := 2; //1 for basic 2 for adv
end;
procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
end;
procedure ProgressReport;
begin
ClearDebug;
WriteLn('********************************************');
WriteLn(' Grims Gnome Agility');
WriteLn('********************************************');
WriteLn('Script Ran For: ' + TimeRunning);
WriteLn('********************************************');
end;
procedure AntiBan;
begin
case random(250) of //Increase number for less AntiBans
0: RandomRClick;
1: PickUpMouse;
2: HoverSkill('strength', False);
3: HoverSkill('attack', False);
4: HoverSkill('agility', False);
5: HoverSkill('thieving', False);
6: HoverSkill('constitution', False);
7: HoverSkill('mining', False);
8: ExamineInv;
end;
end;
procedure AntiRandoms;
begin
FindNormalRandoms;
end;
function RopeColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.02, 0.12);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 5140878, MSX1, MSY1, MSX2, MSY2, 9);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 115) and (R <= 169) and (G >= 91) and (G <= 135) and (B >= 63) and (B <= 94) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 11.94) and (X <= 26.67) and (Y >= 11.72) and (Y <= 26.19) and (Z >= 6.47) and (Z <= 14.02) then
begin
Result := arC[i];
Break;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
If Players[CurrentPlayer].Integers[1]= 1 Then
Procedure Log;
Begin
SetAngle(True);
MarkTime(LoopBegin);
begin
FindColorsTolerance(MyTPA, 999018, 150, 129, 363, 272, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 5, 5);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickRed := DidRedClick;
if ClickRed then
Wait(6500+Random(500));
WriteLn('Log done..');
Break;
end;
end;
end;
End;
Procedure Net;
Begin
FindColorsTolerance(MyTPA, 1064812, 118, 312, 158, 336, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 5, 5);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickRed := DidRedClick;
if ClickRed then
Wait(4500+Random(500));
WriteLn('Net done..');
Break;
end;
end;
End;
Procedure BranchUp;
Begin
FindColorsTolerance(MyTPA, 2051430, 326, 180, 351, 207, 7);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 2, 2);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickRed := DidRedClick;
if ClickRed then
Wait(4000+Random(500));
WriteLn('Branch up done..');
Break;
end;
end;
End;
Procedure Rope;
Begin
Mouse(456,157,10,10, true);
wait(2000 + random(500));
begin
FindColorsTolerance(MyTPA, 5733788, 283, 165, 307, 190, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 0, 0);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickRed := DidRedClick;
if ClickRed then
Wait(6000+Random(500));
WriteLn('Rope walk done..');
Break;
end;
end;
end;
End;
Procedure BranchDown;
Begin
FindColorsTolerance(MyTPA, 1919327, 359, 202, 384, 221, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 5, 5);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickRed := DidRedClick;
if ClickRed then
Wait(5500+Random(500));
WriteLn('Branch down done..');
Break;
end;
end;
End;
Procedure Net2;
Begin
SetAngle(False);
Wait(1500+Random(250));
begin
FindColorsTolerance(MyTPA, 932969, 277, 6, 307, 35, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 3, 3);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
ChooseOption('net');
ClickRed := DidRedClick;
if ClickRed then
Wait(5000+Random(500));
WriteLn('Net2 done..');
Break;
end;
end;
end;
End;
Procedure Pipe;
Begin
FindColorsTolerance(MyTPA, 7763579, 235, 64, 286, 96, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 5, 5);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickRed := DidRedClick;
if ClickRed then
Wait(6000+Random(500));
WriteLn('Pipe done..');
Break;
end;
end;
End;
Procedure WalkToStart;
Begin
FindNormalRandoms;
Mouse(576, 93, 2, 2, True);
SetAngle(True);
Wait(4000+Random(500));
WriteLn('Walk to start done.. Yay!');
End;
Begin
SetupLogin;
SetupSRL;
DeclarePlayers;
ActivateClient;
StartTime:= GetSystemTime;
Time := (GetSystemTime-StartTime);
repeat
MarkTime(LoopBegin);
Log;
Net;
BranchUp;
Rope;
BranchDown;
Net2;
Pipe;
WalkToStart;
ProgressReport;
if TimeFromMark(LoopBegin) > 90000 then
TerminateScript;
until(false);
End;
If Players[CurrentPlayer].Integers[1]= 2 Then
Procedure Log;
Begin
SetAngle(True);
MarkTime(LoopBegin);
begin
FindColorsTolerance(MyTPA, 999018, 150, 129, 363, 272, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 5, 5);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickRed := DidRedClick;
if ClickRed then
Wait(6500+Random(500));
WriteLn('Log done..');
Break;
end;
end;
end;
End;
Procedure Net;
Begin
FindColorsTolerance(MyTPA, 1064812, 118, 312, 158, 336, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 5, 5);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickRed := DidRedClick;
if ClickRed then
Wait(4500+Random(500));
WriteLn('Net done..');
Break;
end;
end;
End;
Procedure BranchUp;
Begin
FindColorsTolerance(MyTPA, 2051430, 326, 180, 351, 207, 7);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 2, 2);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickRed := DidRedClick;
if ClickRed then
Wait(4000+Random(500));
WriteLn('Branch up done..');
Break;
end;
end;
End;
Procedure Tree;
Begin
FindColorsTolerance(MyTPA, 1654610, 333, 220, 307, 190, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 0, 0);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickRed := DidRedClick;
if ClickRed then
Wait(6000+Random(500));
WriteLn('Tree done..');
Break;
end;
end;
end;
End;
Procedure Signpost;
Begin
FindColorsTolerance(MyTPA, 3167852, 216, 55, 220, 55, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 5, 5);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickRed := DidRedClick;
if ClickRed then
Wait(5500+Random(500));
WriteLn('Signpost done..');
Break;
end;
end;
End;
Procedure Pole;
Begin
Mouse(26,232,10,10, true);
wait(2000 + random(500));
begin
SetAngle(False);
Wait(1500+Random(250));
begin
FindColorsTolerance(MyTPA, 5791845, 160, 273, 307, 35, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 3, 3);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
ChooseOption('ole');
ClickRed := DidRedClick;
if ClickRed then
Wait(5000+Random(500));
WriteLn('Pole done..');
Break;
end;
end;
end;
End;
Procedure Barrier;
Begin
FindColorsTolerance(MyTPA, 7763579, 235, 64, 286, 96, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 5, 5);
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
ClickRed := DidRedClick;
if ClickRed then
Wait(6000+Random(500));
WriteLn('Lap Complete!');
Break;
end;
end;
End;
Procedure WalkToStart;
Begin
FindNormalRandoms;
Mouse(576, 93, 2, 2, True);
SetAngle(True);
Wait(4000+Random(500));
WriteLn('Walk to start done.. Yay!');
End;
Begin
SetupLogin;
SetupSRL;
DeclarePlayers;
ActivateClient;
StartTime:= GetSystemTime;
Time := (GetSystemTime-StartTime);
repeat
MarkTime(LoopBegin);
Log;
Net;
BranchUp;
Tree;
Signpost;
Pole;
Barrier;
WalkToStart;
ProgressReport;
if TimeFromMark(LoopBegin) > 90000 then
TerminateScript;
until(false);
End;
End.
any faults please let me know
issue with this line
Integers[1];= 2; //1 for basic 2 for adv
how do i fix?