SRL Archive - Archive

Runaway Cop - SRL Member Application


Runaway

2009-09-13 04:24:04

How Long have You Played Runescape?
4 Year(s) +


Are you affilated in anyway with Jagex LTD?
No


What is your general programming knowledge?
Pascal and Intermediate C# and C++


Are you a member of any other communities?
No


Tell us about yourself…
From: Runaway Cop
Hello again! I'm back and applying with a new script! I'm still the same dude, laid back and friendly :) I still enjoy the same things I did a few weeks ago. Except for my new hobby, driving! I got my license last week and I've been driving everywhere! It's pretty awesome. Anyways, I hope this script will help my odds of acceptance this time round. Cheers!

I believe this script is better than my previous one, and shows that I have a better understanding of scripting with pascal. Thanks to a few guides on DDTM's and such, this script is equipped with decent walking abilities also :)



Please show us one (or multiple) of your scripts.

Much thanks to Main_Ftw, who helped with standards and fixed a few things :)
program RunawayPlanker;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}

const
RunScriptFor = 120; //Minutes to run script
SmartServer = 134;

var
Stime, OakDTM, NormalDTM, LoadsToDo: Integer;

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Pin := '';
Players[0].Integers[0] := 50; //Loads to be done
Players[0].Strings[1] := ''; //Type of log
Players[0].Active := True;

{Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Pin := '';
Players[1].Integers[0]:= 50; //Loads to be done
Players[1].Strings[1] := ''; //Type of log
Players[1].Active := True;}

{Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Pin := '';
Players[2].Integers[0]:= 50; //Loads to be done
Players[2].Strings[1] := ''; //Type of log
Players[2].Active := True;}

{Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Pin := '';
Players[3].Integers[0]:= 50; //Loads to be done
Players[3].Strings[1] := ''; //Type of log
Players[3].Active := True;}
end;

procedure LoadLogDTMs;
begin
OakDTM := DTMFromString('78DA637CC2C4C07086910119CC2AF7606006D' +
'220D1FF40C0F80EA8E628AA1A882C8C04D29F816A2E12507317A8' +
'E616013557816A2E1150730BA8E6387E3500DB530FA2');
NormalDTM := DTMFromString('78DA63E4636660B060624006D5F196609A11C' +
'A679400AA314255039385AB9105AAB123A0861DA8C68D809AFF4C' +
'C49943C03D00037B03F0');
end;

procedure AntiRandoms;
begin
if not (LoggedIn) then Exit;
If (not(Getcolor(499, 455)= 4807525)) then FindNormalRandoms;
end;

function Antiban: boolean;
var
x, y: Integer;
begin
if not (LoggedIn) then Exit;
result := true;
AntiRandoms;
case random(220) of
0,1: BoredHuman;
2,3: RandomRClick;
4,5: PickUpMouse;
6,7: HoverSkill('random', false);
8,9: MouseSpeed := 15+random(5)-random(5);
10,11:
begin
MakeCompass(randomrange(1, 55));
Wait(50+random(100));
MakeCompass(randomrange(120, 250));
Wait(50+random(100));
MakeCompass('n');
end;
12,13:
begin
GetMousePos(x, y);
MMouse(x, y, 15, 15);
Wait(50+random(100))
MMouse(x, y, 5, 5);
end;
14:
begin
SetAngle(true);
Wait(100+random(250));
SetAngle(false);
end;
15,16: RandomMovement;
17,18:
begin
GameTab(RandomRange(1, 13));
Wait(500+random(1000));
Gametab(tab_Inv);
end;
19,20: SleepAndMoveMouse(500+random(1000));
21: wait(500+random(1000));
end;
end;

procedure SetupScript;
begin
SetupSRL;
ClearDebug;
DeclarePlayers;
ActivateClient;
LoginPlayer;
SetAngle(true);
MakeCompass('n');
Antiban;
end;

function UseBank(LogType: string): boolean;
var
x, y, CoinsNeeded: Integer;

