SRL Archive - Archive

Based Lord - SRL Member Application


Based Lord

2012-07-01 20:06:03

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
2 Years of Computer Science through my high school. Mostly Java and some Python.


Are you a member of any other communities?
No


Tell us about yourself…
From: Based Lord
My name is Coleman (AKA Based Lord). I am a 17 year old from Texas who I will be a Senior in High School next year. The majority of my interests have something involved with computers/technology. I have played numerous games such as World of Warcraft, League of Legends, Runescape, and many others. I do have a job aswell; I have worked as a Lifeguard for my neighborhood pool for the past 3 summers. The original reason I came to villavu was to obviously bot on runescape, and I really had no idea that I would eventually make my own scripts. I had been turned off by Programming for the past few months due to a bad experience with my new Computer Science teacher at school. I went from telling my parents "Yeah I definitely want to do Computer Science in College" to "I have no idea what I want to do in College". This community shone a new light on Scripting/Programming that has empowered me to rethink my attitude towards it. One reason why I would like to become an SRL Member is that it is definitely a great accomplishment. But ultimately, I want to continue to learn and contribute to the community.



Please show us one (or multiple) of your scripts.
program BasedAnimationRoom;
{$DEFINE SMART}
{$i SRL/SRL.simba}
{$i SPS/SPS.simba}
{$i SRL/SRL/misc/paintsmart.simba}
{Based Animation Room V2.0
By Based Lord

V2.0b
-Removed the paint background for readability

V2.0
-Added Support for various foods
-Added Support for Black + Mithril
-Uses Records for Foods, Thanks to Abu_jwka's guide
-Attempted to add multi-player

V1.3
-Added Text Finding for Tokens
-Completely Revamped the Combat Detection
-Added Random Chance to use any piece of armour on the animator
-Reduced Freq of Antiban
-Added some Comments to most Procedures/Functions To help people understand what
each thing is doing ect.

V1.2
-Cleaned up the Main loop
-Added some paint debugging for Object Finding
-Changed the Combat Detection, Should be better - Using putonajonny's WaitFight
-Updated some of the colors to work better

V1.1
-Added Banking
-Improved Mem usage and leaks
-Other small bug fixs



Instructions - Read the Thread Please and Fill out Setup
(The SPS Map can also be found on my Thread)
[url]http://villavu.com/forum/showthread.php?t=84568[/url]

}

Const
//Setup
WhichArmour = 'Black';// Black, Mithril, Adamant
EatAt = 500; // When HP < EatAt, Eat WhatFood
TimeToKill = 90000; // Failsafe to break combat loop (Max time to kill)
UseBank = True;


procedure DeclarePlayers;
Begin
HowManyPlayers := 1;//How many Players/Accounts are you using?
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
With Players[0] Do
Begin
Name := '';
Pass := '';
Nick := ''; // Four characters from your Username
Pin := '';
Active := True;
Players[0].BoxRewards := ['Xp', 'amp','oins'];
Strings[0] := 'Rocktail'; //Which Food
// Rocktail, Shark, Lobster
End;

{With Players[1] Do // Remove the Braces if you want to use multi-player
Begin
Name := '';
Pass := '';
Nick := ''; // Four characters from your Username
Pin := '';
Active := True;
Players[0].BoxRewards := ['Xp', 'amp','oins'];
Strings[0] := 'Rocktail'; //Which Food
End;}
End;


Type Foods = Record
FoodDTM : Integer;
End;

Var
Chest, Helm, Legs : Integer; // Holds the Bitmaps for the 3 armour pieces
WarriorColor, WarriorTol : Integer; // for finding the animation
WarriorHMod, WarriorSMod : Extended; // using CTS 2
ArmourColor, ArmourTol : Integer; // for finding armour to loot
ArmourHMod, ArmourSMod : Extended; // using CTS 2
// Used for the Progress Report
TokensPerHour, TokensGained, InitialTokens : Integer;
XpGained, XpPerHour, XpPerKill : Integer;
// Misc Variables used throughout the script
FightTime, PieceCounter, FightAttempts : Integer;
TokensPer, Banks, WarriorsKilled : Integer;
FightBox : TBox;
Food : Foods;

Const

//Don't Touch
VERSION = '2.0';
//For InFight
HPBarGreenColor = 46927;
HPBarGreenTol = 8;
HPBarGreenHMod = 0.74;
HPBarGreenSMod = 0.00;

HPBarRedColor = 12171524;
HPBarRedTol = 15;
HPBarRedHMod = 4.54;
HPBarRedSMod = 0.43;


Procedure Antiban;
Begin
If (Not(LoggedIn)) Then Exit;
If (Not(FindNormalRandoms)) Then
case Random(500) of
0: RandomRClick;
1: PickUpMouse;
2: HoverSkill('Attack', False);
3: HoverSkill('Random', False);
4: Wait(500+Random(2000));
5: CompassMovement(10, 40, True);
End;
GameTab(Tab_Inv);
End;


