SRL Archive - Archive

Sublime - SRL Member Application


Sublime

2011-11-29 10:34:48

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


Are you affilated in anyway with Jagex LTD?
no

Were you Referred to SRL?



What is your general programming knowledge?
english, french, spanish


Are you a member of any other communities?
rsbot, powerbot, facebook, kkk


Tell us about yourself…
From: Sublime
i like to ride motocross and ride my skateboard a lot. i just turned 18 today, and i like to bot on runescape



Please show us one (or multiple) of your scripts.
program Pest_Controller;
{$i srl/srl/misc/Smart.scar}
{.include SRl\SRL.scar}
{$i SRL\SRL\Misc\Stats.simba}


var //Don't touch!
Boat: Integer; //Don't touch!
QuickPray: Boolean; //Don't touch!
SRLStats_Username, SRLStats_Password: String; //Don't touch!
SpendPointsOn, SelectBoots: TStringArray; //Don't touch!


//Descriotion:
//This is a pest control script.
//You will need a program called Simba to bot with this script.
//You can download Simba from this site: [url]http://wizzup.org/simba/[/url]
//You will also need SRL Include.
//To get SRL you must enable SRL extension in Simba.
//You can do that in the View -> Extensions menu.
//Now you should be ready to bot.
//Place your runescape character next to a boat @ pest control.
//Set your graphics to lowest details and max brightness.
//Fill the setup below.
//Press the green arrow in Simba (Ctrl+Alt+R)
//Follow the instructions that you will get in the debug box.
//Happy botting.


procedure Setup;
begin

//========SETUP==========\\

Players[0].Name := ''; //Player username.
Players[0].Pass := ''; //Player password.

Boat := 3; // Which boat to use?
// 1 = 40+ (Novice)
// 2 = 70+ (Intermediate)
// 3 = 100+ (Veteran)

QuickPray := True; // Use QuickPrayers?
// True = yes
// False = no

SpendPointsOn := ['strength']; // Add as many as you want. Will do last one forever.
//strength/attack/defence/constitution
//magic/ranged/prayer
//top/gloves/robes
//melee helm/ranger helm/mage helm
//mace, deflector, seal

SelectBoots := ['battlemage', 'trickster', 'vanguard']; //What hybrid boots you want to choose? Will do last one forever.
//battlemage, trickster, vanguard

SRLStats_Username := ''; // Your SRL Stats Username (Optional) Register here: [url]http://stats.villavu.com/[/url]
SRLStats_Password := ''; // Your SRL Stats Password (Optional) Register here: [url]http://stats.villavu.com/[/url]

//======END OF SETUP=====\\

end;

// Do not touch below unless you know what you are doing

type
Monster = record
Name : String;
Combat : Integer;
Color : Integer;
Tol : Integer;
Hue : extended;
Sat : extended;
end;
Activity = record
Action : String;
Time : Integer;
end;

var
DeathsA, WinsA, LosesA, CurrentPointsA, AntiBansA, TalkedA, CombatLevel: Integer;
WaterColorB, DarkLadderColorB, LightLadderColorB, CenterColorB: Integer;
Ex, BootsIndex, NextBreak: Integer;
Walked, LastestVersion: Boolean;
RecentActivity: Array [0..2] of Activity;


const
VERSION_NUMBER = 8.0;
WORLD = 53;
MIN_NEXTBREAK = 3600000;//1 hour
MAX_NEXTBREAK = 14400000;//4 hour
MIN_BREAKTIME = 180000;//3 min
MAX_BREAKTIME = 900000;//15min

WATERCOLORA = 10063238;
DARKLADDERCOLORA = 1194057;
LIGHTLADDERCOLORA = 1785432;
CENTERCOLORA = 2714499;
DARKWATERCOLORA = 8287087;




function FindDarkLadderColor: Integer;
var
P: TPointArray;
I, II, CurrentColor: Integer;
begin
FindColorsTolerance(P, DARKLADDERCOLORA, MMX1, MMY1, MMX2, MMY2, 50);
for I := 0 to High(P) do
begin
CurrentColor := GetColor(P[I].X, P[I].Y);
if ((GetColor(P[I].X+1, P[I].Y) = currentColor+(LIGHTLADDERCOLORA-DARKLADDERCOLORA)) or (GetColor(P[I].X, P[I].Y+1) = CurrentColor+(LIGHTLADDERCOLORA-DARKLADDERCOLORA))) then Inc(II);
if II > 4 then
begin
Result := CurrentColor;
Exit;
end;
end;
end;


