Results 1 to 21 of 21

Thread: Cts2

  1. #1
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default Cts2

    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...
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  2. #2
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    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.

  3. #3
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    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?
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  4. #4
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    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

  5. #5
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    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.
    Last edited by KeepBotting; 12-06-2013 at 02:12 AM.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  6. #6
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    Lmao, that's the powerbot moderators for you.
    With SRL6 you use
    Simba Code:
    mainscreen.x1
    etc

  7. #7
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    With SRL6 you use
    Simba Code:
    mainscreen.x1
    etc
    Oh sweet. Yeah I edited that part out because I thought I'd fixed it but really hadn't.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  8. #8
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

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

  9. #9
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    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.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  10. #10
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    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.

    Quote Originally Posted by KeepBotting View Post
    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.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  11. #11
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    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.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  12. #12
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    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.

    Simba Code:
    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

  13. #13
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    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.

  14. #14
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    Simba Code:
    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.

    Simba Code:
    var stopWatch:TTimeMarker;

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

    https://github.com/SRL/SRL-6/blob/ma...ime.simba#L268
    Working on: Tithe Farmer

  15. #15
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

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

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

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

    both throw
    Code:
    Exception in Script: Operator expected at line 87, column 2
    I am using it correctly, no?
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  16. #16
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    I get 'operator expected' errors when trying to use either markTime or TTimeMarker.start, why?

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

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

    both throw
    Code:
    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.

  17. #17
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    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...
    Last edited by KeepBotting; 12-06-2013 at 11:00 PM.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  18. #18
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    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?

  19. #19
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    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?
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  20. #20
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    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.

    Quote Originally Posted by KeepBotting View Post
    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.

    Quote Originally Posted by KeepBotting View Post
    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.

  21. #21
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    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 lol
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •