SRL Archive - Archive

Chris - SRL Member Application


Chris

2012-01-18 11:22:43

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
HTML, XHTML, MySQL, PHP(little bit) and JavaScript


Are you a member of any other communities?
Nope :p


Tell us about yourself…
From: Chris
I am Chris, I live in Holland, I will finish the Senior General Secondary Education (if thats a correct translation from dutch) this year, I am 16 year old (yes I started playing RuneScape when I was 10) and erm.. what else do you want to know? Ask me :p



Please show us one (or multiple) of your scripts.
Some stuff to know:
I have made this script to get 99 cooking, it already got me from 70 to 94 and im still using it, once I have reached 99 I will release it in public and add stuff like sharks and monkfish :p


{
Al Kharid cooking script by Chris J (my first script)

Instructions:

* Have your fish in the third bank thingy.
* Make sure you are at the Al Kharid bank, next to the Bank Booth
* Change the ToDo=0 to the amount of fish you want to be cooked
* Change the "Fish2Cook" number to the number of the fish you want to cook :)
* Fill your username and password in below or log in yourself

Good luck achieving 99 cooking!
}
program AKCookerByChrisJ;
{.Include SRL/SRL/Misc/smart.simba}
{.include SRL/SRL.simba}
Const
{
1 = Salmon
2 = Tuna
3 = Lobster
4 = Swordfish
5 = Plain Pizza
}
Fish2Cook = 2; // What fish are you cooking?
ToDo = 3750; // How much fish do you want to cook?
Time2Run = 0; // The maximum time you want to cook before switching players
BankRow = 0; // For 'ToDo' and 'Time2Run', 0 = unlimited :)
BankCol = 2;


{ while isMoving do
wait(200+random(200)); }

var LoadsDone, Raw_Fish, Cooked_Fish, StartTime:Integer;
MyFish:string;
NextAcc:Boolean;


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

Players[0].Name := ''; // Your Username
Players[0].Pass := ''; // Your Password
Players[0].Pin := ''; // Your bank PIN (if you have one)
Players[0].Active := True;
{
Players[1].Name := ''; // Your second account's Username
Players[1].Pass := ''; // Your second account's Password
Players[1].Pin := ''; // Your second account's bank PIN
Players[1].Active := True;
}
end;


function GetRunTime:string;
var
RunTime, MinutesRan, SecondsRan, SecondsMinusMinutes:Integer;
TempVar:string;
begin
RunTime := GetSystemTime - StartTime;
SecondsRan := RunTime / 1000;
if RunTime < 60000 then
begin
result := 'Ran for: ' + IntToStr(RunTime / 1000) + ' seconds.';
end;
if RunTime > 60000 then
begin
MinutesRan := (RunTime / 1000)/60;
TempVar := IntToStr(MinutesRan);
SecondsMinusMinutes := StrToInt(TempVar);
SecondsMinusMinutes := SecondsRan - (SecondsMinusMinutes * 60);
result := 'Ran for: ' + IntToStr(MinutesRan) + ' minutes and '
+ IntToStr(SecondsMinusMinutes) + ' seconds.';
end;
end;


function GetMinutesRan:Integer;
var
RunTime:Integer;
begin
RunTime := GetSystemTime - StartTime;
RunTime := RunTime / 1000;
result := RunTime;
end;


function GetRangePos:Tpoint;
var
TPA:TPointArray;
A:TIntegerArray;
ATPA:T2DPointArray;
I, H, x, y, L, R:Integer;
Tp:Tpoint;
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1450139, MSX1, MSY1, MSX2, MSY2, 15);
ATPA := TPAtoATPA(TPA, 65);
If Length(ATPA) = 0 then
begin
exit;
end;
H := High(ATPA);
writeln('TPAs found: ' + inttostr(H + 1));
SetArrayLength(A, H + 1);
for I := 0 to H do
begin
MiddleTPAEx(ATPA[I], x, y);
L := High(ATPA[I]) + 1;
A[I] := L;
writeln('TPA: ' + inttostr(I) + ', co-ords: ' + inttostr(x) +
', ' + inttostr(y) + ' Tpoints found in this TPA: ' + inttostr(L));
end;
R := 0;
for i := 0 to High(a) do
if (a[R] < a[i]) then
R := i;
writeln(R);
writeln('TPA ' + inttostr(R) + ' is the range.');
MiddleTPAEx(ATPA[R], x, y);
writeln('found range');
Tp.x := x;
Tp.y := y;
result := Tp;
end;


