SRL Archive - SRL Suggestions

SRL To Do Thread


Dynamite

2012-12-23 11:50:33

Hi guys so I was talking to someone on IRC/Skype yesterday (can't remember who :P) and we were saying that we could develop a lot more (useful) functions for SRL if we had the ideas and people told us what they wanted.

So here we are.
If you have any bugs or new function ideas/requests post them here and I or someone else will create them :)

-Boom

J J

2012-12-23 12:05:08

Perhaps
From: J J
Hey Chris,

I did some research and it is possible :) I have never seen someone using it though but it does work.

Example:
program Test;
{$i srl/srl.simba}


function DTMToString(DTM: Integer): String;
begin
Result := GetDTM(DTM).ToString;
writeln('Result: ' + Result);
end;

procedure DTMTest;
var
DTM: Integer;
Test: TMDTM;

begin
DTM := DTMFromString('mWAAAAHicY2FgYOhgZGDIBOKzQDwFiI8Cxb4C8T8gfg3E////R8HogBENgwAAsaUR9g==');
DTMToString(DTM);
FreeDTM(DTM);
end;

begin
SetupSRL;
DTMTest;
end.

After running:
SRL Compiled in 16 msec
Result: mWAAAAHicY2GAgIf///93BdI8UL4BEFsCsRoQA6VQMDpgRMMgAACE7xC7
Successfully executed.

You convert the DTM to a TMDTM. That is a type like a DTM but you can do some fun stuff with it such as converting it to a String.

EDIT: We might have overlooked something in the documents, but I don't think this existed yet. Might be nice to add to SRL.

DannyRS

2012-12-23 12:50:36

more customizable LogPlayerIn function would be great ;)

Dynamite

2012-12-23 12:51:46

From: DannyRS
more customizable LogPlayerIn function would be great ;)


What kind of customisations would you like? :)

DannyRS

2012-12-23 13:41:06

From: Dynamite
What kind of customisations would you like? :)


A more user friendly way for sixhour fix stuff and world selecting maybe?

world selecting and sixhourfix is breaking constantly for me atm, might just be me

Olly

2012-12-23 13:44:51

Srl6 :)

DannyRS

2012-12-23 13:48:02

From: Ollybest
Srl6 :)


*Requests new syntax tutorial for all PascalScript Simba functions For Lape ;)

Olly

2012-12-23 13:55:18

Why does everyone think SRL6 with lape is going to be like going from pascal to java… you will hardly notice a difference.

DannyRS

2012-12-23 14:03:50

From: Ollybest
you will hardly notice a difference.


hardly means i need to know at least something :D

NKN

2012-12-23 14:57:04

From: DannyRS
hardly means i need to know at least something :D


Unless you're using pointers and stuff, you won't need to.

Also comes with operators IIRC?

Shatterhand

2012-12-23 15:48:06

From: DannyRS
A more user friendly way for sixhour fix stuff and world selecting maybe?
world selecting and sixhourfix is breaking constantly for me atm, might just be me

What is the problem with the current sixhourfix?

DannyRS

2012-12-23 15:52:49

From: Shatterhand
What is the problem with the current sixhourfix?


Cant ever seem to get it to reload client when sessions expired

what do you need to do with it besides

SRL_SIXHOURFIX := TRUE;

Shatterhand

2012-12-23 15:55:13

From: DannyRS
Cant ever seem to get it to reload client when sessions expired

what do you need to do with it besides

SRL_SIXHOURFIX := TRUE;

Do you have login checker failsafes? It will restart smart only if it gets the error message when trying to log back in the game. So its built into the LoginPlayer function.

DannyRS

2012-12-23 16:01:53

From: Shatterhand
Do you have login checker failsafes? It will restart smart only if it gets the error message when trying to log back in the game. So its built into the LoginPlayer function.


So this should work?

checker failsafes as in?:


If Not LoggedIn Then
Begin
LoginPlayer;
End;

Ian

2012-12-23 16:04:13

You don't need the begin or end because it's only one line after the then

And yes, what you posted does work :)
I put it at the beginning of every procedure.

DannyRS

2012-12-23 16:06:08

From: BMWxi
You don't need the begin or end because it's only one line after the then


I have a load of other checks in there, just shortened for that post :redface:
but thanks for the tip

Ashaman88

2012-12-23 16:09:40

Make sure to set it to true before setup srl

Shatterhand

2012-12-23 16:13:36

And you might want to add some other resets after LoginPlayer, like exiting sof, setting camera position…

DannyRS

2012-12-23 16:55:53

have all in what I'm doing atm, but guess i wont know if it works till 3-6 hours time :)

Flight

2012-12-23 19:43:50

From: DannyRS
more customizable LogPlayerIn function would be great ;)


I've worked on a much more secure way to log the player into RS that will render any and all keyloggers powerless. It's still not fully operational and still being discussed in the higher up boards, but should I (we) get it working correctly it would be an ideal option way to login for the high security-wise user.

