SRL Archive - Archive

han941306 - SRL Member Application


han941306

2009-05-02 19:44:12

How Long have You Played Runescape?
6 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
ASP, PHP, C++


Are you a member of any other communities?
Sythe


Tell us about yourself…
From: han941306
A student who likes exciting things.



Please show us one (or multiple) of your scripts.
//Test Miner 0.1 Update by Han
//Read Before Using :
//Setup DeclarePlayers; and the Const.
//Updated :
//1. Location and Walking System
//2. Banking Options
//3. Exp Counting
//4. Little change in loop

Program Miner;
{.include SRL\SRL\Misc\Smart.scar}
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\Mining.scar}

var
Loads, FailAtt, HaltNo, PreExp, PostExp, i, j, k, x, y: integer;
Gem, CurrentGems, Gases: integer;
WalkDTM, VRC: Integer;
PickPresents: Boolean;
WhichPick: String;

////////////////////////////Setup///////////////////////////////////
const
CFailAtt = 10; //Fail Attempt Before Switching Characters
WaitTime = 15; //WaitTime * 0.1 seconds waiting before mining another ore, depends on your mining level.
PreferredWorld = 73; //The server you want to access.
MemberServer = False; //Member Server?
RunBool = true; //Run or Walk ?

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
Players[0].Strings[0] := 'Iron'; //'Copper', 'Tin' or 'Iron'.
Players[0].Strings[1] := 'true'; //Pickaxe Equipped?
Players[0].Strings[2] := 'Bank'; //'Bank', 'Drop' or bank 'Gems' only.
Players[0].Loc := 'Bank'; //Location. 'Bank' or 'Mine'.
Players[0].Integers[0] := 50; //Loads to do
end;
/////////////////Script Underneath, Don't Modify////////////////////

Procedure RandomCompass;
begin
case Random(4) of
0:MakeCompass('N');
1:MakeCompass('E');
2:MakeCompass('W');
3:MakeCompass('S');
end;
end;

Procedure AntiBan(RanNum : integer);
begin
case RanNum of
0: GameTab(Random(7) + 1);
1: PostExp := GetXP('mining');
2: PickUpMouse;
3: MMouse(Random(MSX2), Random(MSY2), 2, 2);
4: BoredHuman;
5: RandomCompass;
end;
end;

function LoadAllDTMWalks(Node : Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..3] of TDTMPointDef;
TempTDTM: TDTM;
begin
case Node of
1: begin
dtmMainPoint.x := 677;
dtmMainPoint.y := 109;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := VRC;
dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 677;
dtmSubPoints[0].y := 109;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := VRC;
dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 680;
dtmSubPoints[1].y := 62;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := VRC;
dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 700;
dtmSubPoints[2].y := 72;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := VRC;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 685;
dtmSubPoints[3].y := 136;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := VRC;
dtmSubPoints[3].Tolerance := 0;
end;
2: begin
dtmMainPoint.x := 638;
dtmMainPoint.y := 71;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := VRC;
dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 638;
dtmSubPoints[0].y := 71;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := VRC;
dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 629;
dtmSubPoints[1].y := 45;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := VRC;
dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 655;
dtmSubPoints[2].y := 77;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := VRC;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 661;
dtmSubPoints[3].y := 103;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := VRC;
dtmSubPoints[3].Tolerance := 0;
end;
3: begin
dtmMainPoint.x := 627;
dtmMainPoint.y := 72;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := VRC;
dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 627;
dtmSubPoints[0].y := 72;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := VRC;
dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 640;
dtmSubPoints[1].y := 48;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := VRC;
dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 605;
dtmSubPoints[2].y := 73;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := VRC;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 642;
dtmSubPoints[3].y := 102;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := VRC;
dtmSubPoints[3].Tolerance := 0;
end;
end;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;

Procedure CheckPick;
var
PC : TPoint;
PickSlot : integer;
begin
PickPresents := false;
srl_LoadBitmaps([61, 62, 63, 64, 65, 66]);
case LowerCase(Players[CurrentPlayer].Strings[1]) of
'false':
begin
GameTab(4);
for i := 0 to 5 do
begin
if(FindBitmapToleranceIn(srl_GetBitmap(61 + i), PC.x, PC.y, MIX1, MIY1, MIX2, MIY2, 10)) then
begin
PickSlot := CoordsToItem(PC.x, PC.y);
if (PickSlot = 1) then Break;
DragItem(PickSlot, 1);
PickPresents := true;
Break;
end;
end;
end;