begin
if not (LoggedIn) then Exit;
Result := OpenBankQuiet('veb');
if (not Result) then
begin
Logout;
NextPlayer(true);
Exit;
end;
if PinScreen then
InPin(Players[CurrentPlayer].Pin)
else
begin
FixBank;
DepositAll;
case Lowercase(LogType) of
'normal': CoinsNeeded:= (27*150);
'oak': CoinsNeeded:= (27*270);
end;
SearchBank('coins');
Withdraw(1, 1, CoinsNeeded);
LoadLogDTMs;
SearchBank('log');
case Lowercase(LogType) of
'normal':
begin
if FindDTM(NormalDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 2, 2, false);
Wait(100+random(100));
ChooseOption('all');
end else
begin
Logout;
NextPlayer(true);
Exit;
end;
end;
'oak':
begin
if FindDTM(OakDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 2, 2, false);
Wait(100+random(100));
ChooseOption('all');
end else
begin
Logout;
NextPlayer(true);
Exit;
end;
end;
end;
end;
FreeDTM(NormalDTM);
FreeDTM(OakDTM);
CloseBank;
Antiban;
Inc(LoadsToDo);
If (LoadsToDo = Players[CurrentPlayer].Integers[0]) then
begin
Logout;
NextPlayer(true);
Exit;
end;
end;

function DDTMWalking(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..3] of TDTMPointDef;
TempTDTM: TDTM;
RoadColour: Integer;
begin
case WalkNumber of
0: begin
RoadColour := FindVarrockRoadColor;
dtmMainPoint.x := 1104;
dtmMainPoint.y := 292;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := RoadColour;
dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 1104;
dtmSubPoints[0].y := 292;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := RoadColour;
dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 1083;
dtmSubPoints[1].y := 320;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RoadColour;
dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 1072;
dtmSubPoints[2].y := 302;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := RoadColour;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 1072;
dtmSubPoints[3].y := 291;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := RoadColour;
dtmSubPoints[3].Tolerance := 0;

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

1: begin
RoadColour := FindVarrockRoadColor;
dtmMainPoint.x := 1123;
dtmMainPoint.y := 328;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := RoadColour;
dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 1123;
dtmSubPoints[0].y := 328;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := RoadColour;
dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 1110;
dtmSubPoints[1].y := 316;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RoadColour;
dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 1111;
dtmSubPoints[2].y := 345;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := RoadColour;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 1098;
dtmSubPoints[3].y := 344;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := RoadColour;
dtmSubPoints[3].Tolerance := 0;

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

2: begin
RoadColour := FindVarrockRoadColor;
dtmMainPoint.x := 1114;
dtmMainPoint.y := 328;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := RoadColour;
dtmMainPoint.Tolerance := 5;

dtmSubPoints[0].x := 1114;
dtmSubPoints[0].y := 328;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := RoadColour;
dtmSubPoints[0].Tolerance := 5;

dtmSubPoints[1].x := 1123;
dtmSubPoints[1].y := 293;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RoadColour;
dtmSubPoints[1].Tolerance := 5;

dtmSubPoints[2].x := 1134;
dtmSubPoints[2].y := 360;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := RoadColour;
dtmSubPoints[2].Tolerance := 5;

dtmSubPoints[3].x := 1082;
dtmSubPoints[3].y := 330;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := RoadColour;
dtmSubPoints[3].Tolerance := 5;

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

3: begin
RoadColour := FindVarrockRoadColor;
dtmMainPoint.x := 982;
dtmMainPoint.y := 174;
dtmMainPoint.AreaSize := 8;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := RoadColour;
dtmMainPoint.Tolerance := 5;

dtmSubPoints[0].x := 982;
dtmSubPoints[0].y := 174;
dtmSubPoints[0].AreaSize := 8;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := RoadColour;
dtmSubPoints[0].Tolerance := 5;

dtmSubPoints[1].x := 928;
dtmSubPoints[1].y := 187;
dtmSubPoints[1].AreaSize := 8;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RoadColour;
dtmSubPoints[1].Tolerance := 5;

dtmSubPoints[2].x := 926;
dtmSubPoints[2].y := 201;
dtmSubPoints[2].AreaSize := 8;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := RoadColour;
dtmSubPoints[2].Tolerance := 5;

dtmSubPoints[3].x := 951;
dtmSubPoints[3].y := 220;
dtmSubPoints[3].AreaSize := 8;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := RoadColour;
dtmSubPoints[3].Tolerance := 5;

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

4: begin
RoadColour := FindVarrockRoadColor;
dtmMainPoint.x := 1076;
dtmMainPoint.y := 283;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := RoadColour;
dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 1076;
dtmSubPoints[0].y := 283;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := RoadColour;
dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 1061;
dtmSubPoints[1].y := 314;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RoadColour;
dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 1056;
dtmSubPoints[2].y := 319;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := RoadColour;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 1070;
dtmSubPoints[3].y := 310;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := RoadColour;
dtmSubPoints[3].Tolerance := 0;

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