From: Ollybest
Srl6 :)


Actively in development, I assure you. ;)

From: Ollybest
Why does everyone think SRL6 with lape is going to be like going from pascal to java… you will hardly notice a difference.


The Lape aspect won't be a big change for the normal users & scripters. If anything it will give us many more options in our coding patterns and generally make some things easier to do. I really don't know so much about Lape but there's a couple threads already explaining some of its advantages. Anywho, when SRL-6 rolls out we'll have a better explanation of how scripters can take advantage of the new Lape system. It will indeed make our lives easier. :)

Ian

2012-12-23 20:07:07

From: Flight
I've worked on a much more secure way to log the player into RS that will render any and all keyloggers powerless. It's still not fully operational and still being discussed in the higher up boards, but should I (we) get it working correctly it would be an ideal option way to login for the high security-wise user.


Login with Facebook? (Fake acc of course ;))

Brandon

2012-12-23 20:35:20

From: Flight
I've worked on a much more secure way to log the player into RS that will render any and all keyloggers powerless. It's still not fully operational and still being discussed in the higher up boards, but should I (we) get it working correctly it would be an ideal option way to login for the high security-wise user.



I'd definitely like to try my hand at breaking this. I don't think anything script-wise can be keylogger proof. As long as it transfers data or has to decrypt data at some point on the user's system, it can be stolen.

Unless of course it's some other method? :S Can't think of any lol. Would be certainly cool if your implementation does come to life though.

Dynamite

2013-01-03 12:17:12

Anyone got any suggestions? :)

-Boom

DannyRS

2013-01-03 12:31:55

From: Dynamite
Anyone got any suggestions? :)


I dont know if it exists, but a function to find overlapping ATPA Boxes in two ATPA's, of some kind, and return the box of the intersecting parts as ATPA, i cant think of a "fast" enough way to do it

Maybe one of you more experienced guys can get the logic for it :p

Shatterhand

2013-01-03 12:39:19

From: DannyRS
I dont know if it exists, but a function to find overlapping ATPA Boxes in two ATPA's, of some kind, and return the box of the intersecting parts as ATPA, i cant think of a "fast" enough way to do it

Maybe one of you more experienced guys can get the logic for it :p

Im interested in this too. Making TPAs from the boxes' lines then looking for point matches is slow..

Brandon

2013-01-03 12:39:37

From: DannyRS
I dont know if it exists, but a function to find overlapping ATPA Boxes in two ATPA's, of some kind, and return the box of the intersecting parts as ATPA, i cant think of a "fast" enough way to do it

Maybe one of you more experienced guys can get the logic for it :p



For each TPA in the First ATPA, gettpabounds. For each TPA in the Second ATPA, gettpabounds. For each box, check if they intersect.

If they do, use a forloop to get each point within the intersection.

DannyRS

2013-01-03 12:54:11

From: Brandon
For each TPA in the First ATPA, gettpabounds. For each TPA in the Second ATPA, gettpabounds. For each box, check if they intersect.

If they do, use a forloop to get each point within the intersection.


Something like this is what I've been trying but it takes way to long to be practical in most uses, if there are alot of TPA results

Was considering some kind of tradeoff and finding the middle of the two ATPA boxes and checking if they are within X distance from each other and then doing the calculation for those boxes? Might still take a long time if both ATPA's have alot of boxes

Brandon

2013-01-03 13:04:56

From: DannyRS
Something like this is what I've been trying but it takes way to long to be practical in most uses, if there are alot of TPA results

Was considering some kind of tradeoff and finding the middle of the two ATPA boxes and checking if they are within X distance from each other and then doing the calculation for those boxes? Might still take a long time if both ATPA's have alot of boxes




Function ATPAIntersections(ATPAOne, ATPATwo: T2DPointArray): TPointArray;
var
I, J, K, L, Index: Integer;
Begin
For I := 0 To High(ATPAOne) Do
For K := 0 To High(ATPAOne[I]) Do
For J := 0 To High(ATPATwo) Do
For L := 0 To High(ATPATwo[J]) Do
If (ATPAOne[I][K] = ATPATwo[J][L]) Then
Begin
SetLength(Result, Index + 1);
Result[Index] := ATPAOne[I][K];
Inc(Index);
End;
End;

var
ATPAOne, ATPATwo: T2DPointArray;

begin
ATPAOne := [TPointArray([Point(0, 0), Point(1, 1)]), TPointArray([Point(10, 10), Point(11, 11), Point(14, 0), Point(20, 20), Point(12, 12)])];
ATPATwo := [TPointArray([Point(0, 0), Point(1, 1)]), TPointArray([Point(10, 10), Point(11, 11), Point(12, 12), Point(13, 13)])];

writeln(ATPAIntersections(ATPAOne, ATPATwo));
end.

You can easily change the result to a TBoxArray and it'll hold a list of all boxes that intersect.. I chose to leave it as a TPA.. You get a list of all points that are in both ATPA's. I see it as more useful than the boxes.

