Based on everything I just read/your posting habits… it is a YES from me!
program JJsGOP;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i SRL/SRL/misc/paintsmart.simba}
var
JoinedTeam, DesiredWizard: String;
PaintColor: TColor;
ActionBox: TBox;
GamesPlayed, Tokens, TokensGained, WaitTime, t: Integer;
ActionboxTPA: TPointArray;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
{
Team choice, fill this in behind DesiredWizard
Green team: 'Wizard Acantha'
Yellow team: 'Wizard Vief'
Blue team: 'Wizards'
Randomized team: 'Random'
}
DesiredWizard := 'Random';
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
Active := True;
end;
end;
procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 61;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayerToLob;
OpenWorldScreen;
SelectWorld(61);
LoginPlayer;
Wait(1000 + Random(3000));
ClickNorth(0);
ActionBox := IntToBox(289, 428, 512, 442);
TPAFromBoxWrap(ActionBox, ActionBoxTPA);
end;
procedure Running;
begin
if not(RunEnergy(50)) then
begin
RestUntil(RandomRange(75, 100));
MouseBox(MMCX - 20, MMCY - 20, MMCX + 20, MMCY + 20, 1);
Wait(500 + Random(500));
end;
end;
function Antiban: Boolean;
begin
case Random(12000) of
0..9: begin
WriteLn('Antiban active');
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'antiban = check rc xp', clWhite);
HoverSkill('runecrafting', False);
Wait(100 + Random(300));
Mousebox(MSX1, MSY1, MSX2, MSY2, 2);
WriteLn('Antiban done');
Result:=True;
end;
1000..1004: begin
WriteLn('Antiban active');
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'antiban = check random skill', clWhite);
HoverSkill('random', False);
Wait(100 + Random(300));
Mousebox(MSX1, MSY1, MSX2, MSY2, 2);
WriteLn('Antiban done');
Result:=True;
end;
2000..2006: begin
WriteLn('Antiban active');
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'antiban = random click', clWhite);
RandomRClick;
Wait(200 + Random(600));
Mousebox(MSX1, MSY1, MSX2, MSY2, 2);
WriteLn('Antiban done');
Result:=True;
end;
3000..3009: begin
WriteLn('Antiban active');
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'antiban = pick up mouse', clWhite);
PickUpMouse;
Wait(150 + Random(450));
Mousebox(MSX1, MSY1, MSX2, MSY2, 2);
WriteLn('Antiban done');
Result:=True;
end;
4000..4009: begin
WriteLn('Antiban active');
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'antiban = random movement', clWhite);
RandomMovement;
Wait(200 + Random(400));
Mousebox(MSX1, MSY1, MSX2, MSY2, 2);
WriteLn('Antiban done');
Result:=True;
end;
5000..5014: begin
WriteLn('Antiban active');
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'antiban = bored human', clWhite);
BoredHuman;
Wait(500 + Random(1000));
Mousebox(MSX1, MSY1, MSX2, MSY2, 2);
WriteLn('Antiban done');
Result:=True;
end;
6000..6004: begin
WriteLn('Antiban active');
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'antiban = examine item', clWhite);
ExamineInv;
Wait(250 + Random(400));
Mousebox(MSX1, MSY1, MSX2, MSY2, 2);
WriteLn('Antiban done');
Result:=True;
end;
7000..7014: begin
WriteLn('Antiban active');
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'antiban = sleep & mmouse', clWhite);
SleepAndMoveMouse(1000 + Random(5000));
Wait(100 + Random(300));
Mousebox(MSX1, MSY1, MSX2, MSY2, 2);
WriteLn('Antiban done');
Result:=True;
end;
8000..8019: begin
WriteLn('Antiban active');
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'antiban = afk for a while', clWhite);
case Random(7) of
0: Wait(1000 + Random(10000));
1: Wait(2000 + Random(4000));
2: Wait(3000 + Random(1500));
3: Wait(7500 + Random(2500));
4: Wait(5000 + Random(5000));
5: Wait(5000 + Random(20000));
6: Wait(20000 + Random(5000));
end;
Mousebox(MSX1, MSY1, MSX2, MSY2, 2);
WriteLn('Antiban done');
Result:=True;
end;
9000..9049: Running;
end;
end;
procedure TimeUpdate;
var
TimeBox: TBox;
TimeBoxTPA: TPointArray;
begin
TimeBox := IntToBox(289, 414, 512, 428);
TPAFromBoxWrap(Timebox, TimeboxTPA);
SMART_DrawDotsEx(False, TimeboxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 415, UpChars, ''+TimeRunning+'', clWhite);
end;
procedure GamesUpdate;
var
GamesBox: TBox;
GamesBoxTPA: TPointArray;
begin
GamesBox := IntToBox(289, 443, 350, 455);
TPAFromBoxWrap(GamesBox, GamesBoxTPA);
SMART_DrawDotsEx(False, GamesBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 443, UpChars, ''+IntToStr(GamesPlayed)+'', clWhite);
end;
procedure TokensUpdate;
var
i: Integer;
TokensBox: TBox;
TokensBoxTPA: TPointArray;
TokensGainedString: String;
NumbersCheck: Array of String;
begin
TokensGainedString := GetChatBoxText(8, clBlack);
NumbersCheck := ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];
for i:=0 to 10 do
begin
if Pos(NumbersCheck[i], TokensGainedString) > 0 then
begin
TokensGained := StrToInt(GetNumbers(TokensGainedString));
Tokens := (Tokens + TokensGained);
TokensBox := IntToBox(289, 456, 350, 470);
TPAFromBoxWrap(TokensBox, TokensBoxTPA);
SMART_DrawDotsEx(False, TokensBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 457, UpChars, ''+IntToStr(Tokens)+'', clWhite);
Exit;
end;
end;
end;
procedure ProggyUpdate;
begin
TimeUpdate;
GamesUpdate;
TokensUpdate;
end;
function CheckGOPLobby: Boolean;
var
MyPos: TPoint;
GopLobbyBox: TBox;
begin
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'check if at gop lobby', clWhite);
GopLobbyBox := IntToBox(39803, 3015, 39863, 3079);
SPS_Setup(RUNESCAPE_SURFACE, ['99_7']);
MyPos := SPS_GetMyPos;
WriteLn('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
if MyPos = Point(-1, -1) then
begin
Exit;
end;
if PointInBox(MyPos, GopLobbyBox) then
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.23, 0.88);
WriteLn('Blue colors: '+IntToStr(CountColorTolerance(7301651, MMX1, MMY1, MMX2, MMY2, 10))+'');
if CountColorTolerance(7301651, MMX1, MMY1, MMX2, MMY2, 10) > 2000 then
begin
WriteLn('We are at the Gop lobby');
Result:=True;
end else
begin
WriteLn('We are NOT at the Gop lobby');
Exit;
end;
end else
begin
Exit;
end;
end;
function CheckIfJoined: String;
var
Pts: TPointArray;
Bound: TBox;
X, Y, i: Integer;
JoinedTexts, FullTexts, KickedTexts: Array of String;
begin
ColorToleranceSpeed(1);
JoinedTexts := ['put', 'part', 'joined'];
FullTexts := ['afraid', 'enough', 'glad'];
KickedTexts := ['left', 'new game', 'minutes'];
FindColorsTolerance(Pts, 0, 140, 380, 500, 450, 0);
Bound := GetTPABounds(Pts);
//SMART_DrawBox(Bound);
for i:=0 to 2 do
begin
if FindTextEx(X, Y, [JoinedTexts[i]], [UpChars, NPCChars], Bound.x1 - 5, Bound.y1 - 5, Bound.x2 + 5, Bound.y2 + 5) then
begin
WriteLn('We have joined a team');
Result:='joined';
Wait(500 + Random(1000));
Exit;
end;
if FindTextEx(X, Y, [FullTexts[i]], [UpChars, NPCChars], Bound.x1 - 5, Bound.y1 - 5, Bound.x2 + 5, Bound.y2 + 5) then
begin
WriteLn('The teams are full');
Result:='full';
Wait(500 + Random(1000));
Exit;
end;
if FindTextEx(X, Y, [KickedTexts[i]], [UpChars, NPCChars], Bound.x1 - 5, Bound.y1 - 5, Bound.x2 + 5, Bound.y2 + 5) then
begin
WriteLn('We have been kicked');
Result:='kicked';
Wait(500 + Random(1000));
Exit;
end;
end;
end;
function JoinWizards: Boolean;
var
X, Y, i: integer;
WizCol: TPointArray;
WizColSplit: T2DPointArray;
P: TPoint;
begin
// This will detect a wizard and join a game \\
FindNormalRandoms;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.08, 0.15);
if FindColorsSpiralTolerance(X, Y, WizCol, 6837308, MSX1, MSY1, MSX2, MSY2, 18) then
begin
SortTPAFrom(WizCol, Point(MSCX, MSCY));
WizColSplit := SplitTPAEx(WizCol, 5, 15);
SortATPASize(WizColSplit, True);
for i:=0 to High(WizColSplit) do
begin
P := MiddleTPA(WizColSplit[i]);
MMouse(P.X, P.Y, 2, 2);
if not(WaitUpTextMulti(['ief', 'orvak', 'cantha', 'lriss'], 250)) then
if WaitUpTextMulti(['izard', 'Wizard'], 250) then
begin
ClickMouse2(0);
if WaitOptionMulti(['oin', 'in-ga'], 250) then
begin
if (IsMoving=False) then
begin
Result:=True;
Exit;
end else
begin
repeat
Wait(100 + Random(100));
until(IsMoving=False);
Wait(1000 + Random(1000));
Result:=True;
Exit;
end;
end;
end;
end;
end;
end;
function JoinAcantha: Boolean;
var
X, Y, i: integer;
AcanCol: TPointArray;
AcanColSplit: T2DPointArray;
P: TPoint;
begin
// This will detect Wizard Acantha and join a game \\
FindNormalRandoms;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.34, 0.41);
if FindColorsSpiralTolerance(X, Y, AcanCol, 4680593, MSX1, MSY1, MSX2, MSY2, 17) then
begin
SortTPAFrom(AcanCol, Point(MSCX, MSCY));
AcanColSplit := SplitTPAEx(AcanCol, 10, 10);
SortATPASize(AcanColSplit, True);
for i:=0 to 2 do
begin
P := MiddleTPA(AcanColSplit[i]);
MMouse(P.X, P.Y, 2, 2);
if not(WaitUpTextMulti(['ief', 'orvak', 'lriss'], 250)) then
if WaitUpTextMulti(['cant', 'Acantha'], 250) then
begin
ClickMouse2(0);
if WaitOptionMulti(['oin', 'Join'], 250) then
begin
Wait(100 + Random(200));
if IsMoving=False then
begin
Wait(500 + Random(1000));
case Random(5) of
0..2: TypeSendEx('1', False);
3..4: Mousebox(207, 398, 311, 415, 1);
end;
end else
begin
repeat
Wait(100 + Random(100));
until(IsMoving=False);
Wait(250 + Random(500));
case Random(5) of
0..2: TypeSendEx('1', False);
3..4: Mousebox(207, 398, 311, 415, 1);
end;
end;
Result:=True;
Exit;
end;
end;
end;
end;
end;
function JoinVief: Boolean;
var
X, Y, i: integer;
ViefCol: TPointArray;
ViefColSplit: T2DPointArray;
P: TPoint;
begin
// This will detect a wizard Vief and join a game \\
FindNormalRandoms;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.42, 3.32);
if FindColorsSpiralTolerance(X, Y, ViefCol, 8834548, MSX1, MSY1, MSX2, MSY2, 4) then
begin
SortTPAFrom(ViefCol, Point(MSCX, MSCY));
ViefColSplit := SplitTPAEx(ViefCol, 2, 2);
SortATPASize(ViefColSplit, True);
for i:=0 to High(ViefColSplit) do
begin
P := MiddleTPA(ViefColSplit[i]);
MMouse(P.X, P.Y + 5, RandomRange(-1, 1), RandomRange(-1, 1));
if not(WaitUpTextMulti(['cantha', 'orvak', 'lriss'], 250)) then
begin
if WaitUpTextMulti(['ief', 'Vief'], 250) then
begin
ClickMouse2(0);
if WaitOptionMulti(['oin', 'in-ga'], 250) then
begin
Wait(100 + Random(200));
if IsMoving=False then
begin
Wait(500 + Random(1000));
case Random(5) of
0..2: TypeSendEx('1', False);
3..4: Mousebox(207, 398, 311, 415, 1);
end;
end else
begin
repeat
Wait(100 + Random(100));
until(IsMoving=False);
Wait(250 + Random(500));
case Random(5) of
0..2: TypeSendEx('1', False);
3..4: Mousebox(207, 398, 311, 415, 1);
end;
Result:=True;
Exit;
end;
end;
end;
end;
end;
end;
end;
procedure GetWaitTime;
var
i: Integer;
Bound: TBox;
Pts: TPointArray;
WaitTimeString: String;
NumbersCheck: Array of String;
begin
ColorToleranceSpeed(1);
FindColorsTolerance(Pts, 0, 140, 380, 500, 450, 0);
Bound := GetTPABounds(Pts);
//SMART_DrawBox(Bound);
WaitTimeString := GetTextAtExWrap(Bound.x1 - 5, Bound.y1 - 5, Bound.x2 + 5, Bound.y2 + 5, 0, 0, 2, 0, 0, UpChars);
WriteLn(WaitTimeString);
NumbersCheck := ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
for i:=0 to 9 do
begin
if Pos(NumbersCheck[i], WaitTimeString) > 0 then
begin
WaitTime := StrToInt(GetNumbers(WaitTimeString));
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'kicked, waiting '+IntToStr(WaitTime)+' minutes', clWhite);
Exit;
end;
end;
end;
procedure KickedFailsafe;
var
Options: Array of String;
i, u: Integer;
begin
Options := ['joined', 'full', 'kicked'];
for i:=0 to 2 do
if (CheckIfJoined = Options[i]) then
begin
case i of
0: begin
WriteLn('We haven`t been kicked! Succesful mainloop.');
Wait(500 + Random(1000));
Exit;
end;
1: begin
WriteLn('We haven`t been kicked! Succesful mainloop.');
Wait(500 + Random(1000));
Exit;
end;
2: begin
WriteLn('We have been kicked, waiting until we can start again.');
Wait(500 + Random(1000));
SPS_Setup(RUNESCAPE_SURFACE, ['99_7']);
GetWaitTime;
U := 0;
MarkTime(U);
repeat
//SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
//SMART_DrawText(290, 429, UpChars, 'got kicked, waiting', clWhite);
Wait(250 + Random(500));
Antiban;
case Random(50) of
0: FindNormalRandoms;
1: SPS_BlindWalk(Point(RandomRange(39819, 39851), RandomRange(3015, 3035)));
2: case Random(10) of
0: ClickNorth(0);
end;
end;
Antiban;
Wait(250 + Random(500));
until(TimeFromMark(U) >= (WaitTime*60000));
WriteLn('Waiting time over');
JoinWizards;
Exit;
end;
end;
end;
end;
procedure JoinGame;
var
i, a: Integer;
MyPos: TPoint;
WizardChoice: Array of String;
begin
A := 0;
SPS_Setup(RUNESCAPE_SURFACE, ['99_7']);
MyPos := SPS_GetMyPos;
FindNormalRandoms;
WriteLn('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
WizardChoice := ['Wizards', 'Wizard Acantha', 'Wizard Vief', 'Random']
for i:=0 to 3 do
begin
if DesiredWizard = WizardChoice[i] then
begin
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'joining team', clWhite);
case i of
0: begin;
case Random(3) of
0: begin;
WriteLn('We are walking to the '+WizardChoice[i]+' at the west side');
SPS_BlindWalk(Point(RandomRange(39811, 39823), RandomRange(3051, 3059))); //Wizards west
Wait(1000 + Random(1000));
repeat
Inc(A);
JoinWizards;
Wait(5000 + Random(5000));
until(CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 250) or (A > 9) or (CheckIfJoined = 'joined') or (CheckIfJoined = 'kicked');
if CheckIfJoined = 'kicked' then
begin
WriteLn('We have been kicked..');
KickedFailsafe;
Exit;
end;
end;
1..2: begin;
WriteLn('We are walking to the '+WizardChoice[i]+' at the east side');
SPS_BlindWalk(Point(RandomRange(39847, 39863), RandomRange(3043, 3055))); // Wizards east
Wait(1000 + Random(1000));
repeat
Inc(A);
JoinWizards;
Wait(5000 + Random(5000));
until(CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 250) or (A > 9) or (CheckIfJoined = 'joined') or (CheckIfJoined = 'kicked');
if CheckIfJoined = 'kicked' then
begin
WriteLn('We have been kicked..');
KickedFailsafe;
Exit;
end;
end;
end;
end;
1: begin;
WriteLn('We are walking to '+WizardChoice[i]+'');
SPS_BlindWalk(Point(RandomRange(39807, 39823), RandomRange(3027, 3043)));
Wait(1000 + Random(1000));
repeat
Inc(A);
JoinAcantha;
Wait(5000 + Random(5000));
until(CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 250) or (A > 9) or (CheckIfJoined = 'joined') or (CheckIfJoined = 'kicked');
if CheckIfJoined = 'kicked' then
begin
WriteLn('We have been kicked..');
KickedFailsafe;
Exit;
end;
end;
2: begin;
WriteLn('We are walking to '+WizardChoice[i]+'');
SPS_BlindWalk(Point(RandomRange(39843, 39855), RandomRange(3027, 3035)));
Wait(1000 + Random(1000));
repeat
Inc(A);
JoinVief;
Wait(500 + Random(500));
until(CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 250) or (A > 9) or (CheckIfJoined = 'joined') or (CheckIfJoined = 'kicked');
if CheckIfJoined = 'kicked' then
begin
WriteLn('We have been kicked..');
KickedFailsafe;
Exit;
end;
end;
3: begin;
WriteLn('We are walking to a random generated wizard location')
case Random(3) of
0: begin;
case random(3) of
0: begin;
WriteLn('We are walking to the Wizards at the west side');
SPS_BlindWalk(Point(RandomRange(39811, 39823), RandomRange(3051, 3059))); //Wizards west
Wait(1000 + Random(1000));
repeat
Inc(A);
JoinWizards;
Wait(5000 + Random(5000));
until(CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 250) or (A > 9) or (CheckIfJoined = 'joined') or (CheckIfJoined = 'kicked');
if CheckIfJoined = 'kicked' then
begin
WriteLn('We have been kicked..');
KickedFailsafe;
Exit;
end;
end;
1..2: begin;
WriteLn('We are walking to the Wizards at the east side');
SPS_BlindWalk(Point(RandomRange(39847, 39863), RandomRange(3043, 3055))); // Wizards east
Wait(1000 + Random(1000));
repeat
Inc(A);
JoinWizards;
Wait(5000 + Random(5000));
until(CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 250) or (A > 9) or (CheckIfJoined = 'joined') or (CheckIfJoined = 'kicked');
if CheckIfJoined = 'kicked' then
begin
WriteLn('We have been kicked..');
KickedFailsafe;
Exit;
end;
end;
end;
end;
1: begin;
WriteLn('We are walking to Wizard Acantha');
SPS_BlindWalk(Point(RandomRange(39807, 39823), RandomRange(3027, 3043)));
Wait(1000 + Random(1000));
repeat
Inc(A)
JoinAcantha;
Wait(5000 + Random(5000));
until(CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 250) or (A > 9) or (CheckIfJoined = 'joined') or (CheckIfJoined = 'kicked');
if CheckIfJoined = 'kicked' then
begin
WriteLn('We have been kicked..');
KickedFailsafe;
Exit;
end;
end;
2: begin;
WriteLn('We are walking to Wizard Vief');
SPS_BlindWalk(Point(RandomRange(39843, 39855), RandomRange(3027, 3035)));
Wait(1000 + Random(1000));
repeat
Inc(A);
JoinVief;
Wait(5000 + Random(5000));
until(CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 250) or (A > 9) or (CheckIfJoined = 'joined') or (CheckIfJoined = 'kicked');
if CheckIfJoined = 'kicked' then
begin
WriteLn('We have been kicked..');
KickedFailsafe;
Exit;
end;
end;
end;
end;
end;
end;
end;
end;
function EnterPortalOutside: Boolean;
var
X, Y, i: integer;
PortOutCol: TPointArray;
PortOutSplit: T2DPointArray;
P: TPoint;
begin
// This will click on the portal outside \\
FindNormalRandoms;
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'going through portal', clWhite);
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.45, 1.20);
if FindColorsSpiralTolerance(X, Y, PortOutCol, 12080783, MSX1, MSY1, MSX2, MSY2, 26) then
begin
SortTPAFrom(PortOutCol, Point(MSCX, MSCY));
PortOutSplit := SplitTPAEx(PortOutCol, 50, 50);
SortATPASize(PortOutSplit, True);
for i:=0 to High(PortOutSplit) do
begin
P := MiddleTPA(PortOutSplit[i]);
MMouse(P.X, P.Y, 5, 5);
if WaitUpTextMulti(['ortal', 'Portal'], 250) then
begin
ClickMouse2(1);
Result:=True;
Exit;
end;
end;
end;
end;
function DefineTeam:String;
var
HatCol, HatTol, ColorCount: Array of Integer;
HatHue, HatSat: Array of Extended;
PossibleHats, HatUptexts: Array of String;
i: Integer;
HatAreaBox, Teambox: TBox;
TeamboxTPA: TPointArray;
begin;
HatAreaBox := IntToBox(245, 145, 270, 160);
//SMART_DrawBox(HatAreaBox);
Teambox := IntToBox(180, 401, 280, 415);
HatCol := [3975861, 3555132];
HatTol := [15, 13];
HatHue := [0.02, 1.07];
HatSat := [0.84, 0.51];
PossibleHats := ['Yellow', 'Green'];
ColorCount := [75, 75];
for i := 0 to 1 do
begin
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(HatHue[i], HatSat[i]);
WriteLn('Counted colors: '+IntToStr(CountColorTolerance(HatCol[i], 245, 145, 270, 160, HatTol[i]))+'');
if CountColorTolerance(HatCol[i], 245, 142, 270, 152, HatTol[i]) > ColorCount[i] then
begin
Result:=PossibleHats[i];
WriteLn('We are part of the '+PossibleHats[i]+' team');
case PossibleHats[i] of
PossibleHats[0]: begin;
JoinedTeam := 'Yellow';
PaintColor := clYellow;
TPAFromBoxWrap(Teambox, TeamboxTPA);
SMART_DrawDotsEx(False, TeamboxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(181, 400, UpCharsEx, 'Yellow team', PaintColor);
Exit;
end;
PossibleHats[1]: begin;
JoinedTeam := 'Green';
PaintColor := clGreen;
TPAFromBoxWrap(Teambox, TeamboxTPA);
SMART_DrawDotsEx(False, TeamboxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(181, 400, UpCharsEx, 'Green team', PaintColor);
Exit;
end;
end;
end;
end;
HatUptexts := ['Yellow', 'Green'];
if not(GameTab(Tab_Equip)) then
begin
FTab(Tab_Equip);
Wait(250 + Random(250));
end;
MouseBox(570, 290, 600, 320, 2);
for i := 0 to 1 do
begin;
if WaitUpTextMulti([HatUptexts[i]], 500) then
begin
Result:=HatUptexts[i];
WriteLn('We are part of the '+HatUptexts[i]+' team');
case i of
0: begin;
JoinedTeam := 'Yellow';
PaintColor := clYellow;
SMART_DrawDotsEx(False, TeamboxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(181, 400, UpCharsEx, 'Yellow team', PaintColor);
Exit;
end;
1: begin;
JoinedTeam := 'Green';
PaintColor := clGreen;
SMART_DrawText(181, 400, UpCharsEx, 'Green team', PaintColor);
Exit;
end;
end;
end;
end;
end;
procedure WaitForPortal;
var
t: Integer;
MyPos: TPoint;
begin
t:=0;
Marktime(t);
SPS_Setup(RUNESCAPE_SURFACE, ['99_7']);
MyPos := SPS_GetMyPos;
FindNormalRandoms;
WriteLn('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
if (CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 400) then
begin
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'defining team', clWhite);
WriteLn('We have joined a game. Time to wait until the portal opens');
WriteLn('It`s time to define which team we joined...');
DefineTeam;
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'walking to portal', clWhite);
SPS_BlindWalk(Point(RandomRange(39834, 39842), RandomRange(3010, 3020))); // Portal to enter
ProggyUpdate;
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'waiting for portal', clWhite);
repeat
Wait(250 + Random(500));
Antiban;
case Random(250) of
0: FindNormalRandoms;
1: SPS_BlindWalk(Point(RandomRange(39819, 39851), RandomRange(3015, 3035)));
2: ClickNorth(0);
3: Running;
end;
Antiban;
Wait(250 + Random(500));
until(CountColorTolerance(10798276, 173, 279, 352, 292, 1) < 100) or (CountColorTolerance(204, 208, 208, 324, 220, 1) > 250) or (TimeFromMark(t) > 300000);
if (TimeFromMark(t) > 300000) then
begin
WriteLn('We have been waiting for over 5 minutes and the portal hasn`t opened yet...');
Exit;
end else
begin
EnterPortalOutside;
end;
end else
begin
WriteLn('Something has gone wrong. Not able to detect the "Waiting" text');
end;
end;
procedure FindTheAirAltar;
var
MyPos: TPoint;
AroundAirAltar: TBox;
AirAltarDTM, X, Y: Integer;
aFound: Extended;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['99_1']);
MyPos := SPS_GetMyPos;
Writeln('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
AroundAirAltar := IntToBox(39843, 623, 39855, 635);
if PointInBox(MyPos, AroundAirAltar) then
begin
WriteLn('Our location is near the air altar');
end else
{We aren't near the altar, so we are going to walk near it using SPS}
begin
if MyPos = Point(-1, -1) then
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.48, 0.06);
if not(FindColoredAreaTolerance(X, Y, 7433327, MSCX - 100, MSCY - 100, MSCX + 100, MSCY + 100, 500, 7)) then
begin
AirAltarDTM := DTMFromString('maQEAAHicE2RgYGhjYmBIZILQq4C4FYjzgHghEOcD8RwgTofiCiCeBMTLgHg5EM8E4hqQeqA5hUDsDqWnAHETEEcCcSgQdwFxIhDXQuUmQeVTgdgPiH2BuDhDmaGnzpfB0UaZISrIEMwG4dxkG4a2Si8wLs6wh4uDcFKkGVitvZUig6ezOgMX0BxKMdA7DIwUYgwAAPGsI6M=');
if not(FindDTMRotated(AirAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound)) then
begin
ColorToleranceSpeed(1);
RadialWalkTolerance(2319220, 0, 359, 75, 5, 5, 5);
Wait(1000 + Random(1000));
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.48, 0.06);
if FindColoredAreaTolerance(X, Y, 7433327, MSX1, MSY1, MSX2, MSY2, 500, 7) then
begin
WriteLn('We can see the altar on our mainscreen');
FreeDTM(AirAltarDTM);
Exit;
end;
ColorToleranceSpeed(1);
if FindDTMRotated(AirAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
WriteLn('We have found the AirAltarDTM on the minimap this time');
MMouse(X + 5, Y + 5, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end else
begin
ColorToleranceSpeed(1);
RadialWalkTolerance(2319220, 0, 359, 25, 5, 5, 5);
Wait(1000 + Random(1000));
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.48, 0.06);
if FindColoredAreaTolerance(X, Y, 7433327, MSX1, MSY1, MSX2, MSY2, 500, 7) then
begin
WriteLn('We can see the altar on our mainscreen');
FreeDTM(AirAltarDTM);
Exit;
end;
ColorToleranceSpeed(1);
if FindDTMRotated(AirAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
WriteLn('We have found the AirAltarDTM on the minimap this time');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end else
begin
WriteLn('Something has went wrong, not able to navigate to the Air Altar');
end;
end;
end else
begin
WriteLn('We have found the AirAltarDTM on the minimap');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end;
FreeDTM(AirAltarDTM);
end else
begin
WriteLn('We can see the air altar on our main screen!');
end;
Wait(100 + Random(100));
repeat
Wait(50 + Random(50));
until (IsMoving=False);
end else
begin
WriteLn('Walking near the air altar');
SPS_BlindWalk(Point(RandomRange(39843, 39855), RandomRange(623, 635)));
end;
end;
end;
procedure FindTheMindAltar;
var
MyPos: TPoint;
AroundMindAltar: TBox;
MindAltarDTM, X, Y: Integer;
aFound: Extended;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['99_2']);
MyPos := SPS_GetMyPos;
Writeln('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
AroundMindAltar := IntToBox(39847, 1023, 39871, 1043);
if PointInBox(MyPos, AroundMindAltar) then
begin
WriteLn('Our location is near the mind altar');
end else
{We aren't near the altar, so we are going to walk near it using SPS}
begin
if MyPos = Point(-1, -1) then
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.60, 0.17);
if not(FindColoredAreaTolerance(X, Y, 9998742, MSCX - 100, MSCY - 100, MSCX + 100, MSCY + 100, 500, 4)) then
begin
MindAltarDTM := DTMFromString('mPwEAAHic42dgYNjNxsCwDYhXA/E6IN4BxIeA+DQQn4XiE0C8D4jXAPE9IN4DVSfBxMDAxQShlYFYA4pBbCkgFgRibiDmBGI+qLrfjAwMJkC6raGZobK4HAPXV9aA6Y6mVhSx6qpKOGYFuptczEQBRgMAIdEj4w==');
if not(FindDTMRotated(MindAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound)) then
begin
ColorToleranceSpeed(1);
RadialWalkTolerance(10329254, 0, 359, 60, 5, 5, 10);
Wait(1000 + Random(1000));
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.60, 0.17);
if FindColoredAreaTolerance(X, Y, 9998742, MSX1, MSY1, MSX2, MSY2, 500, 4) then
begin
FreeDTM(MindAltarDTM);
WriteLn('We can see the Mind Altar on the mainscreen');
Exit;
end;
ColorToleranceSpeed(1);
if FindDTMRotated(MindAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
WriteLn('We have found the MindAltarDTM on the minimap this time');
MMouse(X, Y, 3, 3);
Wait(25 + Random(125));
ClickMouse2(1);
end else
begin
ColorToleranceSpeed(1);
RadialWalkTolerance(9473944, 0, 359, 30, 5, 5, 10);
Wait(1000 + Random(1000));
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.60, 0.17);
if FindColoredAreaTolerance(X, Y, 9998742, MSX1, MSY1, MSX2, MSY2, 500, 4) then
begin
FreeDTM(MindAltarDTM);
WriteLn('We can see the Mind Altar on the mainscreen');
Exit;
end;
ColorToleranceSpeed(1);
if FindDTMRotated(MindAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
WriteLn('We have found the MindAltarDTM on the minimap this time');
MMouse(X, Y, 3, 3);
Wait(25 + Random(125));
ClickMouse2(1);
end else
begin
WriteLn('Something has went wrong, not able to navigate to the Mind Altar');
end;
end;
end else
begin
WriteLn('We have found the MindAltarDTM on the minimap');
MMouse(X, Y, 3, 3);
Wait(25 + Random(125));
ClickMouse2(1);
end;
FreeDTM(MindAltarDTM);
end else
begin
WriteLn('We can see the mind altar on our main screen!');
end;
Wait(100 + Random(100));
repeat
Wait(50 + Random(50));
until (IsMoving=False);
end else
begin
WriteLn('Walking near the mind altar');
SPS_BlindWalk(Point(RandomRange(39847, 39871), RandomRange(1023, 1043)));
end;
end;
end;
procedure FindTheWaterAltar;
var
MyPos: TPoint;
AroundWaterAltar: TBox;
WaterAltarDTM, X, Y: Integer;
aFound: Extended;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['99_3']);
MyPos := SPS_GetMyPos;
Writeln('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
AroundWaterAltar := IntToBox(39823, 1439, 39839, 1451);
if PointInBox(MyPos, AroundWaterAltar) then
begin
WriteLn('Our location is near the water altar');
end else
{We aren't near the altar, so we are going to walk near it using SPS}
begin
if MyPos = Point(-1, -1) then
begin
WriteLn('SPS hasn`t been able to recognize our location..');
WriteLn('Walking to the altar by using alternative methods!');
WriteLn('Counted colors: '+IntToStr(CountColorTolerance(6775397, MSX1, MSY1, MSX2, MSY2, 6))+'');
if not(FindColoredAreaTolerance(X, Y, 6775397, MSCX - 100, MSCY - 100, MSCX + 100, MSCY + 100, 250, 6)) then
begin
WaterAltarDTM := DTMFromString('mFQEAAHic42VgYChiYmBIAuIsIC4E4logbgbiRiCuBuISqBxITSwQVwGxH1BfABBHA3EcEEcBsS8QuwKxPRDbQGk3IDYG4gIgrqvRZSjK0mQoKtBkyC3UZMjM1QDTBXkaYLG8NA2wfFmeFkNz12yGtr75DFxAfaRiJjIwCgAALhwZKg==');
if not(FindDTMRotated(WaterAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound)) then
begin
RadialWalkTolerance(2720893, 0, 359, 75, 5, 5, 5);
Wait(1000 + Random(1000));
if FindColoredAreaTolerance(X, Y, 6775397, MSX1, MSY1, MSX2, MSY2, 250, 6) then
begin
FreeDTM(WaterAltarDTM);
WriteLn('We can see the water altar on our mainscreen now');
Exit;
end;
if FindDTMRotated(WaterAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
WriteLn('We have found the WaterAltarDTM on the minimap this time');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end else
begin
RadialWalkTolerance(2720893, 0, 359, 25, 5, 5, 5);
Wait(1000 + Random(1000));
if FindColoredAreaTolerance(X, Y, 6775397, MSX1, MSY1, MSX2, MSY2, 250, 6) then
begin
FreeDTM(WaterAltarDTM);
WriteLn('We can see the water altar on our mainscreen now');
Exit;
end;
if FindDTMRotated(WaterAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
WriteLn('We have found the WaterAltarDTM on the minimap this time');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end else
begin
WriteLn('Something has went wrong, not able to navigate to the Water Altar');
end;
end;
end else
begin
WriteLn('We have found the WaterAltarDTM on the minimap');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end;
FreeDTM(WaterAltarDTM);
end else
begin
WriteLn('We can see the water altar on our main screen!');
end;
Wait(100 + Random(100));
repeat
Wait(50 + Random(50));
until (IsMoving=False);
end else
begin
WriteLn('Walking near the water altar');
SPS_BlindWalk(Point(RandomRange(39823, 39839), RandomRange(1439, 1451)));
end;
end;
end;
procedure FindTheEarthAltar;
var
MyPos: TPoint;
AroundEarthAltar: TBox;
EarthAltarDTM, X, Y: Integer;
aFound: Extended;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['99_4']);
MyPos := SPS_GetMyPos;
Writeln('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
AroundEarthAltar := IntToBox(39827, 1819, 39843, 1835);
if PointInBox(MyPos, AroundEarthAltar) then
begin
WriteLn('Our location is near the water altar');
end else
begin
if MyPos = Point(-1, -1) then
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.93, 0.27);
if not(FindColoredAreaTolerance(X, Y, 5657429, MSCX - 100, MSCY - 100, MSCX + 100, MSCY + 100, 500, 3)) then
begin
EarthAltarDTM := DTMFromString('mFQEAAHic42VgYDjPxsBwAYj3AvFZIH4ExIeA+A4QHwbi20B8DoiPQOlrQGzBxMCgDsSmQOwFxDZA7ALEBkCsBcRuQOwExGZQMUsgLklzZEgJ0WXIijRgSAgxY0gL0wOzQWJ5sYZgfk2OG0NTjhVDWbozQ0WqGQMX0H0cJGImNMxIBEYBAFHAG1s=');
if not(FindDTMRotated(EarthAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound)) then
begin
WriteLn('We haven`t been able to find the EarthAltarDTM');
ColorToleranceSpeed(1);
RadialWalkTolerance(3631228, 0, 359, 75, 5, 5, 5);
Wait(1000 + Random(1000));
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.93, 0.27);
if FindColoredAreaTolerance(X, Y, 5657429, MSX1, MSY1, MSX2, MSY2, 500, 3) then
begin
FreeDTM(EarthAltarDTM);
WriteLn('We can see the Earth Altar on the mainscreen');
Exit;
end;
ColorToleranceSpeed(1);
if FindDTMRotated(EarthAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
WriteLn('We have found the BodyAltarDTM on the minimap this time');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
Wait(100 + Random(100));
repeat
Wait(50 + Random(50));
until (IsMoving=False);
FreeDTM(EarthAltarDTM);
end else
begin
ColorToleranceSpeed(1);
RadialWalkTolerance(3631228, 0, 359, 35, 5, 5, 5);
Wait(1000 + Random(1000));
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.93, 0.27);
if FindColoredAreaTolerance(X, Y, 5657429, MSX1, MSY1, MSX2, MSY2, 500, 3) then
begin
FreeDTM(EarthAltarDTM);
WriteLn('We can see the Earth Altar on the mainscreen');
Exit;
end;
ColorToleranceSpeed(1);
if FindDTMRotated(EarthAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
WriteLn('We have found the BodyAltarDTM on the minimap this time');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end else
begin
WriteLn('Something has went wrong, not able to navigate to the Body Altar');
end;
end;
end else
begin
WriteLn('We have found the EarthAltarDTM on the minimap');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
Wait(100 + Random(100));
repeat
Wait(50 + Random(50));
until (IsMoving=False);
FreeDTM(EarthAltarDTM);
end;
end else
begin
WriteLn('We can see the earth altar on our main screen!');
end;
end else
begin
{We aren't near the altar, so we are going to walk near it using SPS}
WriteLn('Walking near the earth altar');
SPS_BlindWalk(Point(RandomRange(39827, 39843), RandomRange(1819, 1835)));
end;
end;
end;
procedure FindTheFireAltar;
var
MyPos: TPoint;
AroundFireAltar: TBox;
FireAltarDTM, X, Y: Integer;
aFound: Extended;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['99_5']);
MyPos := SPS_GetMyPos;
Writeln('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
AroundFireAltar := IntToBox(39835, 2239, 39851, 2255);
if PointInBox(MyPos, AroundFireAltar) then
begin
WriteLn('Our location is near the fire altar');
end else
{We aren't near the altar, so we are going to walk near it using SPS}
begin
if MyPos = Point(-1, -1) then
begin
ColorToleranceSpeed(1);
if not(FindColoredAreaTolerance(X, Y, 6512225, MSCX - 100, MSCY - 100, MSCX + 100, MSCY + 100, 500, 6)) then
begin
FireAltarDTM := DTMFromString('mwQAAAHic42RgYJjGxsAwHYhbgXgpEE8F4n4gngvE5UDcDcRSTAwMPEAsA8XaQKwExCJALADElkAc7mXJEOSsyxDubsDg66DNEOKqz5ASZA7GWpJcYMwPtI+LAGYEYiYCGA4A2jUNQg==');
if not(FindDTMRotated(FireAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound)) then
begin
WriteLn('We haven`t found the DTM, radial walking near the altar');
RadialWalkTolerance(3823718, 0, 359, 60, 5, 5, 5);
Wait(1000 + Random(1000));
if FindColoredAreaTolerance(X, Y, 6512225, MSX1, MSY1, MSX2, MSY2, 500, 6) then
begin;
FreeDTM(FireAltarDTM);
WriteLn('We are near the altar');
Exit;
end;
ColorToleranceSpeed(1);
if FindDTMRotated(FireAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
WriteLn('We have found the FireAltarDTM on the minimap this time');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end else
begin
ColorToleranceSpeed(1);
RadialWalkTolerance(3823718, 0, 359, 25, 5, 5, 5);
Wait(1000 + Random(1000));
if FindDTMRotated(FireAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
WriteLn('We have found the FireAltarDTM on the minimap this time');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end else
begin
WriteLn('Something has went wrong, not able to navigate to the Fire Altar');
end;
end;
end else
begin
WriteLn('We have found the FireAltarDTM on the minimap');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end;
FreeDTM(FireAltarDTM);
end else
begin
WriteLn('We can see the fire altar on our main screen!');
end;
Wait(100 + Random(100));
repeat
Wait(50 + Random(50));
until (IsMoving=False);
end else
begin
WriteLn('Walking near the fire altar');
SPS_BlindWalk(Point(RandomRange(39835, 39851), RandomRange(2239, 2255)));
end;
end;
end;
procedure FindTheBodyAltar;
var
MyPos: TPoint;
AroundBodyAltar: TBox;
BodyAltarDTM, X, Y: Integer;
aFound: Extended;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['99_6']);
MyPos := SPS_GetMyPos;
Writeln('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
AroundBodyAltar := IntToBox(39835, 2651, 39851, 2667);
if PointInBox(MyPos, AroundBodyAltar) then
begin
WriteLn('Our location is near the body altar');
end else
{We aren't near the altar, so we are going to walk near it using SPS}
begin
if MyPos = Point(-1, -1) then
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.48, 0.20);
if not(FindColoredAreaTolerance(X, Y, 9275018, MSCX - 100, MSCY - 100, MSCX + 100, MSCY + 100, 300, 5)) then
begin
BodyAltarDTM := DTMFromString('mfgEAAHicE2JgYLjOxsBwCYgvAvF9KD4PpU8C8TMgPg6lXwDxYSC+ygbRdwOItwHxByCWZ2JgkARiVSBWB2JxIJYDYkUg5gdiXSDWAmIBqLgcVFwPiC2BWBSIuYG4Na+MoTm3hKG9oIKhMiWLoau4EoirgfwyhsK4ZIb8mCSG2ox8hvLkDDAfxM6OiGMojk8Fq2/NKwGK5TGwAv1GDcxIJYwJABFDKfo=');
if not(FindDTMRotated(BodyAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound)) then
begin
ColorToleranceSpeed(1);
RadialWalkTolerance(8223117, 0, 359, 75, 5, 5, 5);
Wait(1000 + Random(1000));
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.48, 0.20);
if FindColoredAreaTolerance(X, Y, 9275018, MSX1, MSY1, MSX2, MSY2, 300, 5) then
begin
FreeDTM(BodyAltarDTM);
WriteLn('We can see the Body Altar on the mainscreen');
Exit;
end;
ColorToleranceSpeed(1);
if FindDTMRotated(BodyAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
WriteLn('We have found the BodyAltarDTM on the minimap this time');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end else
begin
ColorToleranceSpeed(1);
RadialWalkTolerance(8223117, 0, 359, 25, 5, 5, 5);
Wait(1000 + Random(1000));
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.48, 0.20);
if FindColoredAreaTolerance(X, Y, 9275018, MSX1, MSY1, MSX2, MSY2, 300, 5) then
begin
FreeDTM(BodyAltarDTM);
WriteLn('We can see the Body Altar on the mainscreen');
Exit;
end;
ColorToleranceSpeed(1);
if FindDTMRotated(BodyAltarDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
WriteLn('We have found the BodyAltarDTM on the minimap this time');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end else
begin
WriteLn('Something has went wrong, not able to navigate to the Body Altar');
end;
end;
end else
begin
WriteLn('We have found the BodyAltarDTM on the minimap');
MMouse(X, Y, 2, 2);
Wait(25 + Random(125));
ClickMouse2(1);
end;
FreeDTM(BodyAltarDTM);
end else
begin
WriteLn('We can see the body altar on our main screen!');
end;
Wait(100 + Random(100));
repeat
Wait(50 + Random(50));
until (IsMoving=False);
end else
begin
WriteLn('Walking near the body altar');
SPS_BlindWalk(Point(RandomRange(39835, 39851), RandomRange(2651, 2667)));
end;
end;
end;
function DefineArea:String;
var
AltarMMCol, AltarMMTol, ColorCount: Array of Integer;
AltarMMHue, AltarMMSat: Array of Extended;
PossibleAltars: Array of String;
i: Integer;
begin;
AltarMMCol := [6274014, 1922629, 3036009, 10194822, 6776920];
AltarMMTol := [15, 12, 15, 5, 18];
AltarMMHue := [0.07, 0.71, 0.17, 2.70, 2.79];
AltarMMSat := [2.64, 1.53, 1.25, 2.72, 0.17];
PossibleAltars := ['fire', 'air', 'earth', 'water', 'body'];
ColorCount := [2000, 5000, 10000, 5000, 5000];
for i := 0 to 4 do
begin
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(AltarMMHue[i], AltarMMSat[i]);
if CountColorTolerance(AltarMMCol[i], MMX1, MMY1, MMX2, MMY2, AltarMMTol[i]) > ColorCount[i] then
begin
ColorToleranceSpeed(1);
WriteLn('Define area is '+PossibleAltars[i]+'');
Result:=PossibleAltars[i];
Exit;
end;
end;
WriteLn('Mind altar');
Result:='mind';
end;
procedure WalkToAltar;
var
PossibleAltar: Array of String;
i: Integer;
begin
PossibleAltar := ['fire', 'earth', 'air', 'water', 'body', 'mind'];
for i:= 0 to 5 do
begin
if DefineArea = PossibleAltar[i] then
begin
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'walking to '+PossibleAltar[i]+' altar', clWhite);
case i of
0: begin; WriteLn('We are at the '+PossibleAltar[i]+' altar'); FindTheFireAltar; Exit; end;
1: begin; WriteLn('We are at the '+PossibleAltar[i]+' altar'); FindTheEarthAltar; Exit; end;
2: begin; WriteLn('We are at the '+PossibleAltar[i]+' altar'); FindTheAirAltar; Exit; end;
3: begin; WriteLn('We are at the '+PossibleAltar[i]+' altar'); FindTheWaterAltar; Exit; end;
4: begin; WriteLn('We are at the '+PossibleAltar[i]+' altar'); FindTheBodyAltar; Exit; end;
5: begin; WriteLn('We are at the '+PossibleAltar[i]+' altar'); FindTheMindAltar; Exit; end;
end;
end;
end;
end;
function RadialWalking: Boolean;
var
StartAngles, EndAngles, Radiuses, LargeRadius: Array of Integer;
i, q, r: Integer;
begin
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'radialwalking to orbs', clWhite);
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.02, 0.47);
StartAngles := [0, 90, 180, 270];
EndAngles := [90, 180, 270, 359];
Radiuses := [35, 65, 20, 50, 15, 40, 75];
i := RandomRange(0, 3);
for q:=0 to 6 do
begin
if RadialWalkTolerance(582887, StartAngles[i], EndAngles[i], Radiuses[q], RandomRange(-10, 10), RandomRange(-10, 10), 8) then
begin
WriteLn('We have found the radial walk color and have walked there');
WriteLn('Start angle: '+IntToStr(StartAngles[i])+', End angle: '+IntToStr(EndAngles[i])+', Radius: '+IntToStr(Radiuses[q])+'');
Result:=True;
Wait(250 + Random(500));
if (IsMoving=True) then
begin
repeat
Wait(50 + Random(50));
until(IsMoving=False);
Wait(150 + Random(300));
Exit;
end else
begin
Wait(150 + Random(300));
Exit;
end;
end else
begin
WriteLn('We haven`t been able to find the radial walk color with these angles and radiuses');
WriteLn('Start angle: '+IntToStr(StartAngles[i])+', End angle: '+IntToStr(EndAngles[i])+', Radius: '+IntToStr(Radiuses[q])+'');
end;
end;
LargeRadius := [50, 60, 75];
for r:=0 to 2 do
begin
if RadialWalkTolerance(653044, 0, 359, LargeRadius[r], RandomRange(-10, 10), RandomRange(-10, 10), 10) then
begin
Wait(250 + Random(500));
if (IsMoving=True) then
begin
repeat
Wait(50 + Random(50));
until(IsMoving=False);
Exit;
end else
begin
Exit;
end;
end else
begin
WriteLn('We haven`t been able to find any yellow dots.');
Antiban;
WalkToAltar;
Exit;
end;
end;
end;
procedure WalkFivePixels(P: TPoint);
var
i, r, ExtraX, ExtraY: Integer;
M: TPoint;
PointsToAltar: TPointArray;
PossibleAltars: array of string;
begin
PossibleAltars := ['air', 'mind', 'water', 'earth', 'fire', 'body'];
for i:=0 to 5 do
begin
if DefineArea = PossibleAltars[i] then
begin
WriteLn('case time');
case i of
0: begin;
WriteLn('Air altar');
SPS_Setup(RUNESCAPE_SURFACE, ['99_1']);
Break;
end;
1: begin;
WriteLn('Mind altar');
SPS_Setup(RUNESCAPE_SURFACE, ['99_2']);
Break;
end;
2: begin;
WriteLn('Water altar');
SPS_Setup(RUNESCAPE_SURFACE, ['99_3']);
Break;
end;
3: begin;
WriteLn('Earth altar');
SPS_Setup(RUNESCAPE_SURFACE, ['99_4']);
Break;
end;
4: begin;
WriteLn('Fire altar');
SPS_Setup(RUNESCAPE_SURFACE, ['99_5']);
Break;
end;
5: begin;
WriteLn('Body altar');
SPS_Setup(RUNESCAPE_SURFACE, ['99_6']);
Break;
end;
end;
end;
end;
M := SPS_GetMyPos;
PointsToAltar := TPABetweenPoints(Point(M.X, M.Y), Point(P.X, P.Y), 5, 5);
Writeln('My position is x: '+IntToStr(M.x)+' y: '+IntToStr(M.y));
WriteLn('Array length is '+IntToStr(Length(PointsToAltar))+'');
if Length(PointsToAltar) > 5 then
begin
case Length(PointsToAltar) of
0..8: begin
r := (Length(PointsToAltar));
SPS_WalkPath([PointsToAltar[(r-4)]]);
end;
9..16: begin
r := (Length(PointsToAltar)/2);
SPS_WalkPath([PointsToAltar[r-2]]);
end;
17..24: begin
r := (Length(PointsToAltar)/4);
SPS_WalkPath([PointsToAltar[r]]);
end;
25..32: begin
r := (Length(PointsToAltar)/6);
SPS_WalkPath([PointsToAltar[r]]);
end;
33..40: begin
r := (Length(PointsToAltar)/7);
SPS_WalkPath([PointsToAltar[r]]);
end;
41..48: begin
r := (Length(PointsToAltar)/8);
SPS_WalkPath([PointsToAltar[r]]);
end;
49..56: begin
r := (Length(PointsToAltar)/9);
SPS_WalkPath([PointsToAltar[r]]);
end;
57..64: begin
r := (Length(PointsToAltar)/10);
SPS_WalkPath([PointsToAltar[r]]);
end;
65..72: begin
r := (Length(PointsToAltar)/11);
SPS_WalkPath([PointsToAltar[r]]);
end;
73..80: begin
r := (Length(PointsToAltar)/12);
SPS_WalkPath([PointsToAltar[r]]);
end;
81..88: begin
r := (Length(PointsToAltar)/13);
SPS_WalkPath([PointsToAltar[r]]);
end;
89..96: begin
r := (Length(PointsToAltar)/14);
SPS_WalkPath([PointsToAltar[r]]);
end;
97..10000: WalkToAltar;
end;
Wait(200 + Random(200));
if (IsMoving=True) then
begin
repeat
Wait(50 + Random(50));
until(IsMoving=False);
end;
Wait(200 + Random(200));
end else
begin
WriteLn('Walking to a random spot near the altar');
case Random(6) of
0..4: begin;
case Random(2) of
0: ExtraX := RandomRange(-10, -5);
1: ExtraX := RandomRange(5, 10);
end;
case Random(2) of
0: ExtraY := RandomRange(-10, -5);
1: ExtraY := RandomRange(5, 10);
end;
SPS_WalkPath([Point(P.X + ExtraX, P.Y + ExtraY)]);
end;
5: WalkToAltar;
end;
Wait(200 + Random(200));
if (IsMoving=True) then
begin
repeat
Wait(50 + Random(50));
until(IsMoving=False);
end;
Wait(200 + Random(200));
end;
end;
function GreenOrbs: Boolean;
var
i, CountedGreenOrbColors: integer;
GreenOrbCol, GameboxTPA: TPointArray;
GreenOrbSplit: T2DPointArray;
P: TPoint;
Gamebox: TBox;
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.44, 2.00);
CountedGreenOrbColors := CountColorTolerance(4638563, 0, 76, 515, 308, 19) + CountColorTolerance(4638563, 421, 311, 515, 337, 19) + CountColorTolerance(4115289, 0, 0, 515, 11, 20) + CountColorTolerance(4638563, 370, 11, 515, 191, 19);
WriteLn('Counted green colors: '+IntToStr(CountedGreenOrbColors)+'');
if CountedGreenOrbColors < 200 then
begin
WriteLn('We haven`t been able to find any green orbs on our screen. Moving');
RadialWalking;
end else
begin
SetColorSpeed2Modifiers(0.44, 2.00);
if FindColorsSpiralTolerance(MSCX, MSCY, GreenOrbCol, 4638563, MSX1, MSY1, MSX2, MSY2, 19) then
begin
Gamebox := IntToBox(421, 193, 515, 311);
GameBoxTPA := TPAFromBox(Gamebox);
GreenOrbCol := ClearTPAFromTPA(GreenOrbCol, GameBoxTPA);
SortTPAFrom(GreenOrbCol, Point(MSCX, MSCY));
GreenOrbSplit := SplitTPAEx(GreenOrbCol, 20, 20);
SortATPASize(GreenOrbSplit, True);
if Length(GreenOrbSplit) < 1 then
begin
Exit;
end;
if Length(GreenOrbSplit) < 3 then
begin
i := Low(GreenOrbSplit);
P := MiddleTPA(GreenOrbSplit[i]);
MMouse(P.X, P.Y, RandomRange(-2, 2), RandomRange(-2, 2));
if WaitUpTextMulti(['orb', 'en or', 'Green Orb'], 250) then
begin
ClickMouse2(1);
Wait(500 + Random(1500));
Result:=True;
Exit;
end;
end else
begin
for i:=0 to 2 do
begin
P := MiddleTPA(GreenOrbSplit[i]);
MMouse(P.X, P.Y, RandomRange(-2, 2), RandomRange(-2, 2));
if WaitUpTextMulti(['orb', 'en or', 'Green Orb'], 250) then
begin
ClickMouse2(1);
Wait(500 + Random(1500));
Result:=True;
Exit;
end;
end;
end;
end else
begin
WriteLn('We haven`t been able to detect any green orbs, moving');
RadialWalking;
Antiban;
end;
end;
end;
function YellowOrbs: Boolean;
var
i, CountedYellowOrbColors: integer;
YellowOrbCol, GameboxTPA: TPointArray;
YellowOrbSplit: T2DPointArray;
P: TPoint;
Gamebox: TBox;
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.11, 1.40);
CountedYellowOrbColors := CountColorTolerance(4185305, 0, 76, 515, 308, 19) + CountColorTolerance(4185305, 421, 311, 515, 337, 19) + CountColorTolerance(4185305, 0, 0, 515, 11, 19) + CountColorTolerance(4185305, 370, 11, 515, 191, 19);
WriteLn('Counted yellow colors: '+IntToStr(CountedYellowOrbColors)+'');
if CountedYellowOrbColors < 200 then
begin
WriteLn('We haven`t been able to find any yellow orbs on our screen. Moving');
RadialWalking;
Antiban;
end else
begin
SetColorSpeed2Modifiers(0.11, 1.40);
if FindColorsSpiralTolerance(MSCX, MSCY, YellowOrbCol, 4185305, MSX1, MSY1, MSX2, MSY2, 19) then
begin
Gamebox := IntToBox(421, 193, 515, 311);
GameBoxTPA := TPAFromBox(Gamebox);
YellowOrbCol := ClearTPAFromTPA(YellowOrbCol, GameBoxTPA);
SortTPAFrom(YellowOrbCol, Point(MSCX, MSCY));
YellowOrbSplit := SplitTPAEx(YellowOrbCol, 30, 30);
SortATPASize(YellowOrbSplit, True);
if Length(YellowOrbSplit) < 1 then
begin
Exit;
end;
if Length(YellowOrbSplit) < 3 then
begin
i := Low(YellowOrbSplit);
P := MiddleTPA(YellowOrbSplit[i]);
MMouse(P.X, P.Y, RandomRange(-2, 2), RandomRange(-2, 2));
if WaitUpTextMulti(['orb', 'ow or', 'Yellow Orb'], 250) then
begin
ClickMouse2(1);
Wait(500 + Random(1500));
Result:=True;
Exit;
end;
end else
begin
for i:=0 to 2 do
begin
P := MiddleTPA(YellowOrbSplit[i]);
MMouse(P.X, P.Y, RandomRange(-2, 2), RandomRange(-2, 2));
if WaitUpTextMulti(['orb', 'ow or', 'Yellow Orb'], 250) then
begin
ClickMouse2(1);
Wait(500 + Random(1500));
Result:=True;
Exit;
end;
end;
end;
end else
begin
WriteLn('We haven`t been able to detect any yellow orbs, moving');
RadialWalking;
Antiban;
end;
end;
end;
function Orbs: Boolean;
var
i: integer;
PossibleTeam: Array of String;
begin
PossibleTeam := ['Yellow', 'Green'];
for i:=0 to 1 do
begin
if (JoinedTeam = PossibleTeam[i]) then
begin
case PossibleTeam[i] of
PossibleTeam[0]: begin
// YELLOW TEAM
if (YellowOrbs = True) then
begin
Result := True;
Exit;
end else
begin
Result := False;
Exit;
end;
end;
PossibleTeam[1]: begin
// GREEN TEAM
if (GreenOrbs = True) then
begin
Result := True;
Exit;
end else
begin
Result := False;
Exit;
end;
end;
end;
end;
end;
//DefineTeam;
case Random(2) of
0: begin
// YELLOW TEAM
if (YellowOrbs = True) then
begin
Result := True;
Exit;
end else
begin
Result := False;
Exit;
end;
end;
0: begin
// GREEN TEAM
if (GreenOrbs = True) then
begin
Result := True;
Exit;
end else
begin
Result := False;
Exit;
end;
end;
end;
end;
procedure WaitOrbs;
var
i: Integer;
PossibleTeam: Array of String;
begin
PossibleTeam := ['Green', 'Yellow'];
for i:=0 to 1 do
begin
if (JoinedTeam = PossibleTeam[i]) then
begin
case PossibleTeam[i] of
PossibleTeam[0]: begin
// GREEN TEAM
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'attracting green orbs', clWhite);
if (GreenOrbs = True) then
begin
Antiban;
Wait(500 + Random(1500));
Antiban;
end;
Exit;
end;
PossibleTeam[1]: begin
// YELLOW TEAM
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'attracting yellow orbs', clWhite);
if (YellowOrbs = True) then
begin
Antiban;
Wait(500 + Random(1500));
Antiban;
end;
Exit;
end;
end;
end;
end;
end;
procedure CraftRunes;
var
X, Y, i: integer;
AltarColors, GameboxTPA: TPointArray;
AltarColorsSplit: T2DPointArray;
AltarTypes: Array of String;
AltarTypeSatMod, AltarTypeHueMod: Array of Extended;
TheAltarColors, TheAltarTolerance: Array of Integer;
P: TPoint;
Gamebox: TBox;
begin
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'walking to the altar', clWhite);
WalkToAltar;
Wait(500 + Random(1000));
// This will click on the altar and craft runes \\
AltarTypes := ['Air', 'Mind', 'Water', 'Earth', 'Fire', 'Body'];
AltarTypeSatMod := [0.48, 0.60, 0.00, 0.93, 0.00, 0.48];
AltarTypeHueMod := [0.06, 0.17, 0.05, 0.27, 0.05, 0.20];
TheAltarColors := [7433327, 9998742, 6446432, 5657429, 6446432, 9275018];
TheAltarTolerance := [7, 4, 3, 3, 3, 5];
for i:= 0 to 5 do
begin
if DefineArea = AltarTypes[i] then
begin
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'crafting runes', clWhite);
Antiban;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(AltarTypeSatMod[i], AltarTypeHueMod[i]);
if FindColorsSpiralTolerance(X, Y, AltarColors, TheAltarColors[i], MSX1, MSY1, MSX2, MSY2, TheAltarTolerance[i]) then
begin
Gamebox := IntToBox(421, 193, 515, 311);
GameBoxTPA := TPAFromBox(Gamebox);
AltarColors := ClearTPAFromTPA(AltarColors, GameBoxTPA);
SortTPAFrom(AltarColors, Point(MSCX, MSCY));
AltarColorsSplit := SplitTPAEx(AltarColors, 15, 15);
SortATPASize(AltarColorsSplit, True);
P := MiddleTPA(AltarColorsSplit[0]);
MMouse(P.X, P.Y, RandomRange(-15, 15), RandomRange(-15, 15));
if WaitUpTextMulti(['raft', 'une', 'ltar'], 250) then
begin
ClickMouse2(1);
Wait(1000 + Random(2000));
case Random(5) of
0..2: TypeSendEx('1', False);
3..4: Mousebox(207, 398, 311, 415, 1);
end;
Wait(5000 + Random(2000));
Antiban;
Exit;
end;
end;
end else
begin
//WriteLn('We haven`t been able to detect at which altar we are..');
end;
end;
end;
procedure WalkToPortalInside;
var
a, X, Y, i, ArrowSymbol: Integer;
InputAcc, OutputAcc: Extended;
AltarTypes, SPSMaps: Array of String;
MyPos: TPoint;
ArrowTPoints: Array of TPoint;
begin
Antiban;
A := 0;
AltarTypes := ['Air', 'Mind', 'Water', 'Earth', 'Fire', 'Body'];
SPSMaps := ['99_1', '99_2', '99_3', '99_4', '99_5', '99_6'];
ArrowTPoints := [Point(RandomRange(39843, 39855), RandomRange(651, 659)),
Point(RandomRange(39847, 39863), RandomRange(1087, 1091)),
Point(RandomRange(39843, 39855), RandomRange(1463, 1467)),
Point(RandomRange(39831, 39843), RandomRange(1863, 1867)),
Point(RandomRange(39815, 39823), RandomRange(2243, 2251)),
Point(RandomRange(39827, 39831), RandomRange(2683, 2691))];
for i:= 0 to 5 do
begin
if DefineArea = AltarTypes[i] then
begin
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'walking to portal', clWhite);
SPS_Setup(RUNESCAPE_SURFACE, [SPSMaps[i]]);
MyPos := SPS_GetMyPos;
if MyPos = Point(-1, -1) then
begin
repeat
ArrowSymbol := BitmapFromString(7, 15, 'meJzT9AzXxEAaAWkCVz8gI5IFT31' +
'ARhBB/n3vkRHxgiCRpe+JRG7r7/HPfoeMgCJqPonI4hCRxnpRuDhc' +
'BIJUPOOAIkASLgIXh7MBQZeURw==');
InputAcc := 0.5;
FindDeformedBitmapToleranceIn(ArrowSymbol, X, Y, MMX1, MMY1, MMX2, MMY2, 75, 0, True, OutputAcc)
FreeBitmap(ArrowSymbol);
if (OutputAcc > InputAcc) then
begin
WriteLn('We found the flicker arrow symbol, walking there!');
MMouse(X, Y, 0, 0);
Wait(25 + Random(75));
ClickMouse2(1);
Wait(100 + Random(100));
repeat
Wait(50 + Random(50));
until (IsMoving=False);
end else
begin;
WriteLn('We haven`t been able to detect the flickering arrow symbol.');
inc(A);
Wait(250 + Random(500));
end;
until (OutputAcc > InputAcc) or (A>9);
end else
begin
SPS_BlindWalk(ArrowTPoints[i]);
Wait(1000 + Random(1000));
end;
end;
end;
end;
function EnterPortalInside: Boolean;
var
X, Y, i: integer;
PortInCol: TPointArray;
PortInSplit: T2DPointArray;
P: TPoint;
begin
// This will click on the portal inside \\
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.31, 1.43);
if FindColorsSpiralTolerance(X, Y, PortInCol, 12605594, MSX1, MSY1, MSX2, MSY2, 24) then
begin
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'going through portal', clWhite);
SortTPAFrom(PortInCol, Point(MSCX, MSCY));
PortInSplit := SplitTPAEx(PortInCol, 50, 50);
SortATPASize(PortInSplit, True);
for i:=0 to High(PortInSplit) do
begin
P := MiddleTPA(PortInSplit[i]);
MMouse(P.X, P.Y, 5, 5);
if WaitUpTextMulti(['ortal', 'Portal'], 250) then
begin
ClickMouse2(1);
Result:=True;
Exit;
end else
begin
WriteLn('We haven`t been able to detect the portal, inside GOP');
Result:=False;
end;
end;
end;
end;
procedure AttractOrbsAir;
var
MyPos: TPoint;
begin
WaitOrbs;
SPS_Setup(RUNESCAPE_SURFACE, ['99_1']);
MyPos:=SPS_GetMyPos;
Writeln('My position is x: '+IntToStr(MyPos.x)+' y: '+IntToStr(MyPos.y));
repeat
begin
WalkFivePixels(Point(RandomRange(39839, 39855), RandomRange(623, 635)));
Antiban;
WaitOrbs;
Antiban;
end;
until (Orbs = False);
end;
procedure AttractOrbsMind;
var
MyPos: TPoint;
begin
WaitOrbs;
SPS_Setup(RUNESCAPE_SURFACE, ['99_2']);
MyPos:=SPS_GetMyPos;
Writeln('My position is x: '+IntToStr(MyPos.x)+' y: '+IntToStr(MyPos.y));
repeat
begin
WalkFivePixels(Point(RandomRange(39843, 39867), RandomRange(1027, 1047)));
Antiban;
WaitOrbs;
Antiban;
end;
until (Orbs = False);
end;
procedure AttractOrbsWater;
var
MyPos: TPoint;
begin
WaitOrbs;
SPS_Setup(RUNESCAPE_SURFACE, ['99_3']);
MyPos:=SPS_GetMyPos;
Writeln('My position is x: '+IntToStr(MyPos.x)+' y: '+IntToStr(MyPos.y));
repeat
begin
WalkFivePixels(Point(RandomRange(39823, 39839), RandomRange(1435, 1451)));
Antiban;
WaitOrbs;
Antiban;
end;
until (Orbs = False);
end;
procedure AttractOrbsEarth;
var
MyPos: TPoint;
begin
WaitOrbs;
SPS_Setup(RUNESCAPE_SURFACE, ['99_4']);
MyPos:=SPS_GetMyPos;
Writeln('My position is x: '+IntToStr(MyPos.x)+' y: '+IntToStr(MyPos.y));
repeat
begin
WalkFivePixels(Point(RandomRange(39827, 39843), RandomRange(1815, 1835)));
Antiban;
WaitOrbs;
Antiban;
end;
until (Orbs = False);
end;
procedure AttractOrbsFire;
var
MyPos: TPoint;
begin
WaitOrbs;
SPS_Setup(RUNESCAPE_SURFACE, ['99_5']);
MyPos:=SPS_GetMyPos;
Writeln('My position is x: '+IntToStr(MyPos.x)+' y: '+IntToStr(MyPos.y));
repeat
begin
WalkFivePixels(Point(RandomRange(39839, 39847), RandomRange(2235, 2251)));
Antiban;
WaitOrbs;
Antiban;
end;
until (Orbs = False);
end;
procedure AttractOrbsBody;
var
MyPos: TPoint;
begin
WaitOrbs;
SPS_Setup(RUNESCAPE_SURFACE, ['99_6']);
MyPos:=SPS_GetMyPos;
Writeln('My position is x: '+IntToStr(MyPos.x)+' y: '+IntToStr(MyPos.y));
repeat
begin
WalkFivePixels(Point(RandomRange(39839, 39855), RandomRange(2647, 2663)));
Antiban;
WaitOrbs;
Antiban;
end;
until (Orbs = False);
end;
procedure AttractOrbs;
var
PossibleAltar: Array of String;
i: Integer;
begin
Running;
PossibleAltar := ['air', 'mind', 'water', 'earth', 'fire', 'body'];
for i:= 0 to 5 do
begin
if DefineArea = PossibleAltar[i] then
begin
case PossibleAltar[i] of
PossibleAltar[0]: begin; WriteLn('We are going to attract orbs at the '+PossibleAltar[i]+' Altar'); AttractOrbsAir; Exit; end;
PossibleAltar[1]: begin; WriteLn('We are going to attract orbs at the '+PossibleAltar[i]+' Altar'); AttractOrbsMind; Exit; end;
PossibleAltar[2]: begin; WriteLn('We are going to attract orbs at the '+PossibleAltar[i]+' Altar'); AttractOrbsWater; Exit; end;
PossibleAltar[3]: begin; WriteLn('We are going to attract orbs at the '+PossibleAltar[i]+' Altar'); AttractOrbsEarth; Exit; end;
PossibleAltar[4]: begin; WriteLn('We are going to attract orbs at the '+PossibleAltar[i]+' Altar'); AttractOrbsFire; Exit; end;
PossibleAltar[5]: begin; WriteLn('We are going to attract orbs at the '+PossibleAltar[i]+' Altar'); AttractOrbsBody; Exit; end;
end;
end;
end;
end;
function MakeBarrier: Boolean;
var
i, X, Y, BarrierGreen, BarrierYellow: Integer;
Barriers: Array of Integer;
BarrierBox: TBox;
PossibleTeam: Array of String;
begin;
PossibleTeam := ['Green', 'Yellow'];
BarrierGreen := DTMFromString('mbQAAAHicY2VgYMhmYmAoAeIEIK4C4nwgfgIUvwbEH4D4LhDfBGItA00gyYSC/zNgAkYsGAwAeAkIJw==');
BarrierYellow := DTMFromString('mbQAAAHicY2VgYDjKxsCwC4h3A/FBIL4AYjMxMKwH4u1AvBmIjwFxYqI5UDUTCv7PgAkYsWAwAAACjgmY');
Barriers := [BarrierGreen, BarrierYellow];
for i:=0 to 1 do
begin
if (JoinedTeam = PossibleTeam[i]) then
begin
if FindDTM(Barriers[i], X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(X, Y, 2, 2);
if WaitUpTextMulti(['ake-', 'arri', 'gener'], 250) then
begin
ClickMouse2(1);
end;
end;
BarrierBox := IntToBox(245, 134, 282, 195);
Wait(100 + Random(100));
if PixelShift(Barrierbox, RandomRange(2500, 3000)) > 1000 then
begin
WriteLn('We have succesfully placed a barrier');
if FindChatBoxText('cannot', 8, clBlack) then
begin
FreeDTM(BarrierGreen);
FreeDTM(BarrierYellow);
Exit;
end else
begin
FreeDTM(BarrierGreen);
FreeDTM(BarrierYellow);
Antiban;
Result:=True;
Exit;
end;
end else
begin
MouseCircle(MMCX, MMCY, 70, 1);
Wait(100 + Random(200));
repeat
Wait(50 + Random(100));
until(IsMoving=False);
MMouse(X, Y, 2, 2);
Wait(25 + Random(75));
ClickMouse2(1);
FreeDTM(BarrierGreen);
FreeDTM(BarrierYellow);
Antiban;
Result:=True;
Exit;
end;
end;
end;
end;
procedure BarrierEmergency;
var
a, s: Integer;
begin
if FindChatBoxText('low!', 8, clBlack) then
begin
SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'making emergency barriers', clWhite);
if (MakeBarrier=True) then
begin
a:=0;
MarkTime(s);
Wait(1500 + Random(1000));
Mousebox(246, 147, 266, 182, 0);
WaitOptionMulti(['estr', 'estroy', 'Destroy'], 250);
Wait(1500 + Random(1000));
repeat
if FindChatBoxText('cannot', 8, clBlack) then
begin
Exit;
end else
begin
inc(a);
Antiban;
if MakeBarrier then
begin
Wait(1500 + Random(1000));
if FindChatBoxText('cannot', 8, clBlack) then
begin
Exit;
end else
begin
Mousebox(246, 147, 266, 182, 0);
WaitOptionMulti(['estr', 'estroy', 'Destroy'], 250);
Wait(1500 + Random(1000));
end;
end;
end;
until(a > RandomRange(2, 5)) or (TimeFromMark(s) > 15000) or (FindChatBoxText('cannot', 8, clBlack));
end;
end;
end;
procedure MainLoopPart1;
begin
WaitForPortal;
EnterPortalOutside;
Wait(4000 + Random(1500));
WalkToAltar;
Wait(2500 + Random(2500));
t:=0;
repeat
AttractOrbs;
BarrierEmergency;
Antiban;
TimeUpdate;
until (CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 400) or (CountColorTolerance(204, 208, 208, 324, 220, 1) > 250) or (TimeFromMark(t)>300000)
end;
procedure MainLoopPart2;
begin
WalkToAltar;
CraftRunes;
WalkToPortalInside;
EnterPortalInside;
Wait(2000 + Random(2000));
end;
procedure DrawProggy;
var
OnScreenPaint: Integer;
begin
OnScreenPaint := BitmapFromString(508, 132, 'REMOVED TO MAKE FIT');
SMART_DrawBitmap(True, OnScreenPaint, Point(5, 343));
FreeBitmap(OnScreenPaint);
SMART_DrawText(181, 414, UpCharsEx, 'Time running:', clWhite);
SMART_DrawText(181, 428, UpCharsEx, 'Current action:', clWhite);
SMART_DrawText(181, 442, UpCharsEx, 'Games played:', clWhite);
SMART_DrawText(181, 456, UpCharsEx, 'Tokens gained:', clWhite);
SMART_DrawText(290, 415, UpChars, ''+TimeRunning+'', clWhite);
SMART_DrawText(290, 429, UpChars, 'starting up', clWhite);
SMART_DrawText(290, 443, UpChars, '0', clWhite);
SMART_DrawText(290, 457, UpChars, '0', clWhite);
end;
begin
// MAINLOOP \\
SetUpLogin;
if not(LoggedIn) then
begin
LoginPlayerToLob;
OpenWorldScreen;
SelectWorld(61);
LoginPlayer;
end else
begin;
DrawProggy;
MarkTime(t);
JoinGame;
repeat
WaitForPortal;
Wait(1000 + Random(1000));
EnterPortalOutside;
repeat
Wait(4000 + Random(1500));
WalkToAltar;
Wait(2000 + Random(2000));
t:=0;
repeat
AttractOrbs;
BarrierEmergency;
Running;
Antiban;
TimeUpdate;
until (CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 400) or (CountColorTolerance(204, 208, 208, 324, 220, 1) > 250) or (TimeFromMark(t)>300000)
if CheckGOPLobby then
begin
WriteLn('We are at the GOP lobby, something has gone wrong.. checking!');
repeat
JoinGame;
MainLoopPart1;
until(CheckGopLobby=False);
MainLoopPart2;
end else
begin
MainLoopPart2;
end;
until (DefineArea = 'Body')
Inc(GamesPlayed);
Wait(3000 + Random(3000));
if CheckGOPLobby then
begin
JoinGame;
end else
begin
WriteLn('Something has gone extremely wrong! Terminating script!');
TerminateScript;
end;
until not(LoggedIn);
end;
end.