SRL Archive - Archive

J J - SRL Member Application


J J

2012-05-15 17:09:09

How Long have You Played Runescape?
7 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?
YoHoJo


What is your general programming knowledge?
Pascal


Are you a member of any other communities?
Zybez Community, large tipforum
http://forums.zybez.net/user/196677-ill-knock0ut/
3700 posts / 424 positive rep

Lunagang, largest Dutch tipforum
http://www.lunagang.nl/tipforum/memberlist.php?mode=viewprofile&u=979
6000 posts / ex-moderator

Sythe
http://www.sythe.org/member.php?u=308596
1000 posts / 50 vouches


Tell us about yourself…
From: J J
My name is Jan Jaap. Most of the people will probably have no clue how to pronounce that, it's a Dutch name. That's why most of the people simply call me JJ.

I started playing RuneScape around 2004-2005 when my friends introduced me to it. I never really left the game and here in 2012 I'm still "playing" it.

During my first years of RuneScape I mainly played to talk with friends and to do quests. Around 2009 this changed when my main got permanently banned for bug abuse. At this time I was still playing RuneScape without using bots.

This shortly changed after I didn't had enough time to train my accounts anymore and I maxed my first account, a zerker pure. Shortly after maxing it I got bored and I made a new account. A mid level hybrid. Within a year I maxed out this account. I went PKing for a couple weeks but PKing was getting worse and worse and many of my original friends had quit the game already. Eventually in August 2011 I "quit" and joined Sythe to sell my accounts.

After being busy in the black market I started to enjoy RuneScape again. Not by playing it, but simply by making money and just botting. During the x-mas holiday I started to play RuneScape legit for a while and I really wanted to make a summoning tank.

I started to watch YoHoJo's tutorials and eventually got into scripting. I've made a couple scripts right now and my Great Orb Project script is definately the most advanced/hardest I've made so far.

–

More about my real life situation:
I'm 18 years old and I live in The Netherlands. Currently in HAVO-5 where I'm taking my final exams right now. Next year I will start with a new study, programming / ICT.

I'm pretty tall. Actually, for the rest of the world you will see me as extremely tall, but in The Netherlands my length isn't that unusual. I'm 1 meter 98 which is 6.7 foot.

Right now I have a knee injury and I'm incapable of playing basketball for a while, but it is the sport I really enjoy. Instead, I'm working out atleast 3 times per week now to keep my condition and to build more muscles for basketball and just in general.

My interests are programming, hanging out with friends, going out, gaming, video editing and just having fun.

–

Well I can't add attachments for some reason. So I'll add the SPS maps for the Great Orb Project script below here.

  • You need to have SPS 2
  • If you have SPS 2 then place these maps in the C:\Simba\Includes\SPS\img\runescape_surface\ folder
    • 99_1
    • 99_2
    • 99_3
    • 99_4
    • 99_5
    • 99_6
    • 99_7



