SRL Archive - Archive

t4q - SRL Member Application


t4q

2013-03-26 15:23:58

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've only written Simba and Scar scripts


Are you a member of any other communities?
no


Tell us about yourself…
From: t4q
Iam 24 years old. On spare time i enjoy writing scripts and using them in RS. Really looking forward to be part of this awesome community.



Please show us one (or multiple) of your scripts.
It chops and burns willows on resource island. I also know 
how to use SPS walking with path generator




program PowerChopper;
{$DEFINE SMART}
{$I SRL/SRL.Simba}
var
c,x,y,i,t,toolong,break,breaks,breaking,breaktime,
exp,woodexp,willowDTM,fireexp,woodPerH,firePerH: integer;


procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name:= 'Username'; // Player username
Pass:= 'Password'; // Player password
Active:= True;
end;
end;

procedure SetupSmartClient;
begin
SRL_SixHourFix := True;
SMART_FixSpeed := True;
ClearDebug;
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
end;


function iscutting: Boolean;
var
WBox: TBox;
begin
WBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(WBox, 250, 500) > 300);
end;


procedure Antiban;
begin
FindNormalRandoms;
Case Random(64) Of
0..3: Wait(3000+Random(3000));
4..12: HoverSkill(skill_Woodcutting, False);
13: PickUpMouse;
14..16: begin
MMouseOffClient('rand');
Wait(10000+Random(20000));
PickUpMouse;
end;
17: begin
MMouseOffClient('rand');
Wait(30200+Random(30000));
PickUpMouse;
end;
18: begin
BoredHuman;
SetAngle(1);
end;
19: begin
RandomMovement;
SetAngle(1);
end;
20..40: begin
MakeCompass('rand');
Wait(600+Random(300));
end;
40..48: HoverSkill(skill_Firemaking, False);
49..50: begin HoverSkill('random', False);
Wait(600+Random(2300));
end;
51..55: begin
HoverSkill(skill_Firemaking, False);
Wait(600+Random(3300));
HoverSkill(skill_Woodcutting, False);
end;
56..60: begin
HoverSkill(skill_Woodcutting, False);
Wait(600+Random(3300));
HoverSkill(skill_Firemaking, False);
end;
60..62: begin RandomTab(True);
Wait(600+Random(3300));
RandomTab(True);
Wait(600+Random(3300));
end;
63: mouseBox(35, 121, 484, 265, mouse_move);
end;
end;


Procedure chop;
var
tmpCTS, i, l, r, counter:integer;
WillowTPA:TPointArray;
begin
if not LoggedIn then
LoginPlayer;
FindNormalRandoms;
if not (invfull) then
begin
if isuptext('own Wil') then
begin
clickmouse2(mouse_left);
wait(1000+random(500));
exit;
end;
marktime(toolong);
repeat
if timefrommark(toolong) > 5000+random(3000) then
MakeCompass('rand');
if timefrommark(toolong) > 60000+random(10000) then
terminatescript;
begin
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.48, 0.28);
FindColorsTolerance(WillowTPA, 2568754, MSX1, MSY1, MSX2, MSY2, 8);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(WillowTPA)
marktime(counter);
for i := 0 to L do
begin
r := random(L);
wait(randomrange(60, 200));
mmouse(WillowTPA[r].x, WillowTPA[r].y, 2, 2);
if waituptext('own Wil', 300) then
Break;
if timefrommark(toolong) > 8000+random(3000) then
MakeCompass('rand');
if timefrommark(counter) > 60000 then
begin
writeln('No trees!');
Terminatescript;
end;
end;
case random(5) of
0..2: begin
clickmouse2(mouse_right);
WaitOption('own Wil',1000);
flag;
wait(300+random(100));
end;
3..4: begin
wait(100+random(50));
if isuptext('own Wil') then
clickmouse2(mouse_left);
flag;
wait(300+random(100));
end;
end;
end;
until
iscutting or invfull;
case random(13) of
0..3:MakeCompass('rand');
4..7: wait(100);
9..10: MMouseOffClient('rand');
11: mouseBox(35, 121, 484, 265, mouse_move);
12: Antiban;
end;
end;
end;


procedure Proggy;
begin
ClearDebug;
woodexp:= ((exp) * 14 * 67) + ((exp) * 14 * 68);
fireexp:= ((exp*27*105) + (exp*90));
woodPerH := Round(((woodexp) / (GetTimeRunning / 1000.0)) * 3600);
firePerH := Round(((fireexp) / (GetTimeRunning / 1000.0)) * 3600);
Writeln('==========WOODCUTTER & BURNER=========');
Writeln('Running For: ' + TimeRunning);
Writeln('Woodcutting EXP Gained: ' + IntToStr(woodexp));
Writeln('Woodcutting EXP / Hour: ' + IntToStr(woodPerH));
Writeln('Done ' + IntToStr(breaks) + ' break(s) for ' + MsToTime(t, Time_Bare));
Writeln('Firemaking EXP Gained: ' + IntToStr(fireexp));
Writeln('Firemaking EXP / Hour: ' + IntToStr(firePerH));
Writeln('======================================');
end;


procedure TakeBreak;
begin
if timefrommark(break) > 111*60000+random(16*60000) then
begin
Writeln(Thetime + ': Taking break');
ExitToLobby;
marktime(breaking);
Wait(12*60000+Random(12*60000));
if not LoggedIn then
LoginPlayer;
Wait(8000+Random(7000));
Writeln(Thetime + ': Back from break');
breaks:= (breaks+1);
t:= (t + (TimeFromMark(breaking)));
FindNormalRandoms;
marktime(break);
end;
end;