function LoadFishDetails:Boolean;
begin
case Fish2Cook of
1:
begin
MyFish := 'almon';
Raw_Fish := DTMFromString('mggAAAHicY2NgYBAAYkkgFgJiLiBmBWJhIOaD8kHi3FB1HEA8OSYISDJhYF4G7IARB4YAALByAg8=');
Cooked_Fish := DTMFromString('mlwAAAHicY2dgYOAHYnEo5gZidiDmAWIRIBYEYj4kMQEglgRiISDeYSUFJJmwYl4giQsz4sFQAADhwAJe');
end;
2:
begin
MyFish := 'una';
Raw_Fish := DTMFromString('mWAAAAHicY2FgYOACYmkg5gFiQSCWBWJJIBYGYkUgPrJ7N5BkgmMOBlTAiIZBAACjUwL9');
Cooked_Fish := DTMFromString('mlwAAAHicY2dgYBACYhEglgBiaSDmAWJ2IBYGYn6onABUjBUqzwbEyRFhQJIJK+ZlwA0Y8WAoAADSTwIJ');
end;
3:
begin
MyFish := 'obster';
Raw_Fish := DTMFromString('mlwAAAHicY2dgYBACYmEgFodiEJ8diFmAmBfK5gRiESCWgfJBanLsFIEkE1YM0ocLMOLBUAAAuf8ByQ==');
Cooked_Fish := DTMFromString('mlwAAAHicY2dgYBABYkkoBrF5gJgbiAWgWAKIeaFiIDlhIJYF4lWhIBkmrBikHhdgxIOhAADm9wI8');
end;
4:
begin
MyFish := 'ordfish';
Raw_Fish := DTMFromString('mggAAAHicY2NgYBACYikozQnE3EAsBsR8QMwPFeOFigkD8Y6mQ0CSCQOD1GADjDgwBAAA8hYC5A==');
Cooked_Fish := DTMFromString('mggAAAHicY2NgYOAGYlEglgNiCSAWAGJpIBaBsvmBmAOI2aFi06IXAkkmDMwKJLFhRhwYAgDdtwKe');
end;
5:
begin
MyFish := 'izza';
Raw_Fish := DTMFromString('mWAAAAHicY2FgYBACYlUgFgFiSSAWB2JBIGYDYhkgXrFgIpBkgmMuBlTAiIZBAACS+gKg');
Cooked_Fish := DTMFromString('mWAAAAHicY2FgYOAHYhkgVgRiUSAWB2IJIOYFYlYg7qyJBpJMcMzFgAoY0TAIAAB4QgIb');

end
end;
result := True;
end;


function Finished:boolean;
var x, y:Integer;
begin
if FindDTM(Cooked_Fish, x, y, 560, 211, 596, 243) then
begin
Inc(LoadsDone);
{ writeln(' ');
writeln('Loads Done: ' +inttostr(LoadsDone));
writeln(' '); }
if ToDo = 0 then
begin
result := False;
end;
if ToDo > 1 then
begin
if (LoadsDone * 28) > ToDo then
begin
result := True;
end else
result := False;
end;
end else
if Time2Run > 1 then
begin
if GetMinutesRan > Time2Run then
begin
writeln('Time is up, switching to next player.');
result := True;
end;
end;
end;


procedure customdepositAll;
//var x, y, DepositBMP:integer;
begin
DepositAll;
{DepositBMP:= BitmapFromString(14, 12, 'meJxd0cELAUEUx3EHbdkWxcGSyJ' +
'YtN+HgQGnZwyZKUm5Kubi6OTr6F/0zvvrlNU29pjczn5n3Zrc434p' +
'/lIOgPtoT1UZS6cza2aN/ePd2LyJeXj3WnBx/4/Qi3FrcJbvbpzG2' +
'AOxGyZqEI6yQYwjuN8nuJj2RhIM5gHJqgxHmSlYYlYOZgknAJG71W' +
'h5Z6FqqGGYK027+WREkulOYF6l5sBkxq66A0aG8yzgIc6WeQ5N8KL' +
'coUtiTMH6BFVXdUpgyxsOxJ3WnSWvSlTSp7/kFAJFnpw==');
if FindBitmapToleranceIn(DepositBMP, x, y, 342, 291, 391, 330, 25) then
begin
FreeBitmap(DepositBMP);
x := x + random(15);
y := y + random(14);
Mouse(x, y, -4, -4, True);
if BankScreen then
begin
Writeln('Deposited Inventory');
end;
end else
begin
FreeBitmap(DepositBMP);
Writeln('DepositAll failed');
Writeln('RuneScape got updated, logging and terminating');
LogOut;
NextPlayer(False);
end; }
end;


