SRL Archive - Archive

Peanuts - SRL Member Application


Peanuts

2012-08-03 05:20:39

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
This is the first thing I've tried learning.. I've always wanted to learn to program and I'm enjoying it so far.


Are you a member of any other communities?
No?


Tell us about yourself…
From: Peanuts
I'm just a 22 yr old guy from Australia.. Loved runescape pretty much since i was like.. 12 lol. Found villavu a couple years ago but finally decided to try coding a bit more seriously..
N i wanna keep learning now! :D



Please show us one (or multiple) of your scripts.
Tried to attach and couldn't so im just going to paste...


program PeanutsClaySoftener;

{$DEFINE SMART}
{$I SRL/SRL.Simba}
{$I SPS/SPS.Simba}
{$IFDEF SIMBAMAJOR980}
{$I SRL/SRL/Misc/PaintSmart.Simba}
{$ELSE}
{$I SRL/SRL/Misc/SmartGraphics.Simba}
{$ENDIF}

var

Fountain, Bank : TPointArray;
NumberOfTimes, HowManyLoads, Totalloads, x, y, clay, DTM1, DTM123: Integer;


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

with Players[0] do
begin
Name := ''; // Player Username?
Pass := '; // Player Password?
Nick := ''; // Player nickname?
Active := True; // Using Player?
NumberOfTimes := 45; // How many trips

end;
end;


function FountainColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.06, 2.61);

if not (FindColorsTolerance(arP, 16034954, MSX1, MSY1, MSX2, MSY2, 2)) then
begin
Writeln('Failed to find the fountain color');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
Result := arC[i];
Break;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
end;


Procedure StatsGuise (wat:String);
Begin
Status(wat);
Disguise(wat);
End;


function ClickFountain: Boolean;
var
ex, yi : Integer;

begin
StatsGuise('Finding Fountain');
if FindObjCustom(ex, yi, ['ount'], [FountainColor], 6) then

begin
MMouse(ex, yi, 4, 4);
Wait(100);
Mouse(ex, yi, 3, 3, false);
wait(100 + random(200));
ChooseOption('ount');
wait(1000 + random(1000));
StatsGuise('Clicking Fountain');
end;
end;


procedure MakeAll;
begin
StatsGuise('Finding ''Make All'' Option');
if FindDTM(DTM123, x, y, MCX1, MCY1, MCX2, MCY2) then
begin
MMouse(x,y,5,5);
mouse(x,y,5,5,true);
StatsGuise('Clicked ''Make All''');
end else
Writeln('Couldn''t Click Clay');

end;


procedure GetBank;

var x, y: integer;

begin
FindNormalRandoms;
repeat
if FindObj(x, y, 'anker', 4664372, 10) then
Mouse(x, y, 1, 1, false);
ChooseOption('ank Ban');
wait(1000+random(500));
until (BankScreen)
end;

procedure BankClay;
begin
FindNormalRandoms;
if OpenBank('veb', false, true) then
DepositAll;
Wait(100 + random(400));
WithDraw(0, 0, 28);
end;

procedure Banking;

begin
repeat
FindNormalRandoms;
StatsGuise('Banking');

OpenBankFast('veb');
if BankScreen then
begin
Wait(100 + random(200));

Wait(100 + random(300));
exit;
end;
if not FindBank('veb') then
begin
SPS_WalkPath(Bank);
Wait(500 + random(200));

end;


Wait(200 + random(500));
until(false)

end;


procedure ClickClay;
begin
StatsGuise('Finding Clay');
if FindDTM(Clay, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x,y,5,5);
mouse(x,y,5,5,true);
StatsGuise('Clicked Clay');
end else
Writeln('Couldn''t Click Clay');


end;