procedure burn;
begin
if invfull then
begin
FindNormalRandoms;
willowDTM := DTMFromString('mggAAAHicY2NgYMhmYmBIAuJSIK4E4hQgjgNiUUYGBn4g5gZiWSBWBGIJIHa2FmHwcjNkMNYVYFBR4GaICrFhiAmzY+ABmoUNM+LAEAAAa14HVQ==');
if not FindDtm(willowDTM, x, y, 559, 212, 599, 246) then
terminatescript;
FreeDTm(willowDTM);
MouseItem(1, mouse_right);
WaitOption('ight', 500);
Wait(2300+Random(1000));
if isuptext('raft') then
clickmouse2(mouse_left)
else
MouseItem(5, mouse_left);
marktime(toolong);
repeat
if (timefrommark(toolong) > 5000+random(10000)) then
chop;
Wait(100+Random(50)); //wait for bonfire box
until
FindColorTolerance(x,y,11725050,364, 237,364, 237,10);
begin
Wait(100+Random(200));
mouseBox(343, 171, 375, 193, mouse_left); //click bonfire box
marktime(toolong);
Wait(500+Random(30300));
Antiban;
Wait(7500+Random(30300));
Antiban;
begin
repeat
Wait(500+Random(300));
until
not (ExistsItem(28)) or (timefrommark(toolong) > 115000+random(10000));
end;
begin
Case Random(11) Of
0..1: HoverSkill(skill_Firemaking, False);
2..9: Wait(200+Random(700));
10: Wait(1600+Random(1700));
end;
begin
exp:= (exp+1);
proggy;
chop;
end;
end;
end;
end;
end;



begin
SetupSmartClient;
exp:=0;
breaks:=0;
t:=0;
marktime(break);
Writeln(Thetime + ': Started script');
Repeat
if not iscutting then
chop;
burn;
TakeBreak;
Until(AllPlayersInactive)
end.

Ian

2013-03-26 15:28:29

I'd suggest improving your standards, it is very fast to do and greatly improves the readability of your script :)

Here's a guide: http://villavu.com/forum/showthread.php?t=3293

t4q

2013-03-26 15:32:02

Sorry about those.. I've read that but for me it's easier to do it like I do.. but I'll keep that in mind for the future

Ian

2013-03-26 15:35:16

From: t4q
Sorry about those.. I've read that but for me it's easier to do it like I do.. but I'll keep that in mind for the future


When you start having more complicated procedures and functions, proper indenting really helps to see which parts are which.

rj

2013-03-26 15:55:21

Simba actually has a built-in feature that makes perfect standards for you, http://villavu.com/forum/showthread.php?t=98548

It's best to get in the habbit though, but if you already have a big script it wouldn't hurt to use it

The Killer

2013-03-26 16:32:27

From: RJJ95
Simba actually has a built-in feature that makes perfect standards for you, http://villavu.com/forum/showthread.php?t=98548

It's best to get in the habbit though, but if you already have a big script it wouldn't hurt to use it

That's for lazy people :P, Plus it doesn't space stuff out which can make it easier to read.

Echo_

2013-03-26 16:39:07

The conventions make this script hard to evaluate. Also using MouseBox as antiban could have more randomized coordinates.

You also need to have more forum activity before applying for members. Although you have been here since 2007, you only have 84 posts. So being more active around the forums will help your chances greatly.

No from me

t4q

2013-03-26 17:19:55

From: Echo_
The conventions make this script hard to evaluate. Also using MouseBox as antiban could have more randomized coordinates.

You also need to have more forum activity before applying for members. Although you have been here since 2007, you only have 84 posts. So being more active around the forums will help your chances greatly.

No from me

I recently came back… I didn't use forums for a long time

Vinyl Scratch

2013-03-26 18:11:13

You're declaring x and y global, which is a bad thing in most cases. I do see you're using TPAs, which is advanced, and I do like that, but this is about all I can get from your script, because it's hard to read. Work on your standards, it'll make it SO much easier to fix, edit, read, use, and get into members with.

I'm glad that you're wanting to get in, but work on your skills some more. and best of luck on your app!

I'll not be voting, sorry.

cause

2013-03-26 21:04:49

Sorry not quite up to expectations. No walking implemented; No dtms; bad standards.
But actually quite a good start! With some improvements you could probably get members in a month again if you apply :)

Benny

2013-03-27 11:08:04

A little bit more activity and you have a yes from me, but until then sorry.

riwu

2013-03-29 03:47:21


for i := 0 to L do
begin
r := random(L);
wait(randomrange(60, 200));
mmouse(WillowTPA[r].x, WillowTPA[r].y, 2, 2);

The way you use TPA will result in it looping through same points and skipping some points. Also using ATPA would be much more efficient for RS scripts.
I'll vote no this time for lack of activity and too basic TPA usage :(

superuser

2013-03-29 06:46:18

Unfortunately, no from me :( A tad bit too simple script, lacking readable clear code and innovative, clever ideas.

Rich

2013-03-29 07:13:55

The script is far too simple, so it's a no from me. Sorry.

Hobbit

2013-04-11 17:43:19

Didnt make it this time, take the suggestions mentioned in the thread and feel free to apply in 3 weeks time :)