procedure SetUp;
begin
Smart_Members := False;
Smart_Server := 1;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
if LoadFishDetails then
writeln('Loaded the Fish DTMs, starting in 2 seconds.');
MouseSpeed := 12 + random(2);
wait(2000 + random(500));
StartTime := GetSystemTime - 2000;
if (not(LoggedIn)) then
begin
Loginplayer;
wait(1200 + random(400));
end;
end;


procedure FindRandoms;
begin
if (not(LoggedIn)) then
begin
Loginplayer;
end;
FindNormalRandoms;
end;


procedure Bank;
var x, y, kill:Integer;
Bank_Booth:TPointArray;
begin
if (FindDTM(Raw_Fish, x, y, 553, 211, 598, 248)) then
begin
Exit;
end;
MakeCompass('n');
FindRandoms;
while isMoving do
wait(200+random(200));
{ if (not(BankScreen or PinScreen)) then
begin
wait(500 + random(400));
mouse(217, 130, 3, 3, False);
WaitOptionMulti(['se-qu','uickly','ancel'], 1500);
wait(500 + random(300));
findcolortolerance(Bank_Booth, x, 9350042, 144, 112, 229, 189, 20);
end; }
begin
MouseSpeed := 16 + random(2);
if FindColorsSpiralTolerance(MSCX, MSCY, Bank_Booth, 9350042, 144, 112, 229, 178, 41) then
begin
writeln('Found our color ' + IntToStr(Length(Bank_Booth)) + ' times in our Bank_Booth array');
MiddleTPAEx(Bank_Booth, x, y);
mouse(x, y, 3, 3, False);
writeln('right clicked mid TPA');
wait(500 + random(100));
//mouse(x + random(5), y + 40 + random(10), 3, 3, True);
WaitOptionMulti(['ank bank','uickly','ancel'], 1500);
wait(1800 + random(300));
end;
end;
if (BankScreen or PinScreen) then
begin
writeln('bank is open');
end else
begin
if FindColorsTolerance(Bank_Booth, 9350042, 144, 112, 229, 178, 50) then
begin
writeln('Found our color ' + IntToStr(Length(Bank_Booth)) + ' times in our Bank_Booth array');
MiddleTPAEx(Bank_Booth, x, y);
mouse(x + 15, y, 3, 3, False);
writeln('right clicked mid TPA (second try)');
wait(700 + random(100));
mouse(x + random(5), y + 40 + random(10), 3, 3, True);
//WaitOptionMulti(['se-qu','ank','ancel'], 1500);
wait(1800 + random(300));
end;
if (not(BankScreen or PinScreen)) then
begin
wait(1000);
if (not(BankScreen or PinScreen)) then
begin
writeln('Couldnt open bank, Logging out and terminating script');
Logout;
NextPlayer(False);
NextAcc := True;
Exit;
end;
end;
end;
wait(500 + random(200));
if PinScreen then
begin
InPin(Players[0].Pin);
end;
if invcount > 0 then
begin
CustomDepositAll;
writeln('deposited full inventory');
Wait(200 + random(150));
end;
//x := 129 + random(26);
//y := 99 + random(20);
//mouse(x , y, 0, 0, False);
//wait(500 + random(300));
//Mouse(x, y + 104 + random(20), 15, 0, True);
repeat
inc(kill);
wait(50);
until (withdraw(BankCol,BankRow,0) or (kill = 20))
//Wait(300 + random(100));
MakeCompass('N');
MouseSpeed := 15;
// wait(700+ random(300));
//if (not(FindDTM(Raw_Fish, x, y, 553, 211, 598, 248))) then
//begin
//writeln('couldnt find raw fish, banking again');
//FindRandoms;
{if findSymbol(x, y, 'bank') then
mouseFlag(x, y, randomRange(-10, 10), randomRange(-12, 12), 0);
Wait(6900 + random(300)); }

//Bank;
//end;
end;


procedure Cook;
var x, y, kill, RunTime:Integer;
Tp:TPoint;
begin
if NextAcc then
Exit;
FindRandoms;
MouseSpeed := 19 + random(2);
while isMoving do wait(200+random(200));

Tp := GetRangePos;

x := Tp.x;
y := Tp.y;
mouse(x, y, 4, 4, True);
MouseSpeed := 11 + random(2);