{///////////////////////////////////////////////
//Procedure FreeStuff
//Frees Up Bitmap's/DTM's to prevent Memory Leaks
///////////////////////////////////////////////}
Procedure FreeStuff;
Begin
FreeDTM(Food.FoodDTM);
FreeBitmap(Chest);
FreeBitmap(Helm);
FreeBitmap(Legs);
End;


{///////////////////////////////////////////////
//Procedure SetFoods
//Idea from Abu_jwka's Records guide
//Sets what food will be used during the script
///////////////////////////////////////////////}
Procedure SetFoods;
Begin
Case lowercase(Players[CurrentPlayer].Strings[0]) Of

'lobster':
Begin
WriteLn('Lobster Selected');
Food.FoodDTM := DTMFromString('mlwAAAHicY2dgYJjKxMCwEIg7gbgViHuBeDIQzwZieSAWAWIpIFYFYg0g1gdiFSBeGy4J1M2EFXMx4AaMeDAUAAD6qwZK');
End;

'rocktail':
Begin
WriteLn('Rocktail Selected');
Food.FoodDTM := DTMFromString('mbQAAAHicY2VgYLjJxMDwBIifA/E9IL4CxGcZGRhOAfFBIL4MxDeAuK+6BqiaCQWLMGACRiwYDABICwoU');
End;

'shark':
Begin
WriteLn('Shark Selected');
Food.FoodDTM := DTMFromString('mggAAAHicY2NgYMhnY2CoA+JqNgg7E4hLgNiViYEhAoidgdgHiIOB2BaIw50MgbqYMDAXA3bAiANDAAAz+AWL');
End;

Else
Begin
WriteLn('Please Enter Valid Food');
FreeStuff;
Logout;
End;

End;
End;


{///////////////////////////////////////////////
//Procedure SetAddy
//Sets associated varibles for Adamant Armour
///////////////////////////////////////////////}
Procedure SetAddy;
Begin

WarriorColor := 3820602;
WarriorTol := 7;
WarriorHMod := 0.12;
WarriorSMod := 1.06;

ArmourColor := 7968622;
ArmourTol := 28;
ArmourHMod := 0.11;
ArmourSMod := 0.35;

TokensPer := 60; //Tokens gained per kill
XpPerKill := 396+132;//Normal Xp (+ Constitution experience)

Chest := BitmapFromString(15, 11, 'meJw9kcFugkAQhk3PeLEhDbVaLY' +
'ggILhFUJQQiqJWbQixTYwxHHpo+v4v0K8laTKH3Znv/3dmNsljR1h' +
'SU5LlFjHQ+wNTc6fOc+jNkyBc+kkej4UVpTNitU8X6YzkY6/90FGA' +
'DVuPkiBeReRfdkmtQrJcRdti7UeCK3lgSBF6OFCFJ1mrsn2a7pLDa' +
'UuVTkauAdlTu6/lJj9mAGCo4BFuivX6mAHTAzCkoshglADq4F0ySP' +
'an7U2jAUwbTIRzeXkrzgdKNcOZKg9xvVPkW7lVO9edVN+Xj6okgyf' +
'M6VogV/V+p9e+7yjw9IatLayhrbOQ69cZw6GpiakDpv5tkkGAcWMP' +
'8EHo+VNnIqyxaxAs0BMWKCSzIKFVovp8Xyz9eST++Se125QkxzWAI' +
'ZmFkXFGeKlKsDqADVP7/RdTG9l6lsfQsySYhB4SBvwBCq1nqw==');

Helm := BitmapFromString(4, 19, 'meJw9jmsLgjAYhf9FkXS/Gd5QR+Z' +
'UZKgbZgOzDxEhIURE//8PdGCwL+Oc5zkvbIjE68ilHXOT/FI5ROIR' +
'sM5NkT/xGQo159mXXqCeYSHaCvV9qntSIoQ0UDPKYo84Y2PUOvTWX' +
'1mdo2ZlUjQMChWvvDeVLHAFVXdCKdu3NNxbOw035lrD2WqqoTGfKL' +
'jcLlQ+uCY4Nn7kYYMKhY9BqZM/++4ySQ==');

Legs := BitmapFromString(6, 14, 'meJwzNrO2sXdNzI3Lrc4qrMtNzk8' +
'wNrM2tbCLSg0vaSoAcuOzYyQlpQyNLYEoIMrPL8LHK9hDVFQMIqij' +
'Z6ylY6CuqSsoKAQUAYrrGZohi0AEgWxVdS1RMVEg18bZytLBQkZOh' +
'peXFyiVnB1jZGloYKYHEVFTV1NQlNcz1tE20ALqlpWTAXLVtFQVVO' +
'Q1dNWV1ZWAIkoq8p7+LkARWUUZVS1VeRV5eUUZaTlJZw87KTlJJXU' +
'lIGlqaQgUMbc2FhETllGUEZMSA9orKiYMRAJC/EwMDEAEAJI4K20=');
WriteLn('Adamant Selected');
End;


{///////////////////////////////////////////////
//Procedure SetMith
//Sets associated varibles for Mithril Armour
///////////////////////////////////////////////}
Procedure SetMith;
Begin

WarriorColor := 4798004;
WarriorTol := 11;
WarriorHMod := 0.08;
WarriorSMod := 0.41;

ArmourColor := 12603721;
ArmourTol := 31;
ArmourHMod := 0.04;
ArmourSMod := 1.52;

TokensPer := 50; //Tokens gained per kill
XpPerKill := 320+107;//Normal Xp (+ Constitution experience)

Chest := BitmapFromString(4, 13, 'meJxbVVy0qrgo1NLSXlsLyMjycE9' +
'xcfY0MpyblWmqqWGura2vIG+lq+tpaaGqoABEZQH+CY4OwRbmmsrK' +
'QHaBj0+4tbW4kFCJvx+QnePpCVRvq6kJQTpysjUhwS6mpkZqavoqK' +
'kARJ2NjIIOJgcFJVyfGzhaoBcg2VVY2UlJUlZQEsoEMoAkQNgC1iSL+');

Helm := BitmapFromString(4, 11, 'meJybl501JSW5Nz6+IjBwdmaGuba' +
'2qaaGkZqarb4+Hy8vHrS+vOzO1CkQlOXhviAnx0pXF4hyPD0hDKAJ' +
'QDZQfFpqKtB8IBtoOFwNRLw7LhbIBgA9viZP');

Legs := BitmapFromString(3, 13, 'meJxzMja20tU1UlK0NzQ019a21dS' +
'EMMxVVSEMU2VlJ2NjIAOopsDHJ8XFOdza2khNTUdJSVxIKNjCXF9F' +
'RVNePtTSMsbOFsgAyjrp6kTa2gARUCrB0cHF1BTISHN1BSKgLnkJC' +
'QBvNBgn');
WriteLn('Mithril Selected');
End;


{///////////////////////////////////////////////
//Procedure SetBlack
//Sets associated varibles for Black Armour
///////////////////////////////////////////////}
Procedure SetBlack;
Begin

WarriorColor := 1315861;
WarriorTol := 2;
WarriorHMod := 0.00;
WarriorSMod := 0.27;

ArmourColor := 4534344;
ArmourTol := 11;
ArmourHMod := 0.70;
ArmourSMod := 1.71;

TokensPer := 40; //Tokens gained per kill
XpPerKill := 240+80;//Normal Xp (+ Constitution experience)

Chest := BitmapFromString(4, 10, 'meJyTlpKWxobkZeUhSElRCY7ExcT' +
'9vP1EhKxEhW0hIsH+wXJSocrySUCVfLx8irIxqooZQAYQSYq5S4i6' +
'ABlMDAyRYZFxUXFABhCFB4fHRMQAALQlEWk=');;

Helm := BitmapFromString(3, 13, 'meJxTVVGVlpI2t7BSUlQSFxOHM6y' +
'sbCEMMTFxCENYSBhI8vHyWZlbicMEgcjP2w9IBvgGaKprAo0y0jfS' +
'19WHMFRVVOVl5YEMoGKgdqACIAk0AQCvEw/f');

Legs := BitmapFromString(3, 11, 'meJxTlk9SkktQlI2DkIqyMRCGrGS' +
'ArFQwkJSR8IOQSopKQJKPl09cTNzHw8fdxR3IAAoCEZAhLysvLSUt' +
'LCQMJCEMIAKKMzEwAABcPQ6k');
WriteLn('Black Selected');

End;

{///////////////////////////////////////////////
//Procedure SetThings
//Sets Bitmaps, DTMs, and other variables for later use
///////////////////////////////////////////////}
Procedure SetThings;
Begin
Case lowercase(WhichArmour) of
'adamant': SetAddy;
'mithril': SetMith;
'black' : SetBlack;
End;
SetFoods;
FightBox := IntToBox(224, 114, 294, 150);//Box to check for InFight
SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2,MSY2-10));
End;

/////////////////////////////
//Draws Dots for inputted TPAs
/////////////////////////////
procedure SMART_BigBox(Dots: TPointArray);
begin
SMART_DrawDotsEx(False, Dots, clgreen);
end;

{///////////////////////////////////////////////
//Function FindWarrior
//Finds and Clicks on the Animation Dude
///////////////////////////////////////////////}
Function FindWarrior : Boolean;
Var
CTS, x, y, I : Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
Begin
If (Not(LoggedIn)) Then Exit;
If (Not(FindNormalRandoms)) Then
SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2,MSY2-10));
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(WarriorHMod,WarriorSMod);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, WarriorColor, MSX1, MSY1, MSX2, MSY2, WarriorTol);
ColorToleranceSpeed(CTS)
ATPA := TPAToATPAEx(TPA, 25, 25);
For I := 0 to High(ATPA) do
Begin
SMART_BigBox(TPA);
SMART_DebugATPA(False, ATPA);
MiddleTPAEx(ATPA[i], x, y);
Mouse(x, y, 2, 2,False);
SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2,MSY2-10));
If (ChooseOption('ttack')) Then
Begin
Disguise('Attacking Animation');
Wait(1000);
Result := True;
Exit;
End;
Result := False;
End;
End;


