SRL Archive - Archive

insanomano - SRL Member Application


insanomano

2009-12-29 03:59:48

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
Html, Pascal


Are you a member of any other communities?
No


Tell us about yourself…
From: insanomano
I'm from canada, I'm a 16 year old guy, I like hanging out with friends, snowboarding, scripting, helping out if I can.



Please show us one (or multiple) of your scripts.
program InsaneGuildMiner;
{.include SRL\SRL.scar}

// My ClimbDownLadder and FindAndOpenBank procedures are bugged because of the UpText problem.

var
LoadsMined: integer;

const
Loads = 1; //Enter the amount of loads you would like to do.

procedure DeclarePlayers;
begin

HowManyPlayers:= 1;
CurrentPlayer:= 0;
NumberOfPlayers(HowManyPlayers);


Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'sern';
Players[0].Active := True;

{
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := False;


Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := False;


Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Active := False;


Players[4].Name := '';
Players[4].Pass := '';
Players[4].Nick := '';
Players[4].Active := False; }
end;

procedure AntiRandoms;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
if FindFight then
RunAway('N', True, 1, 5000);
FindLamp('Mining');
end;

procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Mining', False);
3: RandomMovement;
4: BoredHuman;
end;
end;

procedure CantFindRock;
begin
case Random(2) of
1: Mouse(651, 87, 4, 4, True);
2: Mouse(626, 70, 4, 4, True);
3: Mouse(609, 86, 4, 4, True);
4: Mouse(628, 100, 4, 4, True);
end;
end;

procedure ClimbDownLadder;
var
x, y: integer;

begin
repeat
if(FindObjCustom(x, y, ['limb-d', '-down'], [3960200, 4548475, 3952474, 4285045], 5)) then
Mouse(x, y, 1, 1, false);
ChooseOption('own');
until(FindBlackChatMessage('own'))
begin
SetAngle(true);
MakeCompass('N');
end;
end;

procedure SetPathToGuild(RadialWalkin: Integer);
begin
case RadialWalkin of
1: RadialWalkTolerance(6845560, 0, 90, 60, 2, 2, 10);
2: RadialWalkTolerance(6845560, 90, 200, 60, 2, 2, 10);
3: RadialWalkTolerance(6976890, 180, 270, 60, 2, 2, 10);
4: RadialWalkTolerance(6976890, 180, 270, 60, 2, 2, 10);
end;
end;

procedure WalkToGuild2;
var
i: integer;

begin
if not loggedin then exit;
Setrun(true);
for i := 1 to 4 do
begin
SetPathToGuild(i);
end;
ClimbDownLadder;
end;

procedure SetDTMs;
var
GemDTM: integer;

begin
GemDTM := DTMFromString('78DA634C676660E86664400682A2CD601A26C' +
'A180354D382AA86818109554D12504D330135E944A8C905AA6923' +
'A0261FD3CD58D5F41350930754338D809A34A09AE944F89D90397' +
'140355308A88906AAE923424D077E350065E90D53');
end;


Procedure FindAndOpenBank;
begin
AntiRandoms;
if not LoggedIn then Exit;
OpenBankFast('feb');
if(BankScreen) then
Exit;
if(not(BankScreen)) then
begin
repeat
OpenBankFast('feb');
until(BankScreen);
end;
end;

Procedure DepositItems;
var
GemDTM, x, y: integer;