Function WalkTo(Num: Integer): Boolean;
var
Colours, StartRadials,
EndRadials, Radius: TIntegerArray;
begin
if not (LoggedIn) then Exit;
Colours := [FindVarrockRoadColor, 2189373, FindVarrockRoadColor, FindVarrockRoadColor, RoadColor, RoadColor];
StartRadials := [58, 18, 33, 18, 10, 13];
EndRadials := [68, 28, 45, 25, 20, 20];
Radius := [75, 75, 75, 75, 75, 75];
result := RadialRoadWalk(Colours[Num], StartRadials[Num], EndRadials[Num], Radius[Num], 0, 1);
fflag(2);
end;

Procedure WalkToSawMill;
var
i : Integer;
GotThere: Boolean;
begin
for i := 0 to 5 do
begin
GotThere := WalkTo(i);
if not GotThere then break;
end;
end;

function AtSawMill: boolean;
var
TPA: TPointArray;
i, x, y: Integer;
begin
if not (LoggedIn) then Exit;
SymbolAccuracy := 0.5;
result := FindSymbol(x, y, 'Saw Mill');
SymbolAccuracy := 0.8;
if (not result) then
begin
for i := 1 to 25 do
FindColorsSpiralTolerance(x, y, TPA, 2078944, MMX1, MMY1, MMX2, MMY2, i);
if (GetArrayLength(TPA) >= 50) then
begin
Mouse(TPA[i].x, TPA[i].y, 5, 5, true);
FFlag(2);
Exit;
end;
if (GetArrayLength(TPA) = 0) then
begin
Logout;
NextPlayer(true);
Exit;
end;
end;
Mouse(x, y, 2, 2, true);
Antiban;
FFlag(2);
end;

function MakeLogs(LogType: string): boolean;
var
TPA: TPointArray;
i, x, y: Integer;
begin
if not (LoggedIn) then Exit;
for i := 1 to 10 do
Antiban;
if FindColorSpiralTolerance(x, y, 763277, MSX1, MSY1, MSX2, MSY2, i) then
repeat
FindColorsSpiralTolerance(x, y, TPA, 7633277, MSX1, MSY1, MSX2, MSY2, 10);
until((GetArrayLength(TPA) >= 15));
begin
MMouse(TPA[i].x, TPA[i].y, 3, 3);
wait(100+random(100));
Result := IsUpText('operator');
if not result then Exit
else
begin
GetMousePos(x,y);
Mouse(x, y, 0, 0, false);
ChooseOption('plank');
wait(200+random(500));
end;
case Lowercase(LogType) of
'normal':
begin
MouseBox(342, 120, 333, 100, 1);
GetMousePos(x, y);
ClickMouse(x, y, false);
Wait(100+random(100));
ChooseOption('all');
end;
'oak':
begin
MouseBox(185, 98, 195, 118, 1);
GetMousePos(x, y);
ClickMouse(x, y, false);
Wait(100+random(100));
ChooseOption('all');
end;
end;
end;
end;

Function WalkBack(Num: Integer): Boolean;
var
Colours, StartRadials,
EndRadials, Radius: TIntegerArray;
begin
if not (LoggedIn) then Exit;
Colours := [RoadColor, RoadColor, FindVarrockRoadColor, 2189373, FindVarrockRoadColor];
StartRadials := [58, 18, 33, 18, 10, 13];
EndRadials := [68, 28, 45, 25, 20, 20];
Radius := [75, 75, 75, 75, 75, 75];
result := RadialRoadWalk(Colours[Num], StartRadials[Num], EndRadials[Num], Radius[Num], 0, 1);
fflag(2);
end;

Procedure WalkBackBank;
var
i : Integer;
GotThere: Boolean;
begin
MakeCompass('s');
for i := 0 to 5 do
begin
GotThere := WalkTo(i);
if not GotThere then break;
end;
end;

function AtBank: boolean;
var
TPA: TPointArray;
i, x, y: Integer;
begin
if not (LoggedIn) then Exit;
SymbolAccuracy := 0.5;
result := FindSymbol(x, y, 'Bank');
SymbolAccuracy := 0.8;
if (not result) then
begin
for i := 1 to 15 do
FindColorsSpiralTolerance(x, y, TPA, 1356913, MMX1, MMY1, MMX2, MMY2, i);
if (GetArrayLength(TPA) >= 20) then
begin
Mouse(TPA[i].x, TPA[i].y, 3, 3, true);
FFlag(2);
Exit;
end;
if (GetArrayLength(TPA) = 0) then
begin
Logout;
NextPlayer(true);
Exit;
end;
end;
Mouse(x, y, 2, 2, true);
Antiban;
FFlag(2);
end;