'true':
begin
GameTab(5);
for i := 0 to 5 do
begin
if(FindBitmapToleranceIn(srl_GetBitmap(61 + i), PC.x, PC.y, 569, 287, 604, 322, 10)) then
begin
PickPresents := true;
Exit;
end;
end;
if (PickPresents = false) then
begin
WriteLn('Pick Not Found..Change Player.');
HaltNo := 2;
end;
end;
end;

case i of
0: WhichPick := 'Bronze ';
1: WhichPick := 'Iron ';
2: WhichPick := 'Steel ';
3: WhichPick := 'Mithril ';
4: WhichPick := 'Adamant ';
5: WhichPick := 'Rune ';
end;
end;

Procedure CheckGems; //That's just an anti-ban or something(Makes the Inv pretty :P)
var
GCArr : TPointArray;
GemSlot : TIntegerArray;
begin
srl_LoadBitmaps([100, 101, 102, 103]);
GameTab(4);
for i := 0 to 3 do
begin
if(FindBitmapsTolerance(srl_GetBitmap(100 + i), GCArr, MIX1, MIY1, MIX2, MIY2, 10)) then
begin
if(Length(GCArr) = 1) then
begin
SetLength(GemSlot, 1);
CurrentGems := CurrentGems + Length(GCArr);
Gem := Gem + Length(GCArr);
GemSlot[0] := CoordsToItem(GCArr[0].x, GCArr[0].y);
end else
begin
SetLength(GemSlot, Length(GCArr));
CurrentGems := CurrentGems + Length(GCArr);
Gem := Gem + Length(GCArr);
for j := 0 to Length(GCArr) do
GemSlot[j] := CoordsToItem(GCArr[j].x, GCArr[j].y);
end;
if(LowerCase(Players[CurrentPlayer].Strings[1]) = 'true') then
begin
for k := 0 to High(GemSlot) do
DragItem(GemSlot[k], k + 1);
end;
if(LowerCase(Players[CurrentPlayer].Strings[1]) = 'false') then
begin
for k := 0 to High(GemSlot) do
DragItem(GemSlot[k], k + 2);
end;
end;
end;
end;

Procedure CWait(Times : integer);
begin
wait(Times * (100 + Random(50)));
end;

Procedure ProgressReport;
var
HaltState : String;
begin
case HaltNo of
0:HaltState := 'Done all loads successfully.';
1:HaltState := 'Lost / Ore Not Found.';
2:HaltState := 'Pickaxe Not Found';
end;
WriteLn('...........Progress Report...........');
WriteLn('-------------------------------------');
WriteLn('Player : ' + Players[CurrentPlayer].Nick);
WriteLn('Location : ' + Players[CurrentPlayer].Loc);
WriteLn('Using Pick : ' + WhichPick + 'Pickaxe');
WriteLn('Loads done : ' + IntToStr(Loads));
WriteLn('Experience Gained : ' + IntToStr(PostExp - PreExp));
WriteLn('Gems Found : ' + IntToStr(Gem));
WriteLn('Gas Avoided : ' + IntToStr(Gases));
WriteLn('State : ' + HaltState);
WriteLn('Time Elapsed : ' + TimeRunning);
WriteLn('-------------------------------------');
end;