begin
SetDTMs;
if (findcolorTolerance(x, y, 1976104, MIX1, MIY1, MIX2, MIY2, 5)) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('All');
end;
if (finddtm(GemDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('All');
end;
CloseBank
LoadsMined := LoadsMined + 1;
end;

Procedure ProgressReport;
Begin
ClearDebug;
Writeln('||========== ProgressReport ==========||');
Writeln(Padr('||- Finished: '+IntToStr(LoadsMined), 39)+ ' Loads -||');
Writeln(Padr('||- Ran for: '+(TimeRunning), 39)+ '-||');
Writeln('||====================================||');
End;



procedure SetPathToBank(RadialWalkin: Integer);
var
x, y: integer;

begin
case RadialWalkin of
1: if(FindColorTolerance(x, y, 3107432, 602, 16, 664, 43, 5)) then
begin
repeat
mouse(x, y, 1, 1, true);
Flag;
wait(200+random(200+random(200+random(200+random(200)))));
until(FindSymbol(x, y, 'bank') or (FindColorTolerance(x, y, 11976126, 243, 172, 275, 182, 5)))
end;
2: if(FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 1, 1, true);
Flag;
end;
end;
end;

procedure WalkToBank;
var
i: integer;

begin
if not loggedin then exit;
Setrun(true);
for i := 1 to 2 do
begin
SetPathToBank(i);
end;
end;

procedure WalkToGuild;
var
x, y: integer;

begin
if(not(FindColorTolerance(x, y, 1787389, 618, 101, 672, 147, 5))) then
begin
WalkToGuild2;
end;
if(FindColorTolerance(x, y, 1787389, 618, 101, 672, 147, 5)) then
Mouse(x, y, 1, 1, true);
Flag;
ClimbDownLadder;
end;


procedure ClickRockMM;
var
x, y: integer;

begin
if not LoggedIn then Exit;
if(FindColorSpiralTolerance(x, y, 5658202, 556, 75, 675, 142, 10)) then
begin
wait(1000+Random(2000+random(3000)));
Mouse(x, y, 4, 4, True);
Flag;
Exit;
If(not(FindColorSpiralTolerance(x, y, 5658202, 556, 75, 675, 142, 10))) then
begin
CantFindRock;
end;
end;
end;

procedure ClimbLadder;
var
x, y: integer;

begin
if(FindColorSpiralTolerance(x, y, 4345686, 13, 50, 380, 322, 2)) then
mouse(x, y, 1, 1, false);
ChooseOption('limb');
wait(2000);
if(FindColorTolerance(x, y, 66817, 589, 27, 663, 493, 5)) then
begin
repeat
if(FindColorSpiralTolerance(x, y, 4345686, 13, 50, 380, 322, 2)) then
mouse(x, y, 1, 1, false);
ChooseOption('limb');
wait(2000);
until(FindColorTolerance(x, y, 3107432, 602, 16, 664, 43, 5))
end;
end;

Procedure LeaveGuild;
var
x, y: integer;

begin
AntiRandoms;
begin
repeat
if(FindColorTolerance(x, y, 5658202, 560, 55, 610, 157, 10)) then
Mouse(x, y, 1, 1, true);
Flag;
until(not(FindColorTolerance(x, y, 5658202, 560, 55, 610, 157, 10)))
begin
if(FindColorTolerance(x, y, 2968703, MMX1, MMY1, MMX2, MMY2, 10)) then
Mouse(x, y, 1, 1, true);
Flag;
ClimbLadder;
wait(500+random(500+random(500+random(500))));
end;
end;
end;


procedure SetGameChatSilence;
var
x, y: integer;

begin
if(FindColorTolerance(x, y, 925998, 66, 483, 82, 498, 2)) then Exit;
if(not(FindColorTolerance(x, y, 925998, 66, 483, 82, 498, 2))) then
begin
writeln('Setting Chat..')
wait(1000+random(1000+random(500)));
Mouse(91, 493, 1, 1, true);
end;
end;

procedure WaitOnMining;
begin
if(IsMoving) then
begin
repeat
wait(100);
until(not(IsMoving))
end;
end;

procedure MineCoal;
var
x, y: integer;

begin
AntiBan;
AntiRandoms;
SetAngle(true);
if(Not(FindColorSpiralTolerance(x, y, 2305582, 96, 93, 451, 269, 5))) then
begin
CantFindRock;
end;
begin
if(FindColorSpiralTolerance(x, y, 2305582, 96, 93, 451, 269, 2)) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('Mine');
Flag
WaitOnMining;
end;
end;
end;

procedure MiningGuild;
begin
if not LoggedIn then Exit;
MakeCompass('N');
SetAngle(True);
SetRun(True);
ClickRockMM;
repeat
begin
MineCoal;
end;
until(InvFull);
begin
LeaveGuild;
wait(1000+random(500+random(500)));
WalkToBank;
end;
end;

Procedure SetupScript;
begin
SetupSRL;
ClearDebug;
DeclarePlayers;
ActivateClient;
wait(200);
SetGameChatSilence;
end;

procedure Banking;
begin
FindAndOpenBank;
DepositItems;
end;

procedure MainLoop;
begin
WalkToGuild;
MiningGuild;
WalkToBank;
Banking;
ProgressReport;
end;

begin
SetupScript;
LoginPlayer;
repeat
MainLoop;
until(LoadsMined >= (Loads))
end.

bbri06

2009-12-29 04:36:23

I'm not supposed to vote after so recently getting into SRL Members myself, but I will give you some constructive criticism.

First, in CantFindRock; you have

case Random(2) of
1: Mouse(651, 87, 4, 4, True);
2: Mouse(626, 70, 4, 4, True);
3: Mouse(609, 86, 4, 4, True);
4: Mouse(628, 100, 4, 4, True);
end;

Random(2) will result in either a 1 or a 2 (maybe 0, not sure on that actually) so case number 3 and 4 will never be used.

Although there is nothing really wrong with it,

wait(1000+Random(2000+random(3000)));
seems a little unnecessary to me.

When you deposit your items, consider using
Procedure Deposit(SlotFrom, SlotTo: Integer; vType: Variant);
which is in SRL.

Also, you should check out some tutorials on TPAs and consider using

function FindObjTPA(var X, Y: Integer; Color, Tol, CTS, ObjWidth, ObjHeight, minCount: Integer; UpText: TStringArray): Boolean;
rather than FindObjCustom.

In general, you have what looks like a good base but need some more advanced techniques and some more refining.

benjaa

2009-12-29 04:57:42

procedure CantFindRock;
begin
case Random(2) of
1: Mouse(651, 87, 4, 4, True);
2: Mouse(626, 70, 4, 4, True);
3: Mouse(609, 86, 4, 4, True);
4: Mouse(628, 100, 4, 4, True);
end;
end;

blind clicking ftl, sorry

cycrosism

2009-12-29 05:38:33

You should include multiplayer and some TPA's. That progress report could also look a bit better.

Naum

2009-12-29 05:57:00

Hey there, I've seen you around the forums quite a bit a while back.

The script looks okay-ish, but there are a few predominant errors:

In your ClimbLadder Procedure:

This bit of code:
    if(FindObjCustom(x, y, ['limb-d', '-down'], [3960200, 4548475, 3952474, 4285045], 5)) then
Mouse(x, y, 1, 1, false);
ChooseOption('own');

Should have a begin and end; clause, this is because it is needed after an if statement that has two lines related to it after, to do that. So it should look more like:

    if(FindObjCustom(x, y, ['limb-d', '-down'], [3960200, 4548475, 3952474, 4285045], 5)) then
begin
Mouse(x, y, 1, 1, false);
ChooseOption('own');
end;

Your Find and open bank Procedure:


There is a potential infinite loop here:
    repeat
OpenBankFast('feb');
until(BankScreen);

What if it doesn't ever find the bank? The script will just carry on searching for the bank. This is a big no no, instead have something like:

Repeat
OpenBankFast('feb');
Inc(I);
Until(BankScreen) Or (I >= 5);


In many of your Procedures

You use begin and end statements around lines which could do without them, for example:

  if(not(FindColorTolerance(x, y, 1787389, 618, 101, 672, 147, 5))) then
begin
WalkToGuild2;
end;

Could just be:

  if(not(FindColorTolerance(x, y, 1787389, 618, 101, 672, 147, 5))) then
WalkToGuild2;

Also, kinda weirdly, you don't them when they need to be used, and should be :p

  if(FindColorTolerance(x, y, 1787389, 618, 101, 672, 147, 5)) then
Mouse(x, y, 1, 1, true);
Flag;
ClimbDownLadder;


Should be:

if(FindColorTolerance(x, y, 1787389, 618, 101, 672, 147, 5)) then
begin
Mouse(x, y, 1, 1, true);
Flag;
ClimbDownLadder;
end;


This reinforces my first point about 'ClimbLadder'.

Addtionally, you really need to learn about using begin's and end's more frequently, you use them in completely diverse ways from the norm. As people before me mentioned, you need to sort out your case statements.

This procedure could be:

From this:

procedure WaitOnMining;
begin
if(IsMoving) then
begin
repeat
wait(100);
until(not(IsMoving))
end;
end;

To:

procedure WaitOnMining;
begin
While IsMoving Do Wait(100);
end;

^ That's THE best thing about a while loop, I'll link you to some tutorials later :).

That's all script syntax-wise. However, you need certain aspects demanded by fellow members :), such as:

-> Multi- Player
-> TPA (TPointArrays)
-> Making players logout/switch on failure.
-> DDTM's and Bitmaps

But, don't give up. Keep on trying, bounce back and come back better :)

insanomano

2009-12-29 06:07:59

thanks guys im rlly working on getting all this stuff down, thanks for the input.

BobboHobbo

2009-12-29 07:07:45

I like your attitude, keep it up and improve your script from this application and learn :). Then re-apply :).

