SRL Archive - Archive

Runaway Cop - SRL Member Application


Runaway

2009-08-25 07:00:42

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?
No


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


Are you a member of any other communities?
No


Tell us about yourself…
From: Runaway Cop
I'm 17 and I live in Massachusetts. I've been a member of the SRL community for about a year and a half. I have never been really good at scripting, but I've always tried to put in an effort when learning. I don't take the easiest routes, but at least I get stuff done. I love GFX, I even make my own fonts when I'm bored! I am a shy person, so I know a lot of people, but most of them don't know me. That's just how I am. I'm currently in high school, and am planning on going on through to college as well. Somewhere in the south. I love heat, and I love ridin' round on my lawnmower with a shirt off and the breeze in my face. I'm not a redneck. Don't worry. I like jokes. They are fun. [/end life story]

As you'll see, the only thing I have going for me when it comes to scripting is my standards, and sometimes those aren't even right. I just wanted to submit this because it took me time and effort to make. I don't mind if you shoot it down, either way, I know I tried.



Please show us one (or multiple) of your scripts.
I used 3 of the functions that were in my include in my actual scriptm so I only have Cop_wait and Cop_Mouse to put here. They aren't very impressive, but I felt it would make things easier for me.
(Also can be seen in SRL Public revisions):

Runaway.scar Include

//-------------------------------------------------------------------\\
{ }
{ Runaway.scar Include }
{ Made by: Runaway Cop }
{ These are just a few includes to help me out with scripting, }
{ some of them just make scripting faster and easier, where }
{ others can help out in a variety of ways! Enjoy! }
{ }
{ The functions and procedures below consist of: }
{ procedure Cop_wait(waittime: integer) }
{ procedure Cop_mouse(x, y: integer; leftclick: boolean) }
{ procedure Cop_antiban(skill: string; randomtalker: boolean) }
{ procedure Cop_dropload(itemcolor: integer) }
{ fucntion Cop_findtree(treetype: string; chop: boolean): boolean }
{ }
//-------------------------------------------------------------------//

var
waittime, x, y, itemcolor: Integer;
leftclick, randomtalker: Boolean;
treetype, skill: String;

//This takes the time and does several different mathematic equations with it.
//The absolute minimum wait time you can get out of this is the same as the
//variable you plug into it. for example, Cop_wait(100) can range from 100ms to
//240ms wait time. The larger the initial input, the larger the output can be.
procedure Cop_wait(waittime: integer);
var
r1: Integer;
begin
r1 := randomrange(1, 4);
wait((waittime/r1)+random(50));
wait(waittime-random(waittime/2));
wait((waittime/4)+random(20));
end;

//This is just a shortcut, using a random integer for the rx and ry in the
//Mouse(x, y, rx, ry, leftclick) procedure.
procedure Cop_mouse(x, y: integer; leftclick: boolean);
var
ranx1, rany1: Integer;
begin
ranx1 := randomrange(2, 5);
rany1 := randomrange(2, 5);
Mouse(x, y, ranx1, rany1, leftclick);
end;

ACTUAL SCRIPT HERE:

program ChopNBank;
{.include SRL/SRL.scar}
{.include SRL/Runaway.scar}

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].booleans[0] := False;
Players[0].strings[1] := ''; //tree type: normal, oak, willow, maple, yew, magic.
Players[0].strings[2] := ''; //color of logs
Players[0].strings[3] := ''; //loads to do
Players[0].Active := True;
end;