Procedure AntiBan;
begin
StatsGuise('Antiban');
if not LoggedIn then Exit;
begin
x := Random(51)
case x of
0: HoverSkill('Attack', False);
1..2: HoverSkill('Strength', False);
3..6: HoverSkill('hitpoints', False);
7..9: HoverSkill('magic', False);
10..12: HoverSkill('range', False);
13..15: PickUpMouse;
16..25: RandomMovement;
26..27: RandomRClick;
28..32: BoredHuman;
33..34: ExamineInv;
35..48: Wait(100+random(1500));
49..50: Wait(100+Random(2000));
end;
Wait(500+Random(500));
end;
end;

procedure Proggy;
begin
ClearDebug;
Writeln('');
Writeln('');
Writeln('|---------------------------------------------------------------------------------------------------------------------|');
Writeln('');
Writeln(' Bot running: ' + TimeRunning + ' ');
Writeln(' Loads Done: ' + IntToStr(Totalloads) + ' ');
Writeln(' Clay softened: ' + IntToStr(28 * Totalloads) + ' ');

Writeln('|---------------------------------------------------------------------------------------------------------------------|');
Writeln(' ');

end;

procedure BProggy;
begin
ClearDebug;
Writeln('');
Writeln('');
Writeln('|---------------------------------------------------------------------------------------------------------------------|');
Writeln(' === BOT ON BREAK === ');
Writeln(' Bot running: ' + TimeRunning + ' ');
Writeln(' Loads Done: ' + IntToStr(Totalloads) + ' ');
Writeln(' Clay softened: ' + IntToStr(28 * Totalloads) + ' ');

Writeln('|---------------------------------------------------------------------------------------------------------------------|');
Writeln(' ');

end;


procedure SetSps;
begin
SPS_Areas := ['12_7','11_7'];
SPS_Setup(RUNESCAPE_SURFACE, ['12_7','11_7']);

Fountain := [Point(4844, 2969), Point(4827, 2933), Point(4807, 2924)];
Bank := [ Point(4807, 2924), Point(4827, 2933), Point(4844, 2969)];

end;


procedure SetupScript;
begin
{$IFDEF SMART}
{$IFDEF SIMBAMAJOR980}
Smart_Server := 72;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ELSE}
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}
{$ENDIF}



SetupSRL;
SetSps;
DeclarePlayers;


end;


procedure Mainloop;

var
color: String;

begin
ClickNorth(1);
Wait(500 + random(200));
wait(500 + random(1000));
SetAngle(SRL_ANGLE_HIGH);

repeat
repeat
GetBank;
BankClay;
if GetMMLevels('run', Color) < 30 then
RestUntil(90);
Wait(100 + random(100));
StatsGuise('Walking To Fountain');

SPS_WalkPath(Fountain);
Wait(600 + random(500));
ClickClay;
wait(100 + Random(500));
ClickFountain;
wait(2000 + random(500));
MakeAll;
Wait(200 + random(200));

wait(4000+ random(2000));
FindNormalRandoms;
Wait(RandomRange(6000, 7000));
AntiBan;
Wait(13000 + random(1000));
FindNormalRandoms;
wait(5500 + random(500));
StatsGuise('Walking To Bank');
SPS_WalkPath(Bank);
Wait(100 + random(100));
FindNormalRandoms;
Proggy;
HowManyLoads := HowManyLoads + 1;
Totalloads := Totalloads + 1;
until(Totalloads = 15 or 31 or 47 or 62 or 78 or 93)
BProggy;
ExitToLobby;
Wait(200000 + random(300000));
HowManyLoads := HowManyLoads - HowManyLoads;
RandomWorld(False, False);
wait(500 + random(500));
ChangeWorld(RandomWorld(False, False));

until(Totalloads = NumberOfTimes)
NextPlayer(false);
end;

begin