Floor66

2009-12-29 07:36:28

From: bbri06
I'm not supposed to vote after so recently getting into SRL Members myself, but I will give you some constructive criticism.

First, in CantFindRock; you have

case Random(2) of
1: Mouse(651, 87, 4, 4, True);
2: Mouse(626, 70, 4, 4, True);
3: Mouse(609, 86, 4, 4, True);
4: Mouse(628, 100, 4, 4, True);
end;

Random(2) will result in either a 1 or a 2 (maybe 0, not sure on that actually) so case number 3 and 4 will never be used.

Although there is nothing really wrong with it,

wait(1000+Random(2000+random(3000)));
seems a little unnecessary to me.

When you deposit your items, consider using
Procedure Deposit(SlotFrom, SlotTo: Integer; vType: Variant);
which is in SRL.

Also, you should check out some tutorials on TPAs and consider using

function FindObjTPA(var X, Y: Integer; Color, Tol, CTS, ObjWidth, ObjHeight, minCount: Integer; UpText: TStringArray): Boolean;
rather than FindObjCustom.

In general, you have what looks like a good base but need some more advanced techniques and some more refining.


Random(2) makes [0..1], TWO numbers starting from zero :)
So Random(3) makes [0..2], THREE numbers starting from 0.

Bionicle

2009-12-29 11:31:51

