SRL Archive - Archive

t4q - SRL Member Application


t4q

2012-11-23 16:29:18

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
I don't know any. I started now with Simba


Are you a member of any other communities?
no


Tell us about yourself…
From: t4q
My name is Sander and I'm 25 years old. I've played RS since year 1999. I didn't play for many years but due to spare time I have I decided to try it again. Got bored in few months and thought that i could make my own script. I know that this script isn't much but I'm willing to learn.



Please show us one (or multiple) of your scripts.
program SuperHeat;
// Al Kharid Mithril SuperHeater
// SETUP:
// Coal 1st and Mithril 2nd bank slot
// Coal bag in 1st inventory slot and nature runes in 2nd
// Wear fire staff
// Drag superheat spell to action bar and put shortcut key to line 12
{$DEFINE SMART}
{$I SRL/SRL.Simba}

Const
key = '1'; // superheat action bar shortcut

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

with Players[0] do
begin
Name := 'Name'; // Player username
Pass := 'Pass'; // Player password
BoxRewards := ['XP', 'ostume', 'mote', 'oins', 'une', 'ssence'];
LampSkill := Skill_SMITHING;
Active := True;
end;
end;


procedure toBank1;
var
x, y: Integer;
begin
repeat

if FindColorTolerance(x, y, 2044437, 1, 1, 500, 500,3) then
MMouse(x,y,1,1);
until
(WaitUptextMulti(['Bank','ank'],1000))
end;

procedure toBank2;
var
x, y: Integer;
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, mouse_right);
WaitOption('ank Banker', 1000)
Wait(1500+Random(500));
end;



procedure Bank1;
var
d,f, m, n: Integer;
begin
MMouse(656, 222,10,10);
GetMousePos(d, f); // bars
Mouse(d,f, 0, 0, mouse_right);
Wait(70+Random(300));
WaitOption('ll', 1000)

MMouse(45,100,10,10);
GetMousePos(m, n); // coal
Mouse(m,n, 0, 0, mouse_right);
Wait(70+Random(300));
WaitOption('ll', 1000)
end;

procedure Bank2;
var
m, n: Integer;
begin
MMouse(570, 220,10,10);
GetMousePos(m, n);
Mouse(m,n, 0, 0, mouse_right); // fill bag
Wait(70+Random(300));
WaitOption('ill', 1000)
end;

procedure Bank3;
var
k, l: Integer;
begin
MMouse(90,100,10,10);
GetMousePos(k, l); // mithril
Mouse(k,l, 0, 0, mouse_right);
Wait(70+Random(300));
WaitOption('10', 1000)
end;

procedure Bank4;
var
z, c, a, q: Integer;
begin
MMouse(45,100,10,10);
GetMousePos(z, c);
Mouse(z,c, 0, 0, mouse_right); // coal
Wait(70+Random(300));
WaitOption('ll', 1000)

Wait(700+Random(300));
Mmouse(483, 38, 4,4 );
GetMousePos(a, q);
Mouse(a, q, 0, 0, mouse_left); // Close bank
Wait(500+Random(300));
end;



procedure Heat;

var
t,u:integer;
begin
FindNormalRandoms;
GameTab(tab_INV);
Mmouse(700, 300, 10, 10);
GetMousePos(t, u);
repeat
Wait(100+Random(50));
TypeSendEx(key, false);
Wait(300+Random(300));
Mouse(t, u, 0, 0, mouse_left);
Wait(300+Random(300));
until
WaitUptextMulti(['ar', 'bar'], 500)
end;



procedure Antiban;
begin
Case Random(40) Of
0..3: Wait(3000+Random(3000));
4..7: HoverSkill(skill_Smithing, False);
8: PickUpMouse;
9..10: Wait(10000+Random(20000));
11: begin
Wait(30200+Random(30000));
end;
12: begin
BoredHuman;
MakeCompass('N');
KeyDown(VK_UP);
Wait(550+Random(200));
KeyUp(VK_UP);
end;
13: begin
RandomMovement;
MakeCompass('N');
KeyDown(VK_UP);
Wait(550+Random(200));
KeyUp(VK_UP);
end;
14..40: begin
Wait(100+Random(30));
end;
end;
end;

procedure Setup;
begin
{$IFDEF SMART}
{$IFDEF SIMBAMAJOR980}
Smart_Server := 17;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ELSE}
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}
{$ENDIF}
SetupSRL;
ActivateClient;
DeclarePlayers;
if not LoggedIn then
LoginPlayer;
MakeCompass('N');
KeyDown(VK_UP);
Wait(850+Random(200));
KeyUp(VK_UP);
end;

begin
Setup;
repeat
toBank1;
toBank2;
Bank1;
Bank2;
Bank3;
Bank4;
Heat;
Antiban;
until not(LoggedIn)
end.

Footy

2012-11-23 16:36:57

Its a decent script, but I don't think it is SRL member worthy. You seem to have most of the basics down pat, but the intermediates(TPA's, ATPA's, DTM's) don't seem to be there yet. You should look over the Intermediate tutorial section and try to learn some of the stuff in there. I'd also suggest looking over these threads to see what should be in a SRL Member application. Good luck!

Guide to good standards
How to become an SRL Member
Intermediate Tutorial Section