DTM1:= DTMFromString('mbQAAAHicY2VgYDBhYmCwB2JHILYGYnMg/sTIwPAeiH9C8UsgjnTkZXDU52TgNrAH4zB7HgZsgBELBgMAfHEIsQ==');
clay:= DTMFromString('mggAAAHicY2NgYHjLzMDwBYjfAfFzZgj/JRDnMjIw5AFxJhBnA3EREBcAcXuRD1AXEwaWY8AOGHFgCAAA6O0Jrw==');
DTM123 := DTMFromString('mlwAAAHicY2dgYNgIxPugeAcQrwLi1UC8GYjfMTIwPAbi90D8DYg/A/FTIH4IxDHOvEAVTFixHJBkJANDAQCcCQxO');

StatsGuise('SettingUpScript');
SetupScript;
LoginPlayer;
MouseSpeed := 12;
repeat
mainloop;
until(AllPlayersInactive);
begin
FreeDTM(DTM1);
FreeDTM(clay);
FreeDTM(DTM123);
Proggy;
end;
end.

Daniel

2012-08-03 05:27:55

G'day Peanuts,

Unfortunately, I can tell you now, your script will not satisfy many SRL Members and above :( I highly advise you to read this thread (yes, read the entire thing ;)), which will hopefully give you an understanding as to why :) You are however definitely on the right track! Keep going! :)

All I can say is best of luck!

Regards,
~ Daniel.

masterBB

2012-08-03 05:35:11

I see you put much work in this script. Yet it doesn't meet my requirements for becoming a SRL member.

J J

2012-08-03 05:37:36

You are using TPointArrays but they are generated by ACA and I definately want to see custom made TPA functions.
FindObjCustom is also a pretty basic way of finding things, and many members don't like to see those in an application.
Another thing is that you are doing stuff like this:
Mouse(ex, yi, 3, 3, false);
wait(100 + random(200));
ChooseOption('ount');
There is a function that basicly does the same, with even more accuracy:
if WaitOption() then
Which is a boolean so you can make a failsafe if the option does not exist within a certain timeframe.

You also have some infinite loops in there, which is never good.
This is personal preference:
HowManyLoads := HowManyLoads + 1;
but I would use Inc(HowManyLoads) which achieves the same.

For freeing DTM's you can use FreeDTMs instead of having three lines
FreeDTM(DTM1);
FreeDTM(clay);
FreeDTM(DTM123);

Overall:
It looks like you can improve on many things, mainly:
  • More advanced ways of finding objects such as custom made TPA functions
  • Adding failsafes to your script
  • Finding out about more Simba functions which allow you to achieve the same in less lines

It's definately not a bad script, but not good enough for me to vote yes *yet*.

Peanuts

2012-08-03 05:43:53

Thanks guys.

I see I may have gotten a bit ahead of myself.

I will return!

Close application?

fre

2012-08-03 05:44:01

Nice standards,
but the script is a little bit to basic.
It is a very good start tough.
Keep up the good work, and i am sure if you put a little effort into it you can reapply soon with a more advanced script.

Jakkle

2012-08-03 12:25:42

Functions/Procedures like these,

procedure GetBank;

var x, y: integer;

begin
FindNormalRandoms;
repeat
if FindObj(x, y, 'anker', 4664372, 10) then
Mouse(x, y, 1, 1, false);
ChooseOption('ank Ban');
wait(1000+random(500));
until (BankScreen)
end;

function ClickFountain: Boolean;
var
ex, yi : Integer;

begin
StatsGuise('Finding Fountain');
if FindObjCustom(ex, yi, ['ount'], [FountainColor], 6) then

begin
MMouse(ex, yi, 4, 4);
Wait(100);
Mouse(ex, yi, 3, 3, false);
wait(100 + random(200));
ChooseOption('ount');
wait(1000 + random(1000));
StatsGuise('Clicking Fountain');
end;
end;
That find things could end up clicking anything with the same records over and over again so it's always best to check for the up text of the object before clicking.
It's a nice start but not good enough for a SRL Memeber status so a no from me. Good luck with your future progress :)

nielsie95

2012-08-05 04:24:25

From: Peanuts
Thanks guys.

I see I may have gotten a bit ahead of myself.

I will return!

Close application?


You may try again in two weeks!