Flight
2011-05-09 23:13:01
How Long have You Played Runescape?
9 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Java, HTML, Pascal (learning as I go)
Are you a member of any other communities?
Yes, but not active.
RuneCMS (XWX)
Sythe (XWX)
Dodian (Wolf)
MoparIsTheBest (Wolf)
Rune-Server (Wolf)
TRiBot (Flight)
Tell us about yourself…
Please show us one (or multiple) of your scripts.
9 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Java, HTML, Pascal (learning as I go)
Are you a member of any other communities?
Yes, but not active.
RuneCMS (XWX)
Sythe (XWX)
Dodian (Wolf)
MoparIsTheBest (Wolf)
Rune-Server (Wolf)
TRiBot (Flight)
Tell us about yourself…
From: Flight
My name is James, I'm 21 and I'll be 22 in August. Originally from US but now living in Indonesia. I worked in aviation for about 2 and a half years, and currently working for… a much more important cause, but I'll leave that out for now. ;)
I have alot of hobbies, mostly for out doors. I LOVE riding bikes, specifically downhill racing, wilderness riding, and a little bit of BMX. I love both swimming and wakeboarding (also still learning). I'm usually a bit of a daredevil, therefore I enjoy paragliding when I have the chance, and had a blast when I went skydiving with a friend.
Indoor hobbies, I have a few. I'm Learning to play the acoustic guitar. I like play a few games every now and then. I have alot of free time on my hands at the moment so I spend some time working with Simba trying out new scripts, experimenting to the best of my knowledge, ect…
I used to be alot into Runescape Private servers when they were in early stages. I created, what I called, Project16 quite a long time ago and it seemed to be the preferred base among servers. This was later replaced by Flight (project name). This is partly where my name comes from.
I have a little bit more information on what all I've done in the RS Cheating community in my post on this thread:
http://villavu.com/forum/showthread.php?t=61521
I suppose that's it, hopefully I'm not leaving out anything majorly important.
Please show us one (or multiple) of your scripts.
program Astralz;
{$define SMART}
{$i srl/srl.scar}
{$i SRL/SRL/Misc/stats.simba}
{$i Reflection/Reflection.simba}
{
~~~To-Do~~~
-pouches and cast npc contact for repair
}
Var
Stage,Exp,Loads,
BreakRounds,RuneCount,
TotalBreaks,EssenceID,
StartXP,OldAmount,
NewAmount,RunePrice,
FoodID: Integer;
Version,Walking: String;
DoTele: Boolean;
Const
SRLStats_Username = '';
SRLStats_Password = '';
BreakIn = 50; //How long before we take a break? (minutes)
BreakFor = 10; //How long will we break for? (minutes)
Bir = 15; //Random minutes to add/subtract from how long until we break
Bfr = 7; //Random minutes to add/subjtract from break duraction
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
With Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
LampSkill := 'farming';
Strings[0] := 'Default'; //'Default' for normal path walking, 'Webwalk' for webwalking (not accurate)
Booleans[0] := True; //Teleport back to the bank or walk
Integers[0] := 385; //Id of food to eat apon low health (Tuna-361,Lobster-379,Monkfish-7946,Shark-385)
Active := True;
end;
end;
Procedure CheckStats;
begin
if ((SRLStats_Username = '') And (SRLStats_Password = '')) then
begin
case MessageBox('No Stats account entered, would you like to set one up?','SRL Stats',mbYesNoCancel) of
mrYes:
begin
OpenWebPage('http://stats.villavu.com/register');
TerminateScript;
end;
mrNo:
begin
SetupSRLStats(115,'Anonymous','anon1337');
Exit;
end;
mrCancel: TerminateScript;
end;
end else
SetupSRLStats(115,SRLStats_Username,SRLStats_Password);
end;
Function CashStringToInt(S: string): Integer; //Thanks TomTuff!
Var
i, ii: Integer;
Numbs: TStringArray;
Temp: string;
begin
Temp := '';
Numbs := ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'k', 'm', 'b'];
for i := 1 to High(S) do
for ii := 0 to High(Numbs) do
if S[i] = Numbs[ii] then
case ii of
0..9: Temp := Temp + Numbs[ii];
10..12:
begin
Result := StrToInt(Temp);
case ii of
10: Result := Result * 100; //Since price is given to 1 decimal,
11: Result := Result * 100000; //instead of multiplying by the entire
12: Result := Result * 100000000; //factor, you must multiply by factor/10
end;
end;
end;
if (Result = 0) then
Result := StrToInt(Temp);
end;
Function GetPrice(ItemID: Integer): Integer;
begin
Result := CashStringToInt(Between('<b>Current guide price:</b>', '<br><br>', GetPage('http://services.runescape.com/m=itemdb_rs/Shark/viewitem.ws?obj=' + ToStr(ItemID))));
end;
{Skeleton by Brak, re-written with bitmaps, yay!}
Procedure TurnAidOff;
Var
x,y,BMP: Integer;
begin
BMP := BitmapFromString(9, 8, 'meJyTkqmSkWuUkqkSl8yWArORuRAR' +
'eaUeCBuCgFy4GknpYggbohLIBcoyMjDgQd0z5gNRdueS8Kwy7+Ri+' +
'9iK0JScv//+wRHDXk4g4pohCEQZx1GkgFxkWWQpNI0AjLpP/A==');
setbitmapname(BMP,'AidButton'); //Don't laugh
if TabExists(tab_Options) then
if GameTab(tab_Options) then
begin
if FindBitmapIn(BMP,x,y,570,410,605,450) then
begin
MMouse(x,y,5,5);
Wait(Random(100));
if WaitUpTextMulti(['oggle', 'ccep', 'cept', ' Aid'], 500) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,True);
Wait(RandomRange(150,250));
Exit;
end;
end;
end;
Gametab(tab_Inv);
FreeBitmap(BMP);
end;
Procedure LoadVars;
Var
Me: TMe;
begin
Me := GetMe;
TurnAidOff;
EssenceID := 7936;
Stage := 0;
Version := '1.2';
RunePrice := GetPrice(9075);
MouseSpeed := RandomRange(14,16);
OldAmount := GetItemStackSizeAt(1);
StartXP := Me.Experience[SKILL_RUNECRAFTING];
Walking := Players[CurrentPlayer].Strings[0];
DoTele := Players[CurrentPlayer].Booleans[0];
FoodID := Players[CurrentPlayer].Integers[0];
end;
Procedure SetInitialCamera;
begin
MakeCompass('N');
SetAngle(true);
if RunEnergy(30) then
SetRun(True);
end;
Function GetStatus: String;
begin
if (Stage = 0) then
Result := 'Running to alter';
if (Stage = 1) then
Result := 'Crafting runes';
if (Stage = 2) then
Result := 'Running to bank';
if (Stage = 3) then
Result := 'Banking';
end;
Procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx, my);
Pic := BitmapFromString(mx, my, '');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1,131072);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;
Procedure OnScreen;
Var
Me: TMe;
RPH,XPH,PPH: Integer;
begin
Me := GetMe;
Exp := Me.Experience[SKILL_RUNECRAFTING] - StartXP;
RPH := Round((RuneCount * 3600) / (GetTimeRunning / 1000));
XPH := Round((Exp * 3600) / (GetTimeRunning / 1000));
PPH := Round(RPH*RunePrice);
PrintOnSmart(['~Astralz '+Version+' (by Flight)~'],Point(15,30),65280);
PrintOnSmart([''+TimeRunning, 'Loads: '+IntToStr(Loads),
'Crafted: '+IntToStr(RuneCount)+' Runes ('+IntToStr(Exp)+' Exp)',
'Runes/H: '+IntToStr(RPH),
'XP/H: '+IntToStr(XPH),
'Profit/H: '+IntToStr(Round(PPH/1000))+'k',
''+GetStatus],Point(10,60),13217481);
end;
Function WithinArea(Xs,Ys,Xe,Ye: integer): Boolean;
Var
MyX,MyY: integer;
begin
MyX := GetMyPos.x;
MyY := GetMyPos.y;
if ((MyX >= Xs) And (MyX <= Xe)
And (MyY >= Ys) And (MyY <= Ye)) then
Result := True
else
Result := False;
end;
Function R_HPPercent: Integer; //By Wizzup?, modified to use reflection
Var
MaxHp: Integer;
ColorString: String;
begin
MaxHP := R_GetSkillLevel('hitpoints');
if (MaxHP > 1) then
Result := Round(GetMMLevels('hp', ColorString) * 10 / MaxHP)
else
Result := -1;
end;
Procedure FailSafes;
begin
if not LoggedIn then Exit;
if(WithinArea(2096,3916,2105,3922) And (R_CountItem(EssenceID)>1)) then //In bank with essence
Stage := 0
else if(WithinArea(2154,3860,2164,3868) And (R_CountItem(EssenceID)>1)) then //At alter with essence
Stage := 1
else if(WithinArea(2154,3860,2164,3868) And (R_CountItem(EssenceID)=0)) then //At alter, no essence
Stage := 2
else if(WithinArea(2096,3916,2105,3922) And (R_CountItem(EssenceID)=0)) then //In bank, no essence
Stage := 3
else
R_FindRandoms;
end;
Procedure Report;
Var
Me: TMe;
begin
ClearDebug;
Me := GetMe;
Exp := Me.Experience[SKILL_RUNECRAFTING] - StartXP;
WriteLn('=-=-=-=-=-=-=-= Astralz by Flight =-=-=-=-=-=-=-=');
WriteLn('Time Running: '+TimeRunning);
WriteLn('Crafted: '+IntToStr(RuneCount)+' runes ('+IntToStr(Exp)+' Exp)');
WriteLn('Loads: '+IntToStr(Loads));
WriteLn('Breaks: '+IntToStr(TotalBreaks));
WriteLn('=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=');
end;
{*******************************************************************************
function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
By: Echo_
Description: Takes brakes according to the minute values entered
*******************************************************************************}
function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
var
w,x,y,z,
RealBTime: integer;
begin
if not LoggedIn then Exit;
FailSafes;
w := (BreakIn * 60000);
x := (BreakFor * 60000);
y := RandomRange(-randBreakIn * 60000, randBreakIn * 60000);
z := RandomRange(-randBreakFor * 60000, randBreakFor * 60000);
if (HowManyPlayers = 1) then
begin
if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
else
if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
begin
if ((Stage = 0) Or (Stage = 3)) then
begin
RealBTime := ((x+z)/60000);
Writeln('Taking a break for about ' + IntToStr(RealBTime) + ' minutes.');
Logout;
Wait((x) + (z));
Writeln('Logging in.');
LoginPlayer;
Result := LoggedIn;
FindNormalRandoms;
IncEx(BreakRounds, (w) + (x));
IncEx(TotalBreaks, 1);
Writeln('The next break will occur in about ' + IntToStr(BreakIn) + ' minutes.');
end;
end;
end;
if (HowManyPlayers > 1) then
begin
if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
else
if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
begin
if ((Stage = 0) Or (Stage = 3)) then
begin
RealBTime := ((x+z)/60000);
Writeln('Taking a break for about ' + IntToStr(RealBTime) + ' minutes.');
Logout;
IncEx(BreakRounds, (w));
IncEx(TotalBreaks, 1);
NextPlayer(True);
Exit;
while (LoggedIn) do Wait((x) + (z));
NextPlayer(True);
LoadVars; //Clear player data for a new player logging in
end;
end;
end;
end;
{*******************************************************************************
Procedure HumanMouse;
By: Flight
Description: Random human-like mouse movement
*******************************************************************************}
Procedure HumanMouse;
var
randSpeed: extended;
x, y, firstSpeed: integer;
begin
case(Random(10000)) of
9901..9999:
begin
firstSpeed := mouseSpeed;
mouseSpeed := RandomRange(3,5);
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
GetMousePos(x, y);
WindMouse(x, y, RandomRange(x - 75, x + 75), RandomRange(y - 75, y + 75),
30, 55, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
mouseSpeed := firstSpeed;
end;
end;
end;
Function CustomRestTo(Energy: Integer): Boolean;
Var
S: string;
begin
Result := (GetMMLevels('run', S) >= Energy);
if (Result) then exit;
SetRest;
while (GetMMLevels('run', S) < Energy) do
begin
Result := IsResting;
if (not(Result)) then exit;
HumanMouse;
end;
end;
//The below function by Iamadam
function WalkPathEx_I(Path: TTileArray; AcceptableDistance, TileRandomness, WaitTime: integer): boolean;
var
I, H, lClick, lClickTime: integer;
ClickPoint: TPoint;
ClickTile: TTile;
begin
Result := (not (LoggedIn));
if (Result) then
Exit;
H := High(Path);
lClickTime := GetSystemTime;
while (DistanceFrom(Path[H]) > AcceptableDistance) do
begin
for I := H downto 0 do
if (TileOnMM(Path[I])) then
Break;
if (not (I = lClick)) then
begin
if ((I = 0) and (not (TileOnMM(Path[0])))) then
begin
Result := False;
Exit;
end;
lClick := I;
ClickTile := RandomizeTile(Path[I], TileRandomness, TileRandomness);
while (not (TileOnMM(ClickTile))) do
ClickTile := RandomizeTile(Path[I], TileRandomness, TileRandomness);
ClickPoint := TileToMM(ClickTile);
Mouse(ClickPoint.x, ClickPoint.y, 1, 1, True);
lClickTime := GetSystemTime;
Wait(WaitTime + Random(1000));
end else
begin
if (GetSystemTime - lClickTime > 1000 * 20) then
begin
WriteLn('Please check your path. The tile at index ' + ToStr(I) + ' is too far from the next tile');
Result := False;
Exit;
end else
Wait(random(1000));
end;
end;
Result := (LoggedIn);
end;
Procedure RunToBank;
Var
Tiles: TTileArray;
begin
if not LoggedIn then Exit;
R_FindRandoms;
FailSafes;
Writeln('Running to Bank');
OnScreen;
Tiles :=[Tile(2147,3864),Tile(2135,3868),
Tile(2122,3876),Tile(2113,3886),
Tile(2113,3900),Tile(2107,3914),
Tile(2099,3918)];
Case LowerCase(Walking) of
'default': WalkPathEx_I(Tiles,2,1,1000);
'webwalk': r_WebWalk(Tile(2099,3918));
end;
Wait(400+Random(200));
Exit;
end;
Procedure TeleToBank;
Var
TP: TPoint;
x,y,x2,
y2,BMP: Integer;
begin
if not LoggedIn then Exit;
R_FindRandoms;
FailSafes;
BMP := BitmapFromString(5, 5, 'meJxjZGBgREWConzMafJAxGkqbCTP' +
'ztsuwTCDAYKQ2chcoGKgLgAZ6AoM');
setbitmapname(BMP,'MagicButton');
if (Not WithinArea(2111,3911,2115,3917)) then
begin
Writeln('Teleporting to Bank');
OnScreen;
GameTab(tab_Magic);
Wait(Random(100));
if FindBitmapIn(BMP,x,y,550,200,720,435) then
begin
MMouse(x,y,5,5);
Wait(Random(100));
if R_WaitUpText('Cast',RandomRange(250,350)) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,True);
Wait(RandomRange(2500,3500));
end;
end;
end else
begin
TP := TileToMM(Tile(2099,3918));
MMouse(TP.x,TP.y,1,1);
Wait(Random(100));
GetMousePos(x2,y2);
Mouse(x2,y2,0,0,True);
While IsMoving do
Wait(50);
Wait(400+Random(200));
end;
FreeBitmap(BMP);
Exit;
end;
Procedure RunToAlter;
Var
Tiles: TTileArray;
begin
if not LoggedIn then Exit;
R_FindRandoms;
FailSafes;
Writeln('Running to the alter');
SetRun(true);
Tiles :=[Tile(2108,3915),Tile(2113,3914),
Tile(2114,3901),Tile(2114,3887),
Tile(2125,3877),Tile(2134,3867),
Tile(2147,3864), Tile(2158,3864)];
Case LowerCase(Walking) of
'default': WalkPathEx_I(Tiles,2,1,1000);
'webwalk': r_WebWalk(Tile(2158,3864));
end;
MakeCompass('Random');
Wait(400+Random(200));
OnScreen;
Exit;
end;
Procedure Bank;
Var
S: String;
Food: TInvItem;
EssGain: Integer;
TBI,TBI2: TBankItem;
begin
if not LoggedIn then Exit;
R_FindRandoms;
FailSafes;
OnScreen;
if (R_HPPercent <= 60) then
begin
if R_OpenBankBooth('mc') then
begin
if (Not R_ItemExistsInBank(FoodID,TBI)) then
begin
Writeln('Could not find food, terminating.');
CloseBank;
Report;
OnScreen;
Logout;
TerminateScript;
Exit; //Is this even needed?
end else
begin
R_WithdrawItem(FoodID,5);
CloseBank;
While (R_HPPercent <= 90) do
begin
if R_ItemExists(FoodID,Food) then
begin
R_ClickItem(Food.slot,True,'');
Wait(RandomRange(1000,1300));
end;
end;
end;
end;
end else if R_OpenBankBooth('mc') then
begin
if ((R_BankScreen) And (Not R_ItemExistsInBank(EssenceID,TBI2))) then
begin
Writeln('Out of essence!');
CloseBank;
Report;
OnScreen;
Logout;
TerminateScript;
Exit; //Is this even needed?
end;
if R_ItemExists(FoodID,Food) then //Food left over from eating
R_DepositAllBy(FoodID);
R_WithdrawItem(EssenceID,0);
if (R_CountItem(EssenceID) >= 26) then
begin
OnScreen;
EssGain := (NewAmount-OldAmount);
stats_IncVariable('Astral Runes (Crafted)',EssGain);
Stats_Commit;
if (EssGain > 0) then
IncEx(RuneCount,EssGain);
if (GetMMLevels('run',S) <= 40) then
begin
CustomRestTo(100);
end else
begin
SetRun(True);
Stage := 0;
Inc(Loads);
OnScreen;
OldAmount := GetItemStackSizeAt(1);
end;
end;
end;
Report;
end;
Procedure CraftRunes;
Var
S: String;
TP: TPoint;
x,y: Integer;
begin
if not LoggedIn then Exit;
FailSafes;
R_FindRandoms;
TP := TileToMS (Tile(2158,3864),0);
While IsMoving do
Wait(50);
MMouse(TP.x,TP.y,5,5);
Wait(RandomRange(200,300));
if R_WaitUpTextMulti(['Craft-rune','Alter'],RandomRange(250,350)) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,True);
if DidRedClick then
begin
While IsMoving do
Wait(50);
Wait(RandomRange(2500,3500));
if DoTele then
begin
OnScreen;
if (R_CountItem(EssenceID)=0) then
NewAmount := GetItemStackSizeAt(1);
end else if Not DoTele then
begin
if (GetMMLevels('run',S) <= 40) then
begin
CustomRestTo(100);
end else
begin
SetRun(True);
OnScreen;
if (R_CountItem(EssenceID)=0) then
NewAmount := GetItemStackSizeAt(1);
end;
end;
end;
end;
Wait(RandomRange(200,300));
end;
Procedure TheAlmightyLoop;
begin
if not LoggedIn then LoginPlayer;
R_FindRandoms;
FailSafes;
if (Stage = 0) then
RunToAlter
else if (Stage = 1) then
CraftRunes
else if ((Stage = 2) And (Not DoTele)) then
RunToBank
else if ((Stage = 2) And (DoTele)) then
TeleToBank
else if (Stage = 3) then
Bank;
end;
begin
AddOnTerminate('Report');
Smart_Server := 103;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
SetupReflectionEX(True);
DeclarePlayers;
LoadVars;
ClearDebug;
CheckStats;
if not LoggedIn then LoginPlayer;
SetInitialCamera;
OnScreen;
repeat
BreakHandler(BreakIn,BreakFor,Bir,Bfr);
TheAlmightyLoop;
until (False); //Or all players inactive?
end.