Procedure ToBank;
begin
MakeCompass('N');
SetAngle(true);
SetRun(RunBool);
WalkDTM := LoadAllDTMWalks(1);
if(DTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(x, y, 2, 2, true);
FFlag(15);
WalkDTM := LoadAllDTMWalks(2);
if (DTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(x, y, 2, 2, true);
FFlag(10);
for i := 0 to 3 do
if(not RadialWalk(VRC, 450, 270, 65, -1, 1)) then VRC := FindVarrockRoadColor;
WalkDTM := LoadAllDTMWalks(3);
while (not DTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2)) do
begin
if(not RadialWalk(VRC, 450, 270, 65, -1, 1)) then VRC := FindVarrockRoadColor;
if(DTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
Mouse(x, y, 2, 2, true);
for i:= 0 to 1 do
if(not RadialWalk(VRC, 225, 315, 50, -1, 1)) then VRC := FindVarrockRoadColor;
while (not FindBank('veb')) do
begin
RadialWalk(VRC, 225, 315, 50, -1, 1);
if(BankScreen) then
begin
DepositAll;
CloseBank;
Players[CurrentPlayer].Loc := 'bank';
Exit;
end;
end;
end;
end;
end;
end;

procedure ToMine;
begin
for i := 0 to 2 do
begin
if(not RadialWalk(VRC, 135, 45, 70, -1, 1)) then VRC := FindVarrockRoadColor;
WalkDTM := LoadAllDTMWalks(3);
while(not DTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2)) do
begin
if(not RadialWalk(VRC, 135, 45, 70, -1, 1)) then VRC := FindVarrockRoadColor;
if(DTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(x, y, 2, 2, true);
for i:= 0 to 2 do
if(not RadialWalk(VRC, 90, 270, 70, -1, 1)) then VRC:= FindVarrockRoadColor;
WalkDTM := LoadAllDTMWalks(2);
while(not DTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2)) do
begin
if(not RadialWalk(VRC, 135, 45, 70, -1, 1)) then VRC := FindVarrockRoadColor;
if(DTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(x, y, 2, 2, true);
WalkDTM := LoadAllDTMWalks(1);
while(not FindSymbol(x, y, 'mining site')) do
begin
if(not RadialWalk(VRC, 135, 45, 70, -1, 1)) then VRC := FindVarrockRoadColor;
if(FindSymbol(x, y, 'mining site')) then
begin
Mouse(x, y, 2, 2, true);
Players[CurrentPlayer].Loc := 'mine';
Exit;
end;
end;
end;
end;
end;
end;
end;
end;

Procedure FullLoadProcess;
begin
case LowerCase(Players[CurrentPlayer].Strings[2]) of
'bank':
begin
ToBank;
CWait(50);
ToMine;
end;
'drop':
begin
if (LowerCase(Players[CurrentPlayer].Strings[1]) = 'true') then DropAll;
if (LowerCase(Players[CurrentPlayer].Strings[1]) = 'false') then
for i := 2 to 28 do
DropItem(i);
end;
'gems':
begin
CheckGems;
if (CurrentGems = 0) then DropAll; Exit;
if (LowerCase(Players[CurrentPlayer].Strings[1]) = 'true') then
for i := (CurrentGems + 1) to 28 do
Dropitem(i);
if (LowerCase(Players[CurrentPlayer].Strings[1]) = 'false') then
for i := (CurrentGems + 2) to 28 do
Dropitem(i);
CurrentGems := 0;
ToBank;
CWait(50);
ToMine;
end;
end;
end;

Procedure MineOre;
var
OreColor : TIntegerArray;
x, y: integer;
begin
case LowerCase(Players[CurrentPlayer].Strings[0]) of
'copper': OreColor := [4945047, 5011107];
'tin': OreColor := [7566204, 6908273];
'iron': OreColor := [2569042, 1976386];
end;

repeat
if (InvFull) then
begin
CWait(50);
FullLoadProcess;
Loads := Loads + 1;
end;
if (FindObjTPA(x, y, OreColor[0], 15, 2, 15, 25, 10, ['Roc', 'ock', 'cks'])) then
begin
if (FindObjTPA(x, y, OreColor[1], 15, 2, 15, 25, 10, ['Roc', 'ock', 'cks'])) then
begin
if (not FindGas(x, y)) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('Mine');
FailAtt := 0;
CWait(WaitTime);
AntiBan(Random(6));
FindNormalRandoms;
end else Inc(Gases);
end;
end else
begin
FailAtt := FailAtt + 1;
if (FailAtt >= 5) then WriteLn('Ore Not Found, tried ' + IntToStr(FailAtt) + ' Times..'); //Don't let this msg spam the Debug.
CWait(50);
RandomCompass;
SetAngle(True);
end;
until (FailAtt = CFailAtt);
WriteLn('Ore Not Found, Probably Got Lost.');
HaltNo := 1;
end;

Procedure Init;
begin
Loads := 0;
LampSkill := 'mining';
SymbolAccuracy := 0.5;
ClearDebug;
ClearReport;
SmartSetupEx(PreferredWorld, MemberServer, True, False);
SetTargetDC(SmartGetDC);
SetupSRL;
DeclarePlayers;
SetAudioOff;
LoginPlayer;
end;

Procedure MainLoop;
begin
repeat
PreExp := GetXP('mining');
VRC := FindVarrockRoadColor;
Gases := 0;
repeat
if (not loggedIn) then Exit;
CheckPick;
if (PickPresents = false) then Break;
ChatsOff;
SetAngle(True);
SetRun(RunBool);
case (LowerCase(Players[CurrentPlayer].Loc)) of
'bank': begin
ToMine;
MineOre;
end;

'mine': begin
MineOre;
end;
end;
until ((Loads = Players[CurrentPlayer].Integers[0]) or (FailAtt = CFailAtt));
ProgressReport;
Logout;
Cwait(5);
Players[CurrentPlayer].Active := false;
repeat
if(CurrentPlayer = HowManyPlayers - 1) then exit;
Inc(CurrentPlayer);
until(Players[CurrentPlayer].Active = true);
NextPlayer(Players[CurrentPlayer].Active);
Loads := 0;
until(AllPlayersInactive);
srl_FreeBitmaps;
FreeDTM(WalkDTM);
SRLRandomsReport;
writeLn('All Players Finished.');
end;

begin
Init;
MainLoop;
end.

JAD

2009-05-02 19:55:25

I'm not really sure if you understand begin end nesting based on your walking procedures and some others. After an if then or a for do or while do…etc. loop/statement, if you want more then one command after it, you need a begin end for that block of code you want to execute. Just like in C++. Maybe I'm wrong, but it really looked like you were missing a LOT of begin/ends.

This is your second time applying, it shows good knowledge of the SRL include, and I can tell you've worked hard. Yes from me.

Edit: Never mind, you only waited 5 days to apply…. I think that's an auto no then.

Griff

2009-05-02 20:07:17

Your script gets a little messy in places, and your standards are off, but that`s not too big of a deal. But if what JAd dsys is true you applied like 5 days ago, I don`t know if you can get in. If you can`t work on standards and cleaning it up, and when you apply again in 1 month, it`s a yes from me.
Holding vote for now.

Nadeem

2009-05-02 20:41:33

I think he seems to be doing very good actually! Except for the standards, and at some places I see the code is a bit confusing the way it is structured. Also you do not need to tell it to check in exact words if a statement is true.

Example

You Have:

case LowerCase(Players[CurrentPlayer].Strings[2]) of
'bank':
begin
ToBank;
CWait(50);
ToMine;
end;
'drop':
begin
if (LowerCase(Players[CurrentPlayer].Strings[1]) = 'true') then DropAll;
if (LowerCase(Players[CurrentPlayer].Strings[1]) = 'false') then
for i := 2 to 28 do
DropItem(i);
end;
'gems':
begin
CheckGems;
if (CurrentGems = 0) then DropAll; Exit;
if (LowerCase(Players[CurrentPlayer].Strings[1]) = 'true') then
for i := (CurrentGems + 1) to 28 do
Dropitem(i);
if (LowerCase(Players[CurrentPlayer].Strings[1]) = 'false') then
for i := (CurrentGems + 2) to 28 do
Dropitem(i);
CurrentGems := 0;
ToBank;
CWait(50);
ToMine;
end;
end;

Thats a bit messy, no?

Then look at this:

case LowerCase(Players[CurrentPlayer].Strings[2]) of
'bank' : begin
ToBank;
CWait(50);
ToMine;
end;
'drop' : begin
if Players[CurrentPlayer].Strings[1] then DropAll;
if(not(Players[CurrentPlayer].Strings[1]))then
begin
for i := 2 to 28 do
DropItem(i);
end;
end;
'gems' : begin
CheckGems;
if (CurrentGems <= 0) then DropAll; Exit;
if Players[CurrentPlayer].Strings[1] then
begin
for i := (CurrentGems + 1) to 28 do
Dropitem(i);
end;
if(not(Players[CurrentPlayer].Strings[1]))then
begin
for i := (CurrentGems + 2) to 28 do
Dropitem(i);
end;
CurrentGems := 0;
ToBank;
CWait(50);
ToMine;
end;
end;

Come back in a month and and its a YES from me :)

~Nadeem

ian.

2009-05-02 20:45:21

han941306, make sure you wait a month, not 5 days. :) Then you will probably get in! If you fix it up and make it more complex.