function Loading: Boolean;
begin
result := (GetColor(140, 33) = 13092807);
end;

function InGame: Boolean;
begin
result := (getColor(370, 74) = 16711935) and (getColor(404, 70) = 16737894);
end;

function ClanScreen: Boolean;
var
X, Y: Integer;
begin
Result := (FindColor(X, Y, 3226804, 460, 30, 461, 31) or FindColor(X, Y, 3292596, 460, 30, 461, 31));
end;

function CloseClanScreen: Boolean;
begin
if not ClanScreen then Exit;
Mouse(475, 29, 7, 7, True);
MakeCompass(rs_GetCompassAngleDegrees-95+Random(2)*180+Random(10));
Result := True;
end;


function InBoat: Boolean;
begin
result := (getColor(19, 30) = 13421772) and (getColor(19, 51) = 3265113);
end;

procedure Proggy(Situation: string);
var
Texts: array of string;
I: Integer;
begin
RecentActivity[2] := RecentActivity[1];
RecentActivity[1] := RecentActivity[0];
RecentActivity[0].Action := Situation;
RecentActivity[0].Time := GetSystemTime;
SetDebugColors(1054841, 16777215);
Texts := [
'Recent Activity:',
'-'+RecentActivity[2].Action+' ('+IntToStr((GetSystemTime-RecentActivity[2].Time)/1000)+' s ago)',
'-'+RecentActivity[1].Action+' ('+IntToStr((GetSystemTime-RecentActivity[1].Time)/1000)+' s ago)',
'-'+RecentActivity[0].Action+' ('+IntToStr((GetSystemTime-RecentActivity[0].Time)/1000)+' s ago)',
'|---------------------------------------------',
'|Pest Controller Progress Report:',
'|---------------------------------------------',
'|Worked for : ' + TimeRunning,
'|Wins: ' + IntToStr(WinsA),
'|Loses: ' + IntToStr(LosesA),
'|Deaths: ' + IntToStr(DeathsA),
'|Antibans: ' + IntToStr(AntiBansA),
'|---------------------------------------------'];
ClearDebug;
for I := 0 to High(Texts) do
begin
WriteLn(Texts[I]);
end;
end;

procedure InBoatAntiBan;
var
x, y: Integer;
P: TPoint;
begin
If(not LoggedIn)then Exit;
Inc(AntiBansA);
MouseSpeed := 12 + Random(5);
Case Random(13) of
0: MMouse(Random(MIX2), Random(MIY2), 10, 10);
1:
if Random(4) = 1 then HoverSkill('random', False)
else Dec(AntiBansA);
2: PickUpMouse;
3: GameTab(RandomRange(tab_Combat, tab_Notes));
4: SleepAndMoveMouse(400+Random(Random(4000)));
5: IdleTime(100+random(700), 100+Random(100), 0.2+RandomE/2);
6: DoEmote(1+random(19));
7:
begin
Mouse(Random(MIX2), Random(MIY2), 0, 0, False);
Sleep(200+Random(200));
if not ChooseOption('xamine') then
ChooseOption('ancel');
end;
8: MakeCompass(IntToStr(Random(360)));
9:
begin
if Random(20) = 1 then
begin
Inc(TalkedA);
case Random(11) of
0: Typesend('cm0n');
1: Typesend('lol');
2: Typesend('1 more');
3: Typesend('plz');
4: Typesend('hurry');
5: Typesend('all on portals');
6: Typesend('someone stay in center');
7: Typesend('im getting full void');
8: Typesend('everyone in');
9: Typesend('all come in');
10: Typesend('XD');
end;
end else Dec(AntiBansA);
end;
10, 11, 12:
begin
If Walked then Exit;
Walked := True;
Dec(AntiBansA);
Exit;//Needs fixing.
//if not FindColoredAreaTolerance(x, y, DARKWATERCOLORA+CM, MMCX-35, MMCY-35, MMCX+35, MMCY+35, 10, 1) then
//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMUISTA KORJATA ^^
begin
Proggy('Coudn''t find darkwatercolor.');
Exit;
end;
P := RotatePoint(Point(X, Y-3-Random(20)), -rs_GetCompassAngleRadians, X, Y);
MMouse(P.X, P.Y, 0, 0);
if Loading or InGame then Exit;
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
Wait(500+random(1000));
end;
end;
Wait(500+random(500));
Gametab(TAB_Inv);
end;