function Cop_findtree(treetype: string; chop: boolean): boolean;
var
Colors: Array of integer;
UpText: string;
begin
if not (LoggedIn) then Exit;
case Lowercase(treetype) of
'normal': Colors := [1854786, 3567717, 1062703];
'oak': Colors := [1922889, 4624516, 2516570];
'willow': Colors := [6919048, 2441789, 5010788];
'maple': Colors := [3495048, 1451327, 2176088];
'yew': Colors := [2120012, 2648669, 4228986];
'magic': Colors := [10479596, 4623230, 2186320];
end;
begin
writeln('Tree type selected is not supported.');
exit;
end;
UpText := copy(treetype, 2, High(treetype));
repeat
if FindObjCustom(x, y, [UpText], Colors, 5) then
result := true;
if not Chop then
Mouse(x, y, 0, 0, true)
else
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
WaitOption('p down', 500+random(100));
Cop_wait(1500);
until(InvFull);
end;

function Cop_dropload(itemcolor: integer): boolean;
var
b: tbox;
i: Integer;
begin
if not (LoggedIn) then Exit;
if not (InvFull) then Exit;
for i := 1 to 28 do
begin
b := InvBox(i);
if FindColor(itemcolor, x, y,b.x1, b.y1, b.x2, b.y2) then
result := true;
DropItem(i);
else
end;
end;

function Cop_antiban(skill: string; randomtalker: boolean): boolean;
var
compassangle1, compassangle2: Integer;
begin
if not (LoggedIn) then Exit;
//inc(AntibansDone);
result := true;
case random(200) of
0,1: BoredHuman;
2,3: RandomRClick;
4,5: PickUpMouse;
6,7: HoverSkill('random', false);
8,9: ExamineInv;
10,11: begin
compassangle1 := randomrange(1, 55);
compassangle2 := randomrange(120, 250);
MakeCompass(IntToStr(compassangle1));
Cop_wait(50);
MakeCompass(IntToStr(compassangle2));
Cop_wait(50);
MakeCompass('n');
end;
12,13: begin
GetMousePos(x, y);
MMouse(x, y, 15, 15);
Cop_wait(25);
MMouse(x, y, 5, 5);
end;
14: begin
if not (randomtalker) then Exit;
case random(5) of
0: TypeSend('lol');
1: TypeSend('...');
2: TypeSend('bored.');
3: TypeSend('omg this is boring');
4: TypeSend('auayuidy.');
end;
end;
15,16: RandomMovement;
17,18: begin
GameTab(RandomRange(1, 13));
Cop_wait(500);
Gametab(tab_Inv);
end;
19,20: SayCurrentLevels(skill);
end;
end;

procedure Signature;
begin
status('Look at that beautiful signature.');
cleardebug;
writeln(' ____ ____');
wait(100);
writeln('| _ \ / ___|');
wait(100);
writeln('| / _ _ _ _ ____ _ ___ _ ____ _ _ | | ___ ___');
wait(100);
writeln('| |\ \ | || || ` || _ \ | |/ _ \| || _ \ | |_| | | |__ / _ \| _ \');
wait(100);
writeln('|_| \_\\____/|_|_|\___\_\|___/ \___|\___\_\\____ | \____|\___/| __/');
wait(100);
writeln(' Chop N Bank __/ / | |');
wait(100);
writeln(' |___/ |_|');
end;

procedure SetupScript;
SetupSRL;
DeclarePlayers;
ActivateClient;
LoginPlayer;
MakeCompass('n');
end;

procedure MainLoop;
repeat
Cop_findtree(Players[0].strings[0], Players[0].booleans[0]);
Cop_antiban('woodcutting', false);
Cop_dropload(StrToInt(Players[0].strings[1]));
Cop_antiban('woodcutting', false);
until(LoadsDone > StrToInt(Players[0].strings[3])
Logout;
end;

begin
Signature;
SetupScript;
MainLoop;
end.

Awkwardsaw

2009-08-25 07:01:58

can you post your includes? :)

also,

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].booleans[0] := False; //what does this do?
Players[0].strings[1] := '';
Players[0].strings[2] := ''; //this should be integer, or removed
Players[0].strings[3] := ''; //this should be integer, not string
Players[0].Active := True;
end;

in your chopping procedure, you forgot to call your x and y variables