{///////////////////////////////////////////////
//Function FindHealthBars
//Version of SRL_Infight Modified by Based Lord
///////////////////////////////////////////////}
Function FindHealthBars(SearchArea: TBox): Boolean;
var
H, I, CTS, Xc, Yc : integer;
Colors, Tol: TIntegerArray;
HMod, SMod : TExtendedArray;
ATPA: T2DPointArray;
begin
Colors := [HPBarGreenColor, HPBarRedColor];
Tol := [HPBarGreenTol, HPBarRedTol];
HMod := [HPBarGreenHMod, HPBarRedHMod];
SMod := [HPBarGreenSMod, HPBarRedSmod];
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
Xc := (FightBox.X1 + FightBox.X2) / 2
Yc := (FightBox.Y1 + FightBox.Y2) / 2
H := High(Colors);
SetArrayLength(ATPA, H+1);
SetColorSpeed2Modifiers(HMod[i],SMod[i]);
for i := 0 to H do
with SearchArea do
If (FindColorsSpiralTolerance(Xc, Yc, ATPA[i], Colors[i], X1, Y1, X2, Y2, Tol[i])) Then
Begin
Result := True;
End;
ColorToleranceSpeed(CTS);
End;


{///////////////////////////////////////////////
//Function InFight
//Returns If in a fight, If false it will try to FindWarrior Once
///////////////////////////////////////////////}
Function InFight: Boolean;
begin
If (FindHealthBars(FightBox)) Then
Begin
FightAttempts := 0;
Result := True;
Exit;
End Else
Begin //Needed incase animation stops attacking
FindWarrior; //Still not Perfect but much better
Inc(FightAttempts);
If (FightAttempts >= 1) Then
Begin
Result := False;
Exit;
End;
Result := True;
End;
end;

{///////////////////////////////////////////////
//Procedure GetTokens
//Returns Text as a String
///////////////////////////////////////////////}
Function GetToken : String;
Begin
Result := GetTextAtExWrap(30, 150, 65, 170, 0, 20, 0, 16777215, 0, 'StatChars')
End;

{///////////////////////////////////////////////
//Procedure SetTokens
//Sets the Starting Amount of Tokens
///////////////////////////////////////////////}
Procedure SetTokens;
Begin
If (GetToken = '') Then
Begin
InitialTokens := 0;
WriteLn('Initial Tokens Set at '+IntToStr(InitialTokens));
Exit;
End;
InitialTokens := StrToInt(GetToken);
WriteLn('Initial Tokens Set at '+IntToStr(InitialTokens));
End;

{///////////////////////////////////////////////
//Function SetTokens
//Returns and Reads the Token # off the screen for Proggy
///////////////////////////////////////////////}
Function GetTokens : Integer;
Begin
If (Not(LoggedIn)) Then Exit;
If (GetToken = '') Then
Begin
Result := 0;
Exit;
End;
Result := StrToInt(GetToken);
End;


{///////////////////////////////////////////////
//Function CurrentHP
//Returns Health Value in Integer Form
///////////////////////////////////////////////}
Function CurrentHP : Integer;
Var
HPString : String;
Begin
Result := GetMMLevels('HP', HPString);
End;


{///////////////////////////////////////////////
//Function EatFood
//Eats Food if HP is Under EatAt, FindsWarrior after eating
///////////////////////////////////////////////}
Procedure EatFood;
Var
X, Y : Integer;
Begin
If (FindNormalRandoms) Then Exit;
SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2,MSY2-10));
If (CurrentHP<EatAt) Then
Begin
If(FindDTM(Food.FoodDTM,X,Y,MIX1,MIY1,MIX2,MIY2)) Then
Begin
MMouse(X,Y,5,5);
If (WaitUpText('at', 500)) Then
Begin
Mouse(X,Y,0,0,True);
Disguise('Eating');
FindWarrior;
End;
End;
End;
End;


{///////////////////////////////////////////////
//Function HasChest
//Returns If there is a Chest in your Inv
///////////////////////////////////////////////}
Function HasChest : Boolean;
Var
X, Y : Integer;
Begin
Result := FindBitMapTolerancein(Chest, X, Y, MIX1, MIY1, MIX2, MIY2, 40);
End;


{///////////////////////////////////////////////
//Function HasLegs
//Returns If there is Legs in your Inv
///////////////////////////////////////////////}
Function HasLegs : Boolean;
Var
X, Y : Integer;
Begin
Result := FindBitMapTolerancein(Legs, X, Y, MIX1, MIY1, MIX2, MIY2, 40);
End;


{///////////////////////////////////////////////
//Function HasHelm
//Returns If there is a Helm in your Inv
///////////////////////////////////////////////}
Function HasHelm : Boolean;
Var
X, Y : Integer;
Begin
Result := FindBitMapTolerancein(Helm, X, Y, MIX1, MIY1, MIX2, MIY2, 40);
End;

{///////////////////////////////////////////////
//Function WhatPieces
//Returns Number of Pieces in Inv
///////////////////////////////////////////////}
Function WhatPieces : Integer;
Begin
PieceCounter:=0;
If (HasChest) Then Inc(PieceCounter);
If (HasLegs) Then Inc(PieceCounter);
If (HasHelm) Then Inc(PieceCounter);
Result := PieceCounter;
End;


{///////////////////////////////////////////////
//Function OpenBanker
//Finds and Opens the Banker/Bankwindow
///////////////////////////////////////////////}
Function OpenBanker:Boolean;
Var
i, h, X, Y : Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
CTS : Integer;
Begin
If (BankScreen) Then Exit;
If (Not(FindNormalRandoms)) Then
SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2,MSY2-10));
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.42, 0.04);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6052184, MSX1, MSY1, MSX2, MSY2, 10);
ColorToleranceSpeed(CTS);
ATPA := TPAtoATPAEx(TPA, 20, 20);
H := High(ATPA);

for i := 0 to H do
Begin
SMART_BigBox(TPA);
SMART_DebugATPA(False, ATPA);
MiddleTPAEx(atpa[i], X, Y);
Mouse(X, Y, 3, 3,False);
If (ChooseOptionMulti(['ank','ank Jade'])) Then
Begin
SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2,MSY2-10));
Result := True;
Wait(2000);
Exit;
End;
End;
End;

{///////////////////////////////////////////////
//Function FindDoor
//Finds and Opens door to the Animation Room
///////////////////////////////////////////////}
Function FindDoor : Boolean;
Var
CTS,x,y, I : Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
Begin
if (Not LoggedIn) then Exit;
SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2,MSY2-10));
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.21,2.03);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2964553, MSX1, MSY1, MSX2, MSY2, 5);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 20, 17);
For I := 0 to High(ATPA) do
Begin
SMART_BigBox(TPA);
SMART_DebugATPA(False, ATPA);
MiddleTPAEx(ATPA[i], x, y);
Mouse(x, y, 2, 2,False);
If (ChooseOptionMulti(['pen','oor'])) Then
Begin
Result := True;
Wait(1500);
Exit;
End;
End;
End;