Please show us one (or multiple) of your scripts.
program JJsCooker;
{$DEFINE SMART}
{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
{$i ObjectDTM/ObjDTMInclude.simba}

var
StartTime, BurnedLogs, CookedFish, FishXp, LogXp: integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
{ Fill this in with your details }
Name := '';
Pass := '';
Pin := '';
Active := True;
end;
{
Be sure to fill in the correct values for your logs/fishes!

Common firemaking xp rates
Normal logs: 40
Oak logs: 60
Willow logs: 90
Maple logs: 135
Yew logs: 202,5
Magic logs: 303,5

Common cooking xp rates
Trout: 70
Salmon: 90
Lobster: 120
Swordfish: 140
Monkfish: 160
Shark: 200
Rocktail: 225
}

LogXp := 60; {Replace 60 with your Firemaking xp value}
FishXp := 90; {Replace 90 with your Cooking xp value}
end;

procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 10;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
StartTime:=GetSystemTime;
Wait(1000 + Random(1000));
ClickNorth(0);
end;

procedure OnScreenProggy;
var
TotalFish, FmXp, CookXp, FmXpRate, CookXpRate, Sec, MS: Integer;
RunTime, FmXp2, CookXp2, JJ: String;

begin
{ OnScreenProggy handles the progress report painted on SMART }
Sec := (1+((GetSystemTime-StartTime)/1000));
MS := ((Sec)*1000);
TotalFish := (27*(CookedFish));
FmXp := ((LogXp)*(BurnedLogs));
CookXp := ((FishXp)*(CookedFish)*(27));
FmXpRate := ((3600*(FmXp))/(Sec));
CookXpRate := ((3600*(CookXp))/(Sec));
RunTime := MsToTime(MS, Time_Formal);

CookXp2 := 'Cooked '+IntToStr(TotalFish)+' fishes for '+IntToStr(CookXp)+' cooking xp at '+IntToStr(CookXpRate)+' cooking xp per hour';
FmXp2 := 'Burned '+IntToStr(BurnedLogs)+' logs for '+IntToStr(FmXp)+' firemaking xp at '+IntToStr(FmXpRate)+' firemaking xp per hour';
JJ := 'Running for '+(RunTime)+'';

SMART_ClearCanvas;
SMART_DrawText(5, 286, UpCharsEx, JJ, clYellow);
SMART_DrawText(5, 303, UpCharsEx, CookXp2, clYellow);
SMART_DrawText(5, 320, UpCharsEx, FmXp2, clYellow);
end;

procedure Antiban;
begin
case Random(2300) of
0..1: begin; HoverSkill('cooking', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); end;
2..3: begin; HoverSkill('firemaking', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); end;
4: begin; HoverSkill('random', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); end;
5..7: RandomRClick;
8..10: PickUpMouse;
11..13: RandomMovement;
14..16: BoredHuman;
17: ExamineInv;
18..22: SleepAndMoveMouse(Random(5000));
end;
end;

procedure Bankbooth;
var
arP: TPointArray;
ararP: T2DPointArray;
i, arL, X, Y: Integer;
P: TPoint;

begin
FindNormalRandoms;
{ Detects the bank booth }
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.06, 0.22);
FindColorsSpiralTolerance(X, Y, arP, 2905702, 156, 88, 239, 192, 5);
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 80, 80);
arL := High(ararP);
for i := 0 to arL do
begin
{ Banks via the bank booth }
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(50 + Random(50));
if WaitUpTextMulti(['Bank', 'ank'], 250) then
GetMousePos(X, Y);
case Random(4) of
0..2: begin; Mouse(X, Y, 0, 0, 0); WaitOptionMulti(['Bank', 'ank'], 250); end;
3: Mouse(X, Y, 0, 0, 1);
end;
Wait(1250 + Random(750));
if(PinScreen) then
InPin(Players[0].Pin);
if BankScreen then
begin
{ Deposits everything in the inventory }
Mousebox(352, 297, 385, 320, 1);
Wait(200 + Random(200));
{ Withdraws logs and raw food }
Mousebox(38, 92, 73, 123, 1);
WriteLn('Withdrawed logs');
Wait(200 + Random(200));
Mousebox(82, 92, 117, 123, 0);
if WaitOptionMulti(['All', 'Withdraw-All'], 250) then
WriteLn('Withdrawed raw food');
Wait(200 + Random(200));
Exit;
end else
end;
end;

procedure Banker;
var
arP: TPointArray;
ararP: T2DPointArray;
i, arL, X, Y: Integer;
P: TPoint;

begin
FindNormalRandoms;
{ Detects the banker }
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.14);
FindColorsSpiralTolerance(X, Y, arP, 4862264, 129, 111, 188, 176, 15);
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 10, 20);
arL := High(ararP);
for i := 0 to arL do
begin
{ Banks via the banker }
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(50 + Random(50));
if WaitUpTextMulti(['alk', 'alk-to', 'Talk'], 250) then
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, 0);
if WaitOptionMulti(['ank Ba', 'Bank Banker'], 250) then
Wait(1250 + Random(750));
if(PinScreen) then
InPin(Players[0].Pin);
if BankScreen then
begin
{ Deposits everything in the inventory }
Mousebox(352, 297, 385, 320, 1);
Wait(200 + Random(200));
{ Withdraws logs and raw food }
Mousebox(38, 92, 73, 123, 1);
WriteLn('Withdrawed logs');
Wait(200 + Random(200));
Mousebox(82, 92, 117, 123, 0);
if WaitOptionMulti(['All', 'Withdraw-All'], 250) then
WriteLn('Withdrawed raw food');
Wait(200 + Random(200));
Exit;
end else
begin;
Bankbooth;
end;
end;
end;

procedure Banking;
begin;
Case Random(7) of
0..4: Bankbooth;
5..6: Banker;
end;
end;

procedure MakeFire;
var
X, Y, Logs, q, xCoord, yCoord, xCoord2, yCoord2: Integer;
PBox: TBox;

begin;
{ Walking to a firemaking spot }
WriteLn('Walking to a firemaking spot');

xCoord := RandomRange(66, 90);
yCoord := RandomRange(55, 65);
ObjDTM_Walk(''+(IntToStr(xCoord))+':'+(IntToStr(yCoord))+':5:1:7:61:38:1:7:33:84:3:7:121:54:10:7:115:76:10:7:70:79', 3, 5, 5, True);