procedure InGameAntiBan;
var
I: Integer;
begin
If(not LoggedIn)then Exit;
Inc(AntiBansA);
MouseSpeed := 12 + Random(5);
Case Random(14) of
0: MMouse(Random(MIX2), Random(MIY2), 10, 10);
1:
if Random(4) = 1 then HoverSkill('random', False)
else Dec(AntiBansA);
2: PickUpMouse;
3: GameTab(RandomRange(tab_Combat, tab_Notes));
4: IdleTime(100+random(700), 100+Random(100), 0.2+RandomE/2);
5: MakeCompass('S');
6,7:SleepAndMoveMouse(200+Random(Random(4000)));
8,9:MMouse(0, 0, MSX2, MSX2);
10:
if Random(4) = 1 then
begin
Mouse(Random(MIX2), Random(MIY2), 0, 0, False);
if not ChooseOption('xamine') then ChooseOption('ancel');
end else Dec(AntiBansA);
11: MakeCompass(IntToStr(Random(360)));
12:
begin
if Random(2) = 1 then
begin
KeyDown(VK_LEFT);
if Random(2) = 1 then Wait(400+random(2500))
else SleepAndMoveMouse(400+random(2500));
KeyUp(VK_LEFT);
end else
begin
KeyDown(VK_RIGHT);
if Random(2) = 1 then Wait(400+random(2500))
else SleepAndMoveMouse(400+random(2500));
KeyUp(VK_RIGHT);
end;
end;
13:
begin
I := 500+random(800);
KeyDown(VK_DOWN);
if Random(2) = 1 then Wait(I)
else SleepAndMoveMouse(I);
KeyUp(VK_DOWN);
Wait(100+random(300));
KeyDown(VK_UP);
if Random(2) = 1 then Wait(I+random(400))
else SleepAndMoveMouse(I+random(400));
KeyUp(VK_UP);
end;
end;
Wait(200+random(500));
Gametab(TAB_INV);
end;



function FindTPoints(HueMod, SatMod: Extended; Color, MinMatches, Tol: Integer): TPointArray;
var
I: Integer;
P: TPointArray;
T2D: T2DPointArray;
begin
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(HueMod, SatMod);
FindColorsTolerance(P, Color, MSX1, MSY1, MSX2, MSY2, Tol);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
T2D := TPAtoATPAEx(P, 30, 30);
SetLength(P, 0);
for I := 0 to Length(T2D) - 1 do
if Length(T2D[I]) >= MinMatches then
begin
SetLength(Result, Length(Result)+1);
Result[High(Result)] := MiddleTPA(T2D[I]);
end;
SortTPAFrom(Result, IntToPoint(MSCX, MSCY));
end;



function CenterMiddlePoint: TPoint;
var
P: TPointArray;
begin
FindColorsTolerance(P, CenterColorB+FindDarkLadderColor-DarkLadderColorB, MMX1, MMY1, MMX2, MMY2, 0);
Result := MiddleTPA(P);
Result := RotatePoint(IntToPoint(Result.X+5, Result.Y-5), -rs_GetCompassAngleRadians, Result.X, Result.Y);
end;



function Dead: Boolean;
var
x, y: Integer;
begin
if not FindBlackChatMessage('dear') then Exit;
if FindColor(x, y, WaterColorB+FindDarkLadderColor-DarkLadderColorB, MMCX-20, MMCY-20, MMCX+20, MMCY+20) then
begin
Proggy('Died in game');
Result := True;
Inc(DeathsA);
end;
end;


procedure Terminate(Text: String);
begin
Proggy(Text);
WriteLn('Please post this proggy to my thread: [url]http://villavu.com/forum/showthread.php?t=67367');[/url]
if not LastestVersion then WriteLn('There is a new version of this script available at [url]http://villavu.com/forum/showthread.php?t=67367');[/url]
LogOut;
TerminateScript;
end;