{///////////////////////////////////////////////
//Procedure WalkToBank
//Walks to Bank :P
///////////////////////////////////////////////}
Procedure WalkToBank;
Var
NextToDoor : TPointArray;
ToBank : TPointArray;
Begin
NextToDoor := [Point(266, 246), Point(264, 235), Point(267, 223)];
ToBank := [Point(262, 216), Point(250, 216), Point(238, 216),
Point(233, 219), Point(222, 222), Point(222, 233)];
SPS_WalkPath(NextToDoor);
Wait(2000);
FindDoor;
SPS_WalkPath(ToBank);
Wait(2000);
End;

{///////////////////////////////////////////////
//Procedure WalkToAnimationRoom
//Walks back to the Animation Room
///////////////////////////////////////////////}
Procedure WalkToAnimationRoom;
Var
ToAnimation, CoolPath : TPointArray;
Begin
FindNormalRandoms;
ToAnimation := [Point(221, 229), Point(227, 222), Point(232, 217),
Point(243, 217), Point(254, 217), Point(263, 216), Point(267, 216)];
CoolPath := [Point(267, 225), Point(257, 235), Point(252, 243)];
SPS_WalkPath(ToAnimation);
//SetAngle(SRL_ANGLE_LOW);
Wait(1000);
Repeat
FindNormalRandoms;
Wait(100);
Until (FindDoor)
Wait(1000+Random(500));
SPS_WalkPath(CoolPath);
Wait(1500);

End;

{///////////////////////////////////////////////
//Function FindArmour
//Finds and Loots the Armour after leaving Combat
///////////////////////////////////////////////}
Function FindArmour : Boolean;
Var
CTS,x,y,I,Ix : Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
Begin
If (Not(LoggedIn)) Then Exit;
If (Not(FindNormalRandoms)) Then
SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2,MSY2-10));
WriteLn('Looking for Loot');
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(ArmourHMod,ArmourSMod);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, ArmourColor, MSX1, MSY1, MSX2, MSY2, ArmourTol);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
Begin
SMART_BigBox(TPA);
SMART_DebugATPA(False, ATPA);
MiddleTPAEx(ATPA[i], x, y);
Mouse(x, y, 2, 2, False);
SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2,MSY2-10));
Wait(100+Random(100));
If(WaitOptionMulti(['helm','ull','elm'],500)) Then
Begin
Wait(2500+Random(500));
For Ix:=0 to RandomRange(5,9) Do
Begin
If (WhatPieces=3) Then Break;
Mouse(MSCX+1,MSCY+7,2,2,True);
Wait(10+Random(40));
End;
If(WaitOptionMulti(['ake','est','eg'],500)) Then
Begin
Wait(1000+Random(500));
For Ix:=0 to RandomRange(1,2) Do
Begin
If (WhatPieces=3) Then Break;
Mouse(MSCX+1,MSCY+7,2,2,True);
Wait(10+Random(40));
End;
End;
GameTab(Tab_Inv);
Wait(1000);
Result := True;
Exit;
End;
End;
End;