for your antiban, MakeCompass(IntToStr(compassangle1));. you can just do MakeCompass(randomrange(1, 55)); and get rid of both variables, since makecompass uses a variant.

all in all, the script isnt to impressive =\ there wherent to many failsafes, and the tree finding isnt to impressive. its way to simple for me to say yes

keep trying though :)

JAD

2009-08-25 07:23:51

In Cop_findtree, you have it writeln the tree is not suported, and then exit every time. After the case, you should have it do like:


if(Colors[0] = 0)then
begin
Writeln('Tree type not supported');
TerminateScript;
end;
Make sure to terminate too since the script will not work without a valid tree color.

here:

if not Chop then
Mouse(x, y, 0, 0, true)
else
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
WaitOption('p down', 500+random(100));
Cop_wait(1500);

You are missing a begin/end after the else:


if not Chop then
Mouse(x, y, 0, 0, true)
else
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
WaitOption('p down', 500+random(100));
Cop_wait(1500);
end;

You don't wait too long between tree clicks.

In dropload, you are missing another begin/end after that if then, and the else is unnecessary. Make sure to put a begin/end after if/then's and elses if you are executing more than one statement of code.

I am going to give you a yes because I like your attitude and activity in the forums. The script isn't great but you make up for it in other areas.


Please post the whole include though, even if you didn't use all of it.

TRiLeZ

2009-08-25 08:13:21

DeclarePlayers:

Players[0].booleans[0]
So thats if the script right clicks or left clicks the tree? You should comment on that saying what that is.


Players[0].strings[2] := ''; //color of logs
Players[0].strings[3] := ''; //loads to do
Those should be integers not strings. Why does the user have to put in the log color. Why dont you make the script figure out what the color of the log is by what the user wants to chop?

Hmmm… it looks like Players[0].Strings[2] isn't even used in the script.

Cop_findtree:


begin
writeln('Tree type selected is not supported.');
exit;
end;

Everytime Cop_findtree is called, the above happens.


repeat
if FindObjCustom(x, y, [UpText], Colors, 5) then
result := true;
if not Chop then
Mouse(x, y, 0, 0, true)
else
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
WaitOption('p down', 500+random(100));
Cop_wait(1500);
until(InvFull);

What happens if there is a random?
If chop is false, SCAR will click on the tree and then right click it or where it was.

Cop_dropload:


if FindColor(itemcolor, x, y,b.x1, b.y1, b.x2, b.y2) then
Itemcolor is set to the tree type and not a color when it was called a while down…

You should use DTMs for dropping.

Add some wait time after it drops the log or else it may try to drop it multiple times.

Cop_antiban:

if not (randomtalker) then Exit;
randomtalker will always be false unless someone goes in your script and edits it so why have random talking in your antiban?

SayCurrentLevels(skill);
Skill will always be set to woodcutting unless someone goes in your script and edits it…

MainLoop:


procedure MainLoop;
repeat
Cop_findtree(Players[0].strings[0], Players[0].booleans[0]);
Cop_antiban('woodcutting', false);
Cop_dropload(StrToInt(Players[0].strings[1]));
Cop_antiban('woodcutting', false);
until(LoadsDone > StrToInt(Players[0].strings[3])
Logout;
end;

There is no begin…

What if the user is logged out?

Overall:
AntiBan
No AntiRandoms
No DTMs
Not MultiPlayer
No DDTMs
No TPAs

You have a great personality though, but not that great of a script. Its too simple.

Sorry but Im going to vote no.

If you dont make it, next time you apply, make sure your script has DTMs, TPAs, maybe DDTMs, use AntiRandoms and make the script multiplayer. If you do that then I'll vote yes for sure. :)

cycrosism

2009-08-25 10:09:06

That include only has 2 procedures you could of just put these into the actual script. Nice use of arrays, but I don't like that FindObjCustom, you should use your own customized TPA. The antiban looks pretty good but sometimes it might repeat the same statements over and over

Script too short and doesn't compile

Line 31: [Error] (19786:1): Unknown identifier 'PlayerOptions' in script 

Voted no, good luck for next time

caused

2009-08-25 15:54:25

It's called chop and bank but doesnt bank :D ?

I'll only vote anything when it banks :)

Naum

2009-08-25 15:55:42

Hello Runaway Cop, your script looks pretty basic, and reminds me of my first attempt :). But don't give up! The following reasons below, along with JAD's and Trilez(sp?), state why I voted no.