function FindGangplank: TPointArray;
var
X, Y: Integer;
begin
Result := FindTPoints(0.10, 0.25, 3694463, 10, 3);
case (boat) of
1:
begin
X := 35;
Y := 0;
end;
2:
begin
X := -35;
Y := 0;
end;
3:
begin
X := -35;
Y := 0;
end;
end;
SortTPAFrom(Result, RotatePoint(Point(MSCX+X, MSCY+Y), -rs_GetCompassAngleRadians, MSCX, MSCY));
end;

function WalkToVoid: Boolean;
var
X, Y: Integer;
P: TPoint;
begin
if (Boat = 3) then
begin
P := RotatePoint(IntToPoint(680, 100), -rs_GetCompassAngleRadians, MMCX, MMCY);
X := P.X;
Y := P.Y;
if not FindColorSpiral(X, Y, FindDarkLadderColor, MMX1, MMY1, MMX2, MMY2) then Exit;
Mouse(X-1, Y-1, 3, 3, True);
Sleep(2500);
Flag;
Sleep(2000);
end;
case (Boat) of
1: P := RotatePoint(IntToPoint(635, 30), -rs_GetCompassAngleRadians, MMCX, MMCY);
2: P := RotatePoint(IntToPoint(680, 50), -rs_GetCompassAngleRadians, MMCX, MMCY);
3: P := RotatePoint(IntToPoint(645, 55), -rs_GetCompassAngleRadians, MMCX, MMCY);
end;
X := P.X;
Y := P.Y;
if not FindColorSpiral(X, Y, FindDarkLadderColor, MMX1, MMY1, MMX2, MMY2) then Exit;
case (Boat) of
1: P := RotatePoint(IntToPoint(X+18, Y-3), -rs_GetCompassAngleRadians, X, Y);
2: P := RotatePoint(IntToPoint(X+15, Y-3), -rs_GetCompassAngleRadians, X, Y);
3: P := RotatePoint(IntToPoint(X+18, Y-3), -rs_GetCompassAngleRadians, X, Y);
end;
Mouse(P.X, P.Y, 2, 2, True);
Sleep(2500);
Flag;
Sleep(2000);
Result := True;
end;

function ExchangeScreen: Boolean;
begin
Result := GetColor(185, 30) = 2070783;
end;

function TalkVoid: Boolean;
var
X, Y, I, Attempts: Integer;
VP: TPointArray;
begin
while (not ExchangeScreen) do
begin
Inc(Attempts);
if Attempts = 15 then
begin
Result := False;
Exit;
end;
if (Attempts = 7) then MakeCompass(rs_GetCompassAngleDegrees+80+Random(2)*180);
VP := FindTPoints(0.00, 0.41, 2171171, 30, 4);
for I := 0 to Length(VP) - 1 do
begin
MMouse(VP[I].x-1, VP[I].y-1, 3, 3);
if WaitUpTextMulti(['Void', 'Knight'], 500) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
if not WaitOption('xcha', 600) then Break;
Wait(1000+random(600));
Flag;
Wait(2000+random(600));
Break;
end;
end;
Sleep(1000);
end;
Result := True;
end;

