SRL Archive - Archive

Minkino - SRL Member Application


Minkino

2009-06-12 10:26:56

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?
No


What is your general programming knowledge?
A little C++ and VB6


Are you a member of any other communities?
www.voide.org


Tell us about yourself…
From: Minkino
I enjoy almost everything about computers and have been using them since i was 3. I enjoy modding my asus eee pc 1000h. I found srl-forums after being bored downloading dodgy *autoers* so i joined the forums planning to leech. I then got interested in the programming off and on. And now i finished my willow cutter and banker, which has spurred me to make more scripts.



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

Here is an Updated Script.



// Thanks to Rubix and TViYHU and OSMM this could not be possible without them.

{ }
{ Place character in Draynor Bank then log out }
{ }
{ }
{ }


program MyFirstWoodCut;
{.include SRL/SRL/misc/SMART.scar}
{.include SRL\SRL.Scar}
{.include SRL\SRL\Reflection\Reflection.scar}
{.include SRL/SRL/Skill/WoodCutting.scar}


const
//<><><><><>Loads<><><><><>\\
LoadsPerPlayer = 40; //Loads per player before switching
// Player Setup \\
{<><><><><><><><><><><><><><><><><><><><>}

procedure DeclarePlayers;
begin

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Pin := '';
Players[0].Active := True;

end;

{<><><><><><><><><Do Not Edit Below this Line><><><><><><><><><><><>}
label
lblPlayers;

var
x, y, LoadsNum, LoadsNum2, StartTime: integer;
Banked: boolean;


//<><><><><><><><><><>Anti Randoms<><><><><><><><><><>\\

procedure AntiRandoms;
begin
if (FindFight) then
RunAway('N', True, 1, 1500);
FindNormalRandoms;
FindNonInventoryRandoms;
FindBirdsNest;
end;

//<><><><><><><><><><>Anti Ban<><><><><><><><><><>\\

procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(11) of
1: RandomRClick;
2: HoverSkill(LampSkill, False);
3: RandomMovement;
4: BoredHuman;
5: DoEmote(400 + Random(90));
6: SleepAndMoveMouse(500 + random(500));
7: Pickupmouse;
8: GameTab(4);
9: RandomMovement;
10: ChooseOption('Cancel');
11: IdleTime(250 + random(750), 450, 0.5);
end;
end;

//<><><><><><><><><><>Chop Tree<><><><><><><><><><>\\


procedure CutTree;

var
WillowPoint: TPointArray;
ArrayLength, I, H, Attempts, ClickCount: Integer;
WillowATPA: T2DPointArray;
ClickedTree: Boolean;
begin
MakeCompass('N')
FindColorsSpiralTolerance(MSCX, MSCY, WillowPoint, 6307183, MSX1, MSY1, MSX2, MSY2, 15);
WillowATPA := TPAtoATPA(WillowPoint, 25)
ArrayLength := GetArrayLength(WillowATPA);
writeln('Tpas found: ' + IntToStr(ArrayLength));
H := High(WillowATPA);
for I := 0 to H do
begin
repeat
ClearDebug;
ArrayLength := Length(WillowATPA)
WriteLn(ArrayLength)
MiddleTPAEx(WillowATPA[i], x, y); //Used to get the middle of the current sorted tpa
MMouse(x, y, 3, 3);
Wait(50 + Random(50));
if IsUpText('illow') then
begin
AntiBan;
WriteLn('Found Willow Clicking On it....');
Mouse(x, y, 0, 0, True);
writeln('Clicked On Willow');
AntiRandoms;
AntiBan;
ClickedTree := True;
Wait(10000 + Random(2000));
if (ClickedTree = True) then
ClickCount := ClickCount + 1;
end;
if (Length(WillowATPA) = 0) then
begin
Wait(100 + random(100));
Attempts := Attempts + 1;
end;
until (invfull) or (ClickCount = 15) or (Attempts = 50)
end;
end;



//<><><><><><><><><><>Walk To Bank<><><><><><><><><><>\\


function WalkToBank: boolean;
begin
if (not (LoggedIn)) then
begin
NextPlayer(false);
end else
WalkToTile(Point(3095, 3242), 2, 0);
end;