Wait(800 + Random(800));
FindNormalRandoms;
if GetCurrentTab = (tab_Inv) then
begin
WriteLn('Current tab is the inventory tab, correct')
end else
begin
FTab(tab_Inv);
WriteLn('Changed tabs to the inventory tab')
end;
if not(InvFull) then
begin
xCoord2 := RandomRange(82, 90);
yCoord2 := RandomRange(100, 106);
ObjDTM_Walk(''+(IntToStr(xCoord2))+':'+(IntToStr(yCoord2))+':5:1:7:31:104:3:7:123:75:1:7:61:58:10:7:117:121:10:7:69:117', 3, 5, 5, True);
Wait(1000 + Random(2000));
Banking;
ObjDTM_Walk(''+(IntToStr(xCoord))+':'+(IntToStr(yCoord))+':5:1:7:61:38:1:7:33:84:3:7:121:54:10:7:115:76:10:7:70:79', 3, 5, 5, True);
Wait(1000 + Random(2000));
end else
{ Failsafe when standing on a fire }
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.62);
if FindColorSpiralTolerance(X, Y, 536379, 244, 159, 276, 193, 3) then
{ Standing in a fire, moving }
begin;
MouseBox(211, 99, 318, 161, 1);
Wait(1200 + Random(800));
end;
{ Light a log }
Logs := DTMFromString('mAAEAAHiclcvBCkBAFIXhY9aewjNIyUISK5Pm8SeUhbJB3oC/WFiaW9+pU+fGkmojVciRIX2V6OBg0aLBws+AEbOevuPEhhUTPA70RUJGv11Ba8kE7r93A1hgD7U=');
if FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(X, Y, 2, 2);
Mouse(X, Y, 0, 0, 0);
WaitOptionMulti(['ight', 'Light'], 150);
Wait(600 + Random(300));
if not(FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
Inc(BurnedLogs);
end else
begin
FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2)
MMouse(X, Y, 2, 2);
Mouse(X, Y, 0, 0, 0);
WaitOptionMulti(['ight', 'Light'], 150);
end;
end;
FreeDTM(Logs);
{ Check for fire animation }
PBox := IntToBox(282, 145, 320, 195);
FindNormalRandoms;
Marktime(q);
repeat
Wait(100 + Random(100));
Antiban;
Wait(100 + Random(100));
until (Animating(PBox, 100, 200)) or (TimeFromMark(q)>10000);
WriteLn('We have ignited a log')
Wait(150 + Random(250));
end;

procedure StartCooking;
var
X, Y, i, arL: Integer;
arP: TPointArray;
ararP: T2DPointArray;
P: TPoint;

begin;
{ Find fire coordinates }
if GetCurrentTab = (tab_Inv) then
begin
WriteLn('Current tab is the inventory tab, correct')
end else
begin
FTab(tab_Inv);
WriteLn('Changed tabs to the inventory tab')
end;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.62);
FindColorsSpiralTolerance(X, Y, arP, 536379, 279, 158, 318, 195, 3);
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 20, 20);
arL := High(ararP);
for i := 0 to arL do
begin
P := MiddleTPA(ararP[i]);
case Random(9) of
0..1: MouseBox(605, 213, 640, 244, 1);
2: MouseBox(605, 249, 640, 280, 1);
3..8: MouseBox(563, 249, 598, 280, 1);
end;
MMouse(P.x, P.y, 5, 5);
Exit;
end;
end;

procedure Cooking;
var
X, Y, t, xCoord2, yCoord2: Integer;

begin;
{ Start cooking all the food }
GetMousePos(X, Y);
if WaitUpTextMulti(['ire', 'Fire'], 250) then
begin
Mouse(X, Y, 0, 0, 1);
Wait(600 + Random(600));
MouseBox(222, 397, 302, 466, 1);
WriteLn('We are cooking... doing antiban procedures occasionally')

{ Mark the time to know when the inventory has been cooked }
MarkTime(t);
repeat
Wait(500 + Random(500));
Antiban;
FindNormalRandoms;
Wait(500 + Random(500));
until TimeFromMark(t) >= RandomRange(63500, 67000);

{ If the inventory has been cooked, walk back to the banker }
Inc(CookedFish);
xCoord2 := RandomRange(83, 89);
yCoord2 := RandomRange(102, 106);
ObjDTM_Walk(''+(IntToStr(xCoord2))+':'+(IntToStr(yCoord2))+':5:1:7:31:104:3:7:123:75:1:7:61:58:10:7:117:121:10:7:69:117', 3, 5, 5, True);
Wait(1500 + Random(1000));
end else
{ Fail safe when someone is standing on the fire }
begin;
Mouse(X, Y, 0, 0, 0);
if WaitOptionMulti(['Use', 'se'], 250) then
Wait(500 + Random(300));
MouseBox(222, 397, 302, 466, 1);

{ Mark the time to know when the inventory has been cooked }
MarkTime(t);
repeat
Wait(500 + Random(500));
Antiban;
FindNormalRandoms;
Wait(500 + Random(500));
until TimeFromMark(t) >= RandomRange(63500, 67000);

{ If the inventory has been cooked, walk back to the banker }
Inc(CookedFish);

xCoord2 := RandomRange(83, 89);
yCoord2 := RandomRange(102, 106);
ObjDTM_Walk(''+(IntToStr(xCoord2))+':'+(IntToStr(yCoord2))+':5:1:7:31:104:3:7:123:75:1:7:61:58:10:7:117:121:10:7:69:117', 2, 5, 5, True);
Wait(1500 + Random(1000));
end;
end;

