Geo
2011-04-26 20:35:39
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?
PHP, xHTML, CSS, MySQL.
Are you a member of any other communities?
No.
Tell us about yourself…
Please show us one (or multiple) of your scripts.
5 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
PHP, xHTML, CSS, MySQL.
Are you a member of any other communities?
No.
Tell us about yourself…
From: Geo
I'm not very good at talking about myself, but here goes nothing..
I'm Daniel and I'm 18. I'm interested anything that floats my boat. For example I like fishing, football/soccer, programming, learning something new every day.
I recently graduated High School and I'm currently waiting for my citizenship/ Work authorization so I can start working and hopefully enroll in college.
I started programming/coding at 13 in IRC using MSL making way to many Aliases, haha. I was intrigued how someone built a bot, like RuneScript, from nothing and it really made me want to find out how to do that by myself. So, I kept bugging my friend on IRC to teach me and finally he did after 2-3 months I managed to get my first script working.
After that I started to move onto web development and runescape botting. I joined when Villavu was SRL-Forums.com in 2007 and was a noob at everything. I attempted to learn SRL/SCAR but was to incompetent and didn't even understand how Writeln(); worked.
I went inactive in 2008 and gave up on RS botting and focused on learning HTML/CSS/PHP within 2 years I'd become profficient in CSS/HTML and started to focus more on PHP I built a bunch of websites that didn't really go anywhere I also started to build a "Mafia wars" style game which I kind of put off after a while to begin another project and never got around to working on it again.
Check it out if you want:
http://fimbored.com/code/
NOTE: It's kind of messy.
After that I came back to Villavu and have been lurking for the past 2 months feeding my brain and testing/messing with different functions/procedures and actually started to understand what they did.
And now I'm here. :)
Please show us one (or multiple) of your scripts.
program PortSarimJailChopper;
//{$DEFINE SPS}
{$DEFINE SMART}
{$i srl/srl.scar}
{$i srl/srl/misc/paintsmart.scar}
{$i srl/srl/misc/stats.simba}
{$i reflection/reflection.simba}
var
a, Ma, p, i, j, k, x1, y1, x2, y2, GTr, rr, t, s, u, v, w, x,
GST, GCT, GFT, CutWillows, WillowsCut,
TimesBanked, SwitchAConvert : integer;
MyTPA, MyTPA0, MyTPA1, MyTPA2, MyTPA3 : TPointArray;
MyPoint : TPoint;
IsEquip : string;
const
{User Const------------------------------------------------------------------}
Switch = True; //Do you wish for your characters to Switch after x minutes or run until false?
SwitchA = 60; //How long until switching characters, in minutes.
Resting = False; //Rest if run energy is <25% after banking?
PaintDebug = False; {Do you want to see the colours the script is finding as it runs.
Can be stopped at anytime using the "Disable debug" button in SMART.
WARNING: this may cause memory leaks, Use only if necessary.}
{Script Starts here----------------------------------------------------------}
procedure DeclarePlayers;
Begin
HowManyPlayers := 2; //How many players in the script.
CurrentPlayer := 0; //Current player in the Players array.
NumberOfPlayers(HowManyPlayers);//Don't change.
with Players[0] do
Begin
Name := ''; //Player Username
Pass := ''; //Player Password
Active := True;//Active?
Pin := ''; //Bank Pin
IsEquip := 'I'; //Is your hatchet in your Inv(I) or is it Equiped(E)?
End;
with Players[1] do
Begin
Name := ''; //Player Username
Pass := ''; //Player Password
Active := True;//Active?
Pin := ''; //Bank Pin
IsEquip := 'I'; //Is your hatchet in your Inv(I) or is it Equiped(E)?
End;
{with Players[2] do
Begin
Name := ''; //Player Username
Pass := ''; //Player Password
Active := True; //Active?
Pin := ''; //Bank Pin
End;}
End;
{Script Procedures/Functions---------------------------------------------------}
Function iDebug(status : string) : string;
Begin
Writeln('[' + Players[CurrentPlayer].Name + '] :::: ' + status);
End;
Function SwitchTime: Boolean;
Begin
if (HowManyPlayers <= 1) then
Begin
Result := False;
Exit;
End;
if (not Switch) then
Exit else
SwitchAConvert := SwitchA * 60000 + Random(300000);
GST := t + SwitchAConvert;
GCT := GetSystemTime;
GFT := GST - GCT;
if (GFT <= 0) then
Begin
Result := True;
End else
Result := False;
//iDebug(GFT);
End;
Procedure EndPlayer;
Begin
iDebug('Player is stuck in a random or lost, setting player to False.');
//Players[CurrentPlayer].Active := False;
Logout;
//iDebug('Logging in: ' + Players[CurrentPlayer].Name);
NextPlayer(False);
s := 1;
End;
Procedure SwitchPlayer;
Begin
MarkTime(t);
GCT := GetSystemTime;
SwitchAConvert := SwitchA * 60000 + Random(300000);
iDebug('Switching players.');
Logout;
Wait(500+Random(250));
NextPlayer(true);
iDebug('Logging in player: ' + Players[CurrentPlayer].Name);
Inc(p);
s := 1;
Exit;
End;
Procedure ProgressReport;
Begin
if (IsEquip = 'I') then
CutWillows := 27 else
CutWillows := 28;
WillowsCut := CutWillows + WillowsCut;
Inc(TimesBanked);
ClearDebug;
Writeln('*----------------------------------------------*');
Writeln('* Jail Chopper[Willows] *');
Writeln('* v0.1 | Created by Geo *');
Writeln('*----------------------------------------------*');
Writeln(' Current Player: ' + Players[CurrentPlayer].Name);
Writeln(' -------------------------------------------- ');
Writeln(' Running for ' + TimeRunning);
Writeln(' Switching in ' + MsToTime(GFT, Time_Formal));
Writeln(' Times Switched: ' + IntToStr(p));
Writeln(' Willows Cut: ' + IntToStr(WillowsCut) + ' | Times Banked: ' + IntToStr(TimesBanked));
Writeln('*----------------------------------------------*');
End;
{Player Procedures/Functions---------------------------------------------------}
Function f_FindHatchet(Col1, Col2, Tol : Integer; debug2, uText: string) : Boolean;
Begin
for u := 0 to 1 do
repeat
FindColorsSpiralTolerance(x1, y1, MyTPA0, Col1, MIX1, MIY1, MIX2, MIY2, Tol);
if Length(MyTPA0) = 0 then
FindColorsSpiralTolerance(x1, y1, MyTPA0, Col2, MIX1, MIY1, MIX2, MIY2, Tol);
for i := 0 to High(MyTPA0) do
MyPoint := MyTPA0[i];
if (PaintDebug) then
Begin
iDebug('In ur computaar, paintin on ur screenz');
smart_DrawDots(MyTPA0);
End;
MMouse(MyPoint.x, MyPoint.y, 2, 3);
inc(u);
Wait(750+Random(200));
Exit;
Until(u >= 1);
if (IsUptext(uText)) then
Begin
Result := True;
//iDebug('Uptext found, exiting...');
Exit;
End;
Result := False;
Exit;
End;
Procedure FindHatchet;
Begin
for a := 0 to 1 do
Begin
repeat
Gametab(26);
Wait(700);
inc(a);
if (f_FindHatchet(1003631, 1002085, 4, +
'Uptext matches, We do indeed have a hatchet.', 'hatchet')) then
Begin
iDebug('#' + IntToStr(a) + ' ::: Hatchet not found.');
IsEquip := 'E';
s := 2;
Exit;
End;
iDebug('#' + IntToStr(a) + ' ::: Hatchet found.');
if (IsUptext('hatchet')) then exit;
until(a >= 1);
End;
for s := 0 to 1 do
Begin
repeat
Gametab(25);
Wait(700);
inc(s);
if (f_FindHatchet(1003631, 1002085, 4, +
'Uptext matches, We do indeed have a hatchet.', 'hatchet')) then
Begin
iDebug('#' + IntToStr(s) + ' ::: Hatchet isn''t in your inv');
IsEquip := 'I';
s := 2;
Exit;
End;
iDebug('#' + IntToStr(s) + ' ::: Hatchet is in your inv');
if (IsUptext('hatchet')) then exit;
Until(s >= 1);
iDebug('Hatchet not found.. Logging out..');
EndPlayer;
End;
End;
Procedure RandomCheck;
Begin
//iDebug('Checking for randoms...');
r_FindRandoms;
if (r_FindRandoms) then
Begin
k := 0;
iDebug('k :=' + IntToStr(k) + ' :: Stops char from doing nothing when out of random');
End;
Wait(250+Random(250));
End;
Function ToBank: TPointArray;
//Reflection tiles for walking to the bank.
Begin
SetLength(Result, 7);
Result[0] := Point(3029, 3175);
Result[1] := Point(3025, 3188);
Result[2] := Point(3019, 3202);
Result[3] := Point(3028, 3212);
Result[4] := Point(3029, 3226);
Result[5] := Point(3033, 3234);
Result[6] := Point(3046, 3234);
End;
Function ToWillow: TPointArray;
Begin
//Reflection tiles for the walk to the willows.
SetLength(Result, 7);
Result[0] := Point(3046, 3234);
Result[1] := Point(3033, 3234);
Result[2] := Point(3029, 3226);
Result[3] := Point(3028, 3212);
Result[4] := Point(3019, 3202);
Result[5] := Point(3025, 3188);
Result[6] := Point(3029, 3175);
End;
Procedure CheckEnergy;
Begin
r_FindRandoms;
if (Resting) then
Begin
iDebug('Resting...');
if (not RunEnergy(50)) then
RestUntil(50) else
SetRun(True);
End else
Exit;
End;
Procedure FindDbox;
Begin
//Finds the deposit box and banks the willows.
repeat
repeat
Begin
FindColorsSpiralTolerance(x1, y1, MyTPA3, 5990774, MSx1, MSy1, MSx2, MSy2, 2);
if Length(MyTPA) = 0 then
FindColorsSpiralTolerance(x1, y1, MyTPA3, 3160127, MSX1, MSY1, MSX2, MSY2, 3);
for i := 0 to High(MyTPA3) do
MyPoint := MyTPA3[i];
if (PaintDebug) then
Begin
iDebug('In ur computaar, paintin on ur screenz');
smart_DrawDots(MyTPA3);
End;
MMouse(MyPoint.x, MyPoint.y, 2, 3);
iDebug('Finding Bank deposit #1');
Wait(750+Random(200));
End;
Until(IsUpText('Deposit') or (R_DepositBoxScreen));
Begin
Mouse(MyPoint.x, MyPoint.y, 2, 3, false);
wait(200+Random(250));
ChooseOption('Deposit');
iDebug('Opening bank deposit #2');
Wait(2000+Random(250));
r_FindRandoms;
Wait(1500);
End;
Until(R_DepositBoxScreen);
iDebug('Deposit box Screen is open, banking...');
repeat
Begin
FindColorsSpiralTolerance(x1, y1, MyTPA2, 1325891, MSx1, MSy1, MSx2, MSy2, 2);
if Length(MyTPA2) = 0
then FindColorsSpiralTolerance(x1, y1, MyTPA2, 3887704, MSX1, MSY1, MSX2, MSY2, 2);
for i := 0 to High(MyTPA2) do
MyPoint := MyTPA2[i];
if (PaintDebug) then
Begin
iDebug('In ur computaar, paintin on ur screenz');
smart_DrawDots(MyTPA2);
End;
MMouse(MyPoint.x, MyPoint.y, 2, 3);
iDebug('Found Willow log TPA, checking uptext...');
Wait(750+Random(200));
End;
Begin
Mouse(MyPoint.x, MyPoint.y, 2, 3, false);
iDebug('Uptext matches, banking..');
ChooseOption('All');
Wait(2000+Random(250));
CloseWindow;
Wait(1000+Random(250));
R_DropItemsBut('hatchet');
//iDebug(InvCount);
r_FindRandoms;
End;
Wait(200);
Until(InvCount <= 1);
Wait(450+Random(250));
if (SwitchTime) then
SwitchPlayer;
CheckEnergy;
ProgressReport;
End;
Procedure Findwillow;
//The procedure to find and click a willow.
Begin
x := InvCount;
GetMousePos(x2, y2);
repeat
Begin
FindColorsSpiralTolerance(x1, y1, MyTPA, 4415564, MSx1, MSy1, MSx2, MSy2, 6);
if Length(MyTPA) = 0 then FindColorsSpiralTolerance(x1, y1, MyTPA, 4485726, MSX1, MSY1, MSX2, MSY2, 7);
for i := 0 to High(MyTPA) do
//oegybedam
MyPoint := MyTPA[i];
a := InvCount;
Ma := a + 1;
if (x2 = MyPoint.x) or (y2 = MyPoint.y) then
Begin
iDebug('Mouse is in the same position, exiting..');
Wait(1500+Random(250));
Exit;
End;
if (PaintDebug) then
Begin
iDebug('In ur computaar, paintin on ur screenz');
smart_DrawDots(MyTPA);
End;
MMouse(MyPoint.x, MyPoint.y, 0, 0);
iDebug('Finding Willow#1 complete');
if (IsUpText('Oak')) then
Begin
iDebug('Both Willows gone, waiting...');
Wait(1500+Random(250));
Exit;
End;
Wait(400+Random(250));
End;
Until(IsUptext('Willow'));
Begin
for j := 0 to 5 do
repeat
Mouse(MyPoint.x, MyPoint.y, 0, 0, true);
iDebug('Clicked Willow#2 complete' + ' ::: #' + IntToStr(j));
//Writeln(MyPoint);
//iDebug('a: ' + IntToStr(a) + '** Ma:' + IntToStr(Ma));
WaitInvMinCount(Ma, 30000);
//iDebug(IntToStr(a) + '=' + IntToStr(InvCount));
Exit;
Until(InvCount > a) or (j >= 5);
if (j >= 5) then
Begin
iDebug('Clicking willow timed out. j >= 5');
Exit;
End;
RandomCheck;
End;
End;
{Failsafe Procedures/Functions-------------------------------------------------}
Function NoWillow : Boolean;
Begin
//Checks to see if stump colours are visible, if true then runs procedure FindWillow;
FindColorsSpiralTolerance(x1, y1, MyTPA1, 4876933, MSx1, MSy1, MSx2, MSy2, 2);
if Length(MyTPA1) = 0 then FindColorsSpiralTolerance(x1, y1, MyTPA1, 4810624, MSX1, MSY1, MSX2, MSY2, 2);
for i := 0 to High(MyTPA1) do
MyPoint := MyTPA1[i];
if (Length(MyTPA1) <= 1) then
Result := false else
Result := true;
//iDebug(MyTPA1);
Wait(400);
End;
Procedure DoCheck;
Begin
//Random Checks for the following:
//to see if we are at PS with a full inv. Result : Banks;
//if everything is in order then it walks to the willows.
if (InvCount >= 2) then
for w := 0 to 5 do
Begin
repeat
inc(w);
SetRun(True);
iDebug('InvCount >= 2 or = 28, Banking... #' + IntToStr(w));
WalkPath(ToBank);
if (DistanceFrom(Tile(3047, 3239)) < 7) then
Begin
iDebug('Made it to the Bank, exiting..');
FindDbox;
Exit;
End;
Until(w >= 5);
if (w >= 5) then EndPlayer;
End;
for x := 0 to 5 do
Begin
repeat
inc(x);
iDebug('Attempt ' + IntToStr(x) + ' at walking to the Willows');
WalkPath(ToWillow);
if (DistanceFrom(Tile(3028, 3175)) < 4) then
Begin
iDebug('Made it to the Willows, exiting..');
FindWillow;
Exit;
End;
Until(x >= 5);
if (x >= 5) then EndPlayer;
k := 0;
End;
End;
Procedure Antiban;
Begin
GTr := RandomRange(21,37);
rr := RandomRange(1,17);
if (rr = 5) or (rr = 15) then
Begin
Case Random(5000) of
0..1000 : RandomRClick;
1001..2000 : HoverSkill('Woodcutting', false);
2001..3000 : RandomMovement;
3001..4000 : GameTab(GTr);
4001..5000 : PickUpMouse;
End;
End;
End;
Function PlayerLost: boolean;
Begin
if(not (TileOnMM(Tile(3029, 3175)))) then
Begin
if (TileOnMM(Tile(3046, 3234))) then
Begin
Result := False;
Exit;
End;
iDebug('Tile(3046, 3234) is not on the MM. Switching Player..');
iDebug('Reason: Lost.');
Result := true;
s := 1;
Exit;
End else
Result := False;
Exit;
End;
Procedure MainLoop;
Begin
for k := 0 to 20 do
repeat
if (LobbyScreen) then
LeaveLobby;
if (not LoggedIn) then LoginPlayer else
if (PlayerLost) then
Begin
EndPlayer;
End else
Begin
if (InvCount = 28) then
Begin
DoCheck;
End else
if (k > 0) then
Begin
iDebug('oInvCount: ' + IntToStr(x) + ' :: cInvCount:' + IntToStr(invcount));
if (InvCount = x) then
Begin
Inc(k);
iDebug('Inv hasn''t grown over time, Finding Willow.');
FindWillow;
End else
End;
if (k = 0) or (NoWillow) then
Begin
if (DistanceFrom(Tile(3029, 3175)) > 5) then
Begin
DoCheck;
End else
Inc(k);
FindWillow;
End else
Inc(k);
AntiBan;
iDebug('Performing AntiBan...');
iDebug('Wait While Cutting...' + IntToStr(k));
if (InvCount = 28) then
Begin
DoCheck;
End else
LevelUp;
RandomCheck;
Wait(2000+random(650));
End;
until(k >= 20);
End;
Begin
Smart_Server := 152;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
MarkTime(t);
r_SetupRandoms;
SetupSRL;
ClearDebug;
DeclarePlayers;
if (LobbyScreen) then
LeaveLobby;
if (not LoggedIn) then LoginPlayer else
iDebug('Already Logged in..');
Begin
r_SetupRandoms;
iDebug('Setup...');
SetAngle(true);
MakeCompass('N');
v := 1;
//Writeln(v);
repeat
if (LobbyScreen) then
LeaveLobby;
Wait(600);
if (not LoggedIn) then LoginPlayer;
RandomCheck;
SetAngle(true);
MakeCompass('N');
if (v <= 1) then
Begin
v := 2;
//Writeln(v);
FindHatchet;
Wait(400);
DoCheck;
End;
//Checks for a full inv;
if (InvCount = 28) then
Begin
//iDebug('InvCount = 28, banking...');
SetRun(True);
DoCheck;
End else
//Checks if the player is at Willow or Deposit Box;
if (DistanceFrom(Tile(3047, 3239)) < 7) then
Begin
RandomCheck;
DoCheck;
End else
MainLoop;
Until(AllPlayersInactive);
//Shows final progress report after AllPlayersInactive;
ProgressReport;
iDebug('Thanks for using Jail Chopper');
iDebug('Post your progress reports or bugs here: villavu.com/forum/showthread.php?p=801961');
TerminateScript;
End;
End.