MMouse(351 + random(151), 289 + random(43), 3, 3);
repeat
inc(kill);
wait(150 + random(100));
until (kill=20) or (FindDTM(Raw_Fish, x, y, 218, 393, 281, 434))
if (kill>19) then
begin
MouseSpeed := 12 + random(2);
invmouse(1,1);
wait(300 + random(200));

MouseSpeed := 19 + random(2);
Tp := GetRangePos;
x := Tp.x;
y := Tp.y;
mouse(x, y, 4, 4, True);

MouseSpeed := 11 + random(2);
end;
if FindDTM(Raw_Fish, x, y, 218, 393, 281, 434) then
begin
x := x + random(10);
y := y + random(10);
mouse(x, y, 0, -3, true);

writeln('clicked on the "cook all" thingy');
wait(800 + random(450));
writeln('I am cooking :)');
writeln(' ');
RunTime := GetSystemTime - StartTime;
writeln(GetRunTime);
writeln('Loads Done: ' +inttostr(LoadsDone));
writeln(' ');
kill := 0;
wait(4000);
end else
begin
wait(4000);
end;
if (FindDTM(Raw_Fish, x, y, 218, 393, 281, 434)) then
begin
x := x + random(10);
y := y + random(10);
mouse(x, y, 0, -3, true);
kill := -10;
end;
Wait(56000 + random(500));
FindRandoms;
MMouse(565 + random(111), 96 + random(68), 3, 3);
repeat
wait(400 + random(100));
inc(kill);
until (kill=25) or FindDTM(Cooked_Fish, x, y, 682, 424, 724, 463);
FindRandoms;
MouseSpeed := 13 + random(2);
end;


procedure ToBank;
begin
if NextAcc then
Exit;
FindRandoms;
writeln('going to bank');
mouse(613,147,0,-3,true);
Wait(6700 + random(300));
end;


procedure ToRange;
var KebabBMP, x, y, W, W2, I:Integer;
FoundBMP:Boolean;
BitmapsFound:TPointArray;
begin
if NextAcc then
Exit;
wait(400 + random(100));
FindRandoms;
SetArrayLength(BitmapsFound, 4);
for I := 0 to 3 do
begin
case I of
0:
begin
KebabBMP := BitmapFromString(5, 4, 'meJxjZAxXqs6CIE3tH0CSvZcHiIBs' +
'IGJkDBe2TgGSQGSf0B9RuwaZBAAZmBNk');
if (FindBitmapToleranceIn(KebabBMP, x, y, 590, 5, 685, 66, 15)) then
begin
BitmapsFound[0] := IntToPoint(x, y);
end else
FoundBMP := False;
FreeBitmap(KebabBMP);
end;
1:
begin
KebabBMP := BitmapFromString(4, 5, 'meJxjZAwXtk45AAZMTC2MMK59Qn9E' +
'7Roge8GCBUAGkAthA0kIAwgA0mIZBQ==');
if (FindBitmapToleranceIn(KebabBMP, x, y, 590, 5, 685, 66, 15)) then
begin
BitmapsFound[1] := IntToPoint(x, y);
end else
FoundBMP := False;
FreeBitmap(KebabBMP);
end;
2:
begin
KebabBMP := BitmapFromString(4, 5, 'meJw7cIAw4FH0w4oAqfQe2Q==');
if (FindBitmapToleranceIn(KebabBMP, x, y, 590, 5, 685, 66, 15)) then
begin
BitmapsFound[2] := IntToPoint(x, y);
end else
FoundBMP := False;
FreeBitmap(KebabBMP);
end;
3:
begin
KebabBMP := BitmapFromString(5, 4, 'meJwTtk6RjV4jbJ0CRDyKfsKo3AMH' +
'DqBxgWABDAAAK08Wzg==');
if (FindBitmapToleranceIn(KebabBMP, x, y, 590, 5, 685, 66, 15)) then
begin
BitmapsFound[3] := IntToPoint(x, y);
end else
FoundBMP := False;
FreeBitmap(KebabBMP);
end;
end;
end;
BitmapsFound := ClearTPAFromTPA(BitmapsFound, [Point(0, 0)]);
MiddleTPAEx(BitmapsFound, x, y);
mouse(x - random(3), y + random(5), 0, 0,true);
writeln('clicked between icons');
W := 1000 + random(4000);
W2 := (5000 - W);
wait(W);
invmouse(1,1);
MMouse(random(MSX2), random(MSY2), 3, 3);
Wait(W2 + 1500 + random(300));
// almost arrived at range ;)
if (not(FindDTM(Raw_Fish, x, y, 682, 424, 724, 463))) then
begin
writeln('couldnt find raw fish, going back to bank');
FindRandoms;
ToBank;
Bank;
ToRange;
end;
end;