procedure ProgressReport;
begin
WriteLn('/--------------------------------------------------------\');
WriteLn('| Runaway Planker |');
WriteLn('|--------------------------------------------------------|');
WriteLn('| The Script Has Run For '+IntToStr(TimeFromMark(stime))+'! |');
WriteLn('| |');
WriteLn('| We Have Made '+IntToStr((LoadsToDo)*27)+' Planks! |');
WriteLn('\--------------------------------------------------------/');
end;

begin
MouseSpeed := 15+random(5)-random(5);
SetupScript;
MarkTime(stime);
repeat
UseBank(Players[0].Strings[1]);
WalkToSawMill;
AtSawMill;
MakeLogs(Players[0].Strings[1]);
WalkBackBank;
AtBank;
ProgressReport;
until((TimeFromMark((stime)/1000/60)>RunScriptFor));
end.

caused

2009-09-13 04:34:56

Script is looking good. Standards are a bit off sometimes though XD.. I wouldnt care about it if i could actually test the script :x.. But I guess its members only..

  Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Pin := '';
Players[0].Integers[0] := 50; //Loads to be done
Players[0].Strings[1] := ''; //Type of log
Players[0].Active := True;

This could be shortened to:
 
with Players[0] do
begin
Pass := '';
Nick := '';
Pin := '';
Integers[0] := 50; //Loads to be done
Strings[1] := ''; //Type of log
Active := True;
end;

Anyways. Yes from my side :).

~caused

cycrosism

2009-09-13 04:39:58

Yes. Good work :)

Runaway

2009-09-13 04:47:18

From: caused

This could be shortened to:
 
with Players[0] do
begin
Pass := '';
Nick := '';
Pin := '';
Integers[0] := 50; //Loads to be done
Strings[1] := ''; //Type of log
Active := True;
end;


If I shortened it to that, can I still use:


InPin(CurrentPlayer.Pin);
?

Ogre

2009-09-13 04:50:48

I see a few problems:


function UseBank(LogType: string): boolean;
var
x, y, CoinsNeeded: Integer;
begin
if not LoggedIn then Exit;
result := OpenBankQuiet('veb');
if not (result) then
Exit;
NextPlayer(true);

you need a begin and end after "if not (result) then", or it will always do NextPlayer(True);


also


if PinScreen then
InPin(CurrentPlayer.Pin)
else
FixBank;

This will only fix the bank if there isn't a PinScreen, and FixBank; should be indented more.


If (LoadsToDo = CurrentPlayer.Integers[0]) then
Logout;
Exit;
NextPlayer(true);
else
end;

I'm not sure why you have an else there, it causes an error.
Also, again, you should have a begin and end surrounding everything to do after the if..then


if DTMRotated(DDTMWalking(i)), x, y, MMX1, MMY1, MMX2, MMY2) then
Mouse(x, y, 2, 2, false)
else
Logout;
NextPlayer(true);
Exit;

Same with the begin and end after the else


if FindSymbol(x, y, 'Saw Mill') then
result := true;
Mouse(x, y, 2, 2, true);
FFlag(2);

….

I'm not going to say no because of one thing you didn't know. (or forgot all through your script :p). Anyway, I think your script may be a bit basic (you probably should use a TPA or something else to find the NPC at the saw mill), but I think you've been a great addition to SRL and you can be a skilled scripter, so I vote yes. :)

JAD

2009-09-13 04:51:45

In your SetupScript, you don't need that SMART setup stuff as far as I know. You should also probably move one of those waits after ActivateClient in case of lag when boxing down SCAR, and I wouldn't call anti ban right at the end of setting up, but that's just me.

In UseBank, it will switch players every time.. You have NextPlayer(True); that isn't after an if/then, so it will always switch players right there. I don't think you meant for that. Make sure with if/then/elses, and loops, that a begin/end are used if doing more than one statement.

The script will only fix the bank if it was not at the pin screen. What if it was? I'd take out that else after InPin.

The script would probably be faster if you didn't withdraw the coins each time. If they just had all their coins in the inventory, it wouldn't take up more space per load either. But you would not be able to do deposit all then.

