cycrosism
2009-05-20 11:44:00
6 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Visual Basic, A little bit of Java and PHP
Are you a member of any other communities?
RSbot, Scythe, MoparScape, rs-hacking and Freddy1990.
Tell us about yourself…
From: cycrosism
My name is Mark and for a hobby I enjoy using computers and gardening. In my spare time I go on my computer or tend to my garden which has various plants in it. I also play 2 sports which is Cricket and Basketball.
I got an A in I.T and an A+ in Computer programming last year and I am doing I.T this semester and programming nest semester for this year.
Please show us one (or multiple) of your scripts.
The best progress report posted so far is
Worked for 15 Hours, 23 Minutes and 6 Seconds
Gained 665280 Exp
Chopped 9856 Willows
Gained 10 Levels
//Main Script is below
program Drain_willows; {Version 6.3}
{.include SRL/SRL/Misc/Smart.scar}
{.Include SRL\SRL.SCAR}
Var
logs, logxp, x, y:Integer;
const
member = false; //True if you are autoing in member world
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many players?
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters of name
Players[0].Pin := ''; //bank Pin
Players[0].Booleans[1] := true; //true if using sleep
Players[0].Integers[1] := 10+random(10); //Switch players/relog after how many loads?
Players[0].BoxRewards := ['XP', 'ostume']; //Use the random event box on what?
Players[0].Active := True;
{
Players[1].Name := ''; //username
Players[1].Pass := ''; //password
Players[1].Nick := ''; //3-4 letters of name
Players[1].Pin := ''; //Bank Pin
Players[1].Booleans[1] := true; //true if using sleep
Players[1].BoxRewards := ['XP', 'ostume']; //Use the random event box on what?
Players[1].Active := True;
}{
Players[2].Name := ''; //username
Players[2].Pass := ''; //password
Players[2].Nick := ''; //3-4 letters of name
Players[2].Pin := ''; //Bank Pin
Players[2].Booleans[1] := true; //true if using sleep
Players[2].BoxRewards := ['XP', 'ostume']; //Use the random event box on what?
Players[2].Active := True;
}{
Players[3].Name := ''; //username
Players[3].Pass := ''; //password
Players[3].Nick := ''; //3-4 letters of name
Players[3].Pin := ''; //Bank Pin
Players[3].Booleans[1] := true; //true if using sleep
Players[3].BoxRewards := ['XP', 'ostume']; //Use the random event box on what?
Players[3].Active := True;
}
end;
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(251) of
0: Begin
RandomRClick;
wait(1000+random(1000));
end;
50: HoverSkill('random', False);
100: HoverSkill('Woodcutting', False);
150: RandomMovement;
200: BoredHuman;
250: If (Players[CurrentPlayer].Booleans[1] = true) then
Begin
Writeln('Sleeping');
SleepAndMoveMouse(1000+random(6000));
Writeln('Finished sleeping');
end;
end;
end;
Procedure AntiRandom;
begin
FindNormalRandoms;
If FindFight then
begin
Disguise('Running from fight');
runaway('E',true,1,5000+random(2000));
end;
end;
function FindDirtRoadColorEx: Integer;
var
i, Red, Green, Blue, GC, TestColor: Integer;
P: TPointArray;
begin
GC := 2115926;
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 55);
for i:=0 to High(p)-1 do
begin
if rs_OnMinimap(P[i].x,P[i].y) then
begin
TestColor := GetColor(P[i].x,P[i].y);
ColorToRGB(TestColor, Red, Green, Blue);
if InRange(Red - Blue, 36, 71) then
if InRange(Red - Green, 8, 34) then
if InRange(Green - Blue, 24, 53) then
if GetColor(P[i].x + 2, P[i].y + 2) = TestColor then
if GetColor(P[i].x + 1, P[i].y + 1) = TestColor then
if GetColor(P[i].x, P[i].y + 2) = TestColor then
if GetColor(P[i].x + 2, P[i].y) = TestColor then
if GetColor(P[i].x, P[i].y + 1) = TestColor then
if GetColor(P[i].x + 1, P[i].y) = TestColor then
if GetColor(P[i].x + 2, P[i].y + 1) = TestColor then
if GetColor(P[i].x + 1, P[i].y + 2) = TestColor then
begin
Result := TestColor;
Writeln('Dirt Road Color = '+IntToStr(Result));
exit;
end;
end;
end;
WriteLn('Could not find Dirt Road Color!');
Result := 0;
end;
procedure DeathWalk;
Var
x,y,hometeleDTM,HomeTeleBIT:integer;
begin
HomeTeleDTM := DTMFromString('78DA63FCC3CCC07087910119FCFDF70F4CC34' +
'4197F01D53C4655D3D7FB1955CD4FA09AEBA86AAAAA7EA0AA6160214' +
'ECD03026AFE12E19EAF98FEC2500332E7320135AC40F7DCC6AF06003' +
'B5820DA');
HomeTeleBIT := BitmapFromString(24, 24, 'beNpzMPFwGDKIgYE' +
'RDZFtSF/vZzgi1ShME8gwDdkQUSF9NESkUZiGVFX9gCPijUI2BNkE' +
'NNPgRuF3DLJLTE3y4AjNVVidhMuQv//+QaSADGKMwvQRUBdEO9wcI' +
'IlsFFbfoZkDMQTTHLhRZJgDR2SYQ56/vFysqBXOZMc70A3USocQo5' +
'ANpCRfAM2BGOVsbQhEVMmn5JQbduSXY3Av0K1cJck6sk3AogYAZGI' +
'N/w==');
If not loggedin then exit;
if(not(FindLumbyRoadColor > 0)) then
begin
Writeln('Death walk activated');
GameTab(7);
Disguise('We are lost - Doing death walk');
if FindDTM(HomeTeleDTM, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(X, Y, 10, 10,true);
End else
begin
If (FindBitmap(HometeleBIT,x,y)) then
Begin
Mouse(X+11, Y+10, 10, 10,true);
end;
end;
Wait(500+random(500));
If (FindBlackChatMessage('need to wait')) then
Repeat
Writeln('You need to wait another X minutes to cast this spell');
Logout;
Writeln('Waiting 5 minutes');
wait(60000*5);
Loginplayer;
Gametab(7);
if FindDTM(HomeTeleDTM, X, Y, MIX1, MIY1, MIX2, MIY2) then
Mouse(X, Y, 10, 10,true)
else begin
if(FindBitmap(HometeleBIT, X, Y)) then
Mouse(X+11, Y+10, 10, 10,true)
else
Mouse(571, 228, 12, 12, true);
end;
wait(500+random(500));
Until(not(FindBlackChatMessage('need to wait')));
If (FindBlackChatMessage('need to wait')) then
Repeat
Writeln('You need to wait another X minutes to cast this spell');
Logout;
Disguise('Waiting 5 minutes');
Writeln('Waiting 5 minutes');
wait(60000*5);
Loginplayer;
Gametab(7);
if FindDTM(HomeTeleDTM, X, Y, 557, 214, 605, 259) then
begin
Mouse(X, Y, 10, 10,true);
end else
begin
Mouse(571, 228, 12, 12,true);
end;
wait(500+random(500));
Until(not(FindBlackChatMessage('need to wait')));
FreeDTM(HomeTeleDTM);
FreeBitmap(HomeTeleBIT);
wait(17500+Random(5000));
end else
Disguise('Walking back');
Writeln('Walking Back');
Makecompass('n');
SetAngle(True);
Setrun(true);
RadialRoadWalk(FindLumbyRoadColor, 30, 80, 65, 1, 1);
RadialRoadWalk(FindLumbyRoadColor, 340, 0, 50, 1, 1);
RadialRoadWalk(FindLumbyRoadColor, 270, 345, 60, 1, 1);
RadialRoadWalk(FindLumbyRoadColor, 240, 330, 40, 1, 1);
RadialRoadWalk(FindLumbyRoadColor, 240, 330, 40, 1, 1);
If(FindDirtRoadColorEx > 0) then
begin
RadialWalk(FindDirtRoadColorEx, 200, 310, 65, 1, 1);
RadialWalk(FindDirtRoadColorEx, 200, 310, 65, 1, 1);
RadialWalk(FindDirtRoadColorEx, 200, 310, 65, 1, 1);
RadialWalk(FindDirtRoadColorEx, 200, 310, 65, 1, 1);
RadialWalk(FindDirtRoadColorEx, 180, 300, 65, 1, 1);
RadialWalk(FindDirtRoadColorEx, 180, 300, 65, 1, 1);
RadialWalk(FindDirtRoadColorEx, 180, 300, 65, 1, 1);
end else
begin
Writeln('Player is lost');
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
If(FindRoadColor > 0) then
begin
RadialRoadWalk(FindRoadColor, 270, 360, 60, 1, 1);
RadialRoadWalk(FindRoadColor, 270, 360, 60, 1, 1);
end else
begin
Writeln('Player is lost');
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
Cleardebug;
Writeln('Bank Symbol on screen: '+BoolToStr(FindSymbol(x, y, 'bank')));
SymbolAccuracy := 0.7;
If(FindSymbol(X, Y, 'bank')) then
Begin
Mouse(X, Y, 4, 4, True);
FFlag(10);
Writeln('We returned to the bank');
If (FindWaterColor > 0) then
Begin
If (FindSymbol(X, Y, 'bank')) then
begin
mouse(x-30,y+30,6,6,true);
FFlag(10);
end;
end else
begin
Writeln('No water found on screen');
Writeln('No bank symbol found on screen');
Writeln('Player is lost, Setting to false');
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
end;
FreeDTM(HometeleDTM);
FreeBitmap(HomeTeleBIT);
end;
procedure ChopWillow;
var
CTS, x, y, i, b, xtr: Integer;
Points: TPointArray;
Pointe: TPoint;
Pointers: T2DPointArray;
begin
if not (LoggedIn) then Exit;
Repeat
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(3);
FindColorsSpiralTolerance(MSCX, MSCY, Points, 5865581, MSX1, MSY1, MSX2, MSY2, 5);
ColorToleranceSpeed(CTS);
Pointers := SplitTPA(Points, 4);
SortATPASize(Pointers, True);
b := High(Pointers);
Antirandom;
for i:=0 to b do
begin
Pointe := MiddleTPA(Pointers[i]);
Wait(50+random(50));
MMouse(Pointe.x, Pointe.y, 4, 4);
if IsUpText('illo') then
begin
GetMousePos(X, Y);
Wait(10+random(10));
Mouse(X, Y, 1, 1, True);
Disguise('Chopping');
Wait(2000+random(1000));
MarkTime(xtr);
While (IsUpText('illo')) Do
Begin
If (Not(Loggedin)) Then exit;
wait(500);
Antiban;
Antirandom;
If (FindBlackChatMessage('you are dead')) then
Begin
Writeln('You died');
Disguise('Player is dead! Deathwalk activated');
Deathwalk;
end;
If(TimeFromMark(xtr)>50000) then break;
end;
end;
end;
Until(InvFull);
If(Players[CurrentPlayer].Booleans[0]) Then
Begin
Logs:= Logs+ 28;
Logxp := Round(Logs * 67.5);
End Else
Begin
Logs:= Logs+ 27;
Logxp := Round(Logs * 67.5);
end;
end;
procedure ProgressReport;
Begin
ClearDebug;
Writeln('-------------------------------');
Writeln('Worked for '+TimeRunning);
Writeln('Gained ' + FloatToStr(Logxp) + ' Exp');
Writeln('Chopped '+IntToStr(Logs)+' Willows');
Writeln('-------------------------------');
end;
function WalkingDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..1] of TDTMPointDef;
TempTDTM: TDTM;
begin
AntiRandom;
dtmMainPoint.x := 582;
dtmMainPoint.y := 188;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindWaterColor;
dtmMainPoint.Tolerance := 1;
dtmSubPoints[0].x := 582;
dtmSubPoints[0].y := 188;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindWaterColor;
dtmSubPoints[0].Tolerance := 1;
dtmSubPoints[1].x := 575;
dtmSubPoints[1].y := 178;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindRockColor;
dtmSubPoints[1].Tolerance := 1;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
Procedure WalkToWillow;
Var
WaterRocks:Integer;
begin
If (not(loggedin)) then exit;
Disguise('Walking to the willows');
MakeCompass('N');
FindNormalRandoms;
WaterRocks:= WalkingDDTM;
if FindDTM(WaterRocks, X, Y, MMX1,MMY1,MMX2,MMY2) then
begin
Mouse(X+(33), Y+(4), 6, 6, True);
FFlag(10);
FreeDTM(WaterRocks);
end else
begin
Writeln('DDTM method failed');
FreeDTM(WaterRocks);
wait(500+random(1000));
If (FindWaterColor > 0) then
Begin
If (FindSymbol(X, Y, 'bank')) then
begin
mouse(X-30, Y+30, 6, 6, true);
FFlag(10);
Writeln('Used water and bank symbol method');
end else Writeln('Could not find bank symbol');
wait(500+Random(1000));
if (FindSymbol(x, y, 'fishing spot')) then
begin
Mouse(X, Y, 7, 7, true);
FFlag(10);
end else
DeathWalk;
end else
DeathWalk;
end;
end;
procedure Bank;
begin
if not loggedin then exit;
Setrun(true);
Disguise('Walking to bank');
if (FindSymbol(X, Y, 'bank')) then
begin
FindColor(X, Y, FindRockColor, 627, 8, 698, 161);
Mouse(X+(3), Y-(40), 10, 10, true);
FFlag(10);
OpenBank('db', true, true);
If(Players[CurrentPlayer].Booleans[0]) Then
Begin
DepositAll;
Closebank;
ProgressReport;
End Else
Begin
Deposit(2, 28, True);
CloseBank;
ProgressReport;
end;
end else
begin
Writeln('Looking for bank symbol');
begin
symbolAccuracy := 0.4;
if (FindSymbol(X, Y, 'bank')) then
Begin
Mouse(X, Y, 5, 5, True);
FFlag(7);
OpenBank('db', true, true);
Disguise('Depositing');
If(Players[CurrentPlayer].Booleans[0]) Then
Begin
DepositAll;
Closebank;
ProgressReport;
End Else
Begin
Deposit(2, 28, True);
CloseBank;
ProgressReport;
end;
end else
DeathWalk;
end;
end;
end;
Procedure CheckIfUsingAxe;
begin
Disguise('Auto-detecting axe');
Gametab(4);
MMouse(578, 229, 8, 8);
wait(500);
if(isuptext('hatchet')) then
begin
Writeln('We are not weilding an axe');
Players[CurrentPlayer].Booleans[0] := false;
end else
begin
Gametab(5);
wait(500);
MMouse(585, 305, 8 ,8);
wait(300);
if(isuptext('hatchet')) then
begin
Writeln('Axe is wielded');
Players[CurrentPlayer].Booleans[0] := true;
Gametab(4);
end else
begin
Writeln('No axe found');
Logout;
Players[CurrentPlayer].Active := False;
end;
end;
end;
Procedure SetupSmart;
Begin
Disguise('Loading SMART');
Writeln('Loading SMART');
SmartSetupEx(23, member, true, false);
wait(3000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
Cleardebug;
Writeln('SMART loaded');
Disguise('SMART loaded');
end;
procedure MainLoop;
var
Reps:Integer;
begin
If(not(loggedin)) then loginplayer;
repeat
Reps:=Reps+ 1;
Walktowillow;
ChopWillow;
Bank;
FindLamp('woodcutting');
until(Reps>=Players[0].Integers[1]) or (AllPlayersInactive) or (not(loggedin));
if (AllPlayersInactive) then
begin
Logout;
Cleardebug;
ProgressReport;
Writeln('All players are inactive');
wait(500+random(500));
Writeln('Thank you for using Drain Willows!');
Disguise('Script ended - No players left');
TerminateScript;
end;
If (Reps>=Players[0].Integers[1]) then
begin
Disguise('Switching players');
Reps:=0;
Nextplayer(True);
end;
If(not(loggedin)) then
Begin
If (AllPlayersInactive) then
begin
ClearDebug;
ProgressReport;
Writeln('Player is logged out, failed a random?');
wait(500+random(500));
Writeln('Thank you for using Drain Willows!');
Disguise('Script ended - Not logged in');
TerminateScript;
end else
loginplayer;
end;
end;
Procedure SetupScript;
Begin
Cleardebug;
SetupSRL;
Cleardebug;
SetupSmart;
DeclarePlayers;
If (not(loggedin)) then
begin
Loginplayer;
end;
makecompass('n');
SetAngle(True);
CheckIfUsingAxe;
LampSkill:='woodcutting';
end;
begin
Setupscript;
Repeat
Mainloop;
Until(AllPlayersInactive);
end.