function Exchange: Boolean;
begin
Proggy('Exchanging');
Case Lowercase(SpendPointsOn[EX]) of
'attack','att','atk':
begin
Mouse(135, 138, 30, 6, True);
CurrentPointsA := CurrentPointsA-100;
end;
'defence','def':
begin
Mouse(440, 138, 30, 6, True);
CurrentPointsA := CurrentPointsA-100;
end;
'magic','mage':
begin
Mouse(440, 212, 30, 6, True);
CurrentPointsA := CurrentPointsA-100;
end;
'prayer','pray':
begin
Mouse(286, 285, 30, 6, True);
CurrentPointsA := CurrentPointsA-100;
end;
'strength','str':
begin
Mouse(286, 138, 30, 6, True);
CurrentPointsA := CurrentPointsA-100;
end;
'ranged','range':
begin
Mouse(286, 212, 30, 6, True);
CurrentPointsA := CurrentPointsA-100;
end;
'hitpoints','hp','constitution', 'con', 'const':
begin
Mouse(135, 212, 30, 6, True);
CurrentPointsA := CurrentPointsA-100;
end;
'robe', 'robes', 'mage helm','melee helm','top','gloves','ranger helm', 'mace', 'deflector', 'seal':
begin
Mouse(150, 60, 50, 8, True);
Wait(2500+random(900));
case LowerCase(SpendPointsOn[EX]) of
'melee helm':
begin
Mouse(45, 138, 115, 6, True);
CurrentPointsA := CurrentPointsA-200;
end;
'ranger helm':
begin
Mouse(200, 138, 115, 6, True);
CurrentPointsA := CurrentPointsA-200;
end;
'mage helm':
begin
Mouse(350, 138, 115, 6, True);
CurrentPointsA := CurrentPointsA-200;
end;
'top':
begin
Mouse(45, 212, 115, 6, True);
CurrentPointsA := CurrentPointsA-250;
end;
'robes', 'robe':
begin
Mouse(200, 212, 115, 6, True);
CurrentPointsA := CurrentPointsA-250;
end;
'gloves':
begin
Mouse(350, 212, 115, 6, True);
CurrentPointsA := CurrentPointsA-150;
end;
'mace':
begin
Mouse(45, 285, 115, 6, True);
CurrentPointsA := CurrentPointsA-250;
end;
'deflector':
begin
Mouse(200, 285, 115, 6, True);
CurrentPointsA := CurrentPointsA-150;
end;
'seal':
begin
Mouse(350, 285, 115, 6, True);
CurrentPointsA := CurrentPointsA-10;
end;
end;
end;
else
begin
Proggy('No such item as: '+SpendPointsOn[EX]+'.');
Exit;
end;
end;
Wait(1000+random(900));
Mouse(220, 220, 30, 4, True);
Wait(1900+random(900));
Proggy('Succesfully exchanged points in '+SpendPointsOn[EX]);
If EX < Length(SpendPointsOn)-1 then Inc(EX);
Result := True;
end;


function WalkBack: Boolean;
var
X, Y: Integer;
P: TPoint;
begin
P := RotatePoint(IntToPoint(MMCX-6, MMCY-12), -rs_GetCompassAngleRadians, MMCX, MMCY);
X := P.X;
Y := P.y;
FindColorSpiral(X, Y, FindDarkLadderColor, MMX1, MMY1, MMX2, MMY2);
case (Boat) of
1: P := RotatePoint(IntToPoint(X-3, Y+43), -rs_GetCompassAngleRadians, X, Y);
2: P := RotatePoint(IntToPoint(X-41, Y+8), -rs_GetCompassAngleRadians, X, Y);
3: P := RotatePoint(IntToPoint(X-41, Y+8), -rs_GetCompassAngleRadians, X, Y);
end;
X := P.X;
Y := P.y;
FindColorSpiral(X, Y, FindDarkLadderColor, MMX1, MMY1, MMX2, MMY2);
Mouse(X-1, Y-1, 3, 3, True);
Wait(2000);
Flag;
Wait(2000);
if (Boat = 1) then
begin
Result := True;
Exit;
end;
case (Boat) of
2: P := RotatePoint(IntToPoint(612, 100), -rs_GetCompassAngleRadians, MMCX, MMCY);
3: P := RotatePoint(IntToPoint(585, 48), -rs_GetCompassAngleRadians, MMCX, MMCY);
end;
X := P.X;
Y := P.y;
FindColorSpiral(X, Y, FindDarkLadderColor, MMX1, MMY1, MMX2, MMY2);
Mouse(X-1, Y-1, 3, 3, True);
Wait(2000);
Flag;
Wait(2000);
Result := True;
end;


function SpendPoints: Boolean;
begin
if not WalkToVoid then Exit;
if not TalkVoid then Exit;
if not Exchange then Exit;
if not WalkBack then Exit;
Result := True;
end;

function HybridBootsScreen: Boolean;
begin
result := (GetColor(136, 92) = 6668015);
end;

function SelectBootss: Boolean;
begin
if not HybridBootsScreen then Exit;
case (Lowercase(SelectBoots[BootsIndex])) of
'battlemage': Mouse(140, 220, 50, 50, True);
'trickster': Mouse(230, 220, 50, 50, True);
'vanguard': Mouse(320, 220, 50, 50, True);
else Terminate(SelectBoots[BootsIndex]+' boots don''t exist..');
end;
if BootsIndex <> High(SelectBoots) then Inc(BootsIndex);
Result := True;
end;