{///////////////////////////////////////////////
//Function FindAnimator
//Finds and Clicks on the Animator
///////////////////////////////////////////////}
Function FindAnimator : Boolean;
Var
CTS,x,y, I : Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
Begin
If (FindNormalRandoms) Then Exit;
if (Not LoggedIn) then Exit;
SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2,MSY2-10));
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(1.20,0.26);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 8882318, MSX1, MSY1, MSX2, MSY2, 3);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 20, 20);
For I := 0 to High(ATPA) do
Begin
SMART_BigBox(TPA);
SMART_DebugATPA(False, ATPA);
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
If (WaitUpTextMulti(['agical', 'imator', 'Magical Animator'], 500)) Then
Begin
Mouse(x, y, 2, 2, True);
Result := True;
SMART_ClearCanvasArea(IntToBox(MSX1, MSY1, MSX2,MSY2-10));
Wait(5000);
Exit;
End;
Result := False;
End;
End;


{///////////////////////////////////////////////
//Function FoodCheck
//Looks for Food in Inv
///////////////////////////////////////////////}
Function FoodCheck : Boolean;
Var
X, Y : Integer;
Begin
FindNormalRandoms;
GameTab(Tab_Inv);
Result := FindDTM(Food.FoodDTM,X,Y,MIX1,MIY1,MIX2,MIY2);
End;


{///////////////////////////////////////////////
//Procedure GetTheItems
//Checks to see what to Withdraw and does it
///////////////////////////////////////////////}
Procedure GetTheItems;
Var
X, Y : Integer;
Begin
If (InvFull) Then
Begin
If (FindDTM(Food.FoodDTM,X, Y, MIX1, MIY1, MIX2, MIY2)) Then
Begin
MMouse(X,Y,5,5);
If (WaitUpText('sit', 500)) Then
Begin
Wait(100);
Mouse(X,Y,0,0,False);
ChooseOption('5');
End;
End;
End;
Wait(1000);
If (Not HasChest) Then
Begin
If( FindBitMapTolerancein(Chest, X, Y, 30, 90, 495, 290, 50)) Then
Begin
MMouse(X,Y,0,0);
Wait(100);
Mouse(X,Y,0,0,True);
End;
End;
If (Not HasLegs) Then
Begin
If (FindBitMapTolerancein(Legs, X, Y, 30, 90, 495, 290, 50)) Then
Begin
MMouse(X,Y,0,0);
Wait(100);
Mouse(X,Y,0,0,True);
End;
End;
If (Not HasHelm) Then
Begin
If(FindBitMapTolerancein(Helm, X, Y, 30, 90, 495, 290, 50)) Then
Begin
MMouse(X,Y,0,0);
Wait(100);
Mouse(X,Y,0,0,True);
End;
End;
If(FindDTM(Food.FoodDTM,X, Y, 30, 90, 495, 290)) Then
Begin
MMouse(X,Y,5,5);
If (WaitUpText('ithdraw', 500)) Then
Begin
Mouse(X,Y,0,0,False);
ChooseOption('ll');
End;
End Else
Begin
WriteLn('No Food Found');
LogOut;
End;
End;


{///////////////////////////////////////////////
//Procedure DoTheBanking
//Walks to Bank > Withdraws > Walks Back
///////////////////////////////////////////////}
Procedure DoTheBanking;
Begin
If (Not(LoggedIn)) Then Exit;
If (Not(FindNormalRandoms)) Then
If (Not UseBank) Then
Begin
WriteLn('Ran out of Food / lost Armour');
WriteLn('Ending Script');
LogOut;
End;
Disguise('Banking');
Inc(Banks);
WalkToBank;
Repeat
FindNormalRandoms;
Repeat
OpenBanker;
Until (BankScreen);
GetTheItems;
Wait(500+Random(500));
Until (FoodCheck)
CloseBank;
WalkToAnimationRoom;
End;

Function NeedsBank : Boolean;
Begin
If (Not FoodCheck) or (WhatPieces<3) Then Result := True;
End;


{///////////////////////////////////////////////
//Procedure UseArmour
//Uses one of the three armours on the animator
///////////////////////////////////////////////}
Procedure UseArmour;
Var
X, Y : Integer;
Begin
If (Not(LoggedIn)) Then Exit;
If (Not(FindNormalRandoms)) Then
GameTab(Tab_Inv);
If (NeedsBank) Then DoTheBanking;
Disguise('Using Armour');
Case RandomRange(1,3) of
1:
Begin
If FindBitMapTolerancein(Chest, X, Y, MIX1, MIY1, MIX2, MIY2, 40) Then
Begin
Mouse(X,Y,5,5,False);
Wait(150+Random(50));
ChooseOptionMulti(['se','Use']);
FindAnimator;
Wait(5000+Random(500));
Exit;
End;
End;

2:
Begin
If FindBitMapTolerancein(Helm, X, Y, MIX1, MIY1, MIX2, MIY2, 40) Then
Begin
Mouse(X,Y,5,5,False);
Wait(150+Random(50));
ChooseOptionMulti(['se','Use']);
FindAnimator;
Wait(5000+Random(500));
Exit;
End;
End;

3:
Begin
If FindBitMapTolerancein(Legs, X, Y, MIX1, MIY1, MIX2, MIY2, 40) Then
Begin
Mouse(X,Y,5,5,False);
Wait(150+Random(50));
ChooseOptionMulti(['se','Use']);
FindAnimator;
Wait(5000+Random(500));
Exit;
End;
End;
End;
End;


Procedure ProgressReport;
Var
TimeRun : Extended;
Begin
ClearDebug;
TimeRun := (GetTimeRunning/3600000.0);
TokensGained := GetTokens-InitialTokens;
TokensPerHour := Round((TokensGained)/(TimeRun));
WarriorsKilled := TokensGained/TokensPer;
XpGained := WarriorsKilled*XpPerKill
XpPerHour := Round((XpGained)/(TimeRun));


WriteLn('|&#9619;|Based Animation Room');
WriteLn('|&#9619;|'+VERSION+' By Based Lord');
Writeln('|&#9619;|Time Running : ' + TimeRunning);
WriteLn('|&#9619;|Tokens Gained : ' +IntToStr(TokensGained));
WriteLn('|&#9619;|Tokens/Hour : ' +IntToStr(TokensPerHour));
WriteLn('|&#9619;|Xp Gained : ' +IntToStr(XpGained));
WriteLn('|&#9619;|XP/Hour : ' +IntToStr(XpPerHour));
WriteLn('|&#9619;|Banks : ' +IntToStr(Banks));
WriteLn('-----------------------------');
End;


Procedure OnScreenProggy;
Var
Proggy : Integer;
TimeRun, TknsG, TknsPh, ExpG, ExpPh : String;
Begin
SmartSetDebug(True);
ProgressReport;
TimeRun := TimeRunning;
TknsG := IntToStr(TokensGained);
TknsPh := IntToStr(TokensPerHour);
ExpG := IntToStr(XpGained);
ExpPh := IntToStr(XpPerHour);

Proggy := 0;//Took out for reading purposes


SMART_DrawBitmap(True, Proggy, Point(MCX1-3,MCY1-5));
Smart_DrawText(155, 405,StatChars, TimeRun, clWhite);
Smart_DrawText(155, 425,StatChars, TknsG, clWhite);
Smart_DrawText(155, 445,StatChars, ExpG,clWhite);
Smart_DrawText(328, 425,StatChars, TknsPh,clWhite);
Smart_DrawText(328, 445,StatChars, ExpPh,clWhite);
FreeBitmap(Proggy);
End;


Procedure WaitFightLoop;
Begin
Repeat
FindWarrior;
AntiBan;
Wait(1000);
Until ((TimeFromMark(FightTime)>10000)or(InFight))
End;


Procedure FightLoop;
Begin
If (Not(LoggedIn)) Then Exit;
If (Not(FindNormalRandoms)) Then
If (Not InFight) Then FindWarrior;
If (InFight) Then Disguise('Fighting Animation');
Repeat
EatFood;
Antiban;
FindNormalRandoms;
Until(TimeFromMark(FightTime) > TimeToKill) or (Not(InFight))
End;


Procedure FindArmourLoop;
Var
Fails : Integer;
Begin
Repeat
If (Fails > 5) Then Break;
FindArmour;
Inc(Fails);
Until (WhatPieces>=3)
End;


Procedure MainLoop;
Begin
If(NeedsBank) Then
Begin
WriteLn('Going to Bank');
DotheBanking;
End;
UseArmour;
MarkTime(FightTime);
WaitFightLoop;
MarkTime(FightTime)
FightLoop;
Wait(500+Random(500));
FindArmourLoop;
OnScreenProggy;
End;


Procedure Setup;
Begin
Smart_Server := 26;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;

ClearDebug;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Addonterminate('FreeStuff')
SPS_Setup(RUNESCAPE_OTHER,['custom_WarriorGuild']);
SetThings;
End;


{Procedure Tester;
Var
X, Y : Integer;
Begin
If(FindDTM(Food.FoodDTM,X,Y,MIX1,MIY1,MIX2,MIY2)) Then
Begin
WriteLn('Found Food');
End;
End;}


begin
Setup;
Repeat
ExitSquealOfFortune();
MakeCompass('S');
SetFoods;
SetAngle(SRL_ANGLE_HIGH);
SetTokens;
OnScreenProggy;
Repeat
MainLoop;
Until (Not(LoggedIn));
NextPlayer(Players[CurrentPlayer].Active = False);
Until AllPlayersInactive;
end.

Ashaman88

2012-07-01 20:44:29

My vote depends on one question, which university is your top pick to go to?

Based Lord

2012-07-01 21:13:33

From: ashaman88
My vote depends on one question, which university is your top pick to go to?

Oh boy lol… I'm guessing you want me to say UT considering you live in Austin. Honestly I do not really have a top pick, most of the state's schools seem fairly good. Although, UT would definitely be one of my top picks if I had the grades :) but on the other hand A&M is less than an hour away from where I live. I will be happy where ever I end up considering my parents are willing to pay my way through it.

Ashaman88

2012-07-01 21:27:24

From: Based Lord
Oh boy lol… I'm guessing you want me to say UT considering you live in Austin. Honestly I do not really have a top pick, most of the state's schools seem fairly good. Although, UT would definitely be one of my top picks if I had the grades :) but on the other hand A&M is less than an hour away from where I live. I will be happy where ever I end up considering my parents are willing to pay my way through it.


haha actually A&M is where it's at!!! I just graduated from there this past May, although I do love Austin. Are you really thinking about A&M? What majors are you looking at?


PS script shows wide enough knowledge for me, activity is good, and attitude is good as well.


YES

Based Lord

2012-07-01 21:36:28

From: ashaman88
haha actually A&M is where it's at!!! I just graduated from there this past May, although I do love Austin. Are you really thinking about A&M? What majors are you looking at?


PS script shows wide enough knowledge for me, activity is good, and attitude is good as well.


YES

Yeah A&M is my #1 pick depending on what major I decide (Still undecided). I have 2 cousins there now. My biggest dilemma is that I'm going to miss the top 10% mark for being automatically accepted :/

Also, Thanks for the Vote :D

[XoL]

2012-07-01 21:42:01

Good enough for me!
YES!

Google

2012-07-01 21:54:24

I know this guy through a old forum I used to use. He is a very kind person he listens well and is eager to learn to do his best.

As for your application it was easy to read, you use TPAs, DTM|Bitmaps + SPS walking w/ custom map, and explain everything your procedures|functions do. Very easy to read. I would love to see some more activity in the community though.

P.S Little more activity and a yes from me, I will hold my vote for now:spongebob:

NKN

2012-07-01 22:45:51

Yes from me.

Ashaman88

2012-07-01 22:49:35

From: Based Lord
Yeah A&M is my #1 pick depending on what major I decide (Still undecided). I have 2 cousins there now. My biggest dilemma is that I'm going to miss the top 10% mark for being automatically accepted :/

Also, Thanks for the Vote :D


It's all good, I didn't have top 10 either, but I still got in (and got a masters degree). So don't sweat it, just dominate this next year!

Gl with app

Abu

2012-07-02 11:26:46

You used Records! :spot:

And used them well! :spot::spot:

From my tutorial! :spot::spot::spot:


Yes from me :D

However I must say, with an activity of 83% I fail to see GOOGLE's point about more Activity…

Sin

2012-07-02 12:03:54


Var
Chest, Helm, Legs : Integer; // Holds the Bitmaps for the 3 armour pieces
WarriorColor, WarriorTol : Integer; // for finding the animation
WarriorHMod, WarriorSMod : Extended; // using CTS 2
ArmourColor, ArmourTol : Integer; // for finding armour to loot
ArmourHMod, ArmourSMod : Extended; // using CTS 2
// Used for the Progress Report
TokensPerHour, TokensGained, InitialTokens : Integer;
XpGained, XpPerHour, XpPerKill : Integer;
// Misc Variables used throughout the script
FightTime, PieceCounter, FightAttempts : Integer;
TokensPer, Banks, WarriorsKilled : Integer;
FightBox : TBox;
Food : Foods;

Const

//Don't Touch
VERSION = '2.0';
//For InFight
HPBarGreenColor = 46927;
HPBarGreenTol = 8;
HPBarGreenHMod = 0.74;
HPBarGreenSMod = 0.00;

HPBarRedColor = 12171524;
HPBarRedTol = 15;
HPBarRedHMod = 4.54;
HPBarRedSMod = 0.43;
Holy global-variables batman!

J J

2012-07-02 13:25:09

TPA, SPS, DTM, bitmap, Onscreen proggy all covered.
Good attitude and good activity -> Yes.

Joe

2012-07-02 14:04:54

The guy is nice.
The guy can script.
The guy is active.
The guy applied.
The guy applied with a reasonable script.
The guy isn't a dick.

The guy has a yes from this guy.

Good luck on becoming one of us, guy.

Jakkle

2012-07-04 12:05:43

Yes from me :)

xtrapsp

2012-07-04 12:33:24

yes yes yes :) Seen you about not really spoken but definitely a yes from me

BraK

2012-07-26 19:03:55

Closed awaiting Admin action.