Rubix
2009-01-12 20:10:20
<!– BEGIN TEMPLATE: formanswers –>
Rubix - SRL Member Application Form
Rubix
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Visual Basic
Other Communitys
Sythe, Scunerape
How Long have You Played Runescape
2-3 Years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I'm 14, I live in The US of A. To be specific Iowa. I listen to music from 60's-80's, no new crap please, except Linkin Park. Have gotten to home w/ a girl :D. I play Basketball, Cross Country, and Track. Im 121.4 Pounds, and im 5' 8". Started SRL from a link from Sythe. Started the week SRL 4 Beta was released, and I was all nub like 'WTF include errors, fix pl0x' :D. I Often play Airsoft and Paintball with the neighborhood kids.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
——————————————————
<!– END TEMPLATE: formanswers –>
Rubix - SRL Member Application Form
Rubix
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Visual Basic
Other Communitys
Sythe, Scunerape
How Long have You Played Runescape
2-3 Years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I'm 14, I live in The US of A. To be specific Iowa. I listen to music from 60's-80's, no new crap please, except Linkin Park. Have gotten to home w/ a girl :D. I play Basketball, Cross Country, and Track. Im 121.4 Pounds, and im 5' 8". Started SRL from a link from Sythe. Started the week SRL 4 Beta was released, and I was all nub like 'WTF include errors, fix pl0x' :D. I Often play Airsoft and Paintball with the neighborhood kids.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
program SecretWoodCutter;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\Woodcutting.scar}
var
WoodCut, Ent : Integer;
Loads, LoadsDone, Dloads : Integer;
WillowLog, WalkDDTM : Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 2;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Integers[0] := 5; //loads to cut. RANDOM 6 IS ADDED
Players[0].Integers[1] := 64; //time to wait before re-clicking tree (miliseconds)
Players[0].Active := True;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Integers[0] := 5; //loads to cut. RANDOM 6 IS ADDED
Players[1].Integers[1] := 124124; //time to wait before re-clicking tree (miliseconds)
Players[1].Active := True;
end;
procedure Setup;
begin
WillowLog := DTMFromString('78DA631464666098C6C8800C5CED24C0344C9' +
'4511CA8A60B550D4C16AE8611A8662A0135EC40350B08A89105AA' +
'994D400D2B504D1F7E3500593E0495');
SetUpSrl;
ActivateClient;
DeclarePlayers;
LoginPlayer;
SetRun(True);
end;
function LogCount: Integer;
begin
if not LoggedIn then Exit;
GameTab(4);
Result := CountItems(WillowLog, 'DTM', []);
end;
procedure ProgressReport;
begin
WoodCut := WoodCut + LogCount;
cleardebug;
writeln ('No errors for ' + TimeRunning);
writeln ('Chopped ' +IntToStr(WoodCut));
WriteLn ('Avoided ents ' +IntToStr(EntsAvoided));
end;
function FindBankFloorColor: Integer;
var
i, Red, Green, Blue, GC, TestColor: Integer;
P: TPointArray;
begin
if not LoggedIn then Exit;
GC := 6847874;
FFlag(0);
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 40);
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, 6, 11) then
if InRange(Red - Green, 7, 12) then
if InRange(Green - Blue, -3, 3) 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('Catherby Bank Floor Color is = '+IntToStr(Result));
exit;
end;
end;
end;
WriteLn('Catherby Bank Floor Color Could Not Be Found, Script Exploding');
Result := 0;
begin
NextPlayer(False);
end;
end;
procedure AntiBan;
begin
if not (LoggedIn) then Exit;
case Random(43) of
0, 9, 17, 23: PickUpMouse;
1, 13, 16: RandomRclick;
2, 10, 18, 22, 24: RandomMovement;
5, 11, 8: ChooseOption('cancel');
6, 15, 21: MMouse(Random(MSX2), Random(MSY2), 0, 0);
7, 14, 3: HoverSkill('woodcutting', false);
end;
end;
procedure AntiRandom;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
if FindFight then
RunAway('E', True, 1, 5000);
end;
function SetDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 703;
dtmMainPoint.y := 270;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindRoadColor;
dtmMainPoint.Tolerance := 10;
dtmSubPoints[0].x := 723;
dtmSubPoints[0].y := 268;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindRoadColor;
dtmSubPoints[0].Tolerance := 10;
dtmSubPoints[1].x := 712;
dtmSubPoints[1].y := 279;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindRoadColor;
dtmSubPoints[1].Tolerance := 10;
dtmSubPoints[2].x := 697;
dtmSubPoints[2].y := 286;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindRoadColor;
dtmSubPoints[2].Tolerance := 10;
dtmSubPoints[3].x := 718;
dtmSubPoints[3].y := 250;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindRoadColor;
dtmSubPoints[3].Tolerance := 10;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function SearchForBank : Boolean;
var
MyTPA : TPointArray;
MyPoint : TPoint;
x, y, i : Integer;
Banker: T2DPointArray;
begin
if not LoggedIn then Exit;
FindColorsTolerance(MyTPA, 7376798, MSx1, MSy1, MSx2, MSy2, 10);
if Length(MyTPA) < 5 then FindColorsTolerance(MyTPA, 338217, MSX1, MSY1, MSX2, MSY2, 10); //maybe you should do if Length() < something then instead of = 0
Banker:=SplitTPAEx(MyTPA,30,30);
for i := 0 to High(Banker)do
begin
MyPoint := MiddleTPA(banker[I]);
MMouse(MyPoint.x, MyPoint.y, 2, 2);
Wait(10+random(50));
Mouse(x, y, 0, 0, False);
if isuptext('ank') then
Wait(50+random(100));
if ChooseOption('quickly') then
AntiRandom;
Wait(500+random(250));
end;
Wait(350+random(350));
FFlag(0);
Result := True;
end;
{==============================================================================
Help from TViYH for FindTree function, and some help in ChopTree function.
==============================================================================}
function FindTree(var x, y: Integer) : boolean;
var
i, rx, ry: Integer;
TreePoints: TPointArray;
ATPA: T2DPointArray;
begin
if not LoggedIn then Exit;
FindColorsSpiralTolerance(MSCX, MSCY, TreePoints, 3231574, MSX1, MSY1, MSX2, MSY2, 10);
ATPA := SplitTPA(TreePoints, 3);
SortATPASize(ATPA, True);
Status('Tree Check');
for i := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], rx, ry);
MMouse(rx, ry, 0, 0);
Wait(RandomRange(125, 750));
if IsUpText('hop') and IsUpText('illow') then
begin
Result := True;
x := rx;
y := ry;
Exit;
end;
end;
end;
function ChopTree : Boolean;
var
Tries, T, TreeClicked, Attempts: Integer;
x, y : integer;
begin
if not LoggedIn then Exit;
if not FindTree(x, y) then
if Tries = 3 then
else
Inc(Tries)
else
begin
FindEnt(x, y, True);
case Random(2) of
0: Mouse(x, y, 0, 0, True);
1: begin
FindEnt(x, y, True);
Mouse(x, y, 0, 0, False);
Wait(RandomRange(100, 210));
ChooseOption('hop');
end;
end;
FFlag(1);
FindEnt(x, y, True);
T := InvCount;
MarkTime(TreeClicked);
GameTab(4);
repeat
Wait(RandomRange(125, 1250));
FindEnt(x, y, True);
AntiRandom;
until((TimeFromMark(TreeClicked) >= Players[CurrentPlayer].Integers[2]) or (InvCount > T) or InvFull);
Ent := EntsAvoided
if ChopTree then
Result := ChopTree
else
if ChopTree = False then
repeat
Inc(Attempts)
FindTree(x, y);
wait(540+random(540));
ChopTree;
Until (ChopTree = True)or (Attempts = 5);
if Attempts =3 then
NextPlayer(False);
end;
end;
procedure WalkToTrees;
var
WalkDTM: integer;
x, y: integer;
begin
if not LoggedIn then Exit;
WalkDTM := SetDDTM;
if FindSymbol(x,y, 'shop') then
begin
Mouse(x, y, 7, 7, True);
FFlag(0);
end else
begin
RadialWalk(FindRoadColor,180, 290, 70,1, 1);
FFlag(1);
end;
if RadialWalk(FindRoadColor,180, 290, 70,1, 1) then
begin
AntiRandom;
FFlag(2);
Wait(RandomRange(400, 600));
end else
begin
RadialWalk(FindRoadColor,140, 190, 70,1, 1);
FFlag(0);
Wait(RandomRange(400, 600));
end;
if DTMRotated(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2) then
begin
Mouse(X, Y, 3, -5, True);
AntiRandom;
end else
begin
RadialWalk(FindDirtRoadColor,140, 190, 70,1, 1);
AntiBan;
end;
if not FindTree(x, y) then
MakeCompass('e');
if FindTree(x, y) then
begin
AntiRandom;
MakeCompass('n');
end else
LogOut;
end;
{===============================================================================
WalkToBank doesn't work well.
===============================================================================}
procedure WalkToBank;
var
WalkDTM: integer;
x, y: integer;
begin
if not LoggedIn then Exit;
WalkDTM := SetDDTM;
RadialRoadWalk(FindRoadColor,90, 150, 70,1, 1);
FFlag(1);
Wait(RandomRange(200,501));
RadialRoadWalk(FindRoadColor,45, 140, 70,1, 1);
AntiRandom;
FFlag(3);
Wait(RandomRange(100,400));
if DTMRotated(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2) then
begin
Mouse(X, Y, 3, -5, True);
AntiRandom;
FFlag(0);
end;
RadialWalk(FindBankFloorColor,180, 290, 70,1, 1);
AntiRandom;
end;
function Bank : Boolean;
var
x, y : Integer;
Tries : Integer;
begin
if SearchForBank then
begin
Result := True;
FindDTM(WillowLog, x, y, MIX1, MIY1, MIX2, MIY2);
Mouse(x, y, 6, 4, False);
Wait(RandomRange(90, 160));
ChooseOption('All');
end else
if not SearchForBank then
repeat
Inc(Tries);
SearchForBank;
Until (Result = True)or (Tries = 5);
if Tries = 3 then
begin
NextPlayer(False);
end else
Bank;
end;
procedure scriptterminate;
begin
FreeDTM(WillowLog);
FreeDTM(WalkDDTM);
end;
procedure MainLoop;
var
P : integer; //time
begin
Loads := Players[CurrentPlayer].integers[0] + Random(6);
repeat
if Loads >= LoadsDone then
begin
WalkToTrees;
repeat
MarkTime(p);
ChopTree;
repeat
AntiBan;
Wait(RandomRange(129, 260));
until((TimeFromMark(p) >= RandomRange(13000,15000)));
until((InvFull) or (not LoggedIn));
if InvFull then
begin
Dloads := Dloads + 1;
WalkToBank;
ProgressReport;
Bank;
end;
end;
until(Dloads >= Loads);
if AllPlayersInactive then
begin
Writeln('All players inactive! Stopping script immediately!');
TerminateScript;
end;
NextPlayer(True);
Loads := 0;
end;
begin
Setup;
repeat
MainLoop;
until(false);
end.——————————————————
<!– END TEMPLATE: formanswers –>