begin
SetUpLogin;
Wait(1000 + Random(1000));
ObjDTM_Setup;
repeat
OnScreenProggy;
Banking;
MakeFire;
StartCooking;
Cooking;
until not(LoggedIn);
end.

JJ's Thieving Guild
program ThievingGuildChests;
{$DEFINE SMART}
{$i srl/srl.simba}

Function OpenChest:Boolean;
Var
X, Y, t: Integer;

begin
MarkTime(t);
repeat

X:=MSCX;
Y:=MSCY;
if FindObjTPA(X, Y, 7376552, 15, 1, 4, 9, 20, ['ract']) then
begin;
Writeln('We found the chest');
GetMousePos(X, Y);

Case Random(4) of
0..2: begin;
Mouse(X, Y, 5, 5, True);
Writeln('We clicked the chest');
end;

3: begin;
Mouse(X, Y, 5, 5, False);
WaitOption('Open', 300);
Writeln('We clicked the chest');
end;
end;

Wait(1500+random(1000));
Writeln('We are waiting to complete the thieving');
end;

begin;
repeat
Wait(200+random(200));
until FindChatBoxText('fail', 8, clBlack) or FindChatBoxText('open', 8, clBlack) or FindChatBoxText('reach', 8, clBlack) or (TimeFromMark(t) >= 10000);
end;

begin;
if FindChatBoxText('fail', 8, clBlack) then
Wait(300+random(200));
end;

begin;
if FindChatBoxText('open', 8, clBlack) then
Wait(2000+random(500));
end;

begin
if FindChatBoxText('reach', 8, clBlack) then
WriteLn('Time to open the doors');
Wait(300+random(200));
end;

until FindChatBoxText('reach', 8, clBlack) or (TimeFromMark(t) >= 15000);
end;


function OpenGate:Boolean;
var
X, Y, a, t, z: Integer;

begin
z:=0
t:=0
a:=0
MarkTime(t);

repeat
X:=MSCX;
Y:=MSCY;
z:=0
if FindObjTPA(X, Y, 1252637, 5, 1, 3, 3, 6, ['pen']) then
begin;
Writeln('We found the chest');
GetMousePos(X, Y);

Case Random(4) of
0..2: begin;
Mouse(X, Y, 2, 2, True);
Writeln('We clicked the gate');
end;

3: begin;
Mouse(X, Y, 2, 2, False);
WaitOption('Open', 300);
Writeln('We clicked the gate');
end;
end;

Writeln('We are waiting to open the gate');
Wait(2000+random(1000));
end;

begin;
repeat
Wait(200+random(200));
until FindChatBoxText('swings', 8, clBlack) or FindChatBoxText('bornly', 8, clBlack) or (TimeFromMark(t) >= 10000);
end;

begin;
if FindChatBoxText('bornly', 8, clBlack) then
WriteLn('We failed to open the gate');
Wait(200+random(200));
end;

begin;
if FindChatBoxText('swings', 8, clBlack) then
a:=a+1
end;

begin;
if (TimeFromMark(z) >= 10000) then
WriteLn('Time exceeded');
end;

until FindChatBoxText('swings', 8, clBlack) or (TimeFromMark(t) >= 20000);
end;


begin
SetUpSRL;
ActivateClient;
repeat
repeat OpenChest;
until(FindChatBoxText('reach', 8, clBlack));
OpenGate;
until(False);
end.

JJ's Pie Shell Maker
program PieShellMaker;
{$DEFINE SMART}
{$i srl/srl.simba}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Enter username
Players[0].Pass := ''; //Enter password
Players[0].Pin := ''; //Enter pin (later in script aswell!!)
Players[0].Active := True;
end;

procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 1;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
end;

procedure BankingI;
var
a, Jug, Flour, X, Y:Integer;

begin
a:=0

repeat

begin;
OpenBank('veb', False, True)
if(PinScreen) then
InPin(''); //Enter your pin between the ''
if(BankScreen) then
Deposit(1, 28, True);

case Random(11) of
0..6: begin;
Withdraw(0, 0, 9);
Withdraw(1, 0, 9);
end;

7..10: begin;
Withdraw(1, 0, 9);
Withdraw(0, 0, 9);
end;
end;

CloseBank;
Wait(100 + Random(100));
end;


begin;
if GetCurrentTab = (tab_Inv) then
begin
WriteLn('Current tab is the inventory tab, correct!')
end else
begin
FTab(tab_Inv);
WriteLn('Changed tab to the inventory tab')
end;

begin;
Jug := BitmapFromString(4, 4, 'meJzrC/CfFhYyPypyRXxcZGRsSGgE' +
'EAUFheXkFqanZycnp8fGJhYUlAIZiYmp8fHJAM/UEsU=');
Flour := BitmapFromString(4, 4, 'meJzbtm3f/v0nTpy4eOHiLVXrEAVj' +
'jy1b927YsEPHNVnTMVbdLgIoaBpSbuRfqO+dreeRDgB6BBWa');
end;