function IsLost: Boolean;
var
x, y, I: Integer;
P: TPoint;
begin
while FlagPresent and (I < 99) do
begin
Inc(I);
Sleep(40);
end;
if FindColor(x, y, 195836, MMCX-16, MMCY-16, MMCX+16, MMCY+16) and (Distance(MMCX, MMCY, x, y) < 17) then Exit;
case Boat of
1: P := RotatePoint(IntToPoint(670, 140), -rs_GetCompassAngleRadians, MMCX, MMCY);
2: P := RotatePoint(IntToPoint(585, 140), -rs_GetCompassAngleRadians, MMCX, MMCY);
3: P := RotatePoint(IntToPoint(575, 35), -rs_GetCompassAngleRadians, MMCX, MMCY);
end;
x := P.x;
y := P.y;
Sleep(1000);
if not FindColorSpiral(x, y, FindDarkLadderColor, MMX1, MMY1, MMX2, MMY2) then
begin
Result := True;
Exit;
end;
if Boat = 3 then
begin
P := RotatePoint(IntToPoint(x-5, y+6), -rs_GetCompassAngleRadians, x, y);
X := P.x;
Y := P.y;
end;
Mouse(x, y, 2, 2, True);
Wait(2500+Random(1000));
Flag;
Wait(2000+Random(1000));
end;


function GetInBoat: Boolean;
var
x, y, I, Attempts: Integer;
P: TPointArray;
begin
while (not (InBoat or InGame)) do
begin
if not LoggedIn then Exit;
if SolveTeleportRandoms then Wait(4000);
Inc(Attempts);
if IsLost then
begin
Wait(1000);
Continue;
end;
if ((Attempts = 4) or (Attempts = 8)) or (Attempts = 12) then MakeCompass(rs_GetCompassAngleDegrees+85+Random(10)+Random(2)*180);
if (Attempts = 15) then
begin
Result := false;
Exit;
end;
P := FindGangplank;
for I := 0 to Length(P) - 1 do
begin
if (InBoat or InGame) then break;
MMouse(P[I].x-2, P[I].y-2, 5, 5);
if WaitUpTextMulti(['ross', 'angp', 'lank'], 500+Random(300)) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
WaitFunc(@InBoat, 10, 150+150*Attempts);
Break;
end else Continue;
end;
if InBoat then Break;
if FindNPCChatText('already have', Nothing) then
begin
if not SpendPoints then Terminate('Failed Spending Points');
Attempts := 0;
end;
CloseClanScreen;
SelectBootss;
end;
Result := True;
end;


function Attack: Boolean;
var
x, y, I, II, TimeMark, MaxWait: Integer;
Monsters: Array of Monster;
MonsterPoints: TPointArray;
begin
case (Boat) of
1:
begin
SetLength(Monsters, 2);
with Monsters[0] do
begin
Name := 'Shifter';//Green
Combat := 57;
Color := 2570777;
Tol := 4;//+1
Hue := 0.13;
Sat := 0.27;
end;
with Monsters[1] do
begin
Name := 'Shifter';//Red
Combat := 38;
Color := 1777497;
Tol := 4;//+1
Hue := 0.07;
Sat := 0.37;
end;
end;
2:
begin
SetLength(Monsters, 3);
with Monsters[0] do
begin
Name := 'Shifter';//Green
Combat := 57;
Color := 2570777;
Tol := 4;//+1
Hue := 0.13;
Sat := 0.27;
end;
with Monsters[1] do
begin
Name := 'Shifter';//BlackRed
Combat := 76;
Color := 3421244;
Tol := 4;//+2
Hue := 1.05;
Sat := 0.36;
end;
with Monsters[2] do
begin
Name := 'Shifter';//Yellow
Combat := 90;
Color := 1648698;
Tol := 4;//+1
Hue := 0.11;
Sat := 0.44;
end;
end;
3:
begin
SetLength(Monsters, 2);
with Monsters[0] do
begin
Name := 'Shifter';//Yellow
Combat := 90;
Color := 1648698;
Tol := 4;//+1
Hue := 0.11;
Sat := 0.44;
end;
with Monsters[1] do
begin
Name := 'Shifter';//Gray
Combat := 104;
Color := 10726569;
Tol := 6;
Hue := 0.27;
Sat := 0.29;
end;
end;
end;
for I := 0 to High(Monsters) do
begin
MonsterPoints := FindTPoints(Monsters[I].Hue, Monsters[I].Sat, Monsters[I].Color, 10, Monsters[I].Tol);
for II := 0 to High(MonsterPoints) do
begin
MMouse(MonsterPoints[II].X-2, MonsterPoints[II].Y-2, 5, 5);
GetMousePos(X, Y);
if (CombatLevel >= Monsters[I].Combat) then
begin
if not WaitUpTextMulti(['Attack', 'ck Sh', 'ifter'], 200+Random(200)) then Continue;
if Random(13) = 1 then
begin
Mouse(x, y, 0, 0, False);
Result := WaitOption('ttack', 500+Random(500));
Break;
end;
Mouse(X, Y, 0, 0, True);
Result := True;
Break;
end else
begin
Mouse(X, Y, 0, 0, False);
Result := WaitOption('ttack', 500+Random(500));
Break;
end;
end;
if Result then Break;
end;
If Length(MonsterPoints) > 0 then
begin
MaxWait := 500+Random(1200);
TimeMark := GetTimeRunning;
repeat
sleep(10);
until((GetTimeRunning-TimeMark > MaxWait) or not InGame or Loading);
end;
end;