begin
SetUp;
repeat
Bank;
ToRange;
Cook;
ToBank;
until Finished or NextAcc
writeln('Cooked '+inttostr(ToDo)+' Fishes, starting on next account.');
logout;
NextAcc := False;
NextPlayer(False);
LoadsDone := 0;
StartTime := GetSystemTime;
LogInPlayer;
repeat
Bank;
ToRange;
Cook;
ToBank;
until Finished
end.

Chris

2012-01-18 11:36:17

I have recovered my very first RuneScape account 2 days ago, which was stolen from me by the old "gimme your black platelegs ill make em gold" trick..
Thats how I know that I have been playing for 6 years :D
Made a picture:
http://img72.imageshack.us/img72/6128/chrisp.png

Sir R. M8gic1an

2012-01-18 11:37:42

There's no reason to post your account… your script aint bad, I'm considering a yes ;)

-RM

Scaper

2012-01-18 11:39:21

Yes from me

Chris

2012-01-18 11:43:05

From: Sir R. M8gic1an
There's no reason to post your account… your script aint bad, I'm considering a yes ;)

-RM


Yeah I know but I liked the "You last logged in 1895 days ago" part :p

Ooo 2 Yes's, thanks :D

Main

2012-01-18 11:43:58

SI!

Chris

2012-01-18 11:49:56

From: Main
SI!


Tytyty :D

Btw: When will I know if I have been accepted or declined?

Main

2012-01-18 11:55:25

Patients young padawan. will come, your time.
Usually couple of days when every thing has been decided.

Chris

2012-01-18 12:00:01

From: Main
Patients young padawan. will come, your time.
Usually couple of days when every thing has been decided.


Aha ok thanks :)
I have patience but its nice to know
I thought it would be automatically done by the system, if I have more than 80% yes after 48 hours for example :p

Sir R. M8gic1an

2012-01-18 12:04:01

An Admin takes care of it say max after a week ;)

-RM

Chris

2012-01-18 12:08:32

From: Sir R. M8gic1an
An Admin takes care of it say max after a week ;)

-RM


Ok thanks :smile:

Harry

2012-01-18 13:04:29

You use MoveMouse. Instant no from me. Also your RS account is probably going to get banned soon if you've been running that.

Chris

2012-01-18 13:10:34

From: Harry
You use MoveMouse. Instant no from me. Also your RS account is probably going to get banned soon if you've been running that.



whats wrong with movemouse? its what ive seen in other scripts
Should I use MMouse?

Harry

2012-01-18 13:12:14

MoveMouse is detected. Moves instantly in a straight line with no spline or randomness. If anyone else is using it for a RS script you should inform them to stop.

Chris

2012-01-18 13:21:10

From: Harry
MoveMouse is detected. Moves instantly in a straight line with no spline or randomness. If anyone else is using it for a RS script you should inform them to stop.


Ok, thanks
All my hope is gone for this application :p

Markus

2012-01-18 13:21:58

MoveMouse and TerminateScript; sorry..

Chris

2012-01-18 13:28:04

From: Markus
MoveMouse and TerminateScript; sorry..


Yeah I should change the TerminateScript to go to the next player.. sorry :p

And I ran this for 70 to 94 cooking on my main.. doing 6-8 hours every day, not banned. Am I lucky?


Last edit: Changed those things, are there any other bad things about the script?

the scar noob

2012-01-18 14:27:17

From: Markus
MoveMouse and TerminateScript; sorry..

I see he edited his code cuz I can't find those 2 anymore :p

As I skimmed through the code, I missed some failsafes btw.
& also, did you created all the code by yourself? if not, don't forget to give credit..that's pretty important to me and since I don't even see any comments in the script, I doubt you made all of it?

Chris

2012-01-18 15:16:50

From: the scar noob
I see he edited his code cuz I can't find those 2 anymore :p

As I skimmed through the code, I missed some failsafes btw.
& also, did you created all the code by yourself? if not, don't forget to give credit..that's pretty important to me and since I don't even see any comments in the script, I doubt you made all of it?


Yeah I have edited it :)
There was 1 TerminateScript;, where it should change to the next player instead of terminating the script. I didnt really use & test multiplayer a lot because I only needed it for my main..
You missed failsafes? probably for things which will never occur :p
And about credit, I know.. only thing:
I had this from superuser:
function HighestIndex(a: TIntegerArray): integer;
var
i: integer;
begin
result := -1;

if (Length(a) < 1) then
exit;