//<><><><><><><><><><>Banking<><><><><><><><><><>\\

procedure Bank;
var
LoadBanked: boolean;
begin
if not LoggedIn then Exit;
Wait(300 + random(160));
R_SetAngle(50);
R_OpenBankBooth('db');
wait(2000 + Random(500))
if (R_BankScreen) then
begin
LoadBanked := True;
DepositAll;
Banked := True;
LoadsNum := LoadsNum + 1;
LoadsNum2 := LoadsNum2 + 1;
CloseBank;
writeln('Load Banked');
Wait(150 + random(278));
MakeCompass('S');
end;
if (not (LoadBanked)) then
begin
Writeln('Could Not Find Bank')
NextPlayer(False);
end;
end;

//<><><><><><><><><><>Walk to Willows<><><><><><><><><><>\\

function WalkToWillows: boolean;
begin
if (not (LoggedIn)) then
begin
NextPlayer(false);
end else
WalkToTile(Point(3087, 3234), 2, 0);
end;


function CheckInventory: boolean;
begin
if InvFull then
Result := True;
end;

//<><><><><><><><><><>Setup Script<><><><><><><><><><>\\

procedure SetupScript;
begin
MarkTime(StartTime);
keydown(VK_UP);
end;


procedure MainProc;
begin
CheckInventory;
if (not (CheckInventory)) then
begin
CutTree;
AntiBan;
WalkToBank;
Bank;
AntiBan;
WalkToWillows;
AntiBan;
end else
WalkToBank;
Bank;
AntiBan;
WalkToWillows;
CutTree;
AntiBan;
end;


begin
SMARTSetUpEX(55, False, True, False);
SetTargetDC(SMARTGetDC);
SetupSRL;
DeclarePlayers;
lblPlayers:
LoginPlayer;
SetupScript;
repeat
MainProc;
if (not LoggedIn) then
NextPlayer(false);
until (LoadsNum = LoadsPerPlayer) or (StartTime = 21600000);
NextPlayer(true);
if AllPlayersInactive then
begin
exit;
end else
goto lblPlayers;
end.

Da 0wner

2009-06-12 10:34:06

Script seems old because it requires SRL stats.

Script also looks simple and I do not think that it meets SRL standards.

I do not see a DTM anywhere nor a custom TPA. You do have findobjcustom however. But you can try making your own with ATPA/TPAs.

No. Sorry, try to add DTMs, walking (not symbols, RRW), TPAs, etc.

ZaSz

2009-06-12 10:34:12

No from me right now, to simple.
Learn cases, ddtms, some road walk procedures, and try not to use findobjcustom

Nice try though. If you don't make it. Try again in a month.

Waddo

2009-06-12 15:08:52

No,
No DTM's, no DDTM's, the walking is not walking all your doing is finding a symbol which means no RRW or RW.

begin
SMARTSetUpEX(55, False, True, False);
SetTargetDC(SMARTGetDC);
SetupSRL;
ActivateClient;
SetupScript;
LoginPlayer;
repeat
MainProc;
AntiBan;
until (LoadsNum = LoadsPerPlayer) or (not LoggedIn);
NextPlayer(true);
end.

That wont work after first player has finished his loads or is (not (LoggedIn)) it will log in the second player then finish the script, also if the loop ends because your player is (not (LoggedIn)) then you want to do NextPlayer(False).

It's to simple.

Check out this http://www.villavu.com/forum/showthread.php?t=32568
Work through it then improve your script. Good luck next time.

Ps. The first time I applied I was sure I was going to get in I thought it was awesome Possibly because it had a form in and lots of lines however most of them lines where the form. Turns out it wasn't :P I didn't eithen call SetupSRL; :) , dont let this application ruin your spirit.

ZephyrsFury

2009-06-12 15:16:26

You don't have a main loop:


begin
SMARTSetUpEX(55, False, True, False);
SetTargetDC(SMARTGetDC);
SetupSRL;
ActivateClient;
SetupScript;
LoginPlayer;
repeat
MainProc;
AntiBan;
until (LoadsNum = LoadsPerPlayer) or (not LoggedIn);
NextPlayer(true);
end.