The two ATPA's can also be of different sizes/lengths.

Seems pretty fast to me :S

DannyRS

2013-01-03 19:27:19

From: Brandon

Seems pretty fast to me :S


Does seem much faster than my method, but i cant get it to actually find any values no matter what i seem to pass in :S tried everything i can think of, the two ATPA's are all over each other but the result TPA is always null

Any help in a "real world" RS use?

Brandon

2013-01-03 19:50:04

From: DannyRS
Does seem much faster than my method, but i cant get it to actually find any values no matter what i seem to pass in :S tried everything i can think of, the two ATPA's are all over each other but the result TPA is always null

Any help in a "real world" RS use?



It works in RS and normally as well.. It's just with a ton of points, there's a ton of iterations and thus it gets extremely slow..

The below will print one point because the two boxes only intersect at one point. So yeah the algorithm and stuff works. It could of course be optimized a bit but for a lot of points it's slow :c


{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}

Function ATPAIntersections(ATPAOne, ATPATwo: T2DPointArray): TPointArray;
var
I, J, K, L, Index: Integer;
Begin
For I := 0 To High(ATPAOne) Do
For K := 0 To High(ATPAOne[I]) Do
For J := 0 To High(ATPATwo) Do
For L := 0 To High(ATPATwo[J]) Do
If (ATPAOne[I][K] = ATPATwo[J][L]) Then
Begin
SetLength(Result, Index + 1);
Result[Index] := ATPAOne[I][K];
Inc(Index);
End;
End;


var
A, A2: T2DPointArray;
T, T2: TPointArray;

begin
SetupSRL;

T := TPAFromBox(IntToBox(0, 0, 25, 25));
T2 := TPAFromBox(IntToBox(25, 25, 50, 50));

A := TPAToATPAEx(T, 30, 35);
A2 := TPAToATPAEx(T2, 40, 10);

writeln(ATPAIntersections(A, A2));
end.

DannyRS

2013-01-03 20:12:07

From: Brandon
It works in RS and normally as well.. It's just with a ton of points, there's a ton of iterations and thus it gets extremely slow..

The below will print one point because the two boxes only intersect at one point. So yeah the algorithm and stuff works. It could of course be optimized a bit but for a lot of points it's slow :c


Alright, When i get back to my PC, I'll give it another go ;) Thanks so much for the reply Brandon,

If Dynamite and etc want a suggestion for OP, Optimized brandon function include would be a good idea :p

slushpuppy

2013-01-04 06:22:45

nvm scratch that LOL

Olly

2013-01-04 10:58:03

a sound plugin!!!

Daniel

2013-01-04 11:04:08

From: Flight
I've worked on a much more secure way to log the player into RS that will render any and all keyloggers powerless. It's still not fully operational and still being discussed in the higher up boards, but should I (we) get it working correctly it would be an ideal option way to login for the high security-wise user.


I fail to see how, unless you are thinking of utilising this or this, which I doubt given that it is detectable and bannable by the Runescape client, and aside from the fact being Windows-only.

BraK

2013-01-04 11:27:12

From: DannyRS
I dont know if it exists, but a function to find overlapping ATPA Boxes in two ATPA's, of some kind, and return the box of the intersecting parts as ATPA, i cant think of a "fast" enough way to do it

Maybe one of you more experienced guys can get the logic for it :p



function ATPAOverlapping(Limit : Integer; ATPA, ATPA2 : T2DPointArray; Var ATPAResult: T2DPointarray) : Boolean;
Var
I, II, III, IIII : Integer;
TempTPA : TpointArray;
begin
For I := 0 to High(ATPA) do
begin
TBOX := GetTPABounds(ATPA[I]);
For II := 0 to high ATPA2 do
begin
for III:= 0 to High(ATPA2[i]) do
begin
if PointInBox(ATPA2[ii][iii], Tbox) then
begin
inc(Count);
IIII := GetArrayLength(TempTPA);
SetArrayLength(TempTPA, IIII + 1);
TempTPA[IIII] := ATPA[ii][iii];
end;
If Count > Limit then
begin
IIII := GetArrayLength(ATPAResult);
SetArrayLength(ATPAResult, IIII + 1);
ATPAResult[IIII] := TempTPA;
end;
SetArraylength(ATPAresult, 0);
SetArrayLength(TempTPA, 0);
end;

Something like that anyway. Just a method off the top of my head. This was not done in simba so likely all the code is worng but this is just to illustrate the method.

Edit Ninja'd by brandon. :p

DrChill

2013-01-04 13:02:11

I've worked on a much more secure way to log the player into RS that will render any and all keyloggers powerless. It's still not fully operational and still being discussed in the higher up boards, but should I (we) get it working correctly it would be an ideal option way to login for the high security-wise user.

This definitely sounds interesting, can't wait to see it :)

Moar support for Linux :)

(Though I guess this is just SRL6)