function WaitForGameStart: Boolean;
begin
Walked := False;
if InBoat then
repeat
if Random(15) = 1 then InBoatAntiBan;
Wait(200+Random(200));
until (not InBoat);
Result := WaitFunc(@InGame, 10, 2000);
end;

function FindCenterColor: Integer;
var
P: TPoint;
TPA: TPointArray;
Colors: TIntegerArray;
I, LengthA, MaxLength, MaxIndex: Integer;
begin
MaxLength := 5;
P := RotatePoint(IntToPoint(627, 155), -rs_GetCompassAngleRadians, MMCX, MMCY);
FindColorsTolerance(TPA, 2846340, P.X-7, P.Y-7, P.X+7, P.Y+7, 40);
Colors := GetColors(TPA);
SetLength(TPA, 0);
ClearSameIntegers(Colors);
for I := 0 to High(Colors) do
begin
FindColors(TPA, Colors[I], P.X-7, P.Y-7, P.X+7, P.Y+7);
LengthA := Length(TPA);
if LengthA > MaxLength then
begin
MaxIndex := I;
MaxLength := LengthA;
if LengthA > 97 then Break;
end;
end;
if MaxLength = 5 then
begin
Result := -1;
Terminate('Failed to find centercolor.');
end else
begin
Proggy('Found centercolor. It is '+IntToStr(Colors[MaxIndex]));
Result := Colors[MaxIndex];
end;
end;

function WalkCenter(Pray: Boolean): Boolean;
var
CP: TPoint;
Dist: Integer;
begin
if (CenterColorB = 0) then
begin
CenterColorB := FindCenterColor;
if (CenterColorB = -1) then Terminate('Couldn''t find centercolor');
CenterColorB := CenterColorB+DarkLadderColorB-FindDarkLadderColor;
end;
CP := CenterMiddlePoint;
Dist := Distance(MMCX, MMCY, CP.X, CP.Y);
if ((Dist < 18) or (Dist > 73)) then Exit;
Mouse(CP.X-2, CP.Y-2, 5, 5, True);
Wait(2000+Random(3000));
if Pray and QuickPray then Mouse(715, 60, 20, 20, True);
Flag;
Result := True;
end;

function GetPoints: Integer;
var
TextNumbers: String;
begin
TextNumbers := GetNumbers(Trim(GetTextAt(114, 78, 0, 3, 0, 16777113, 0, 3, xpchars)));
if Length(TextNumbers) > 0 then
Result := StrToInt(TextNumbers)
else
Result := -1;
end;


function selectWorldA(world: Integer): Boolean;
var
x, y, xx, yy, i: Integer;
begin
if not LobbyTab(L_WorldSelect) then Exit;
while(not FindText(xx, yy, IntToStr(world), StatChars, 117, 142, 135, 435)) do
begin
Wait(1000);
if i = 0 then
begin
MMouse(685, 423, 10, 10);
GetMousePos(X, Y);
HoldMouse(X, Y, MOUSE_LEFT);
end;
i := i+1;
if (i > 25) then
begin
ReleaseMouse(X, Y, MOUSE_LEFT);
Exit;
end;
end;
ReleaseMouse(X, Y, MOUSE_LEFT);
Wait(1500+Random(1000));
if not FindText(xx, yy, IntToStr(world), StatChars, 117, 142, 135, 435) then Exit;
Mouse(xx, yy, 50, 5, true);
Result := True;
end;