It'll finish the first player, switch players with NextPlayer then just finish the script.

Camaro'

2009-06-12 15:21:23

From: ZephyrsFury
You don't have a main loop:


begin
SMARTSetUpEX(55, False, True, False);
SetTargetDC(SMARTGetDC);
SetupSRL;
ActivateClient;
SetupScript;
LoginPlayer;
repeat
MainProc;
AntiBan;
until (LoadsNum = LoadsPerPlayer) or (not LoggedIn);
NextPlayer(true);
end.

It'll finish the first player, switch players with NextPlayer then just finish the script.


I think he thought this was like another language, and it repeat everything between begin - end. I dont no.

Colluci

2009-06-12 16:03:17

No.

Reasons stated above. Anyways, keep learning and scripting. You'll get there next month!

NCDS

2009-06-12 23:16:36


procedure CheckInventory;
begin
if (InvFull) then
begin
WalkToBank;
end else
begin
ChopTree;
end;
end;
Can just be:

procedure CheckInventory;
begin
if (InvFull) then
begin
WalkToBank
else
ChopTree;
end;
which remove's the unnecessary begin..end;

Although FindObjCustom can be a very useful function, it is recommended that you make your own custom object finding function's atleast to apply with.

not a big deal, I just want to make sure you are aware that

FFlag(0);
can just be:

Flag;
because 'Flag:' is 'FFlag(0);' although if you wish to use any other integer than '0' FFlag(); is necessary.


Writeln('Willows dould not be found. Switching Players....');
Simple spelling error's like this lead me to believe you rushed this. When you create/release a script (especially to apply with) you should always take your time, look over your code, make sure everything is the way you want it. Be proud of your script's. Then, when you are 100% positive it is how you want it and is the best you can do…release it :)


procedure AntiRandoms;
begin
if (FindFight) then
RunAway('N', True, 1, 1500);
FindNormalRandoms;
FindLamp('');
end;
FindLamp(); is already called in FindNormalRandoms, so no need to call them separately.


You ask for user's to input their bank pin twice.
Once as a const.

YourPin = ''; //Make same for all players if none leave blank
and again in declare player's

procedure DeclarePlayers;
begin

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Pin := ''; // Here
Players[0].Active := True;

end;
It would be much more convenient/user friendly to just use the one in DeclarePlayer's.
To do so, simply put:

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

as of right now, I vote no.
Fix the problem's I have listed as well as your multiplayer issues pointed out by other's and anything else I may have missed then re-apply in a month or so and as long as you fix thing's correctly you should get in with out a problem.

Don't be afraid to log onto IRC sometimes for help, or check out Tutorial Island here on the forum's!

Dynamite

2009-06-12 23:22:03

No. Read what I posted on your thread.

T~M

P1nky

2009-06-13 00:32:24

add rrw/dtms/ddtm/tpas.

No for now.
but dude your headed in right direction and atleast you didn't bomb the app, tbh you know the basics. Now lets get started on the intermediate Tuts :)

Da 0wner

2009-06-13 00:48:00

From: NCDS

procedure CheckInventory;
begin
if (InvFull) then
begin
WalkToBank;
end else
begin
ChopTree;
end;
end;
Can just be:

procedure CheckInventory;
begin
if (InvFull) then
begin
WalkToBank
else
ChopTree;
end;
which remove's the unnecessary begin..end;

Although FindObjCustom can be a very useful function, it is recommended that you make your own custom object finding function's atleast to apply with.

not a big deal, I just want to make sure you are aware that

FFlag(0);
can just be:

Flag;
because 'Flag:' is 'FFlag(0);' although if you wish to use any other integer than '0' FFlag(); is necessary.


Writeln('Willows dould not be found. Switching Players....');
Simple spelling error's like this lead me to believe you rushed this. When you create/release a script (especially to apply with) you should always take your time, look over your code, make sure everything is the way you want it. Be proud of your script's. Then, when you are 100% positive it is how you want it and is the best you can do…release it :)


procedure AntiRandoms;
begin
if (FindFight) then
RunAway('N', True, 1, 1500);
FindNormalRandoms;
FindLamp('');
end;
FindLamp(); is already called in FindNormalRandoms, so no need to call them separately.