result := 0;

for i := 0 to High(a) do
if (a[result] < a[i]) then
result:= i;
end;
and used a part for:
  R := 0;
for i := 0 to High(a) do
if (a[R] < a[i]) then
R := i;

and the DeclarePlayers ofcourse but w/e everyone's using it the same.. idrc :p

And yes I made everything -_-

my last 'proggie':
Ran for: 112 minutes and 11 seconds.
Loads Done: 69

Edit: I havent found any 'rules' for applying for SRL members. Thats why Ive edited the script, no one says its not allowed. It is of course stupid to wait for people to tell whats wrong and edit it untill its a good script, but on other hand, I will never use MoveMouse again and the TerminateScript; was just a stupid thing which I forgot to take out.
And is it btw allowed to apply for SRL members with a script the person has already released in public or should it be a script which no one else has seen yet?

the scar noob

2012-01-18 21:20:44

Chris, can you explain step by step what happens in the function below please?

function GetRangePos:Tpoint;
var
TPA:TPointArray;
A:TIntegerArray;
ATPA:T2DPointArray;
I, H, x, y, L, R:Integer;
Tp:Tpoint;
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1450139, MSX1, MSY1, MSX2, MSY2, 15);
ATPA := TPAtoATPA(TPA, 65);
If Length(ATPA) = 0 then
begin
exit;
end;
H := High(ATPA);
writeln('TPAs found: ' + inttostr(H + 1));
SetArrayLength(A, H + 1);
for I := 0 to H do
begin
MiddleTPAEx(ATPA[I], x, y);
L := High(ATPA[I]) + 1;
A[I] := L;
writeln('TPA: ' + inttostr(I) + ', co-ords: ' + inttostr(x) +
', ' + inttostr(y) + ' Tpoints found in this TPA: ' + inttostr(L));
end;
R := 0;
for i := 0 to High(a) do
if (a[R] < a[i]) then
R := i;
writeln(R);
writeln('TPA ' + inttostr(R) + ' is the range.');
MiddleTPAEx(ATPA[R], x, y);
writeln('found range');
Tp.x := x;
Tp.y := y;
result := Tp;
end;

PatDuffy

2012-01-18 21:23:55

Ooooo I like the question! I'm going to start doing that :p

the scar noob

2012-01-18 21:39:36

From: PatDuffy
Ooooo I like the question! I'm going to start doing that :p


Haha lol xD
But just dont post it right now, okay? I,obviously, want him to explain what's happening ^^

Hero

2012-01-18 21:40:51

You should have a time limit on his reply. As for a vote. I wait.

nickrules

2012-01-18 22:19:56

From: the scar noob
Chris, can you explain step by step what happens in the function below please?


If you can answer this fully and correctly (E: In sub 20 hrs), you have my vote without a doubt. Acceptable activity, decent quality script. Admittedly, it could benefit from more failsafing, from what I saw.

Daniel

2012-01-19 03:21:07

From: Harry
MoveMouse is detected. Moves instantly in a straight line with no spline or randomness. If anyone else is using it for a RS script you should inform them to stop.


Wut? :S

Chris

2012-01-19 07:55:53

From: the scar noob
Chris, can you explain step by step what happens in the function below please?