I'm sorry, but my vote is no. You do know a fair bit, but you need to improve. You need failsafes…majorly.

All that i have to say to improve on your script has already been said, but one thing i noticed is that i never saw a single else. For all of those if…then statements, what if it wasn't able to do the 'if'? You need else's there too. For example:
if(FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 1, 1, true);
Flag;
end;
If it doesn't find the bank symbol, it will just go to your banking procedure, which will go to your findandopenbank procedure, which will in-turn get the script stuck in that infinite loop mentioned by naum above:
  if(not(BankScreen)) then
begin
repeat
OpenBankFast('feb');
until(BankScreen);
end;
And this is where Jagex drops the banhammer.
Try something as simple as this to prevent such disasters:
if(FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 1, 1, true);
Flag;
end else
begin
Logout;
TerminateScript;
end;

Also, i noticed that you have multiple players in your declare player section, but your script is not multiplayer. It is very simple to make your script multiplayer, all you need is to change something in your main loop:
begin
SetupScript;
LoginPlayer;
repeat
MainLoop;
until(LoadsMined >= (Loads))
end.
simply to
begin
SetupScript;
LoginPlayer;
repeat
repeat
MainLoop;
until(LoadsMined >= (Loads))
Nextplayer;
until(AllPlayersInactive);
end.

In your 'CantFindRock' procedure…all i have to say is wtf. What purpose does this achieve? If you want to do it, make it less banable. Blind clicking is not good. Not good at all:
procedure CantFindRock;
begin
NextPlayer;
end;

Now, at the end of your mainloop in your script, not in the multiplayer one i suggested, there is a flaw. What flaw? It will not log you out once all the loads are done. It will just end the script, and wait to be auto logged. Simply add a logout into there if you want to keep it single player:
begin
SetupScript;
LoginPlayer;
repeat
MainLoop;
until(LoadsMined >= (Loads))
Logout;
end.

Your AntiRandom is pretty good, but the FindLamp isn't compleated. Now that you get the random event gifts, you add BoxRewards into the declare players, and then you put in a TStringArray and use the uptexts of the items into that string array. Here is an example of how to incorporate it into your declare players:
  Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'sern';