if (FindBitmapSpiralTolerance(Flour, X, Y, 553, 204, 738, 467, 10)) and (FindBitmapSpiralTolerance(Jug, X, Y, 553, 204, 738, 467, 10)) then
begin;
Mouse(X, Y, 5, 5, True);
FindBitmapSpiralTolerance(Flour, X, Y, 553, 204, 738, 467, 10)
Mouse(X, Y, 5, 5, True);
FreeBitMap(Jug);
FreeBitMap(Flour);
Wait(400 + Random(200));
MouseBox(225, 402, 296, 455, 1);
Wait(10500 + Random(1500));
inc(a);
end;
end;

until a=14
end;


procedure BankingII;
var
b, Dish, Dough, X, Y:Integer;

begin
b:=0

repeat
begin;
OpenBank('veb', False, True)
if(PinScreen) then
InPin(''); //Enter your pin between the ''
if(BankScreen) then
Deposit(1, 28, True);

case random(36) of
0..9: begin;
Withdraw(2, 0, 5);
Withdraw(2, 0, 9);
Withdraw(3, 0, 5);
Withdraw(3, 0, 9);
end;

10..19: begin;
Withdraw(2, 0, 9);
Withdraw(2, 0, 5);
Withdraw(3, 0, 9);
Withdraw(3, 0, 5);
end;

20..23: begin;
Withdraw(3, 0, 5);
Withdraw(3, 0, 9);
Withdraw(2, 0, 5);
Withdraw(2, 0, 9);
end;

24..27: begin;
Withdraw(3, 0, 9);
Withdraw(3, 0, 5);
Withdraw(2, 0, 9);
Withdraw(2, 0, 5);
end;

28..29: begin;
Withdraw(2, 0, 9);
Withdraw(2, 0, 5);
Withdraw(3, 0, 5);
Withdraw(3, 0, 9);
end;

30..31: begin;
Withdraw(3, 0, 9);
Withdraw(3, 0, 5);
Withdraw(2, 0, 5);
Withdraw(2, 0, 9);
end;

32: begin;
Withdraw(3, 0, 9);
Withdraw(2, 0, 5);
Withdraw(3, 0, 5);
Withdraw(2, 0, 9);
end;

33: begin;
Withdraw(3, 0, 5);
Withdraw(2, 0, 9);
Withdraw(3, 0, 9);
Withdraw(2, 0, 5);
end;

34: begin;
Withdraw(3, 0, 5);
Withdraw(2, 0, 9);
Withdraw(3, 0, 5);
Withdraw(2, 0, 5);
end;

35: begin;
Withdraw(3, 0, 9);
Withdraw(2, 0, 9);
Withdraw(3, 0, 5);
Withdraw(2, 0, 5);
end;

36: begin;
Withdraw(3, 0, 5);
Withdraw(2, 0, 5);
Withdraw(3, 0, 9);
Withdraw(2, 0, 9);
end;
end;

CloseBank;
Wait(100 + Random(100));
end;

begin;
if GetCurrentTab = (tab_Inv) then
begin
WriteLn('Current tab is the inventory tab, correct!')
end else
begin
FTab(tab_Inv);
WriteLn('Changed tab to the inventory tab')
end;

begin;
Dish := BitmapFromString(4, 5, 'meJzT88/UQ0Z+6RDkG1cMZ/vEFAIR' +
'UASIIGwIAgA6UhPB');
Dough := BitmapFromString(6, 6, 'meJwzcfAwcfAwtHZmYmCAICDX2MED' +
'yMirr89vaCxuaYFwa/r76yZOrOrtK+vogIi0zprVNG0aRBDI7V64s' +
'Gv+fLggUKRvyZLeRYvhggDN4Cfg');
end;

if (FindBitmapSpiralTolerance(Dish, X, Y, 553, 204, 738, 467, 20)) and (FindBitmapSpiralTolerance(Dough, X, Y, 553, 204, 738, 467, 20)) then
begin;
Mouse(X, Y, 5, 5, True);
FindBitmapSpiralTolerance(Dish, X, Y, 553, 204, 738, 467, 20);
Mouse(X, Y, 5, 5, True);
FreeBitMap(Dish);
FreeBitMap(Dough);
Wait(400 + Random(200));
MouseBox(236, 401, 285, 456, 1);
Wait(16500 + Random(2000));
inc(b);
end;
end;

until b=9
end;


begin
SetupLogin;
begin
SetUpSRL;
ActivateClient;
repeat
BankingI;
BankingII;
until(false);
end;
end.

Well I can't post my GOP script because it pushes to characters to 17000 when 10000 is allowed. I'll make another Application? If someone can PM me..

EDIT: When editing the application I could add an attachment, attached it now!
I hope the custom map part is clear.
EDIT 2: Updated the script a little bit. Scripting wise there it isn't really exciting, but it plays the minigame better now.
EDIT 3: Added a new script
EDIT 4: Added two new scripts, both using my own made new color combining function.

[XoL]

2012-05-15 17:59:51

BEFORE VOTING – DOWNLOAD SCRIPT
————————————-