This:

case Lowercase(LogType) of
'normal': begin
if FindDTM(NormalDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 2, 2, false);
wait(100+random(100));
ChooseOption('all');
else
Logout;
NextPlayer(true);
Exit;
end;
'oak': begin
if FindDTM(OakDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 2, 2, false);
wait(100+random(100));
ChooseOption('all');
else
Logout;
NextPlayer(true);
Exit;
end;
end;

Should be this:

case Lowercase(LogType) of
'normal': begin
if FindDTM(NormalDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 2, 2, false);
wait(100+random(100));
ChooseOption('all');
else
begin //////
Logout;
NextPlayer(true);
Exit;
end;/////
end;
'oak': begin
if FindDTM(OakDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 2, 2, false);
wait(100+random(100));
ChooseOption('all');
else
begin ///////
Logout;
NextPlayer(true);
Exit;
end; /////////
end;
end;

Just make sure to put proper begins/ends in, or the script will not work.

It could also be shortened a lot like this:

if(Lowercase(LogType) = 'normal')then
Result := FindDTM(NormalDTM, x, y, MSX1, MSY1, MSX2, MSY2) else
if(Lowercase(LogType) = 'oak')then
Result := FindDTM(OakDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
if(Result)then
begin
Mouse(x, y, 2, 2, false);
wait(100+random(100));
ChooseOption('all');
end else
begin
Logout;
NextPlayer(true);
Exit;
end;
Sorry for the standards there. But that would be a lot shorter, because you had a lot of redundant code in there.


I would randomize Antiban through out your script more. Don't call it right after the bank is closed all the time. I know that it won't do it every time because it's random(200) or whatever, but still, if in the same spot it can be worse for making you look human like.

You need a begin/end near the bottom of that function:

If (LoadsToDo = CurrentPlayer.Integers[0]) then
begin
Logout;
Exit;
NextPlayer(true);
end;

Also, the else was unnecessary.

In WalkTo:

while not (RadialRoadWalk(Colours[Num], StartRadials[Num], EndRadials[Num], Radius[Num], 0, 1)) do
Antiban

That is going to cause a TON of lag most likely. It is also a possible infinite loop. Try doing like:

var t: Integer;

MarkTime(T);
while not (RadialRoadWalk(Colours[Num], StartRadials[Num], EndRadials[Num], Radius[Num], 0, 1)) do
begin
Antiban;
wait(500+random(500));
if(TimeFromMark(T) > 5000+random(4000))then break;
end;




This:

Procedure WalkToSawMill;
var
i : Integer;
GotThere: Boolean;
begin
for i := 0 to 5 do
begin
GotThere := WalkTo(i);
if not GotThere then
begin
break;
end;
end;
end;
Could just be:

Procedure WalkToSawMill;
var
i : Integer;
begin
for i := 0 to 5 do
if(not(WalkTo(i)))then break;
end;


There's no begin/end on your for to do loop in MakeLogs? You really need to work on getting those right, or this script will not work.

When you check if the operator text is up, do GetMousePos before right clicking so you click in the same spot you moved to:

GetMousePos(x,y);
Mouse(x,y,0,0,false);


This:

case Lowercase(LogType) of
'normal': begin
MouseBox(342, 120, 333, 100);
GetMousePos(x, y);
ClickMouse(x, y, false);
wait(100+random(100));
ChooseOption('all');
end;
'oak': begin
MouseBox(185, 98, 195, 118);
GetMousePos(x, y);
ClickMouse(x, y, false);
wait(100+random(100));
ChooseOption('all');
end;
end;

Could just be:

if(LowerCase(LogType) = 'normal)then
MouseBox(342, 120, 333, 100) else
MouseBox(185,98,195,118);
GetMousePos(x, y);
ClickMouse(x, y, false);
wait(100+random(100));
ChooseOption('all');

That's for shortening. There are many more things wrong with this though…

You used clickmouse! This is a big no no, and equals instant ban. The script should also not compile, because MouseBox takes a fifth parameter. 1 = left click, 2 = right click, 3 = no click.

This:


Procedure WalkBackBank;
var
i : Integer;
GotThere: Boolean;
begin
MakeCompass('s');
for i := 0 to 5 do
begin
GotThere := WalkTo(i);
if not GotThere then
begin
break;
end;
end;
end;

Could just be:

Procedure WalkBackBank;
var
i : Integer;
begin
MakeCompass('s');
for i := 0 to 5 do
if(not(WalkTo(i)))then break;
end;



You have no main loop? Where's your repeat until false? Where's the if(not(LoggedIn))then NextPlayer(False); at the end of that main loop?



You really need to work on your scripting abilities Runaway. You're a great guy to talk to on msn, you have a great attitude, and I know you've been trying hard. Your graphics work is also very impressive :)

I give you a yes, but hardly based on the script. It doesn't even compile, so I almost had to vote no though… I know you'll work at it though and apply the feed back you receive in this thread.

Good luck!

Main

2009-09-13 04:57:26

Lol

function Antiban: boolean;
var
x, y: Integer;
begin
if not (LoggedIn) then Exit;
result := true;
AntiRandoms;
case random(220) of //is it 22?
.........
21,22: wait(500+random(1000)); //It should end at 21, because 0-21 = 22 ^^
end;//spacing
end;

I won't criticize you on your standards, instead I'll "teach" you.

//Case 1
If true then exit;//If...then one action.

//Case 2
If true then
begin
action1;
action2;
end;//use begin and end if you have more than 1 action

//Case 3
If true then
begin
action1;
action2;
end else action3;//this is similiar to what happen after the "then"
//Case 4
If true then action1
else action 2;

//Case 5
If true then action 1
else
begin
action2;
action3;
end;

//Case 6
If true then
begin
action1;
action2;
end else action3;

//Case 7
If true then
begin
action1;
action2;
end else
begin
action3;
action4;
end;

I vote yes. But before you get accepted, you will need to learn these, they might be pretty basic stuff, but it can mess your script up quite badly in the future.

EDIT: Got beat :(

Awkwardsaw

2009-09-13 05:00:18

o: your missing a lot of begin…end nests, which would make the script fail pretty fast.


i also think you should use tpas for the sawmill guy finding

none-the less, i think that your ready for srl-members, and i think that your just cool :) so i am voting yes

Ogre

2009-09-13 05:02:21

From: Runaway Cop
If I shortened it to that, can I still use:


InPin(CurrentPlayer.Pin);
?


Yes

Griff

2009-09-13 05:04:29

The script looks pretty good, and you have a great attitude, but it doesn't even compile. That shows like you rushed through it and did a bit of a sloppy job on the script. I'm going to have to vote no, sorry.

Runaway

2009-09-13 05:06:31

From: Griff721
The script looks pretty good, and you have a great attitude, but it doesn't even compile. That shows like you rushed through it and did a bit of a sloppy job on the script. I'm going to have to vote no, sorry,


I didn't rush, I just couldn't figure out some problems with the script for the life of me :\ I've actually been making this ever since I submitted my first script.

3Garrett3

2009-09-13 05:16:09

Why do you apply without asking around for help first?

Runaway

2009-09-13 05:25:51

From: 3Garrett3
Why do you apply without asking around for help first?


Last time I was reprimanded for not submitting a script that was entirely mine :\

Main

2009-09-13 05:37:23

Could you link me to your previous application?
I am still typing you my comments at the time of typing this post.

EDIT: Sent Standards comments.

Here is a fun little script that you can practice on.
program New;
{.include srl/srl.scar}

{Practice your If...else with the "F9" Key)}
Procedure randomnumber;
begin
If (IsFKeyDown(9)) then Writeln('Key down F9')
else Writeln('F9 Key is not down');
end;