function Login: Boolean;
begin
if LoggedIn then
begin
Result := True;
Exit;
end;
LoginPlayerToLob;
Wait(1000+Random(500));
if not LobbyScreen then Exit;
Wait(1000+Random(500));
if not selectWorldA(WORLD) then Exit;
Wait(1000+Random(500));
if not LogInPlayer then Exit;
Wait(1000+Random(500));
SetAngle(True);
end;

procedure TakeBreak;
var
BreakTime: Integer;
begin
Logout;
BreakTime := RandomRange(MIN_BREAKTIME, MAX_BREAKTIME);
Proggy('Taking a '+IntToStr(BreakTime/(1000*60))+' minute break!');
Wait(BreakTime);
Login;
NextBreak := GetSystemTime+RandomRange(MIN_NEXTBREAK, MAX_NEXTBREAK);
end;

procedure MainLoop;
var
Points: Integer;
begin
if GetSystemTime > NextBreak then TakeBreak;
SetRun(True);
if not GetInBoat then
begin
Sleep(5000);
if not LoggedIn then Login
else if not SolveTeleportRandoms then Terminate('Couldn''t get in boat');
Exit;
end;
Points := GetPoints;
if Points > 0 then
begin
if CurrentPointsA = 0 then CurrentPointsA := Points
else if (Points > CurrentPointsA) then IncEx(WinsA, (Points-CurrentPointsA)/(Boat+1))
else Inc(LosesA);
CurrentPointsA := Points;
end;
Proggy('Entered the boat');
Stats_Commit;
if not WaitForGameStart then Exit;
Proggy('You board the lander');
WalkCenter(True);
repeat
WalkCenter(False);
if Dead then WalkCenter(True);
Attack;
if Random(15) = 1 then InGameAntiBan;
Wait(100);
while Loading do Wait(10);
until not InGame;
Proggy('Game ended');
stats_IncVariable('Loads Done', 1);
end;

procedure ScriptStartup;
var
Version: String;
begin
NextBreak := GetSystemTime+RandomRange(MIN_NEXTBREAK, MAX_NEXTBREAK);
Smart_Server := 53;
Smart_Members := True;
ClearDebug;
WriteLn('Please wait. Runescape is being loaded.');
SmartSetupEx(Smart_Server, Smart_Members, Smart_Signed, Smart_SuperDetail);

if (SRLStats_Username = '') then
SetupSRLStats(182, 'Anonymous', 'anon1337')
else
SetupSRLStats(182, SRLStats_Username, SRLStats_Password);
WriteLn(GetPage('http://weequ.net/pest_controller/News.txt'));
Version := GetPage('http://weequ.net/pest_controller/Version.txt');
if Version <> '' then
begin
if (StrToFloat(Version) = VERSION_NUMBER) then
begin
WriteLn('You have the lastest version of this script.');
LastestVersion := True;
end else
begin
WriteLn('There is a newer version of this script available. Get it here: http:villavu.com/forum/showthread.php?t=67367');
if MessageBox('There is a new version of this script available!'+chr(13)+'Would you like to open the download page in a new window?', 'Version alarm', 4) = 6 then
begin
OpenWebPage('http:villavu.com/forum/showthread.php?t=67367');
TerminateScript;
end;
end;
end else
begin
WriteLn('Couldn''t check the version number.');
LastestVersion := True;
end;
SetTargetArray(SmartImageArray, 765,503);
while not RSReady do Wait(100);
SetupSRL;
WriteLn('Runescape loaded. Loggin in.');
Login;
DarkLadderColorB := FindDarkLadderColor;
LightLadderColorB := DarkLadderColorB + 591375;
SetupAutoColors;
WaterColorB := AutoColor(srl_WaterColor);
Mousespeed := 12+Random(5);
CombatLevel := GetCombatLevel;
end;


begin
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Active:= True;
Setup;
ScriptStartup;
while (true) do
begin
MainLoop;
end;
end.

Markus

2011-11-29 10:42:23

No plagiarism!
Banned for two weeks.