SRL Archive - Archive

simba4sho - SRL Member Application


simba4sho

2011-12-24 17:54:42

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
a little c++, php, pascalscript


Are you a member of any other communities?
sythe, rsbuddy


Tell us about yourself…
From: simba4sho
I am a 17 year old student who moved to Canada with my family during my early high school years. Leaving all my friends back home, I have been on the computer more and more.

Being somewhat involved in runescape cheating, the only place I could come to post-update was srl. The color bots intrigue me and i continue to read tutorials by the day, trying to incorporate new techniques at all times.

I can't want to get more involved in the forums and continue to write more efficient, foolproof, and reliable scripts.

For my script below, i have some future updates planned once I get better at some things:
- Making reliable DTM's – Add each one and let the use simply enter which herb they'll use
- More failsafes and a better failcount method

Any input into improving my script will be appreciated



Please show us one (or multiple) of your scripts.
program HerbCleaner;
{$DEFINE SMART}
{$i SRL\SRL.scar}

const
Item_Column = 9;

var
x, y, FailCount, HCleaned: Integer;

const
HerbDTM = 'mlwAAAHicY2dgYJACYlUgVoOylYBYBoglgLgAiIuAOAeIK4C4BIpBYlwhPAzs7OwMioqKDBwcHGBsZyTNwBPDx8AOlMeFGfFgKAAAbOoGSA==';
ChestColor = 9804692;

Procedure DeclarePlayers;
var
i, NumberOfPlayerz: Integer;
begin
NumberOfPlayerz := 1;
NumberOfPlayers(NumberOfPlayerz);
CurrentPlayer := 0;
for i := 0 to (NumberOfPlayerz - 1) do
begin
Players[i].Name := '';
Players[i].Pass := '';
Players[i].Pin := '';
Players[i].BoxRewards := ['xp', 'grimy'];
LampSkill := 'Hunter';
Players[i].Active := True;
end;
end;

procedure stopscript(msg: string);
begin
Writeln('ending script: ' + msg);
Closewindow;
Logout;
TerminateScript;
end;

procedure report;
begin
Cleardebug;
Writeln('simba4sho''s herb cleaner v1.0');
Writeln('************************');
Writeln('Herbs cleaned: ' + IntToStr(hcleaned));
Writeln('Time Running: ' + TimeRunning);
Writeln('***********************');
end;

function countdtm(dtm: String): Integer;
var
dtmf: longint;
n, count: Integer;
B: TBox;
begin
if not getcurrenttab = 25 then GameTab(25);
count := 0;
dtmf := dtmfromstring(dtm);
for n := 1 to 28 do
begin
B := InvBox(n);
if FindDTM(dtmf, x, y, B.x1, B.y1, B.x2, B.y2) then
count := count + 1;
end;
freedtm(dtmf);
result := count;
end;

function FindChest: boolean;
var
T: Integer;
TPA: TPointArray;
TP: TPoint;
Begin
MakeCompass('w');
if PinScreen then InPin(Players[Currentplayer].Pin);
if (not loggedin) or bankscreen then exit;
FindColorsTolerance(TPA, ChestColor, 270, 130, 310, 205, 15);
if Length(TPA) > 0 then
Begin
TP := MiddleTPA(TPA);
Mouse(TP.x, TP.y, RandomRange(-2, 2), RandomRange(-2, 2), False);
Result := WaitOption('pen', 500);
end else begin
SpiralMouse(x, y, 10, 10, 500, 500, 'pen', 15, 50);
GetMousePos(x, y);
Mouse(x, y, RandomRange(-2, 2), RandomRange(-2, 2), False);
Result := WaitOption('pen', 500);
end;
T := GetSystemTime + 3000;
repeat
Wait(10);
if (GetSystemTime > T) then Exit;
result := bankscreen;
until(result)
End;

function CleanHerbs: boolean;
var
n: integer;
begin
if not loggedin then exit;
CloseWindow;
if ((countdtm(herbdtm) > 0) and (countdtm(herbdtm) < 28)) then StopScript('not enough herbs. logging out');
if countdtm(herbdtm) > 0 then
begin
for n := 1 to 28 do
InvMouse(n, 1);
end;
wait(randomrange(750, 1523));
Result := countdtm(herbdtm) = 0;
if result then Hcleaned := hcleaned + 28;
Report;
end;