Richard

2009-05-02 20:46:37

Sorry, you have to wait for 2 weeks before applying again, meaning its an auto no.

Its almost a worthy script by my standards, but please follow rules/read the rules before applying.

3Garrett3

2009-05-02 21:02:11

He has 14 posts and at least 2 are members applications? Too good to be true that someone comes in, doesn't post, and has a good enough script to get in? :\

No anyway because of not waiting.

Naike

2009-05-02 23:52:12

No, Be more active.

Da 0wner

2009-05-03 04:33:09

From: Nadeem
I think he seems to be doing very good actually! Except for the standards, and at some places I see the code is a bit confusing the way it is structured. Also you do not need to tell it to check in exact words if a statement is true.

Example

You Have:

case LowerCase(Players[CurrentPlayer].Strings[2]) of
'bank':
begin
ToBank;
CWait(50);
ToMine;
end;
'drop':
begin
if (LowerCase(Players[CurrentPlayer].Strings[1]) = 'true') then DropAll;
if (LowerCase(Players[CurrentPlayer].Strings[1]) = 'false') then
for i := 2 to 28 do
DropItem(i);
end;
'gems':
begin
CheckGems;
if (CurrentGems = 0) then DropAll; Exit;
if (LowerCase(Players[CurrentPlayer].Strings[1]) = 'true') then
for i := (CurrentGems + 1) to 28 do
Dropitem(i);
if (LowerCase(Players[CurrentPlayer].Strings[1]) = 'false') then
for i := (CurrentGems + 2) to 28 do
Dropitem(i);
CurrentGems := 0;
ToBank;
CWait(50);
ToMine;
end;
end;