This is interesting, I will vote after looking through the script you seem to be good on other categories such as activity.

Kyle Undefined

2012-05-15 18:01:31

Will read through them all later when I have time, good luck :)

YoHoJo

2012-05-15 18:08:34

This guy is a boss.
Found him on Sythe, chatted with him about SRL/Scripting etc.
He learned A LOT VERY FAST, super talented, and super dedicated.

He has my vote any day, he is definitely member materiel in my eyes!

Sin

2012-05-15 18:24:33

Can someone post his GOP script here? Can't view it on a playbook.

[XoL]

2012-05-15 18:32:23

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.

Joe

2012-05-15 18:33:40

I already said I would vote for you. From the start of the GOP developement it looked good. To be totally honest I thought it was going to be a fail- I thought you would undertake a massive scripting challenge like this, see that it was too hard, and inevitably quit. But nope, J J goes and creates the script even better than I could have myself.
It's a Super De-Duper Awesomeness Yes 1260 McTwist.
I hope you get in.
Good luck- if you needed it..

Gucci

2012-05-15 18:37:53

Your scripts are very nice (For sure some nice skills you have) especially GOP and you definitely show talent, also activity is great. Yes from me :)

NKN

2012-05-15 19:24:16

Great GOP script. Love the activity and helpfulness, and being part of other forums gives you an idea how to act/ enhances Runescape knowledge, which is a plus.

TPA's ~ Check
DTM"S ~ Check
Activty ~ Check
Walking ~ Check
Join Date ~ Check
Functioning Script ~ Check
Standards ~ Check

Good job, 100% yes from me.

tehq

2012-05-15 19:35:07

From: NKN


TPA's ~ Check
DTM"S ~ Check
Activty ~ Check
Walking ~ Check
Join Date ~ Check
Functioning Script ~ Check
Standards ~ Check

Good job, 100% yes from me.


Completely agree. The only thing I was uncertain of was the standards, but, all things being equal, Yes! Good luck J J

Kyle Undefined

2012-05-15 20:02:08

Looked through your scripts, your code is good, could work on standards though. Your activity is good too, you have a good attitude, and your longetivity is good.

Voted yes. Awesome work, keep it up :)

punkd

2012-05-15 20:08:25

100% yes for me. Standards are alittle off but when it comes to skill like this, that can be overlooked. Posts are mostly helpful and explanatory, overall very good job. I'll see you on the other side. Keep up the good work.

Joe

2012-05-15 20:32:21

Hey J J… I just have one question- when I got your script in PM I overlooked this, but you made your own custom SPS maps. There are maps for the altars already in the surface file. Care to explain? I installed them anyways.

Ashaman88

2012-05-15 22:15:59

Yes for the reasons already stated, good work!

Griff

2012-05-15 22:46:19

Referred by YohoJo? Automatic no! But seriously, code looks good, in the grand scheme of things who really cares about standards… Yes!

P1nky

2012-05-16 01:02:42

Haven't seen skills like these from a recent applicants… Yes!

Rich

2012-05-16 01:21:19

Yes. Best app we've had in a fair while.

Er1k

2012-05-16 01:52:12

EDIT 2: How did someone read through ~20000 characters within 10 minutes and voted no? Oh well.


Where was it?

Anyway yes. Good job and keep it up!

J J

2012-05-16 02:54:06

From: JOEbot
Hey J J… I just have one question- when I got your script in PM I overlooked this, but you made your own custom SPS maps. There are maps for the altars already in the surface file. Care to explain? I installed them anyways.

Well I actually made them before I realized that there were altars in the surface map already. After I made them I put them together in one 500x500 px map:
However, when I was collecting co-ordinates it was failing some times. After re-making some parts of the map I just decided to scrap SPS and started working on making a walking system purely based on RadialWalk/Color walking/DTM's. After a while I finished the walking system.

Shortly after I realized that SPS might have been messing up co-ordinates because some of the colors are nearly the same. The Mind altar (big altar on the left side of the map) and the body altar (most south altar) have nearly identical colors. Just like the air altar(north/west) and water altar(north), they have similiar green colors.

By seperating the altars from eachother I actually got useful results and used the RadialWalk/Color walking/DTM walking as a failsafe when SPS returned unrealistic results.

I actually never used the other SPS maps :P But I think they might return wrong co-ordinates aswell because of the identical colors.

Also, for the other people that posted. Thanks :) I realise that some of the standards might be a little bit off at certain points but most of the times it should be fine ;) You can also see a learning process in the script. Some of the procedures where made with less knowledge, such as JoinVief, JoinAcantha, JoinWizards and JoinGame. And the failsafes for walking, FindTheAirAltar, FindTheMindAltar, etc.

I will probably rewrite those to an array in the future, because they all rely on the same template :P

xtrapsp

2012-05-16 03:35:34

Just voted yes :)


You beat my highscore.. i went 19-0 so great! :D

SubiN

2012-05-16 04:17:08

i like ur blog posts yes

bg5