1) In your Include you could have cut out so many variables, as they're only used once.

2) In Cop_FindTree:

if FindObjCustom(x, y, [UpText], Colors, 5) then
result := true;

could have been:

Result := FindObjCustom(x, y, [UpText], Colors, 5);

3) You also need a Begin End; clause in your Cop_dropload procedure:

function Cop_dropload(itemcolor: integer): boolean;
var
b: tbox;
i: Integer;
begin
if not (LoggedIn) then Exit;
if not (InvFull) then Exit;
for i := 1 to 28 do
begin
b := InvBox(i);
if FindColor(itemcolor, x, y,b.x1, b.y1, b.x2, b.y2) then
result := true;
DropItem(i);
else
end;
end;

should be:

function Cop_dropload(itemcolor: integer): boolean;
var
b: tbox;
i: Integer;
begin
if not (LoggedIn) then Exit;
if not (InvFull) then Exit;
for i := 1 to 28 do
begin
b := InvBox(i);
if FindColor(x, y, ItemColor, b.x1, b.y1, b.x2, b.y2) then
Begin //needed here
result := true;
DropItem(i);
End; //neede here also
else
end;
end;

This is because SCAR reads one line down from an 'if' statement, so if you have 2 lines then you need to encapsulate it in a Begin and End clause. Also you muddled up your variables and the color :)

4) In Cop_AntiBan, there is no need for the two variables 'compassangle1' and 'compassangle2' as they're only used once. Variables are usually used if something is going to accessed twice, or to reduce lag, for example doing:


F := High(TPA);
For I := 0 to F Do

Is much more efficient than doing

For I := 0 To High(TPA) Do

However, in your case you could have just replaced this:

compassangle1 := randomrange(1, 55);
compassangle2 := randomrange(120, 250);
MakeCompass(IntToStr(compassangle1));
Cop_wait(50);
MakeCompass(IntToStr(compassangle2));

Cut out two variables and done this:

MakeCompass(IntToStr(randomrange(1, 55)));
Cop_wait(50);
MakeCompass(IntToStr(randomrange(120, 250)));

:)


5) Lacks the crucial multiplayer :/

6) The script is devoid of many failsafes and AntiRandoms, what happens If your caught in a random? Will it solve it?


7) The script wont actually compile, you need a Begin in these two procedures:

procedure SetupScript;
SetupSRL;
DeclarePlayers;
ActivateClient;
LoginPlayer;
MakeCompass('n');
end;

procedure MainLoop;
repeat
Cop_findtree(Players[0].strings[0], Players[0].booleans[0]);
Cop_antiban('woodcutting', false);
Cop_dropload(StrToInt(Players[0].strings[1]));
Cop_antiban('woodcutting', false);
until(LoadsDone > StrToInt(Players[0].strings[3])
Logout;
end;

to:

procedure SetupScript;
Begin
SetupSRL;
DeclarePlayers;
ActivateClient;
LoginPlayer;
MakeCompass('n');
end;

procedure MainLoop;
Begin
repeat
Cop_findtree(Players[0].strings[0], Players[0].booleans[0]);
Cop_antiban('woodcutting', false);
Cop_dropload(StrToInt(Players[0].strings[1]));
Cop_antiban('woodcutting', false);
until(LoadsDone > StrToInt(Players[0].strings[3])
Logout;
end;

;)

Coh3n

2009-08-25 19:06:34

Hey there. :)