You ask for user's to input their bank pin twice.
Once as a const.

YourPin = ''; //Make same for all players if none leave blank
and again in declare player's

procedure DeclarePlayers;
begin

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Pin := ''; // Here
Players[0].Active := True;

end;
It would be much more convenient/user friendly to just use the one in DeclarePlayer's.
To do so, simply put:

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

as of right now, I vote no.
Fix the problem's I have listed as well as your multiplayer issues pointed out by other's and anything else I may have missed then re-apply in a month or so and as long as you fix thing's correctly you should get in with out a problem.

Don't be afraid to log onto IRC sometimes for help, or check out Tutorial Island here on the forum's!


procedure CheckInventory;
begin
if (InvFull) then
begin
WalkToBank
else
ChopTree;
end;

That SHOULD give an error NCDS.

It should be:
procedure CheckInventory;
begin
if (InvFull) then
WalkToBank
else
ChopTree;
end;
Right?

NCDS

2009-06-13 05:31:29

oops!


procedure CheckInventory;
begin
if (InvFull) then
begin
WalkToBank
else
ChopTree;
end;
end;
I believe that follows proper standard's.
But either one should work.
Good Catch :)

Minkino

2009-06-13 14:36:27

^^^^^^^^^^^^^^^^^^
Updated script at top of page, if you think i have just copied and pasted
something then ask me a question and ill answer

Minkino

BobboHobbo

2009-06-13 14:59:16

No you obviously just Copy and Pasted the TPA code from an tut, i bet you know nothing about them.

marpis

2009-06-13 15:08:03

you should put the new script to the 1st post, so people would see it before they vote.
I still have to say No.
Your tree finding function never gets its Attempts to 50, cause it exits after the 1st failure.

if (Length(WillowATPA) = 0) then
begin
Wait(100 + random(100));
Attempts := Attempts + 1;
Writeln('Willows could not be found. Switching Players....');
Exit; // it will exit even if Attempts is 1.
end;
In your mapwalking you use DTM, not DDTM. DDTM = Dynamic DTM, which means that it is a DTM of which points color tolerance may vary. DDTMs are made with functions, that look somewhat like this:

function LoadDDTM(tolerance: integer): integer;
begin
MyRoadColor := FindRoadColor;

DTMMainPoint.x := 876;
DTMMainPoint.y := 84;
DTMMainPoint.AreaSize := 1;
DTMMainPoint.AreaShape := 0;
DTMMainPoint.Color := MyRoadColor;
DTMMainPoint.Tolerance := tolerance; // this is set in function parameters, see?

DTMSubPoints[0].x := 764;
DTMSubPoints[0].y := 234;
DTMSubPoints[0].Are....
...
DTMSubPoints[1].x := 654;
DTMSubPoints[1].y := 32;
...
DTMSubPoints[2].x
// and so on, read tuts about this

To the banking thing: you should make it a function like this:
Take these couple of functions from here:
http://www.villavu.com/forum/showthread.php?t=46310 (FindBankEx, OpenBankBooth)

function DepositLogs: boolean;
var
x, y: integer;
begin
if not FindBankEx('db', x, y, 'move') then
if not YourOwnFindBank then exit;
wait(3000+random(1000));
if not OpenBankBooth('db') then
if not YourOwnOpenBank then exit;
wait(1000+random(1000));
DepositAll;
result := not InvFull;
end;



end;

To-Do-List:
- DDTM to mapwalking
- use functions! you only have procedures
- failsafes, you have barely any.

boberman

2009-06-13 19:17:41

I really like how clean your code is. As far as a good looking set of code, this is some of the best I've seen.

The downside is that the script isn't complex enough. No doubt you could do better. Just do some more walking and I think you could get in easy.

Minkino

2009-06-14 17:37:32

I have just updated the script at the top of page, give me your worst.

NCDS

2009-06-14 18:25:44

From: Minkino
^^^^^^^^^^^^^^^^^^
Updated script at top of page, if you think i have just copied and pasted
something then ask me a question and ill answer

Minkino


Copy and paste?

MiddleTPAEx(WillowATPA[i], x, y); //Used to get the middle of the current sorted tpa