2012-05-16 14:21:18

I votes yes without reading you app. I saw your work on GOP ,and i like your ambition and creativity. You chose very hard project on beginning. However first 3 scripts you pasted here are poorly coded :P

Gucci

2012-05-16 14:27:45

Wow, this is going amazingly might be pretty obvious by now ;)

Joe

2012-05-16 16:58:02

From: J J
Well I actually made them before I realized that there were altars in the surface map already. After I made them I put them together in one 500x500 px map:
However, when I was collecting co-ordinates it was failing some times. After re-making some parts of the map I just decided to scrap SPS and started working on making a walking system purely based on RadialWalk/Color walking/DTM's. After a while I finished the walking system.

Shortly after I realized that SPS might have been messing up co-ordinates because some of the colors are nearly the same. The Mind altar (big altar on the left side of the map) and the body altar (most south altar) have nearly identical colors. Just like the air altar(north/west) and water altar(north), they have similiar green colors.

By seperating the altars from eachother I actually got useful results and used the RadialWalk/Color walking/DTM walking as a failsafe when SPS returned unrealistic results.

I actually never used the other SPS maps :P But I think they might return wrong co-ordinates aswell because of the identical colors.

Also, for the other people that posted. Thanks :) I realise that some of the standards might be a little bit off at certain points but most of the times it should be fine ;) You can also see a learning process in the script. Some of the procedures where made with less knowledge, such as JoinVief, JoinAcantha, JoinWizards and JoinGame. And the failsafes for walking, FindTheAirAltar, FindTheMindAltar, etc.

I will probably rewrite those to an array in the future, because they all rely on the same template :P


Yeah you deserve members.
EDIT: BTW 20-0 Niiiiice.

BobboHobbo

2012-05-17 05:44:57

Yes, you have scripting ability far superior then alot of others here.

WT-Fakawi

2012-05-17 05:49:51

Hey J_J, we share the J!

Yes. Crazy contributions! Creative, love it!

Mark

2012-05-17 06:25:49

From: Rich
Yes. Best app we've had in a fair while.

couldnt agree more and is actually the first one ive ever voted for.
good work mate cant wait to see more.

yes from me

YoHoJo

2012-05-17 06:26:30

From: CRU1Z1N
couldnt agree more and is actually the first one ive ever voted for.
good work mate cant wait to see more.

yes from me


Vote no on accident?
It was 26-0 before you posed! :D
E: Nvm, but hmmm!

Mark

2012-05-17 06:28:36

lol i def voted yes says 27-1 now tho lol

EtherFreak

2012-05-18 00:43:07

From: YoHoJo
This guy is a boss.
Found him on Sythe, chatted with him about SRL/Scripting etc.
He learned A LOT VERY FAST, super talented, and super dedicated.

He has my vote any day, he is definitely member materiel in my eyes!


Had I seen this first, I would have voted no, too bad I already voted ;

P.S. Its not a no vote…

J J

2012-05-18 01:36:02

From: WT-Fakawi
Hey J_J, we share the J!

Yes. Crazy contributions! Creative, love it!

Thanks :)

From: EtherFreak
Had I seen this first, I would have voted no, too bad I already voted ;

P.S. Its not a no vote…

You would vote no purely based on another person's positive opinion? Anyways, thanks everyone for voting and sharing your opinions. It's not that I'm too bothered about the single no vote, but I would like to know the reason so I can improve based on that.

Gucci

2012-05-18 16:15:30

Damn 29-1 is very impressive, I felt I did well with 21-2. don't worry about the no some people just vote for the sake of voting or are being mean. It won't affect your app much ;)

Sin

2012-05-18 16:21:34

From: J J
Thanks :)


You would vote no purely based on another person's positive opinion? Anyways, thanks everyone for voting and sharing your opinions. It's not that I'm too bothered about the single no vote, but I would like to know the reason so I can improve based on that.


He was making a joke…………

Joe

2012-05-18 16:51:36

From: Gucci
Damn 29-1 is very impressive, I felt I did well with 21-2. don't worry about the no some people just vote for the sake of voting or are being mean. It won't affect your app much ;)


I felt good about my app changing from 9-11 to 15-13 a few days before the poll ended.
Whoosh!
What was that? Oh yeah… my pride…

EDIT: I wanted to test out the script, and when I ran it, it was working, but then when it required using a map, I got this
 FoundMatches := SPS_FindMapInMap(P.x, P.y, SPS_AreaMaps, SmallMap, SPS_Tolerance); 
in the SPS tab. Any fixes?

J J

2012-05-19 04:09:14

From: Sin
He was making a joke…………

My attempt of a sarcastic reponse has sort of failed, yeah xD

From: JOEbot
I felt good about my app changing from 9-11 to 15-13 a few days before the poll ended.
Whoosh!
What was that? Oh yeah… my pride…

EDIT: I wanted to test out the script, and when I ran it, it was working, but then when it required using a map, I got this
 FoundMatches := SPS_FindMapInMap(P.x, P.y, SPS_AreaMaps, SmallMap, SPS_Tolerance); 