t4q

2012-11-23 16:41:52

Thank you, I'll do that

riwu

2012-11-23 19:26:20

Hi!
First of all, you should improve on your standards. Your standards will be the first thing people notice when looking at your script, and therefore forming the first impression of your 'cleanness'. Make sure you read through http://villavu.com/forum/showthread.php?t=60288 and practice the right standards in all your future scripts :)


procedure toBank1;
var
x, y: Integer;
begin
repeat
if FindColorTolerance(x, y, 2044437, 1, 1, 500, 500,3) then
MMouse(x,y,1,1);
until
(WaitUptextMulti(['Bank','ank'],1000))
end;
This procedure contains a potential infinite loop. If the color is never found, you will never be able to break out of the loop and hence the script gets stuck. To avoid this, use failsafes and break timers.
Also, even if the script didn't find the color, it's still going to blindly wait for the uptext.


procedure toBank2;
var
x, y: Integer;
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, mouse_right);
WaitOption('ank Banker', 1000)
Wait(1500+Random(500));
end;
You should combine this with toBank1, as it may cause confusion to separate a procedure that opens the bank into 2.


procedure Bank1;
var
d,f, m, n: Integer;
begin
MMouse(656, 222,10,10);
GetMousePos(d, f); // bars
Mouse(d,f, 0, 0, mouse_right);
Wait(70+Random(300));
WaitOption('ll', 1000)

MMouse(45,100,10,10);
GetMousePos(m, n); // coal
Mouse(m,n, 0, 0, mouse_right);
Wait(70+Random(300));
WaitOption('ll', 1000)
end;
In the rest of your script, you rely heavily on blind clicks. This is prone to error, such as when the player run out of supply, or due to lag the items haven't appear in the inventory yet. Also try use SRL functions such as MouseItem/InvMouse, SetAngle(SRL_ANGLE_HIGH) as you are required to demonstrate your knowledge of the SRL include.

Your procedures are also poorly named, at first glance i thought you have 4 banking procedures as failsafe! Name it more meaningfully like 'WithdrawSupplies' etc, as well as combining them into a single procedure where possible.

As Footy said, the script is too simple, try learn more advanced techniques and you will make it one day ;)

Also, improve on your activity as the SRL member is not only a scripting rank, but a community rank as well. Try to hang around and help out others who have scripting/set-up problems.

NKN

2012-11-24 02:27:38

From: Footy
Its a decent script, but I don't think it is SRL member worthy. You seem to have most of the basics down pat, but the intermediates(TPA's, ATPA's, DTM's) don't seem to be there yet. You should look over the Intermediate tutorial section and try to learn some of the stuff in there. I'd also suggest looking over these threads to see what should be in a SRL Member application. Good luck!

Guide to good standards
How to become an SRL Member
Intermediate Tutorial Section


From: riwu
Hi!
First of all, you should improve on your standards. Your standards will be the first thing people notice when looking at your script, and therefore forming the first impression of your 'cleanness'. Make sure you read through http://villavu.com/forum/showthread.php?t=60288 and practice the right standards in all your future scripts :)


procedure toBank1;
var
x, y: Integer;
begin
repeat
if FindColorTolerance(x, y, 2044437, 1, 1, 500, 500,3) then
MMouse(x,y,1,1);
until
(WaitUptextMulti(['Bank','ank'],1000))
end;
This procedure contains a potential infinite loop. If the color is never found, you will never be able to break out of the loop and hence the script gets stuck. To avoid this, use failsafes and break timers.
Also, even if the script didn't find the color, it's still going to blindly wait for the uptext.


procedure toBank2;
var
x, y: Integer;
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, mouse_right);
WaitOption('ank Banker', 1000)
Wait(1500+Random(500));
end;
You should combine this with toBank1, as it may cause confusion to separate a procedure that opens the bank into 2.


procedure Bank1;
var
d,f, m, n: Integer;
begin
MMouse(656, 222,10,10);
GetMousePos(d, f); // bars
Mouse(d,f, 0, 0, mouse_right);
Wait(70+Random(300));
WaitOption('ll', 1000)

MMouse(45,100,10,10);
GetMousePos(m, n); // coal
Mouse(m,n, 0, 0, mouse_right);
Wait(70+Random(300));
WaitOption('ll', 1000)
end;
In the rest of your script, you rely heavily on blind clicks. This is prone to error, such as when the player run out of supply, or due to lag the items haven't appear in the inventory yet. Also try use SRL functions such as MouseItem/InvMouse, SetAngle(SRL_ANGLE_HIGH) as you are required to demonstrate your knowledge of the SRL include.

Your procedures are also poorly named, at first glance i thought you have 4 banking procedures as failsafe! Name it more meaningfully like 'WithdrawSupplies' etc, as well as combining them into a single procedure where possible.

As Footy said, the script is too simple, try learn more advanced techniques and you will make it one day ;)

Also, improve on your activity as the SRL member is not only a scripting rank, but a community rank as well. Try to hang around and help out others who have scripting/set-up problems.

This bout sums it up for me

Hobbit

2012-12-09 17:21:57

The poll has closed and you didn't quite make it this time. Please take the suggestions made in this thread and improve on the script and reapply in 3 weeks time :)

Cheers
Hobbit