Thats a bit messy, no?

Then look at this:

case LowerCase(Players[CurrentPlayer].Strings[2]) of
'bank' : begin
ToBank;
CWait(50);
ToMine;
end;
'drop' : begin
if Players[CurrentPlayer].Strings[1] then DropAll;
if(not(Players[CurrentPlayer].Strings[1]))then
begin
for i := 2 to 28 do
DropItem(i);
end;
end;
'gems' : begin
CheckGems;
if (CurrentGems <= 0) then DropAll; Exit;
if Players[CurrentPlayer].Strings[1] then
begin
for i := (CurrentGems + 1) to 28 do
Dropitem(i);
end;
if(not(BPlayers[CurrentPlayer].Strings[1]))then
begin
for i := (CurrentGems + 2) to 28 do
Dropitem(i);
end;
CurrentGems := 0;
ToBank;
CWait(50);
ToMine;
end;
end;

Come back in a month and and its a YES from me :)

~Nadeem


Wtf?

case LowerCase(Players[CurrentPlayer].Strings[2]) of
'bank' : begin
ToBank;
CWait(50);
ToMine;
end;
'drop' : begin
if Players[CurrentPlayer].Strings[1] then DropAll;
if(not(StrToBool(Players[CurrentPlayer].Strings[1])))then
begin
for i := 2 to 28 do
DropItem(i);
end;
end;
'gems' : begin
CheckGems;
if (CurrentGems <= 0) then DropAll; Exit;
if StrToBool(Players[CurrentPlayer].Strings[1]) then
begin
for i := (CurrentGems + 1) to 28 do
Dropitem(i);
end;
if (not(StrToBool(Players[CurrentPlayer].Strings[1])))then
begin
for i := (CurrentGems + 2) to 28 do
Dropitem(i);
end;
CurrentGems := 0;
ToBank;
CWait(50);
ToMine;
end;
end;

And you could have used the Booleans array for the true and false anyway.

Nava2

2009-05-03 06:01:29

Yes.

But, its a shame you didn't wait. Rules are rules.

I hope some of you reported this before you posted…

Anyways, just wait, and you will get in.

You show much potential, my friend.

Hobbit

2009-05-03 07:30:49

One application at a time please

http://www.villavu.com/forum/showthread.php?t=44701