in the SPS tab. Any fixes?

Hm it should just work fine, make sure you have 99_1, 99_2, 99_3, 99_4, 99_5, 99_6 and 99_7 and all saved as .png file

This is how my SPS_GetMyPos looks:
function SPS_GetMyPos(): TPoint;
var
Minimap: TMufasaBitmap;
SmallMap: T3DIntegerArray;
t, FoundMatches: integer;
P: TPoint;
Searches: extended;
begin
Result := Point(-1, -1);

if (not LoggedIn) then
Exit;

if (SPS_Tolerance < 1.0) then
SPS_Tolerance := 600.0;

if (SPS_MatchesPercent = 0.0) then
SPS_MatchesPercent := 0.35;

if (inRange(round(rs_GetCompassAngleDegrees), 10, 350)) then
MakeCompass('N');

t := getSystemTime();

Minimap := SPS_GatherMinimap;
SPS_FilterMinimap(Minimap);
//DrawBitmapDebugImg(Minimap.Index);
//DisplayDebugImgWindow(150, 150);
SmallMap := [];
SmallMap := SPS_BitmapToMap(Minimap, SPS_Accuracy);

FoundMatches := SPS_FindMapInMap(P.x, P.y, SPS_AreaMaps, SmallMap, SPS_Tolerance);
Searches := ((Minimap.Width / SPS_Accuracy) * (Minimap.Height / SPS_Accuracy));
{
writeln('fx: '+toStr(p.x)+' ~ on area: '+toStr(P.X * SPS_Accuracy + (Minimap.Width / 2)));
writeln('fy: '+toStr(p.y)+' ~ on area: '+toStr(P.Y * SPS_Accuracy + (Minimap.Width / 2)));
writeln('matches: '+toStr(foundMatches));
writeln('searches: '+toStr(searches));
writeln('percent: '+toStr(FoundMatches / Searches));
}
if ((FoundMatches / Searches) > SPS_MatchesPercent) then
Result := SPS_LocalToGlobal(SPS_GetTopLeftCoords(SPS_Areas), // the top left of the total area
P.x * SPS_Accuracy + (Minimap.Width / 2),
P.y * SPS_Accuracy + (Minimap.Width / 2));

Minimap.Free;

t := (GetSystemTime - t);
if (SPS_Debug) then
Writeln('SPS_GetMyPos: Finished in '+ToStr(t)+' ms. Result = '+ToStr(Result));
end;

Joe

2012-05-21 10:51:40

EDIT:
Nevermind! I have this seperate map folder for SPS pathmaking and I put them in there, not the actual SPS simba folder
Sorry for any confusion, the script is working great right now.

Thanks JJ!

EDIT2: I keep getting kicked at the mind altar. You should consider it walking to the yellow dots on the minimap and then searching for the orbs there.

J J

2012-05-21 11:09:28

From: JOEbot
EDIT:
Nevermind! I have this seperate map folder for SPS pathmaking and I put them in there, not the actual SPS simba folder
Sorry for any confusion, the script is working great right now.

Thanks JJ!

Great! :P
Once I get accepted as a SRL Member I will post this script somewhere in those new forums, not sure how it looks. I think there are still some minor glitches but yeah, I'll look at those later after the responses from others!

Gala

2012-05-22 08:58:27

Sorry accidentally clicked no, can a mod change it to a yes? I know it won't make a difference, but 31/1 is nice :)

[S]paz

2012-05-22 09:02:02

Yes from me. Looks great.

J J

2012-05-23 05:09:57

From: Joe
EDIT2: I keep getting kicked at the mind altar. You should consider it walking to the yellow dots on the minimap and then searching for the orbs there.

Well it relies on counting yellow/green orb colors depending on what team you are in. If the teams are making loads of barriers it will get messed up and think there are green/yellow orbs. Not much I can do about that, I could make a different TPA's for the barriers and filter them out but that would also filter out the orbs.. It has a barrier emergency though but if it keeps thinking that there are orbs it will get stuck in that loop.

Might add barrier emergency as a random chance of 1/25 or something to happen every time attract orbs gets called :P Other than that I don't really know how to fix it. Impossible by using colors only.

From: Gala
Sorry accidentally clicked no, can a mod change it to a yes? I know it won't make a difference, but 31/1 is nice :)

Oh, atleast you posted haha.

From: [S]paz
Yes from me. Looks great.

Thanks :)

I have a day off from exams today so I will be running the script all day and check if I can find some mistakes myself. Anyone knows when this poll ends? :P

Ashaman88

2012-05-23 07:43:25

I think normally right at two weeks

Er1k

2012-05-23 07:45:52

From: J J

I have a day off from exams today so I will be running the script all day and check if I can find some mistakes myself. Anyone knows when this poll ends? :P


This poll will close on 05-30-2012 at 05:09 AM.

Sir R. M8gic1an

2012-06-01 06:55:41

In, congratulations, keep up the good work.

~RM