marpis

2009-06-14 21:37:08

Looks like you've changed your walking to reflection?
If you made this script with 100% reflection, it'd be like 70 lines long.

Reflection walking is a very good option, but it still doesn't show skill.
In fact, reflection is alot easier to use than color.

Minkino

2009-06-15 01:53:41

Copy and paste?

MiddleTPAEx(WillowATPA[i], x, y); //Used to get the middle of the current sorted tpa


Yeah copied and pasted from a tutorial then changed to my script

XcanadamanX

2009-06-15 02:14:46

in your antiban…random(11) is from 0-10 not 1-11.

Phran6

2009-06-17 00:21:58

var
WillowPoint: TPointArray;
ArrayLength, I, H, Attempts, ClickCount: Integer;


ArrayLength := Length(WillowATPA)
WriteLn(ArrayLength)
MiddleTPAEx(WillowATPA[i], x, y); //Used to get the middle of the current sorted tpa
MMouse(x, y, 3, 3);

writeln(ArrayLength); when ArrayLength is an integer ?

{*******************************************************************************
function MiddleTPAEx(TPA: TPointArray; var x, y: Integer): Boolean;
Description: Stores the coordinates of the middle of the TPointArray a to X & Y.
*******************************************************************************}
MiddleTPAEx(WillowATPA, x, y); //Used to get the middle of the current sorted tpa
you writed it yourself or copied but you dont know what it mean…
Used to get the middle of the current sorted tpa: when WillowATPA is an atpa and not an array of tpa.




ArrayLength is an integer youw ill get an errore, did you event tested it befor post it here ? holding vote.

senrath

2009-06-17 00:26:04

From: francishelie
var
WillowPoint: TPointArray;
ArrayLength, I, H, Attempts, ClickCount: Integer;


ArrayLength := Length(WillowATPA)
WriteLn(ArrayLength)
MiddleTPAEx(WillowATPA[i], x, y); //Used to get the middle of the current sorted tpa
MMouse(x, y, 3, 3);

writeln(ArrayLength); when ArrayLength is an integer ?

ArrayLength is an integer youw ill get an errore, did you event tested it befor post it here ? holding vote.


…

What error? SCAR 3.20 autowraps values when used in Writeln.

Phran6

2009-06-17 00:28:39

ahh sorry im old school, but he should change it since not everyone use scar 3.20

senrath

2009-06-17 00:30:41

From: francishelie
u sure ?? writeln(x:string) ..


I said 3.20. You're obviously using 3.15b or earlier. In 3.20d it comes up as Writeln(x).

ShowerThoughts

2009-06-17 00:31:53

From: NCDS
oops!


procedure CheckInventory;
begin
if (InvFull) then
begin
WalkToBank
else
ChopTree;
end;
end;
I believe that follows proper standard's.
But either one should work.
Good Catch :)


lol @ you?

procedure CheckInventory;
begin
if (InvFull) then
begin
WalkToBank
end else
ChopTree;
end;

Phran6

2009-06-17 00:53:37

From: Hermen
lol @ you?

procedure CheckInventory;
begin
if (InvFull) then
begin
WalkToBank
end else
ChopTree;
end;



lol @ you?

procedure CheckInventory;
begin
if (InvFull) then
WalkToBank
else
ChopTree;
end;
just shortened :P

Da 0wner

2009-06-17 12:13:06

Guys, read the entire thread…I already mentioned that and had it the shortened way -.-. Srsly.
From: Da 0wner
procedure CheckInventory;
begin
if (InvFull) then
begin
WalkToBank
else
ChopTree;
end;

That SHOULD give an error NCDS.

It should be:
procedure CheckInventory;
begin
if (InvFull) then
WalkToBank
else
ChopTree;
end;
Right?

Naike

2009-06-18 04:12:45

Damn, 0-18.

Yes, just becuase no one should walk away with 0 yes's.
Keep trying, don't give up becuase it failed this time,

Sir R. M8gic1an

2009-06-25 21:09:28

I am sorry, but it seems like you won't make it this time. You're on the right path, good luck, and may the scripting gods be with you. Feel free to re-apply in a month.

~RM