Players[0].Active := True;
To
  Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'sern';
Players[0].BoxRewards := ['amp', 'mote', 'ostume']; //this will randomly choose between a lamp, an emote and a costume from the event box.
Players[0].Active := True;

Your AntiBan needs some more advanced methods, if you want you can look at my tutorial for AntiBan in my signature.

I think i saw this mentioned before, but I'm not too sure so I'm just going to say it:
if(FindObjCustom(x, y, ['limb-d', '-down'], [3960200, 4548475, 3952474, 4285045], 5)) then
Mouse(x, y, 1, 1, false);
ChooseOption('own');
You need a begin, end nest in there because there is more then one procedures after the if…then. It should look like this:
if(FindObjCustom(x, y, ['limb-d', '-down'], [3960200, 4548475, 3952474, 4285045], 5)) then
begin
Mouse(x, y, 1, 1, false);
ChooseOption('own');
end;

I still have more to say, but unfortunately I am short on time right now. If you want, I can post more later, just reply with a yes or no. Your attitude is great, and for most people, that is the main part of voting. You have a great attitude, and a sufficient amount of posts, and if it were just based on that, I would have voted yes. I hope you take all I have said into consideration, and will incorporate it into your script. You need some more advanced techniques to be accepted into SRL Members, go learn some more, and re-apply next month :).

~bionicle

insanomano

2009-12-29 14:21:14

thanks, yea bionicle you dont have to post anymore thats fine, i guess i'm just gonna have to take a month and make a killer script then come back and re-apply :D

Kyle Undefined

2009-12-29 15:13:34

I like your attitude, and if you come back with a script that incorporates the suggestions the other people have said, then it will be a yes :)

~Camo

Gu3st...

2009-12-29 17:33:19

From: Camo Developer
I like your attitude, and if you come back with a script that incorporates the suggestions the other people have said, then it will be a yes :)

~Camo
Same, there is no problems in your attitude, and that's 70% of the vote, but still; the script is a bit too simple. Read some more advanced tuts and come back sometime later with a kick-ass script and it will be a yes from me :)

Griff

2009-12-29 18:18:07

You're script isn't quite there yet, just take the feedback given to you above, and apply again later. I'm going to vote yes now because of your attitude, but if you don't get in, make sure you apply again :)

Daniel

2009-12-29 22:27:57

I vote yes :)
From: bbri06
I'm not supposed to vote after so recently getting into SRL Members myself

Why? You have every right to vote when you become an SRL Member at any stage.

bbri06

2009-12-30 00:39:53

@Dan's The Man

"F.A.Q.
Q: When should you be allowed to vote?
A: You should not vote on applications as soon as you get into SRL Members. Wait a couple of weeks and see how others are taking the applications and learn."

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

First point in there.

Daniel

2009-12-30 06:27:09

From: bbri06
@Dan's The Man

"F.A.Q.
Q: When should you be allowed to vote?
A: You should not vote on applications as soon as you get into SRL Members. Wait a couple of weeks and see how others are taking the applications and learn."

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

First point in there.


Haha, I remember making that pointer up :p But it's not a rule, it's a pointer, a guide. It isn't necessary, but you vote when you think you're ready (which is practically what it is saying) ;)

Sir R. M8gic1an

2009-12-30 07:52:06

Good logic, good structure, good standards; However, I'd like to see some more advanced object finding.

~RM

insanomano

2010-01-01 02:32:09

well guys you can close this thread because i know im not not ready quite yet :P, but i will make a script soon that implements all your guys info and its gonna be sweet aha, happy new years everyone have a good night and thanks for all the help.

Baked0420

2010-01-01 08:48:17

happy new years insanomano and everyone else.

I think you made a few mistakes from maybe not looking it over once real good before submitting but it's not bad, like RM said, you have good logic and structure.

Not so sure if you'll make it this time, 2 yes 11 no, but I'll vote yes and make it 3, you have a better attitude then a lot of people who have gotten in and understand how to script and I know you can improve even more.

better luck next time. :)

Sir R. M8gic1an

2010-01-02 07:54:01

Feel free to re-apply in two weeks, once you've had the time to learn and improve all that was mentioned :)

~RM