testje
2011-05-26 14:22:44
How Long have You Played Runescape?
6 Year(s)
Are you affilated in anyway with Jagex LTD?
Just a regular player
Were you Referred to SRL?
-
What is your general programming knowledge?
I just know Pascal and Delphi
Are you a member of any other communities?
Sythe, RSCA, Fagex, you name it, I game it.
Tell us about yourself…
Please show us one (or multiple) of your scripts.
Here's a woodcutter I made. It's for the Falador yews and got some cool features like automatic location detection, and you can mess around with the script you want, because it'll forget everything it knows every 200milliseconds.
Brilliant as it'll failsafe itself.
Here's a bolt enchanter, only works for members and it got me 86 mage.
I also got a cool moneymaking script if you want that one, and an awesome aircrafter made with 100% colour!
Edit: Here is the air crafter. 100% colour!!
6 Year(s)
Are you affilated in anyway with Jagex LTD?
Just a regular player
Were you Referred to SRL?
-
What is your general programming knowledge?
I just know Pascal and Delphi
Are you a member of any other communities?
Sythe, RSCA, Fagex, you name it, I game it.
Tell us about yourself…
From: testje
I am Alex, 16 years old and recently picked up scripting again after a big hiatus. I like to play RS at times. I'm currently doing high school but expect to graduate within a few weeks.
I'd like to get SRL Members as that'll give me some recognition.
Please show us one (or multiple) of your scripts.
Here's a woodcutter I made. It's for the Falador yews and got some cool features like automatic location detection, and you can mess around with the script you want, because it'll forget everything it knows every 200milliseconds.
Brilliant as it'll failsafe itself.
program yewkiller;
(*******************************************************************************
Kill Them Yews!
A Falador Yew Cutter by Testje
Instructions: Place character anywhere at Falador or FEB, run script, win!
*******************************************************************************)
{$i srl/srl/misc/smart.scar}
{$i srl/srl.scar}
{$i reflection/reflection.simba}
//Yew ID: 1309
//Yew STUMP: 7402
//Cutting anim: 867
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do //ripped this from bobzilla without permission
begin
Name := ''; //Username
Pass := ''; //Password
Nick := ''; //3-4 non uppercase, number, or space characters on your username
Pin := ''; //Bank Pin (Blank if none)er
Active := True; //Player Active?
Integers[2] := 10; //how long to work for in minutes
end;
end;
const
id_YEW_TREE = 1309;
id_YEW_STUMP= 7402;
id_ANIM_CUT = 867;
const
KtY_YewCount= 2; //This might be useful later for other locations
//In fact, it shouldn't be too hard to modify this script
//in order to use it at other locations/skills. Maybe
//I can even add some kind of "Scritp Record" so it's easy
//to make it do multiple skills in multiple locations? :o
const //To be used in the future
KtY_TO_YEWS = 1337; //Besides, the exact numbers don't really matter
KtY_CUT_YEWS = 1338;
KtY_SWITCH_YEWS = 1339;
KtY_TO_BANK = 1340;
KtY_CLEAR_INV = 1341;
KtY_CAN_CUT = 1342;
KtY_LOGGEDOUT =35071; //I LOSE, so do you
var
YewTimeStamps : array [0..KtY_YewCount-1] of integer;
YewTiles : array [0..KtY_YewCount-1] of TTile;
BankToYews : TTileArray;
YewsToBank : TTileArray;
CurrentYew : Integer;
Breakout : Boolean;
////////////////////////////////////////////////////////////////////////////////
function KtY_ObjectInReach(objID, MaxDist : integer) : boolean;
var
tempObject : TRSObject;
begin
result := False;
tempObject := GetObjectByID(id_YEW_TREE, OBJECT_TYPE_INTERACTABLE, MaxDist);
if (DistanceFrom(tempObject.Tile) < MaxDist) then
result := true;
end;
////////////////////////////////////////////////////////////////////////////////
function FindYew : boolean;
var
FoundObjs : TRSObjectArray;
YewPoint : TPoint;
TimeMark : Integer;
Tries : Integer;
begin
Result := False;
FoundObjs := GetObjectsByID(id_YEW_TREE, OBJECT_TYPE_INTERACTABLE, 10); //First try to find a yew
if length(FoundObjs) = 0 then
begin
FoundObjs := GetObjectsByID(id_YEW_STUMP, OBJECT_TYPE_INTERACTABLE, 10);
if length(FoundObjs) = 0 then
begin
writeln('There is no fckn yew, and no fckn stump of a yew!');
BreakOut := True;
exit;
end else
writeln('we found a stump -.-''');
//writeln(FoundObjs);
result := False;
end else
begin
writeln('WE found a yew tree!');
writeln('We found itat : '+ ToStr(FoundObjs[0].Tile)+' to be precise');
writeln('WE are at: '+ToStr(GetMyPos));
if GetAnimation <> id_ANIM_CUT then
begin
While(Tries < 10) do
begin
writeln('and were gonna cut it!');
if InvFull then
begin
writeln('wait we are not, as our inventory is full');
result := True; //to follow main loop logic
Exit;
end;
YewPoint := TileToMS(FoundObjs[random(9)].Tile, random(500));
MMouse(YewPoint.x, YewPoint.y, 5, 5);
if IsUpText('hop') then
begin
GetMousePos(YewPoint.x, YewPoint.y);
if Random(2) = 1 then
Mouse(YewPoint.x, YewPoint.y, 0, 0, true)
else begin
Mouse(YewPoint.x, YewPoint.y, 0, 0, false);
ChooseOption('hop');
end;
R_Flag;
TimeMark := GetSystemTime;
While ((GetSystemTime-TimeMark) < 5000) do
begin
if GetAnimation = id_ANIM_CUT then
begin
writeln('We iz cuttin and we r done');
Result := True;
Exit;
end;
end;
end;
Inc(Tries);
end;
end else
begin
writeln('we are already cutting it');
Result := True;
end;
end;
end;
(*
Typical script-loop:
Walk from bank to yews TO_YEWS
cut a yew CUT_YEWS
switch yew SWITCH_YEWS
Invfull: walk back to bank TO_BANK
at bank: deposit stuff CLEAR_INV
*)
function SwitchYews : boolean;
var
i, j, k : integer;
begin
//if FindYew then exit; //No need to switch, there's a yew in front of us
j := MaxInt;
for i := 0 to high(YewTimeStamps) do //Find out which yew to go
begin
if (YewTimeStamps[i] < j) then
begin
j := YewTimeStamps[i];
k := i;
end;
end;
if i > high(yewtimestamps) then i := random(length(yewtimestamps));
writeln('we are switching to yew: '+inttostr(i)+'@'+ToStr(yewtiles[i]));
if (r_WebWalk(YewTiles[i])) then
begin
writeln('we iz at the right yew!');
writeln('Yew: '+tostr(i)+' @ '+ToStr(yewtiles[i]));
R_Flag;
end;
end;
function ScriptState : integer;
var
MyPos : TTile;
begin
Result := -1; //aka middleofnowhere
if (not(loggedin)) then
begin
result := KtY_LOGGEDOUT;
exit;
end;
MyPos := GetMyPos;
if InvFull {and position is like ..} then
begin
result := KtY_TO_BANK; //Hey, the inventory is full ;)
if Distance(BankToYews[0].x, BankToYews[0].y, GetMyPos.x, GetMyPos.y) < 5 then
result := KtY_CLEAR_INV;
end;
//Check if we are chopping
if KtY_ObjectInReach(id_YEW_TREE, 5) then //1 should do actually
begin
if (GetAnimation = id_ANIM_CUT) then
result := KtY_CUT_YEWS
else
result := KtY_CAN_CUT; //Might do some check for axes here
end;
if KtY_ObjectInReach(id_YEW_STUMP, 5) then //tree is gone,
begin
result := KtY_SWITCH_YEWS;
end;
end;
procedure DepositStuff;
begin
if not loggedin then exit;
if not R_OpenBankBooth('feb') then
begin
writeln( '?? no bank!');
logout;
exit;
end;
R_DepositAllBy('Yew Log');
CloseBank;
end;
procedure LoadArrays;
begin
BankToYews := TPointArray([Point(3012, 3355), Point(3006, 3348),
Point(3006, 3334), Point(3006, 3323),
Point(3019, 3318)]);
YewsToBank := TPointArray([Point(3012, 3355), Point(3006, 3348),
Point(3006, 3334), Point(3006, 3323),
Point(3019, 3318)]);
InvertPath(YewsToBank);
YewTiles[0].x := 2995+random(6);
YewTiles[0].y := 3310+random(6);
YewTiles[1].x := 3018+random(6);
YewTiles[1].y := 3314+random(6);
end;
begin
Smart_Members := True;
Smart_Server := 52;
Smart_Signed := True;
Smart_SuperDetail := False;
setupsrl;
SetupReflection;
DeclarePlayers;
LoadArrays;
repeat
{$IfDef Newcutter}
case ScriptStatus of
KtY_TO_YEWS: WalkPath(BankToYews);
KtY_TO_BANK: WalkPath(YewsToBank);
KtY_CUT_YEWS: FindYew;
KtY_SWITCH_YEWS: SwitchYews;
KtY_CLEAR_INV: DepositStuff; //c-c-c-c-c-COOOMBO BREAKER =D (nothing with yews inside)
end else
begin
writeln('Uhm, IDK wtf ur trying to do, but I can tell you one thing and'+
' that''s that it just doesn''t work');
TerminateScript;
end;
{$Else}
BreakOut := False;
WalkPath(BankToYews);
CurrentYew := 1; //cus of walkpath
repeat
FindNormalRandoms;
if FindYew then
begin
repeat
if random(500) = 1 then BoredHuman;
wait(50+random(200));
if InvFull then break;
until not FindYew;
YewTimeStamps[currentyew] := GetSystemTime;
end;
if not invfull then SwitchYews;
until InvFull;
WalkPath(YewsToBank);
OpenBankFast('feb');
DepositAll;
{$EndIf}
until false;
writeln('omg u r s00 leet');
end.
Here's a bolt enchanter, only works for members and it got me 86 mage.
////////////////////////////////////////////////////////////////////////////////
// E N C H A N T M A B O L T S //
// By testje! //
// Version 0.5.0 //
////////////////////////////////////////////////////////////////////////////////
// //
// This script will enchants bolts at any location. Have some bolts and runes//
// in your inventory, and it'll enchant forever! Or until you're bankrupt.. //
// //
// //
// Requirements: //
// * At least 9 magic //
// * Bolts in the first inventory spots, runes in the rest //
// //
// Please post proggys :) //
////////////////////////////////////////////////////////////////////////////////
program EnchantMaBolts;
const
LogMins = 30; //How often do you want to log out and switch? Script will auto add 10 mins if everything is fine.
YourSRLId = ''; //Your SRL Id, leave blank if you don't know what it is
YourSRLPass = ''; //SRL pass, same as above. (hint, it's used for stats)
Debugmode = false; //True for debugmode (tons of crap in debugbox)
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include srl/srl/skill/magic.scar}
{.include reflection/reflection.simba}
{.include srl/srl/misc/stats.simba}
//Instructions:
// Enter details
// Place bolts in first inventory slot, the rest doesn't matter
// Have fun!
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do //ripped this from bobzilla without permission
begin
Name := ''; //Username
Pass := ''; //Password
Nick := ''; //3-4 non uppercase, number, or space characters on your username
Pin := ''; //Bank Pin (Blank if none)er
Active := True; //Player Active?
Strings[0] := 'diamond'; //Which bolts you gonna enchant?
end;
end;
var
boltsdone, xpdone, OldStackSize, overalltimer, uberlogzor,logtime : integer;
AntibanTimer, AntiBanMark: Array [0..5] of Integer;
procedure debug(s : string);
begin
status(s);
if (Debugmode) then
writeln(s);
end;
function GetBoltFromName(name : string) : integer;
begin
case lowercase(trim(name)) of
'opal' : result := 0;
'sapphire', 'saphire' : result := 1; //Everyone spells this wrong
'jade' : result := 2;
'pearl' : result := 3;
'emerald', 'emmy' : result := 4;
'red topaz', 'topaz' : result := 5;
'ruby' : result := 6;
'diamond', 'dimmy' : result := 7;
'dragonstone', 'dstone' : result := 8;
'onyx' : result := 9;
end;
end;
function GetBoltXPFromID(boltID : integer) : integer;
var
arr : TIntegerArray;
begin
result := -1;
arr := [9, 17, 19, 29, 37, 33, 59, 67, 78, 97];
if (not(InRange(boltid, 0, 9))) then
exit;
result := arr[boltID];
end;
procedure ClickBoltEnchantThingy(boltID : integer);
var
x, y : integer;
spellbox : tbox;
timeouter : integer;
begin
if (not(loggedin)) then
exit;
R_FindRandoms;
FindNormalRandoms;
GameTab(tab_Magic);
if not SpellAvailable(spellbox, 'enchant crossbow bolt') then
begin
writeln('Spell not found! Player going inactive');
Writeln('But first checking for randoms..');
if R_FindRandoms or FindNormalRandoms then
begin
ClickBoltEnchantThingy(boltID);
Exit; //Recursion, look at this coolness ;)
end;
Players[CurrentPlayer].Rand := 'No spell';
logout;
exit;
end;
MouseBox(spellbox.x1, spellbox.y1, spellbox.x2, spellbox.y2, 1);
MarkTime(timeouter);
while not(getcolor(483, 39) = 1909802) do
begin
debug('waiting for dialog to appear');
wait(10);
FindNonInventoryRandoms;
if (TimeFromMark(timeouter) > 45000) then
begin
Writeln('Random checking..');
if R_FindRandoms or FindNormalRandoms then
begin
ClickBoltEnchantThingy(boltID);
Exit; //Recursion, look at this coolness ;)
end;
writeln('Took a year for dialog to pop up, weird..');
Players[CurrentPlayer].Rand := 'No dialog';
LogOut;
end;
end;
if OldStackSize < 10 then
begin
writeln('No bolts found! Maybe you are out of bolts =)');
writeln('Just for reference, stack size is: '+inttostr(GetItemStackSizeAt(1)));
logout;
exit;
end;
if (boltID >= 5) then
x := (boltID mod 5)*93 + 51 //bottom row
else
x := boltID*95 + 45; //Top row, Fagex slightly varies space although there are same amount of bolts top/bottom
y := (boltID div 5) * 131 + 100; //And this is pretty useless, but there is no a ? b | c in Pascal (Lape plz!!)
MouseBox(x{+32}, y{+25}, x+32, y+25, 2);//, {x{+29}{, y{+25}{,}// 2)});
wait(16+random(100)); //human reaction time, and interface might not appear directly
ChooseOption('10'); // ;-)
//MMouse(x,y,0,0);
end;
function DoClawAntiBan: Boolean; //Riped from MageMeFast, thanks KZ!
var
z, c, i, x, y: Integer;
begin
if TimeFromMark(OverallTimer) > 10 * 60000 then
begin
ClearReport;
MarkTime(OverallTimer);
for i := 0 to 5 do
begin
AntibanTimer[i] := Random((i + 1) * i) + 1 + Random(3);
AddToReport('AntibanTimer[' + IntToStr(i) + '] = ' + IntToStr(AntibanTimer[i]));
end;
end;
for i := 0 to 5 do
if TimeFromMark(AntiBanMark[i]) > (AntibanTimer[i] * (60000 + Random(30000))) then
begin
AddToReport('Performing antiban number ' + IntToStr(i));
case i of
0: begin MMouse(RandomRange(0, 760), RandomRange(0, 500), 0, 0); Wait(Random(1500) + Random(500)); end;
1: begin
MMouse(RandomRange(0, 760), RandomRange(0, 500), 0, 0);
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(Random(3000));
MMouse(RandomRange(0, 760), RandomRange(0, 500), 0, 0);
Wait(Random(2000));
end;
2: Wait(Random(15000));
3: begin
repeat
c := Random(13) + 21;
GameTab(c);
Wait(Random(2000));
inc(z);
until z >= 3;
// GameTab(4);
end;
4: BoredHuman;
5: HoverSkill('magic', False);
end;
MarkTime(AntiBanMark[i]);
Result := True;
end;
end;
procedure ForceClawAntiban; //Same as above, but this one leaves out the cool timers
var x, y, c, z : integer;
begin
z := 0;
case random(5) of
0: begin MMouse(RandomRange(0, 760), RandomRange(0, 500), 0, 0); Wait(Random(1500) + Random(500)); end;
1: begin
MMouse(RandomRange(0, 760), RandomRange(0, 500), 0, 0);
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(Random(3000));
MMouse(RandomRange(0, 760), RandomRange(0, 500), 0, 0);
Wait(Random(2000));
end;
2: Wait(Random(15000));
3: begin
repeat
c := Random(13) + 21;
GameTab(c);
Wait(Random(2000));
inc(z);
until z >= 3;
// GameTab(4);
end;
4: BoredHuman;
5: HoverSkill('magic', False);
end;
end;
procedure WaitWhileBeingLeet(boltID : integer); //Anyone up for a better name?
var
howmanyboltswedidduringthiswaitloop : integer; //Clear enough?
TimeOut : integer;
begin
if (not(loggedin)) then
exit;
if random(2) = 1 then ForceClawAntiban;
wait(1000+random(2500));
TimeOut := GetSystemTime;
while (GetItemStackSizeAt(1) > Max(0, OldStackSize-100)) do
begin
if ((GetSystemTime-TimeOut) > 2*60000) then //2 minutes, it usually takes 20 seconds :p
begin
writeln('It''s taking a "bit" too long..');
writeln('First we are going to check for randoms, because it seems they sometimes fail..');
if R_FindRandoms or FindNormalRandoms then
begin
writeln('We DID find a random!');
writeln('Breaking out of loop, antirandoms will log us out if we failed.');
Exit;
end;
LogOut;
Exit;
end;
if R_FindRandoms then break;
if FindNonInventoryRandoms then break; //The only inventory random left is reward box, which should be solved after it does a random??
{if (random(5) = 1) then} DoClawAntiBan; //It was a bit hyperactive because I messed up the initial wait things
wait(200+random(200));
end;
howmanyboltswedidduringthiswaitloop := OldStackSize-GetItemStackSizeAt(1);
IncEx(boltsdone, howmanyboltswedidduringthiswaitloop);
IncEx(Players[currentplayer].Integers[2], howmanyboltswedidduringthiswaitloop);
stats_IncVariable('Bolts Enchanted', howmanyboltswedidduringthiswaitloop);
IncEx(xpdone, (howmanyboltswedidduringthiswaitloop div 10)*GetBoltXPFromID(boltID));
IncEx(Players[currentplayer].Integers[3], (howmanyboltswedidduringthiswaitloop div 10)*GetBoltXPFromID(boltID));
OldStackSize := GetItemStackSizeAt(1); //It's better to set it here, more efficient than at start of function with regards to gametab switching
end;
procedure Report;
var
i : integer; //For player report
begin
SRLRandomsReport;
stats_Commit; //important =)
AddToReport('<=================================================================>');
AddToReport(' Enchant Ma Bolts version 0.5.0');
AddToReport(' Bolting for ' + TimeRunning);
AddToReport(' Bolted '+inttostr(boltsdone div 10)+' times');
try
AddToReport(' At a rate of '+inttostr(round(boltsdone div (( GetTimeRunning div 3600000.0))))+' bolts/hour');
AddToReport(' Getting approx '+inttostr(round(xpdone div (( GetTimeRunning div 3600000.0))))+' xp/hour');
except end; //Should work now
//AddToReport(' Peformed '+inttostr(antibans)+' times an antiban action');
AddToReport('<=================================================================>');
AddToReport(' Name | Lv | XP | Bolts | Active | Random ');
AddToReport(' ---------------+----+---------+--------+--------+--------------- ');
for i := 0 to high(Players) do
AddToReport(' '+Padr(Players[i].Name, 14)+' | '+ //The name
Padz(IntToStr(Players[i].Level[SKILL_MAGIC]), 2) +' | '+ //Level, Padz padds 9 to 09
Padl(IntToStr(Players[i].Integers[3]), 7) + ' | ' + //The XP
Padl(IntToStr(Players[i].Integers[2]), 6) + ' | ' + //Bolts
Padl(BoolToStr(Players[i].Active), 6) + ' | ' + //True or False
Players[i].Rand);
AddToReport('<=================================================================>');
{ Look, imma designer, I first made this \/ then that ^
<=================================================================>
Name | Lv | XP | Bolts | Active | Random
---------------+----+---------+--------+--------+---------------
ImA Pirate yar | 09 | 2460049 | 100000 | False | Cap 'n Arnav
Zezima | 99 | 1337 | 35071 | True | Nolif3r
<=================================================================>
}
end;
var i : integer;
begin
Smart_Members := True;
Smart_Server := 52;
Smart_Signed := True;
Smart_SuperDetail := False;
setupsrl;
SetupReflection;
SetupSRLStats(102, YourSRLId, YourSRLPass);
DeclarePlayers;
LogInPlayer;
wait(5000+random(5000)); //it takes some time to build the interface.
for i := 0 to 5 do //Forgot to copy this one from MMF
MarkTime(AntibanMark[i]);
R_FindRandoms;
FindNormalRandoms;
repeat
logtime := GetSystemTime;
OldStackSize := GetItemStackSizeAt(1); //make this dynamic, baby
uberlogzor := (Logmins*60000)+(random(600) * 1000) + random(1000); //Randomly adds 10 mins,
writeln('Switching/Logging out in '+inttostr(UberLogzor div 60000)+' minutes and '+inttostr(uberlogzor mod 60000 div 1000)+' seconds'); //<3 MMF
repeat
ClickBoltEnchantThingy(GetBoltFromName(players[CurrentPlayer].Strings[0]));
WaitWhileBeingLeet(GetBoltFromName(players[CurrentPlayer].Strings[0]));
if (not(loggedin)) then break;
until((not(loggedin)) or (GetSystemTime-logtime > uberlogzor));
Report;
NextPlayer(LoggedIn);
wait(5000+random(5000)); //idem dito
until false;
writeln('hello world');
writeln(GetItemStackSizeAt(1));
end.
I also got a cool moneymaking script if you want that one, and an awesome aircrafter made with 100% colour!
Edit: Here is the air crafter. 100% colour!!
{
WWWWBgggggggggggggWWW
EWWHggggWF"""""""""""NMgWNWW
EE2HWWWE""""2ZZ22222222%7""HWWWE22
T E S T J E EEQWWWE222ZZZZZZZ22222222222% , JWWWEQ
P R E S E N T S W@gWWEzzgZEEZZZZZZZZZZZZZZZ222cc%-. qWBp
EggWBnZEEZZZEZZZZZZZZZQ2""2E2ZZ22222%-J"WWW@
A I R O EWWFZBBBEEZEBEZEZ@BBEE` `dZZZZ22S2S2 MWHE
M A L E S C O EQNWEEBEEEZZEZZZZE 3E, `@ZZZZ2222, HWH
@WBgBBBEEHEE""""EEi, ""EL, J"Z22ZZS22JWWWW@
A @WWNBEEBEEEb "ZE ""Eg, ZZZZZZ2Zz,qWBgE
@WWNWBEBEHBBg, `3g, 2EZBp, ZZZZZ2222)dWWWE
V E R Y @WWWEEEBEE2`WWW, ?#% ZEZZE- ZZZZZZZZZ)dWWWE
C O O L @WWWWWBEEE2 dP 3#, 3EZZE- ZZZZZZZZZ)dWWWE
A I R C R A F T E R @WBBBBBEE$% dgg,7"^ ZEEZEgp -$EZZZZZZZ)dWWWE
@WWWEEEEBBgggggdF"` ggp,`"ZBE"^ 3@EEZZZZEZ^3WWWE
EEBWWWBBEEBEBWW^ ,qWWC 3WE2` 2EEBBZZdWWEWWE
WWWWWBBNBBB,,,3WWE 3WENWR .,@EEEEZPggNWWEZ
Instructions: WqWWWWBgBBBEEEEE- qgZEE, -gHEEEEEEP"WWBWWW
Start at FEB WFWWWWWWBBBEBBBgggEEE"" qpEEEEEEEEqgWWWBN
Have enough ess in bank EWWWBWWWWWBBBEEBBBBBWmmWmWBBEEEEE22QWWWEE
Fill in the player array EHWWWWWWBEBBEBBEEEEEEEBBEEEEEEQgWWWEWW
Run the script and enjoy :)gWWWWWWWWWWWWBBBWWWWWWWWNgggWWBWWW
WWWWWWWWWWWWWWWWWWBWWWWWWWWW
BBEEEEWWWWWWWWWWWWWWWWWEEE
BBEEEEEEEEEEEEEEEEEEE
}
program AiroMalesco;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
const ManualLadderColor = 0; //Pick if the script fails to do so
CoordFailsafe = false; //False if you are coords paranoid *cough* Harry *cough*, true for longer runtime
LoadsBeforeSwitch = 3; //Number of loads before we switch players/logout+login
DebugLevel = 0; //No need to touch, but useful for scripters
procedure DeclarePlayers;
var i : integer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
Players[0].name := ''; //Your player's Username
Players[0].pass := ''; //His password
Players[0].nick := ''; //The nickname
//Multiplayer fully supported, freel free to add more players!
for i := 0 to HowManyPlayers-1 do
Players[i].active := true; //Set them active
end;
type
TDDTMHandler = record //Record for universal (D)DTM handling
DaDTM : integer; //The (D)DDTM
Modi : TBox; //What to mod to X1, Y1, X2, Y2 etc
end; //I.E. Modi.x1 = 10 will search in mmx1+10, mmy1, mmx2, mmy2 etc.
TWalkStep = record //Record for walking stuff, contains all information in order to click one time
DDTM : TDDTMHandler; //The DDTM, first priority :)
Backuptype : (None, Radialwalking, Coords, Polar); //The backuptype, in case the DDTM fails. None, Radialwalk, Coords or Polar coords
RadiPoint : TPoint; //What are the Start/End radials, or the Coords in cae of Coord failsafe
OtherInfo : TPoint; //The radius and colour, or in case of coords, the randomness.
end;
TWalkRoute = array of TWalkStep; //Looks neater then array of TWalkStep imo ^^
var
ToAltar, ToBank : TWalkRoute; //The WalkRoutes used in the script
TreeColor, LadderColor, //The colours the script uses
dtmRuneEss, dtmAirRune, //Item DTMs
AirsCrafted, Loads, //Report
EssUsed : integer; //Report
////////////////////////////////////////////////////////////////////////////////
// procedure Debug(s : string; level : integer); //
// Will debug string s at level Level, the higher the level the more important//
////////////////////////////////////////////////////////////////////////////////
procedure Debug(s : string; Level : integer);
begin
if (Level >= DebugLevel) then
writeln(s);
Status(s);
end;
////////////////////////////////////////////////////////////////////////////////
// function InAltar : boolean; //
// Returns true if we are in the Altar. Only useful if doubting between out //
// and inside altar. //
////////////////////////////////////////////////////////////////////////////////
function InAltar : boolean;
var
x, y : integer;
begin
x := mmcx;
y := mmcy;
result := False;
if (not(loggedin)) then
exit;
if FindColorSpiral(x, y, TreeColor, mmx1, mmy1, mmx2, mmy2) then
result := (Distance(mmcx, mmcy, x, y) > 30); //Inside the altar, trees are only at the very outside
end;
////////////////////////////////////////////////////////////////////////////////
// function HandleColour(clr: integer) : integer; //
// Enter colour clr, will return it or autocolour it. Useful for failsafe //
// handling. //
////////////////////////////////////////////////////////////////////////////////
function HandleColour(clr : integer) : integer;
begin
result := clr;
if (clr < 0) then
case clr of
-1 : Result := AutoColor(2); //Maybe I'll add more later
-2 : Result := AutoColor(1);
end;
end;
////////////////////////////////////////////////////////////////////////////////
// function FastFindLadderColor: Integer; //
// Finds the colour of the ladder, as SRL's one isn't that good (false pos.) //
////////////////////////////////////////////////////////////////////////////////
function FastFindLadderColor: Integer;
var
i, n, cts:Integer;
p: TPointArray;
ca: TIntegerArray;
pa: array of TPointArray;
W, H: Extended;
b: TBox;
begin
if (not(loggedin)) then
exit;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.225, 6.5);
FindColorsSpiralTolerance(MMCX, MMCY, p, 77925, MMX1, MMY1, MMX2, MMY2, 16);
ColorToleranceSpeed(cts);
pa := SplitTPAEx(p, 2, 2);
SortATPAFromSize(pa, 32, True);
n := High(pa);
for i := 0 to n do
if (Length(pa[i]) > 15) and (Length(pa[i]) < 42) then
begin
ca := GetColors(pa[i]);
ClearSameIntegers(ca);
if (Length(ca) = 1) and (ca[0] > 0) then
begin
b := GetTPABounds(pa[i]);
w := b.x2 - b.x1;
h := b.y2 - b.y1;
if (w > h) then
SwapE(w, h);
if (w = 0) or (h = 0) then Continue;
if (h div w >= 1.12) and (h div w <= 1.8) then
begin
Result := ca[0];
Break;
end;
end;
end;
if (Result > 1) then
WriteLn('LadderColor = '+IntToStr(Result));
end;
////////////////////////////////////////////////////////////////////////////////
// function DoAutoColor : boolean; //
// Will autocolor all the colours (2) necessary to run the script. //
////////////////////////////////////////////////////////////////////////////////
function DoAutoColor : boolean;
var
r, g, b, x, y, oB : integer;
begin
result := false;
if (not(loggedin)) then
exit;
try //Try, Finally block for writeln'ing the colours
if ((ManualLadderColor > 0) and FindColor(x, y, ManualLadderColor, mmx1, mmy1, mmx2, mmy2)) then //Check if the user put in a valid colour
LadderColor := ManualLadderColor
else
LadderColor := FastFindLadderColor;
ColortoRGB(LadderColor, R, G, B); //Convert the colour to RGB values
R := Max(0, R-33); //Substract 33 of the R. I did the max as it should be > 0
G := Max(0, G-3); //Idem
TreeColor := RGBtoColor(R, G, B); //Convert back to a colour and test it
if (FindColor(x, y, TreeColor, mmx1, mmy1, mmx2, mmy2)) then
exit;
oB := B; //If we are here the colour was wrong. We store Blue on variable oldBlue
for B := oB to oB+10 do //For-loop, we add up to 10 to the blue
begin
TreeColor := RGBtoColor(R, G, B); //Make it a colour again and test it
if (FindColor(x, y, TreeColor, mmx1, mmy1, mmx2, mmy2)) then
exit; //Exit out if we found it
end;
writeln(' - Autocoloring FAILED');
writeln(' - Please manually pick the laddercolor, and try to rerun the script');
writeln(' - If it still displays this message after that, take a screenshot, save it as BMP/PNG and send it to Markus');
writeln('TERMINATING SCRIPT');
logout; //Logout so we don't just sit there
RaiseException(erCustomError, 'Autocolouring failed'); //Throw an exception to be sure we terminate
TerminateScript;
finally //The Finally part of Try ... Finally. This will be executed, unless there is a runtime exception ;)
Debug('Treecolor - '+inttostr(treecolor), 1);
Debug('Laddercolor - '+inttostr(laddercolor), 1);
result := true;
end;
end;
procedure MyTakeScreenz(s : string);
var
bc, wi, he : integer;
C : TCanvas;
begin
{$IfNDef Simba} GetClientDimensions(wi, he);
bc := BitmapFromString(wi, he, '');
CopyClientToBitmap(bc, 0, 0, wi-1, he-1);
C := GetBitmapCanvas(bc);
C.brush.Style := bsClear;
C.Font.Name := 'Arial';
C.Font.Color := clRed;
C.Font.Size := 20;
C.Textout(5, 2, 'Treecolor: '+inttostr(TreeColor));
C.TextOut(5, 27, 'Laddercolor: '+inttostr(LadderColor));
SaveBitmap(bc, SRLSavePath+s+' '+timerunning);{$EndIf}
end;
////////////////////////////////////////////////////////////////////////////////
// function WalkTheRoute(route : TWalkRoute) : boolean; //
// Highlevel walking function. Enter a TWalkRoute, and it'll walk. Has built- //
// in failsafe handling. //
////////////////////////////////////////////////////////////////////////////////
function WalkTheRoute(route : TWalkRoute) : boolean;
var
i : integer;
x, y : integer;
begin
result := false; //ALWAYS initialize the result
if (not(loggedin)) then
exit;
for i := 0 to high(route) do //Repeat code below for every step we need to walk
begin
debug('Walking step '+inttostr(i), 0);
if (not(loggedin)) then //Default "failsafe"
exit;
//WaitWhilstLoading;
if DTMRotated(route[i].DDTM.DaDTM, x, y, //Ok, so first we search for the (D)DTM
mmx1+route[i].DDTM.Modi.X1, mmy1+route[i].DDTM.Modi.Y1,
mmx2-route[i].DDTM.Modi.X2, mmy2-route[i].DDTM.Modi.Y2) then
begin
Debug('FOUND STEP '+inttostr(i), 0);
MFF(x, y, 1, 1); //If we found it click
FFlag(0); //Wait
FindNormalRandoms; //And find Randoms ofcourse :p
Wait(500 + random(500)); //Then wait a little bit longer
end else
begin
debug('Failsafe! step '+inttostr(i), 1);
case route[i].BackupType of //If not found, we got a few backup types:
None :
begin
MyTakeScreenz('Failed to walk to step '+inttostr(i));
logout;
exit;
end; //We got none, in that case we'll stop
Radialwalking :
begin
if not RadialWalk(HandleColour(route[i].OtherInfo.y), route[i].RadiPoint.x, route[i].RadiPoint.y, route[i].OtherInfo.x, 1, 1) then
begin
logout;
exit; //We got radialwalk, just handle the radialwalk
end;
end;
Coords: //And we got coords
begin
if (not(CoordFailsafe)) then //For coord-click paranoia people, we got constant they can set :)
begin
logout;
exit;
end;
MFF(route[i].RadiPoint.x, route[i].RadiPoint.y, route[i].OtherInfO.x, route[i].OtherInfo.y);
end;
end;
FFlag(0);
FindNormalRandoms;
Wait(500 + random(500));
end;
end;
result := true;
debug('Walked the route completely :)', 1);
end;
////////////////////////////////////////////////////////////////////////////////
// function ClickRCAltar : boolean; //
// Enters the RC altar, or, when already inside, it'll craft the runes :) //
////////////////////////////////////////////////////////////////////////////////
function ClickRCAltar : boolean;
var
p : TPointArray;
d : T2DPointArray;
i, x, y, t : integer;
Altr : boolean;
begin
result := false;
if (not(loggedin)) then
exit;
Altr := InAltar; //Check if we are in the altar
Debug('In altar: '+booltostr(altr), 0);
repeat //Repeat loop, so we can try it a few times
wait(200 + random(200));
debug('trying to find the altar', 0);
inc(t);
if (t > 5) then
exit;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.82, 0.14); //Set CTS2 mods
while (GetColor(0, 0) = -1) do
Wait(1);
FindColorsSpiralTolerance(mscx, mscy, P, 4410442, MSX1, MSY1, MSX2, MSY2, 20); //Find colours
SetColorspeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1); //No need for OldCTS := GetCTS; CTS(2); CTS(OldCTS) as I have exact control over the script
if (length(p) < 30) then
continue;
d := SplitTPAEx(p, 3, 3); //Split the TPA
SortATPASize(d, true); //Sort by size, biggest one first
for i := 0 to 5 do //Only first give are worth checking lol
begin
MiddleTPAEx(d[i], x, y);
MMouse(x-5, y-5, 10, 10); //yea yea big randomness
wait(200 + random(100)); //Wait til uptext appears
if (Altr) then //If inside altar
begin
if (rs_GetUpText = 'Craft-rune Altar / 2 more options') then //Craft the runes
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
result := true;
FFlag(0);
wait(200 + random(200)); //We might keep moving a little bit after the flag is gone
exit;
end;
end else
begin
if (rs_GetUptext = 'Enter Mysterious ruins / 2 more options') then //Else go inside
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
x := GetSystemTime;
repeat
wait(50 + random(50));
if (GetSystemTime-x > 5000) then
exit;
until(InAltar);
result := true;
exit;
end;
end;
end;
until (t > 5);
end;
////////////////////////////////////////////////////////////////////////////////
// function ClickPortal : boolean; //
// Will click the portal in the RC altar, in order to leave it. //
////////////////////////////////////////////////////////////////////////////////
function ClickPortal : Boolean;
var
t, i, cts, cx, cy: Integer;
tpa: TPointArray;
atpa: T2DPointArray;
begin
Result := False;
if (not(loggedin)) then
exit;
while (GetColor(0, 0) = -1) do
Wait(1);
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.8, 1.28);
for t := 0 to 5 do
begin
if (t > 0) then
Wait(300 + Random(100));
FindColorsSpiralTolerance(mscx, mscy, tpa, 8897739, 1, 1, 515, 337, 12 + t);
atpa := SplitTPAEx(tpa, 7, 7);
if (Length(atpa) < 1) then Continue;
SortATPASize(atpa, True);
if (Length(atpa[0]) < 100) then Continue;
MiddleTPAEx(atpa[0], cx, cy);
FindColorsTolerance(tpa, 8897739, cx - 30, cy -30, cx +30, cy +30, 15);
if (Length(tpa) < 200) then Continue;
MMouse(cx, cy, 6, 6);
Wait(50 + Random(100));
if IsUpText('se Port') then
begin
GetMousePos(cx, cy);
Mouse(cx, cy, 0, 0, true);
i := GetSystemTime;
repeat
wait(50 + random(50));
if (GetSystemTime-i > 5000) then
exit;
until(not(InAltar));
Result := (not(InAltar));
wait(500 + random(1000));
Break;
end;
end;
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(cts);
end;
////////////////////////////////////////////////////////////////////////////////
// function PadWithZero(no, dig : integer) : string; //
// Will add zero's to a number. //
////////////////////////////////////////////////////////////////////////////////
function PadWithZero(no, dig : integer) : string;
var
i : integer;
begin
result := inttostr(no);
for i := 1 to dig-length(inttostr(no)) do
result := '0'+result;
end;
////////////////////////////////////////////////////////////////////////////////
// procedure Report; //
// Will output a progress report :) //
////////////////////////////////////////////////////////////////////////////////
procedure Report;
var
pA : string;
i : integer;
begin
writeln('<=====================================================>');
writeln(' Airo Malesco 3.0, by Testje');
writeln(' We''ve been crafting airs for ' + TimeRunning);
writeln(' We crafted '+inttostr(AirsCrafted)+' airs, using '+inttostr(EssUsed)+' ess.');
writeln('<=====================================================>');
if (HowManyPlayers <= 1) then
begin
writeln(' Our char is '+inttostr(players[currentplayer].level[7])+' Runecrafting');
writeln(' He''s owning the world with this script, as we received '+inttostr(
players[currentplayer].level[7]-players[currentplayer].integers[0])+' levels during this run :)');
end else
begin
writeln(' # | Nick | T/F | Ess | Airs | Level'{ | Lvls gained'}); //Not yet levels gained
for i := 0 to HowManyPlayers-1 do
begin
case Players[i].active of
true : pa := 'T';
false: pa := 'F';
end;
writeln(
' '+PadWithZero(i, 2)+' '+padL(players[i].nick, 4)+' '+pA+' '+
PadWithZero(players[i].integers[1], 5)+' '+PadWithZero(players[i].integers[2], 5)+' '+
padL(inttostr(players[currentplayer].level[7]), 2));
end;
end;
writeln('<=====================================================>');
SRLRandomsReport;
end;
////////////////////////////////////////////////////////////////////////////////
// function OpenBBank : boolean; //
// Basically a wrapper for OpenFEBBank, handles PIN too //
////////////////////////////////////////////////////////////////////////////////
function OpenBBank : boolean;
begin
if (not(loggedin)) then
exit;
OpenBankFast('vwb');
if (PinScreen) then
InPin(Players[currentplayer].pin);
FixBank;
result := BankScreen;
end;
////////////////////////////////////////////////////////////////////////////////
// function HandleBanking : boolean; //
// Deposists airs, withdraws ess =] //
////////////////////////////////////////////////////////////////////////////////
function HandleBanking : boolean;
var
x, y, A : integer;
begin
result := false;
if (not(loggedin or bankscreen)) then //If we aren't in the bank exit;
exit;
if FindDTM(dtmAirRune, x, y, mix1, miy1, mix2, miy2) then
begin
a := ItemAmount('inv', 'dtm', dtmAirRune, []); //Count the air runes
IncEx(Players[currentplayer].integers[2], a);
IncEx(AirsCrafted, a);
IncEx(reportvars[1], a);
Mouse(x, y, 5, 5, false); //Deposit them
ChooseOption('ll');
inc(loads); //Increment amout of loads
end;
if FindDTM(dtmRuneEss, x, y, msx1, msy1, msx2, msy2) then
begin
result := true;
Mouse(x, y, 5, 5, false);
ChooseOption('ll');
end else
begin
writeln(players[currentplayer].name+' doesn''t have any rune ess anymore!');
writeln('Logging out now');
CloseBank;
logout;
exit;
end;
wait(300 + random(200));
a := CountItemsIn('inv', 'dtm', dtmRuneEss, []);
IncEx(EssUsed, a);
IncEx(players[currentplayer].integers[1], a);
IncEx(reportvars[0], a);
if random(3) = 1 then
CloseBank;
end;
////////////////////////////////////////////////////////////////////////////////
// function GenerateWalkSteps : boolean; //
// Will generate the TWalkRoutes necessary for the script :) //
////////////////////////////////////////////////////////////////////////////////
function GenerateWalkSteps : boolean;
var
ToAltarDDTM: array [0 .. 4] of TDTM;
ToBankDDTM: array [0 .. 6] of TDTM;
i : integer;
begin
debug('Generating walking route....', 1);
SetArrayLength(ToAltar, 5);
SetArrayLength(ToBank, 6);
////////////////////////////////////////////////////////////////////////////////
// To Altar DDTM: 1 //
// From: Falador East Bank, best results if standing at bank booth //
// Destination: Between river and Mining Guild //
////////////////////////////////////////////////////////////////////////////////
ToAltarDDTM[0].Mainpoint.x := 611; //1
ToAltarDDTM[0].Mainpoint.y := 145;
ToAltarDDTM[0].Mainpoint.color := 0;
ToAltarDDTM[0].Mainpoint.tolerance := 423; //Max tol
SetArrayLength(ToAltarDDTM[0].subpoints, 3);
ToAltarDDTM[0].SubPoints[0].x := 581;
ToAltarDDTM[0].SubPoints[0].y := 69;
ToAltarDDTM[0].SubPoints[0].color := TreeColor;
ToAltarDDTM[0].SubPoints[0].areasize := 3;
ToAltarDDTM[0].SubPoints[1].x := 611;
ToAltarDDTM[0].SubPoints[1].y := 39;
ToAltarDDTM[0].SubPoints[1].color := TreeColor;
ToAltarDDTM[0].SubPoints[1].areasize := 3;
ToAltarDDTM[0].SubPoints[2].x := 693;
ToAltarDDTM[0].SubPoints[2].y := 97;
ToAltarDDTM[0].SubPoints[2].color := LadderColor;
ToAltarDDTM[0].SubPoints[2].areasize := 3;
ToAltar[0].BackupType := Radialwalking;
ToAltar[0].RadiPoint := IntToPoint(225, 180);
ToAltar[0].OtherInfo := IntToPoint(65, -1);
////////////////////////////////////////////////////////////////////////////////
// To Altar DDTM: 2 //
// From: Between river and Mining Guild //
// Destination: South Falador, near the exit gate //
////////////////////////////////////////////////////////////////////////////////
ToAltarDDTM[1].Mainpoint.x := 622;//2
ToAltarDDTM[1].Mainpoint.y := 148;
ToAltarDDTM[1].Mainpoint.color := 0;
ToAltarDDTM[1].Mainpoint.tolerance := 422; //Max tol
SetArrayLength(ToAltarDDTM[1].subpoints, 2);
ToAltarDDTM[1].SubPoints[0].x := 576;
ToAltarDDTM[1].SubPoints[0].y := 93;
ToAltarDDTM[1].SubPoints[0].color := laddercolor;
ToAltarDDTM[1].SubPoints[0].areasize := 3;
ToAltarDDTM[1].SubPoints[1].x := 676;
ToAltarDDTM[1].SubPoints[1].y := 72;
ToAltarDDTM[1].SubPoints[1].color := laddercolor;
ToAltarDDTM[1].SubPoints[1].areasize := 3;
ToAltar[1].BackupType := Radialwalking;
ToAltar[1].RadiPoint := IntToPoint(135, 225);
ToAltar[1].OtherInfo := IntToPoint(70, -1);
////////////////////////////////////////////////////////////////////////////////
// To Altar DDTM: 3 //
// From: South Falador, near the exit gate //
// Destination: Outside Falador, near the yew tree //
////////////////////////////////////////////////////////////////////////////////
ToAltarDDTM[2].Mainpoint.x := 620;//3
ToAltarDDTM[2].Mainpoint.y := 145;
ToAltarDDTM[2].Mainpoint.color := 0;
ToAltarDDTM[2].Mainpoint.tolerance := 422; //Max tol
SetArrayLength(ToAltarDDTM[2].subpoints, 2);
ToAltarDDTM[2].SubPoints[0].x := 645;
ToAltarDDTM[2].SubPoints[0].y := 81;
ToAltarDDTM[2].SubPoints[0].color := TreeColor;
ToAltarDDTM[2].SubPoints[0].areasize := 3;
ToAltarDDTM[2].SubPoints[1].x := 658;
ToAltarDDTM[2].SubPoints[1].y := 43;
ToAltarDDTM[2].SubPoints[1].color := laddercolor;
ToAltarDDTM[2].SubPoints[1].areasize := 3;
////////////////////////////////////////////////////////////////////////////////
// To Altar DDTM: 4 //
// From: Outside Falador, near the yew tree //
// Destination: North-East of Air Altar //
////////////////////////////////////////////////////////////////////////////////
ToAltarDDTM[3].Mainpoint.x := 581; //4
ToAltarDDTM[3].Mainpoint.y := 127;
ToAltarDDTM[3].Mainpoint.color := 0;
ToAltarDDTM[3].Mainpoint.tolerance := 422; //Max tol
SetArrayLength(ToAltarDDTM[3].subpoints, 3);
ToAltarDDTM[3].SubPoints[0].x := 620;
ToAltarDDTM[3].SubPoints[0].y := 103;
ToAltarDDTM[3].SubPoints[0].color := TreeColor;
ToAltarDDTM[3].SubPoints[0].areasize := 3;
ToAltarDDTM[3].SubPoints[1].x := 613;
ToAltarDDTM[3].SubPoints[1].y := 95;
ToAltarDDTM[3].SubPoints[1].color := TreeColor;
ToAltarDDTM[3].SubPoints[1].areasize := 3;
ToAltarDDTM[3].SubPoints[2].x := 622;
ToAltarDDTM[3].SubPoints[2].y := 68;
ToAltarDDTM[3].SubPoints[2].color := TreeColor;
ToAltarDDTM[3].SubPoints[2].areasize := 3;
////////////////////////////////////////////////////////////////////////////////
// To Altar DDTM: 5 //
// From: North-East of Air Altar //
// Destination: Next to the Air Altar //
////////////////////////////////////////////////////////////////////////////////
ToAltarDDTM[4].Mainpoint.x := 600; //5 / last
ToAltarDDTM[4].Mainpoint.y := 99;
ToAltarDDTM[4].Mainpoint.color := 0;
ToAltarDDTM[4].Mainpoint.tolerance := 422; //Max tol
SetArrayLength(ToAltarDDTM[4].subpoints, 4);
ToAltarDDTM[4].SubPoints[0].x := 607;
ToAltarDDTM[4].SubPoints[0].y := 92;
ToAltarDDTM[4].SubPoints[0].color := TreeColor;
ToAltarDDTM[4].SubPoints[0].areasize := 3;
ToAltarDDTM[4].SubPoints[1].x := 617;
ToAltarDDTM[4].SubPoints[1].y := 106;
ToAltarDDTM[4].SubPoints[1].color := TreeColor;
ToAltarDDTM[4].SubPoints[1].areasize := 3;
ToAltarDDTM[4].SubPoints[2].x := 620;
ToAltarDDTM[4].SubPoints[2].y := 114;
ToAltarDDTM[4].SubPoints[2].color := TreeColor;
ToAltarDDTM[4].SubPoints[2].areasize := 3;
ToAltarDDTM[4].SubPoints[3].x := 614;
ToAltarDDTM[4].SubPoints[3].y := 125;
ToAltarDDTM[4].SubPoints[3].color := TreeColor;
ToAltarDDTM[4].SubPoints[3].areasize := 3;
ToAltar[4].DDTM.Modi.Y1 := 20; //Necessary, against false positives
////////////////////////////////////////////////////////////////////////////////
for i := 0 to 4 do
ToAltar[i].DDTM.DaDTM := AddDTM(ToAltarDDTM[i]);
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// To Bank DDTM: 1 //
// From: The place you'll end up after teleporting out of the altar (SE of it)//
// Destination: A bit to the north of it. //
////////////////////////////////////////////////////////////////////////////////
ToBankDDTM[0].Mainpoint.x := 638; //1
ToBankDDTM[0].Mainpoint.y := 41;
ToBankDDTM[0].Mainpoint.color := 0;
ToBankDDTM[0].Mainpoint.tolerance := 423; //Max tol
SetArrayLength(ToBankDDTM[0].subpoints, 4);
ToBankDDTM[0].SubPoints[0].x := 590;
ToBankDDTM[0].SubPoints[0].y := 86;
ToBankDDTM[0].SubPoints[0].color := TreeColor;
ToBankDDTM[0].SubPoints[0].areasize := 4;
ToBankDDTM[0].SubPoints[1].x := 662;
ToBankDDTM[0].SubPoints[1].y := 89;
ToBankDDTM[0].SubPoints[1].color := TreeColor;
ToBankDDTM[0].SubPoints[1].areasize := 4;
ToBankDDTM[0].SubPoints[2].x := 649;
ToBankDDTM[0].SubPoints[2].y := 119;
ToBankDDTM[0].SubPoints[2].color := TreeColor;
ToBankDDTM[0].SubPoints[2].areasize := 4;
ToBankDDTM[0].SubPoints[3].x := 574;
ToBankDDTM[0].SubPoints[3].y := 51;
ToBankDDTM[0].SubPoints[3].color := TreeColor;
ToBankDDTM[0].SubPoints[3].areasize := 4;
////////////////////////////////////////////////////////////////////////////////
// To Bank DDTM: 2 //
// From: North of the air altar //
// Destination: The Yew Tree //
////////////////////////////////////////////////////////////////////////////////
ToBankDDTM[1].Mainpoint.x := 672; //1
ToBankDDTM[1].Mainpoint.y := 64;
ToBankDDTM[1].Mainpoint.color := 0;
ToBankDDTM[1].Mainpoint.tolerance := 423; //Max tol
SetArrayLength(ToBankDDTM[1].subpoints, 4);
ToBankDDTM[1].SubPoints[0].x := 654;
ToBankDDTM[1].SubPoints[0].y := 66;
ToBankDDTM[1].SubPoints[0].color := TreeColor;
ToBankDDTM[1].SubPoints[0].areasize := 3;
ToBankDDTM[1].SubPoints[1].x := 659;
ToBankDDTM[1].SubPoints[1].y := 99;
ToBankDDTM[1].SubPoints[1].color := TreeColor;
ToBankDDTM[1].SubPoints[1].areasize := 3;
ToBankDDTM[1].SubPoints[2].x := 648;
ToBankDDTM[1].SubPoints[2].y := 126;
ToBankDDTM[1].SubPoints[2].color := TreeColor;
ToBankDDTM[1].SubPoints[2].areasize := 3;
ToBankDDTM[1].SubPoints[3].x := 645;
ToBankDDTM[1].SubPoints[3].y := 117;
ToBankDDTM[1].SubPoints[3].color := TreeColor;
ToBankDDTM[1].SubPoints[3].areasize := 3;
////////////////////////////////////////////////////////////////////////////////
// To Bank DDTM: 3 //
// From: The Yew Tree //
// Destination: The entrance of Falador //
////////////////////////////////////////////////////////////////////////////////
ToBankDDTM[2].Mainpoint.x := 669; //1
ToBankDDTM[2].Mainpoint.y := 49;
ToBankDDTM[2].Mainpoint.color := 0;
ToBankDDTM[2].Mainpoint.tolerance := 423; //Max tol
SetArrayLength(ToBankDDTM[2].subpoints, 3);
ToBankDDTM[2].SubPoints[0].x := 617;
ToBankDDTM[2].SubPoints[0].y := 76;
ToBankDDTM[2].SubPoints[0].color := TreeColor;
ToBankDDTM[2].SubPoints[0].areasize := 3;
ToBankDDTM[2].SubPoints[1].x := 644;
ToBankDDTM[2].SubPoints[1].y := 107;
ToBankDDTM[2].SubPoints[1].color := TreeColor;
ToBankDDTM[2].SubPoints[1].areasize := 3;
ToBankDDTM[2].SubPoints[2].x := 656;
ToBankDDTM[2].SubPoints[2].y := 72;
ToBankDDTM[2].SubPoints[2].color := TreeColor;
ToBankDDTM[2].SubPoints[2].areasize := 3;
////////////////////////////////////////////////////////////////////////////////
// To Bank DDTM: 4 //
// From: The entrance of Falador //
// Destination: Inside Falador, bit north of the entrace next to the tree //
////////////////////////////////////////////////////////////////////////////////
ToBankDDTM[3].Mainpoint.x := 620; //1
ToBankDDTM[3].Mainpoint.y := 37;
ToBankDDTM[3].Mainpoint.color := 0;
ToBankDDTM[3].Mainpoint.tolerance := 423; //Max tol
SetArrayLength(ToBankDDTM[3].subpoints, 3);
ToBankDDTM[3].SubPoints[0].x := 612;
ToBankDDTM[3].SubPoints[0].y := 83;
ToBankDDTM[3].SubPoints[0].color := TreeColor;
ToBankDDTM[3].SubPoints[0].areasize := 3;
ToBankDDTM[3].SubPoints[1].x := 644;
ToBankDDTM[3].SubPoints[1].y := 117;
ToBankDDTM[3].SubPoints[1].color := TreeColor;
ToBankDDTM[3].SubPoints[1].areasize := 3;
ToBankDDTM[3].SubPoints[2].x := 611;
ToBankDDTM[3].SubPoints[2].y := 120;
ToBankDDTM[3].SubPoints[2].color := TreeColor;
ToBankDDTM[3].SubPoints[2].areasize := 3;
////////////////////////////////////////////////////////////////////////////////
// To Bank DDTM: 5 //
// From: Bit north of the Fally south gate //
// Destination: Between the castle tower and mining guild //
////////////////////////////////////////////////////////////////////////////////
ToBankDDTM[4].Mainpoint.x := 630; //1
ToBankDDTM[4].Mainpoint.y := 27;
ToBankDDTM[4].Mainpoint.color := 0;
ToBankDDTM[4].Mainpoint.tolerance := 423; //Max tol
SetArrayLength(ToBankDDTM[4].subpoints, 2);
ToBankDDTM[4].SubPoints[0].x := 651;
ToBankDDTM[4].SubPoints[0].y := 52;
ToBankDDTM[4].SubPoints[0].color := LadderColor;
ToBankDDTM[4].SubPoints[0].areasize := 3;
ToBankDDTM[4].SubPoints[1].x := 585;
ToBankDDTM[4].SubPoints[1].y := 35;
ToBankDDTM[4].SubPoints[1].color := LadderColor;
ToBankDDTM[4].SubPoints[1].areasize := 3;
ToBank[4].BackupType := Radialwalking;
ToBank[4].RadiPoint := IntToPoint(-45, 45);
ToBank[4].OtherInfo := IntToPoint(65, -1);
////////////////////////////////////////////////////////////////////////////////
// To Bank DDTM: 6 //
// From: Between castle tower and mining guild //
// Destination: Falador East Bank :) //
////////////////////////////////////////////////////////////////////////////////
ToBankDDTM[5].Mainpoint.x := 653; //1
ToBankDDTM[5].Mainpoint.y := 34;
ToBankDDTM[5].Mainpoint.color := 0;
ToBankDDTM[5].Mainpoint.tolerance := 423; //Max tol
SetArrayLength(ToBankDDTM[5].subpoints, 3);
ToBankDDTM[5].SubPoints[0].x := 582;
ToBankDDTM[5].SubPoints[0].y := 91;
ToBankDDTM[5].SubPoints[0].color := LadderColor;
ToBankDDTM[5].SubPoints[0].areasize := 3;
ToBankDDTM[5].SubPoints[1].x := 648;
ToBankDDTM[5].SubPoints[1].y := 106;
ToBankDDTM[5].SubPoints[1].color := LadderColor;
ToBankDDTM[5].SubPoints[1].areasize := 3;
ToBankDDTM[5].SubPoints[2].x := 676;
ToBankDDTM[5].SubPoints[2].y := 82;
ToBankDDTM[5].SubPoints[2].color := LadderColor;
ToBankDDTM[5].SubPoints[2].areasize := 3;
ToBank[5].BackupType := Radialwalking;
ToBank[5].RadiPoint := IntToPoint(-45, 45);
ToBank[5].OtherInfo := IntToPoint(65, -1);
////////////////////////////////////////////////////////////////////////////////
for i := 0 to 5 do
ToBank[i].DDTM.DaDTM := AddDTM(ToBankDDTM[i]);
////////////////////////////////////////////////////////////////////////////////
Debug('Walking generated!', 1);
result := true;
end;
////////////////////////////////////////////////////////////////////////////////
// procedure RAMKiller; //
// Will kill the RAM (the hardware, not the person ;) ) by filling it //
// with useless crap like DTMs, Colours, etc. :) //
////////////////////////////////////////////////////////////////////////////////
procedure RAMKiller; //yea I had to do at least ONE weird name ;)
begin
if (not(loggedin)) then
exit;
dtmRuneEss := DTMFromString('78DA63EC63606098C98002E22323183480342' +
'310FF0702C6D940C62C0634C0884402E9E940620901353D406239' +
'01350D40623E0135F5406206013520F74EC5AF060014D50D78');
dtmAirRune := DTMFromString('78DA635CC6C8C0F09401053C7DF8904103480' +
'36518FE0301E36620EB3E031A60442281F41620EB350135CB81AC' +
'CF04D4CC06B2DE12503313C87A885F0D00883C103B');
DoAutocolor;
GenerateWalkSteps;
end;
////////////////////////////////////////////////////////////////////////////////
// procedure SetupScript; //
// Will setup the whole script for you, and owns :p //
////////////////////////////////////////////////////////////////////////////////
procedure SetupScript;
begin
SetupSRL; //Okay, no comments necessary me thinks :)
DeclarePlayers;
LoginPlayer;
RAMKiller;
SetAngle(true);
GetAllLevels;
OpenBBank;
HandleBanking;
end;
begin
SetupScript;
repeat
MakeCompass('n');
report;
WalkTheRoute(ToAltar);
if (not(ClickRCAltar and ClickRCAltar)) then
LogOut;
if (not(ClickPortal)) then
begin
MakeCompass('s');
if (not(ClickPortal)) then
Logout;
MakeCompass('n');
end;
WalkTheRoute(ToBank);
OpenBBank;
HandleBanking;
if ((not(loggedin)) or (loads mod LoadsBeforeSwitch = 0)) then
begin
Report;
if (BankScreen) then
CloseBank;
NextPlayer(loggedin);
GetAllLevels;
end;
until (false);
end.