function GetRangePos:Tpoint; // returns a TPoint
var
TPA:TPointArray; // arrray of Tpoint
A:TIntegerArray; // array of integer
ATPA:T2DPointArray; // array of TPointArray
I, H, x, y, L, R:Integer; // integers
Tp:Tpoint; // Tpoint xD
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1450139, MSX1, MSY1, MSX2, MSY2, 15);
// searches for the color 1450139 (the red colour on the range) in the mainscreen with
// a tolerance of 15 so it gets all red colours, it starts looking at the player (MSCX, MSCY)
// and from there it looks outwards until the whole mainscreen has been checked.
// The coordinates of the spots where it has found the colour are stored in TPoints,
// inside the TPointArray "TPA"
ATPA := TPAtoATPA(TPA, 65); // this changes the TPA to multiple TPA's inside the ATPA,
// splits the TPA so every TPoint inside its TPA wont have TPoints in that same TPA which
// are more than 65 pixels away from it
If Length(ATPA) = 0 then
// if the colour wasnt found, no TPA's stored in the ATPA it exits from the function.
begin
exit;
end;
H := High(ATPA); // H is the amount of TPA's found in the ATPA
writeln('TPAs found: ' + inttostr(H + 1)); // debug
SetArrayLength(A, H + 1); // The TIntegerArray gets the same length as the ATPA
for I := 0 to H do // the loop starts with 0 a
begin
MiddleTPAEx(ATPA[I], x, y); // middles the TPA with the number I from the loop,
// which starts with 0 and stops when the last TPA in the ATPA has been done(H)
L := High(ATPA[I]) + 1; // L is the amount of points found in the TPA
A[I] := L; // stores the number in the TIntegerArray
writeln('TPA: ' + inttostr(I) + ', co-ords: ' + inttostr(x) +
', ' + inttostr(y) + ' Tpoints found in this TPA: ' + inttostr(L)); // debug :D
end; // loop finished
R := 0; // integer R is 0
for i := 0 to High(a) do // I is 0 again, does the next command for every integer stored in
// the TIntegerArray
if (a[R] < a[i]) then // if the integer R in the array is lower than the integer I in the array,
// R will be I. does this for every integer inside the array so the highest value in the array will
// be R after this loop.
R := i;
writeln(R); // debug
writeln('TPA ' + inttostr(R) + ' is the range.'); // the TPA with the value R has the most TPoints in it,
// thats the range.
MiddleTPAEx(ATPA[R], x, y); // middles the TPA which has the most TPoints in it
writeln('found range'); // This isnt necessary :p
Tp.x := x; // stores the x of the middle of the range into a TPoint
Tp.y := y; // this does the y
result := Tp; // the result from this function will be the TPoint of the range.
end;

My english isnt great :p

the scar noob

2012-01-19 14:42:24

Decent explanation everyone?

Oh btw, would you agree with my next statement?

I think it would be better if you edited this:
  FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1450139, MSX1, MSY1, MSX2, MSY2, 15); 
ATPA := TPAtoATPA(TPA, 65);
If Length(ATPA) = 0 then
begin
exit;
end;

to this:
  FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1450139, MSX1, MSY1, MSX2, MSY2, 15); 
If Length(TPA) = 0 then
begin
exit;
end;
ATPA := TPAtoATPA(TPA, 65);
Btw I'm not trying to be cocky or so, I just want him to use his head so that he would see some things =p

Chris

2012-01-19 14:50:12

From: the scar noob
Decent explanation everyone?

Oh btw, would you agree with my next statement?

I think it would be better if you edited this:
  FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1450139, MSX1, MSY1, MSX2, MSY2, 15); 
ATPA := TPAtoATPA(TPA, 65);
If Length(ATPA) = 0 then
begin
exit;
end;

to this:
  FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1450139, MSX1, MSY1, MSX2, MSY2, 15); 
If Length(TPA) = 0 then
begin
exit;
end;
ATPA := TPAtoATPA(TPA, 65);
Btw I'm not trying to be cocky or so, I just want him to use his head so that he would see some things =p


It would make the script maybe 30 ms faster if it fails to finds the range :p
But yea, that would be better.

the scar noob

2012-01-19 15:43:25

From: Chris
It would make the script maybe 30 ms faster if it fails to finds the range :p
But yea, that would be better.


Yes, but did you also noticed that it could cause probs in the future? Like over here:
procedure Cook;
var x, y, kill, RunTime:Integer;
Tp:TPoint;
begin
if NextAcc then
Exit;
FindRandoms;
MouseSpeed := 19 + random(2);
while isMoving do wait(200+random(200));

Tp := GetRangePos;

x := Tp.x;
y := Tp.y;
mouse(x, y, 4, 4, True);
MouseSpeed := 11 + random(2);
If there are no colors found, there would be a prob

Chris

2012-01-19 15:58:35

From: the scar noob
Yes, but did you also noticed that it could cause probs in the future? Like over here:
procedure Cook;
var x, y, kill, RunTime:Integer;
Tp:TPoint;
begin
if NextAcc then
Exit;
FindRandoms;
MouseSpeed := 19 + random(2);
while isMoving do wait(200+random(200));

Tp := GetRangePos;

x := Tp.x;
y := Tp.y;
mouse(x, y, 4, 4, True);
MouseSpeed := 11 + random(2);
If there are no colors found, there would be a prob


Yea but it will always find the colour because my ToRange procedure wont go anywhere else than close to the range, or it would stay at the bank if every icon is blocked, which has never occured yet. If this does occur, it will click 0, 0 and wait 4 seconds, then it will click random(10), Random(10) and wait for 60 seconds.. after that it will be killed because it cant find the bank.
It would be better to make a failsafe for this and I will do that but this really never occurs..

Ran for: 58 minutes and 10 seconds.
Loads Done: 35

