SRL Archive - OSR Help

Cts2


KeepBotting

2013-12-04 21:17:19

Anyone want to give a quick run-through on it? Can't find any updated tutorials and I've actually never used it. I always relied on FindObj but seeing as that's depreciated…

Ian

2013-12-04 21:27:25

Footy's tutorial here explains it pretty well, I don't think any of the CTS2 modifying code changed.

If something doesn't compile just post here and I'll do my best to find the updated function. :)

KeepBotting

2013-12-04 21:39:40

From: BMWxi
Footy's tutorial here explains it pretty well, I don't think any of the CTS2 modifying code changed.

If something doesn't compile just post here and I'll do my best to find the updated function. :)
Oh sweet, I had completely forgotten about that one. Thanks, I'll try and use it.

Offtopic: why are you banned over at powerbot?

Ian

2013-12-04 23:11:01

From: KeepBotting
Oh sweet, I had completely forgotten about that one. Thanks, I'll try and use it.

Offtopic: why are you banned over at powerbot?


As of a few hours ago I'm not anymore :)

I got a 300 point warning for this post here without a reason given.

When I appealed it the same staff member who issued the warning was the one to answer it, and he said that my IP matched someone who scammed him. After a lengthy exchange of emails I decided that he banned me for personal reasons and that the IP story was just an excuse. So I didn't waste more of my time trying to appeal through him.

When I found out that he was no longer staff I asked a moderator if anything could be done about it, and he removed the 300 point warning :)

KeepBotting

2013-12-05 21:07:36

From: BMWxi
As of a few hours ago I'm not anymore :)

I got a 300 point warning for this post here without a reason given.

When I appealed it the same staff member who issued the warning was the one to answer it, and he said that my IP matched someone who scammed him. After a lengthy exchange of emails I decided that he banned me for personal reasons and that the IP story was just an excuse. So I didn't waste more of my time trying to appeal through him.

When I found out that he was no longer staff I asked a moderator if anything could be done about it, and he removed the 300 point warning :)

Lmao, that's the powerbot moderators for you.

Ian

2013-12-05 21:13:01

From: KeepBotting
Lmao, that's the powerbot moderators for you.


With SRL6 you use
mainscreen.x1
etc :)

KeepBotting

2013-12-05 21:26:54

From: BMWxi
With SRL6 you use
mainscreen.x1
etc :)

Oh sweet. Yeah I edited that part out because I thought I'd fixed it but really hadn't.

Coh3n

2013-12-05 23:37:25

SRL-6 has mainscreen.findObject() that allows you to set the CTS.

KeepBotting

2013-12-06 07:45:16

From: Coh3n
SRL-6 has mainscreen.findObject() that allows you to set the CTS.


Oh thank you sweet Jesus.

I was having so much trouble with depreciated procedures/functions trying to use that SRL5 code…

I'll try this when I get back from school.

Flight

2013-12-06 09:03:26

From: Coh3n
SRL-6 has mainscreen.findObject() that allows you to set the CTS.


Ah so SRL-6 uses Janilabo's TColorSettings? That saves a lot of time and it's much safer to use.

From: KeepBotting
Oh thank you sweet Jesus.

I was having so much trouble with depreciated procedures/functions trying to use that SRL5 code…

I'll try this when I get back from school.


Actually if you're looking for an explanation on CTS itself you can refer to masterBB's beautiful CTS tutorial, but do be sure to thank him for that, a lot of effort went into writing it I'm sure.

KeepBotting

2013-12-06 16:49:41

From: Flight
Ah so SRL-6 uses Janilabo's TColorSettings? That saves a lot of time and it's much safer to use.



Actually if you're looking for an explanation on CTS itself you can refer to masterBB's beautiful CTS tutorial, but do be sure to thank him for that, a lot of effort went into writing it I'm sure.
Yeah I understand CTS2 (in SRL5 at least).

I'm gonna try TRSMainscreen.findObject, though I do want to convert my SRL5 CTS2 code and get it working just out of curiosity.

Which reminds me, what happened to MarkTime and TimeFromMark? More really useful functions that seem to be gone.

rj

2013-12-06 16:55:15

From: KeepBotting
Yeah I understand CTS2 (in SRL5 at least).

I'm gonna try TRSMainscreen.findObject, though I do want to convert my SRL5 CTS2 code and get it working just out of curiosity.

Which reminds me, what happened to MarkTime and TimeFromMark? More really useful functions that seem to be gone.



procedure markTime(var a:Integer);
begin
a := getSystemTime;
end;

function timeFromMark(a:Integer):Integer;
begin
result := getSystemTime - a;
end;