Pretty much everything has been mentioned from what I can see, so I'm going to vote no. Not getting into members the first time shouldn't discourage you at all, there are plenty of people that don't get in their first time.

You are doing really good for a beginner scripter, and you should continue to learn and you'll be able to make it into members next time no problem. You also have a really good attitude in my opinion, which is something that is huge when getting into members. :)

Keep it up! :)

Torrent of Flame

2009-08-25 19:47:20

That Cop_FindTree was modified by marpis..
http://www.villavu.com/forum/showpost.php?p=619468&postcount=11

Harry

2009-08-25 20:01:19

I voted yes. Your script lacks some stuff people mentioned above, but you have a good attitude, and you look like you tried hard on your script. I am sure that you can easily improve once you are in members. You also have a fine attitude on the forums.

If you do not get in this time, I am sure if you fix up that stuff you can get in :)

Sabzi

2009-08-25 20:13:26

I was thinking what to say so I held my vote.
But Harry just said what I thought and couldn't write it down.
This means yes from me.

belgin fish

2009-08-25 22:55:50

You seem to contribute a lot to the forums, also your script could be a bit longer and more complex, but it seems alright to me. I'll vote yes since you seem to want to learn more aswell, so hopefully you will learn more once you get in :D

rogeruk

2009-08-26 01:16:10

For the same reasons TRiLeZ & JAD have already pointed out im going to have to vote no on this one.

Some of the basics of SCAR scripting are missing. Begins and ends not setup properly etc.

There are already dropping functions that work, there isnt really a need to make a custom one.

However, i dont see why you cant succeed next time (if your unsuccessful) by just learning a few things.

Good luck

Griff

2009-08-26 04:55:00

I voted yes, mainly because of your attitude and contribution to the forums. Nauman, Trilez and JAD got most of the things in your script. Your almost there for your scripting, so if you don't get in this time, continue to have a good attitude and make sure to re-apply in a month.

noidea

2009-08-26 05:34:35

I would usually vote no for an app like this, but I KNOW you you wont give up, and that you have potential ;) Yes

ian.

2009-08-26 05:42:34

Yes. :) Script isn't anything amazing (no offence =X), but for your first script attempt, you seem to really understand some stuff and how it works. :) And you're a really nice guy to talk to. ^^ Good luck! :)

Markus

2009-08-26 15:11:02

Your attitude is good! But please, when you apply with a powerchopper which doesn't even compile, no way I can vote yes.
Thus a No vote for obvious reasons. You'll get in sooner or later :)

bugger0001

2009-08-28 00:35:38

No compiling+not complex enough+way too short to show us your skills = me voting NO.

Sorry mate, I can't vote yes just based on your attitude and the fact that this is your first script, but you certainly are on your way of becoming a SRL member. If you need any kind of scripting help then send me a PM and I'll send you the further contacts ;)

Rich

2009-08-28 00:47:37

Sorry, but it's a "No."

- The script doesn't compile
- There is no use of DTMs, TPAs or anything advanced
- An include with two procedures which are pretty much pointless, is pointless
- The script is just too simple

You're heading in the right direction, and an attitude like yours will definitely boost your chances.

Sorry,
Richard.

Gu3st...

2009-08-28 01:01:41

I voted no, the script is too simple (and Nauman and JAD pretty much said what there is to say), but: Your attitude is very good, and you have a lot of potential! Keep up the good work and you would be there in no time! :)

Sir R. M8gic1an

2009-08-28 20:57:17

Great Attitude. Yes.

~RM

Naum

2009-09-01 16:15:12

Shouldn't this guy be in already? Or is it too close?

Sir R. M8gic1an

2009-09-01 18:03:25

From: Torrent of Flame
That Cop_FindTree was modified by marpis..
http://www.villavu.com/forum/showpost.php?p=619468&postcount=11



I Am sorry, you have a great attitude and potential, however, we require that the script you apply with be 90% yours. Feel free to apply in two weeks.

~RM