function bankgoods: boolean;
begin
if PinScreen then InPin(Players[Currentplayer].Pin);
if not (bankscreen and loggedin) then exit;
Depositall;
wait(randomrange(230, 482));
Result := WithdrawEx(Item_Column, 1, 0, ['rimy']);
CloseBank;
end;

begin
Smart_Server := 54;
Smart_Members:= True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
FailCount := 0;
if not loggedin then loginplayer;
SetAngle(true);

repeat
if not loggedin then loginplayer;
case countdtm(herbdtm) of
0: begin
if not findchest then FailCount := FailCount + 1 else FailCount := 0;
if not bankgoods then FailCount := FailCount + 1 else FailCount := 0;
end;
else begin
if not CleanHerbs then FailCount := FailCount + 1 else FailCount := 0;
end;
end;
if failcount > 6 then stopscript('failcount exceeded');
until(false)
end.

RISK

2011-12-24 17:57:17

You shouldn't use global variables, try using local variables instead.

E: You should also clean up your code a little. It's kind of hard to read.

simba4sho

2011-12-24 18:17:44

From: RISK
You shouldn't use global variables, try using local variables instead.

E: You should also clean up your code a little. It's kind of hard to read.


I use 4 global variables: x, y, hcleaned, and failcount

Failcount is my global failure count increment so i can increase and reset it in different procedures and functions.

Hcleaned is my global count of items cleaned for report purposes.

x, y are just so i don't have to re-declare them in each individual procedure and function.

I'm guessing you're just commenting on the global use of x and y and not the others? I guess I could do them locally, but may I ask why declaring them globally is necessarily bad?

———————-

Also, what aspects of my coding makes it hard to read? I did kind of have a various range of capitalization that I need to work on. Are the standards and indenting fine?

Thanks for the input.

Dynamite

2011-12-24 18:27:43

From: simba4sho
I use 4 global variables: x, y, hcleaned, and failcount

Failcount is my global failure count increment so i can increase and reset it in different procedures and functions.

Hcleaned is my global count of items cleaned for report purposes.

x, y are just so i don't have to re-declare them in each individual procedure and function.

I'm guessing you're just commenting on the global use of x and y and not the others? I guess I could do them locally, but may I ask why declaring them globally is necessarily bad?

———————-

Also, what aspects of my coding makes it hard to read? I did kind of have a various range of capitalization that I need to work on. Are the standards and indenting fine?

Thanks for the input.


Most of your standards are good, but I hate if then statements being on the same line.
Also, what in Santa's mind is:
case countdtm(herbdtm) of
0: begin
if not findchest then FailCount := FailCount + 1 else FailCount := 0;
if not bankgoods then FailCount := FailCount + 1 else FailCount := 0;
end;
else begin
if not CleanHerbs then FailCount := FailCount + 1 else FailCount := 0;
end;
end;

PatDuffy

2011-12-24 18:28:13

No for the 8 posts.

I normally do not look at post-counts, but a new member with only 8 posts does not meet the requirement of being an active member of the community.

cycrosism

2011-12-24 18:33:23

Script is too simple, you are not an active enough person in the community. No from me.

Kyle Undefined

2011-12-24 23:01:35

Script is too simple and you're just too new to the community. Great start though! :)

Main

2011-12-25 01:03:42

Good try, very good try. As long as your learning its all good. But unfortunately like others have said, the script is a bit too simple. But since you already started to learn, am sure you can learn a bit more and that will brush up your skills and it should be good enough in no time :p

TomTuff

2011-12-25 01:15:24

At least it wasn't a ripped script. Get more active in the community, work on your scripting skills, then come back and I'm sure you'll be able to be an SRL member.

Hobbit

2012-01-07 16:38:45

The poll has closed and you didn't make it this time. Please take the suggestions made here and read some more in the tutorial section and improve your script. You may reapply in 4 weeks time.


Cheers
Hobbit