begin
SetupSRL;
repeat
randomnumber;
until(False)
end.

Lance

2009-09-13 05:40:10

Yes. The vote looks like your gonna be in this time ;D good luck.

Main

2009-09-13 07:26:48

I see you've fixed your mistakes, now it compiles and run nicely, well done :norris:

TRiLeZ

2009-09-13 07:31:17

Legend:
Green = Good
Yellow = Suggestion
Orange = Between Suggestion and Bad, change it
Red = Bad

DeclarePlayers:
MultiPlayer

AntiRandoms:
if not (LoggedIn) then Exit;
The ()'s could be wrapped around not LoggedIn.


AntiBan:
100% Chance of doing AntiBan, but waiting sort of makes it less than 100% because its not really antiban, just waits.

SetupScript:

SmartSetupEx(SmartServer, False, True, False);
Wait(500+Random(1000));
SetTargetDC(SMARTGetDC);
Wait(500+Random(1000));
ActivateClient;
Dosnt need to be there. SetupSRL will load SMART. This will actually load SMART twice.


UseBank:

if (not(OpenBankQuiet('veb'))) then
begin
NextPlayer(true);
Exit;
end;
If the bank is already open, which it should be, this will go onto the next player. Change that to
if (not Result) then
Or make it an else statement with OpenBankFast above this.