Ran for: 84 minutes and 57 seconds.
Loads Done: 52
almost 96 cooking :p

the scar noob

2012-01-19 16:02:44

From: Chris
Yea but it will always find the colour because my ToRange procedure wont go anywhere else than close to the range, or it would stay at the bank if every icon is blocked, which has never occured yet. If this does occur, it will click 0, 0 and wait 4 seconds, then it will click random(10), Random(10) and wait for 60 seconds.. after that it will be killed because it cant find the bank.
It would be better to make a failsafe for this and I will do that but this really never occurs..

Ran for: 58 minutes and 10 seconds.
Loads Done: 35

Ran for: 84 minutes and 57 seconds.
Loads Done: 52
almost 96 cooking :p


Told you there could be failsafes ;)
I'm just messing with ya kid xD

Look, I read from most ppl that you're a great guy so I don't think there would be a big problem
..hmm wait a minute, we don't really know you? =p

Chris

2012-01-19 16:04:12

From: the scar noob
Told you there could be failsafes ;)
I'm just messing with ya kid xD


Yea I noticed but since this is my application for SRL Members Im taking you 100% serious ;)

Look, I read from most ppl that you're a great guy so I don't think there would be a big problem
..hmm wait a minute, we don't really know you? =p


So.. whats it gonna be :p
More questions? :D

the scar noob

2012-01-19 16:21:33

From: Chris

So.. whats it gonna be :p
More questions? :D


Lol :D
I'll wait and see what people tell about you as a person (attitude/contribution/helpfulness/..)

Chris

2012-01-19 16:52:28

From: the scar noob
Lol :D
I'll wait and see what people tell about you as a person (attitude/contribution/helpfulness/..)


They probably dont know much more than you do :p
Only thing you could do is read through all of my posts, but it looks like you are going for a "No" :(

W/e, Ill make another script.
with lots of failsafes for things which cant happen. xD

Sabzi

2012-01-19 17:15:06

The point of failsafes that you are prepared for everything.
You don't write one like "what if this specific thing happens?", you write a failsafe like "what do we do if what I originally wanted failed" and then you take into consideration what could have caused the failure, you should be always prepared for worst case scenarios.

Chris

2012-01-19 18:06:37

From: Sabzi
The point of failsafes that you are prepared for everything.
You don't write one like "what if this specific thing happens?", you write a failsafe like "what do we do if what I originally wanted failed" and then you take into consideration what could have caused the failure, you should be always prepared for worst case scenarios.


Yes, I have been like: "what if anything goes wrong?" and it was simple, "Theres a failsafe which will eventually log you out.",
And for other specific problems, I have always tried to make the script get back to cooking if something goes wrong, if this doesnt work, It will logout.

Im now going to sleep, good night everyone :p

WT-Fakawi

2012-01-20 08:50:08

More than good enough for me! Yes.

Scaper

2012-01-20 10:06:30

I like his attitude aswell as he has what it takes good application if you ask me, and his explanation of the tpa was ok aswell :)

Chris

2012-01-20 13:48:41

Thanks :smile:
Its 50/50 lol :thumbsup:

the scar noob

2012-01-20 14:02:27

From: Scaper
I like his attitude aswell as he has what it takes good application if you ask me, and his explanation of the tpa was ok aswell :)


True, he seems promising in a way :)

putonajonny

2012-01-21 16:54:31

It's a yes from me because of how well he knew his script in the scar noobs questions.

Btw when you are only telling it to do one thing in an if statement you can miss out the begin and end, so:
  If Length(ATPA) = 0 then     //you can change this
begin
exit;
end;

If Length(ATPA) = 0 then //to this..
exit;

Griff

2012-01-21 17:01:56

Yes from me! To be honest I was surprised (and impressed) that you could answer TSN's question :p

Chris

2012-01-21 17:39:00

Thanks :)
Yes that begin and end; were not needed, Ill change it :p

Thanks Griff :D

You shoul look through the code when I release it for the public, already changed a lot and I have a pretty big list of things to change in the coming days :p

RISK

2012-01-21 17:39:40

It is a yes from me, Chris. Great job. I expect to see a lot from you. :)

Chris

2012-01-21 17:51:30

Thanks :smile:
I wont disappoint you ^^

Markus

2012-01-23 17:10:25

Changed my vote from No to Yes :)

Chris

2012-01-23 17:57:41

From: Markus
Changed my vote from No to Yes :)


Thanks
19 Yes 12 No, :surprised:
I didnt expect that to happen :p

WT-Fakawi

2012-01-23 18:06:35

In. Welcome :)