Not sure what the current system is, I just use that

Ashaman88

2013-12-06 16:58:06

From: KeepBotting
Yeah I understand CTS2 (in SRL5 at least).

I'm gonna try TRSMainscreen.findObject, though I do want to convert my SRL5 CTS2 code and get it working just out of curiosity.

Which reminds me, what happened to MarkTime and TimeFromMark? More really useful functions that seem to be gone.

var
t: ttimemarker


t.start
t.gettime
etc etc.

masterBB

2013-12-06 17:00:52

From: Officer Barbrady
procedure markTime(var a:Integer);
begin
a := getSystemTime;
end;

function timeFromMark(a:Integer):Integer;
begin
result := getSystemTime - a;
end;


Not sure what the current system is, I just use that


I wrote a time marker for that.

var stopWatch:TTimeMarker;

stopWatch.start();
SlowProcedure();
writeln('it took: ' + ToStr(stopWatch.getTime()));

https://github.com/SRL/SRL-6/blob/master/lib/utilities/time.simba#L268

KeepBotting

2013-12-06 17:33:21

I get 'operator expected' errors when trying to use either markTime or TTimeMarker.start, why?


procedure someProcedureInvolvingATimer;
var someRandomTimer:integer;
begin
markTime(someRandomTimer);
end;


procedure anotherProcedureInvolvingATimer;
var someRandomTimer:TTimeMarker;
begin
someRandomTimer.start();
end;

both throw
Exception in Script: Operator expected at line 87, column 2

I am using it correctly, no?

Ian

2013-12-06 17:37:36

From: KeepBotting
I get 'operator expected' errors when trying to use either markTime or TTimeMarker.start, why?


procedure someProcedureInvolvingATimer;
var someRandomTimer:integer;
begin
markTime(someRandomTimer);
end;


procedure anotherProcedureInvolvingATimer;
var someRandomTimer:TTimeMarker;
begin
someRandomTimer.start();
end;

both throw
Exception in Script: Operator expected at line 87, column 2

I am using it correctly, no?


Is that a runtime error or a compiling error?

The 2nd one compiles fine for me.

E: Just tested, it works fine too.

KeepBotting

2013-12-06 17:42:07

From: BMWxi
Is that a runtime error or a compiling error?

The 2nd one compiles fine for me.

E: Just tested, it works fine too.


Compiling error. First one won't work for you because you probably haven't declared markTime or timeFromMark, they're not in SRL anymore.

Why are they not compiling for me? :c I mean my script is basically done, I just need to figure out how to use these timers…

Ian

2013-12-06 18:03:11

From: KeepBotting
Compiling error. First one won't work for you because you probably haven't declared markTime or timeFromMark, they're not in SRL anymore.

Why are they not compiling for me? :c I mean my script is basically done, I just need to figure out how to use these timers…

Updated Simba/SRL? Interpreter set to lape?

KeepBotting

2013-12-06 18:09:10

From: BMWxi
Updated Simba/SRL? Interpreter set to lape?
Yes and yes. Just tried to force an update on Simba, restarted binaries and still throws an operator expected error on compile.

Wtf?

Coh3n

2013-12-08 08:31:19

From: Flight
Ah so SRL-6 uses Janilabo's TColorSettings? That saves a lot of time and it's much safer to use.
Yes, we thought it would be a good idea to utilize inside SRL so we don't run into annoying errors like in the past. The full include can be found in SRL-6/lib/utilities/color.simba.

From: KeepBotting
Yeah I understand CTS2 (in SRL5 at least).
The color tolerance stuff is in Simba, not SRL, so if you understand it in SRL-5 you understand it in SRL-6. The TColorSetting is just a new tool that makes using different CTS's much easier.

From: KeepBotting
Yes and yes. Just tried to force an update on Simba, restarted binaries and still throws an operator expected error on compile.

Wtf?
Did you forget a ; or an end in the previous procedure? That's normally what throws that error.

And just to confirm, markTime and timeFromMark was replaced with TTimeMarker.

KeepBotting

2013-12-08 09:23:41

From: Coh3n
Yes, we thought it would be a good idea to utilize inside SRL so we don't run into annoying errors like in the past. The full include can be found in SRL-6/lib/utilities/color.simba.

The color tolerance stuff is in Simba, not SRL, so if you understand it in SRL-5 you understand it in SRL-6. The TColorSetting is just a new tool that makes using different CTS's much easier.

Did you forget a ; or an end in the previous procedure? That's normally what throws that error.

And just to confirm, markTime and timeFromMark was replaced with TTimeMarker.

Yeah that's what I had done :duh: lol