If there is a pin to enter, your script wont even bank.


LoadsToDo := LoadsToDo + 1;
Change that to Inc(LoadsToDo);


DDTMWalking:
Ya DDTMs!!

WalkTo:
Ya Radial Walking!!


if DTMRotated(DDTMWalking(i)), x, y, MMX1, MMY1, MMX2, MMY2) then Mouse(x, y, 2, 2, false)
Right clicks and dosnt choose an option.


AtSawMill:
Add a fail safe.

MakeLogs:
TPA

WalkBack:

if DTMRotated(DDTMWalking(i)), x, y, MMX1, MMY1, MMX2, MMY2) then Mouse(x, y, 2, 2, false)
Remove 1 ")" or else the script wont compile!!
It rights clicks and dosnt chose an option.


AtBank:
Add a fail safe, someone may be standing on the bank symbol…

Conclusion:
There were a lot of errors in this script, but you have improved a lot since your last application.
You had DTMs, DDTMs, Radial Walking, a TPA, Multiplayer, AntiBan and AntiRandoms.
You have a good attitude and your a great learner.

I vote you a yes. Nobody shouldnt see this… hahahaha =p

Brain

2009-09-13 07:35:09

I vote yes, see you around the forums, seem to be a good guy with a good attitude.

Main

2009-09-13 07:35:31

Trilez, he updated he script again at the same time you've post :eek:. Lets re check him :sasmokin:


EDIT:
I corrected your grammar
From: TRiLeZ

I voted yes for your application. No body should see this… hahahaha =p

=p

TRiLeZ

2009-09-13 07:40:48

From: Main_Ftw
Trilez, he updated he script again at the same time you've post :eek:. Lets re check him :sasmokin:


EDIT:
I corrected your grammar

=p


Leave my grammar alone!
When I vote on peoples applications, I dont care about grammar when I state yes or no.

Well, time to look over the script..

Edit: Actually Im not because Im busy again.

Main

2009-09-13 07:48:14

@ Runaway:
You made your script compile, GRATZ :norris:
but continue to fix what trilez posted.


I will also recommend the fix for music tab.

procedure AntiRandoms;
Begin
If not (LoggedIn) then Exit;
If (not(Getcolor(499, 455)= 4807525)) then FindNormalRandoms;
End;

And maybe more of these in your anti ban.
MouseSpeed := 15+random(5)-random(5);

Gonna sleep now, GL.

Runaway

2009-09-13 09:16:04

Fanks Main :)

And Trilez, I fixed most of the things you listed at the same exact time as you posted :p
I fixed the other simples one.

I just finished adding failsafes to AtBank and AtSawMill. I used TPAs :)

Tickyy

2009-09-13 11:08:09

Hello Runaway Cop,

My first impression on your script was the Function WalkTo and the Function WalkBack, never seen that way of walking, nice little touch there but wouldn't that lag a lot…? :rolleyes:, Before we go to the bad part, i also see some TPAs over there, Good bonus for you, now let's pass to the negative part,

i see this: "Much thanks to Main_Ftw, who helped with standards greatly and fixed a few things", so you had problems on your standards eh? Well, i saw it fixed so i will rate it just like it is, i guess. The way you open your bank is TERRIBLE, what if it actually was at the bank, but had problems in the first try, you should make a small Loop there, here's it how i usually do it:


for i:=1 to 3 do
begin
OpenBank('veb', True, True);
if ((bankscreen) or (pinscreen)) then break;
if i=3 then
// terminate script or whatever.....
wait(RandomRange(200, 500));
end;

Also:


if PinScreen then
InPin(Players[CurrentPlayer].Pin)
else //
begin //

It actually will only open the bank if it doesn't have a bank pin, why not just like this:


if PinScreen then InPin(Players[CurrentPlayer].Pin);
FixBank;

No need for an else and begin there….

The way you get the logs is very weird, do you really need DTMs to find them, why you don't edit this "SearchBank('log');" to logs or oak logs, Withdraw them, and then check them with ExistsItem, I'm not sure if that would work but IMO it should :), now… where the heck is your progress report XD, kinda weird seeing a script without a progress report, i hope you'll make at least one in the next version, anyways…


MouseSpeed := 15+random(5)-random(5);

Is this really necessary?


That's all, its more like a No to me, but I've seen you around the forums, you're an active member so, I'll say Yes.

Tickyy.

Naum

2009-09-13 13:15:17

Your way of walking using arrays is very peculiar, I've rarely seen that done :).

I like you, I envy your photoshop skills :p, yes!

Sabzi

2009-09-13 13:41:13

Sorry, but this will be a bad voting. I haven't even looked in the script. But I like you and I think you should be a member. I have read some posts though(I like how JAD votes and his application posts).
And attitude is important too and I know that.
If still wondering, it's a big yes from me.
Good luck!

Dynamite

2009-09-13 14:40:10

Yes from me.

T~M

Smarter Child

2009-09-13 19:15:58

Definitely. That walking function is really original :D.

Although you use FindVarrockRoadColor twice? Anyways, I don't see that would help, but good luck!

:)

Edit: Never mind, read it a little more carefully. I get it now :p

3Garrett3

2009-09-13 19:27:32

I had voted no earlier when it didn't compile. You fixed it, and I would ask an admin to change my vote to a yes, but it doesnt look necessary.

:)

Ogre

2009-09-13 19:49:02

Tickyy, you were talking about his standards and yours in your corrections weren't correct…

just a note

Runaway

2009-09-13 20:10:09

Thanks everyone for the help :)

From: Tickyy

now… where the heck is your progress report XD, kinda weird seeing a script without a progress report, i hope you'll make at least one in the next version, anyways…


Proggy added!
It's simple, but what else is there to put on a planker script :p

Main

2009-09-13 20:20:31

Sell at ge? ^^?

Runaway

2009-09-13 20:27:14

From: Main_Ftw
Sell at ge? ^^?


Only if I was in the mood to make DDTM's for a few weeks :p

Main

2009-09-13 20:50:08

Seriously a tele back option would be epic, or rest at the musician. (Real players DO THIS).

rogeruk

2009-09-13 22:06:10

Script may be simple but it shows you have good understanding of SCAR/SRL Scripting.

We are all constantly learning and theres always room to improve.

Yes from me,
Good luck

Kave

2009-09-13 22:27:28

Yes from moi.

Tickyy

2009-09-13 23:11:15

From: Ogre
Tickyy, you were talking about his standards and yours in your corrections weren't correct…

just a note


Ohnoez, you wanna tell me that my standards fail?

Main

2009-09-13 23:19:58

I don't see any fail,
 //terminate or what ever.
maybe I failed to see t3h fail?

Tickyy

2009-09-13 23:28:07

From: Main_Ftw
I don't see any fail,
 //terminate or what ever.
maybe I failed to see t3h fail?


s/i/he

Runaway

2009-09-14 23:20:46

From: Tickyy
s/i/he


…whaaaat?

Laur€ns

2009-09-14 23:47:17

From: TRiLeZ
<lots of yellow unreadable text>

Damn annoying. :p Make it another color!


Runaway Cop, I like what I've seen from you on the forums, I like your attitude and I think your script it worthy enough for members. Yes. :)


From: Runaway Cop
…whaaaat?

That means, change 'I' with 'he'. :) It's some Regex thing, which he did wrong. It should be s/I/he/ :p

marpis

2009-09-14 23:57:15

I think you're a good guy and the script is OK.
Welcome aboard!

Runaway

2009-09-15 00:38:10

Thanksh fer duh votes :)

From: Laur€ns
That means, change 'I' with 'he'. :) It's some Regex thing, which he did wrong. It should be s/I/he/ :p


and I still don't get it, but whatevvva, it don't matter. :p

Main

2009-09-16 08:37:25

I did , He Did, we did, they did, she did w/e.

ian.

2009-09-16 08:50:47

:) Congratulations. Yes.

TRiLeZ

2009-09-16 08:57:56

From: ian.
:) Congratulations. Yes.


[offtopic]I thought you quit SRL…[/offtopic]

[ontopic]Just a reminder, I voted yes :p[/ontopic]

Laur€ns

2009-09-16 10:08:10

May I say 'welcome' in advance? :norris:

Main

2009-09-16 16:11:35

To who? Ian or runaway cop? :p

Gu3st...

2009-09-16 16:52:17

Yes. Very nice :)

Sir R. M8gic1an

2009-09-16 16:59:15

I believe it's about time to say this…

Welcome to Jah People!

~RM