Page 3 of 3 FirstFirst 123
Results 51 to 65 of 65

Thread: Breakhandler

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

    Default

    Quote Originally Posted by Dgby714 View Post
    No, mine is completely different.
    I feel like having it in one procedure would be simpler, no?

  2. #52
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,033
    Mentioned
    65 Post(s)
    Quoted
    163 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    I feel like having it in one procedure would be simpler, no?
    I just seen what Sir R. M8gic1an posted and made something along those lines I havn't even looked at Echo_s.

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  3. #53
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,318
    Mentioned
    264 Post(s)
    Quoted
    1394 Post(s)

    Default

    Echo_'s is just one function, and you call it within you're script's loop. I hope that answers your question.

    Current project:
    [Scripts / AeroLib Rev. 2]


    Did you know?
    J1407b, dubbed "Saturn on steriods", has a ring system 200 times larger than Saturn's own rings.
    #teampixel

  4. #54
    Join Date
    Apr 2011
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This is perfect, going to use this in my scripts
    Working on a Watchmen pickpocket-er, hope to get 80kxp / hour.

  5. #55
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,236
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Hey Echo instead of howmanyplayers what do you think about players active?
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  6. #56
    Join Date
    Jan 2011
    Location
    Denver, CO
    Posts
    1,353
    Mentioned
    2 Post(s)
    Quoted
    72 Post(s)

    Default

    Quote Originally Posted by Yago View Post
    Hey Echo instead of howmanyplayers what do you think about players active?
    I think that would work too, but I believe in the "if it's not broken, don't fix it" policy

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

    Default

    Quote Originally Posted by Echo_ View Post
    I think that would work too, but I believe in the "if it's not broken, don't fix it" policy
    Yes, but in this situation PlayersActive makes more sense.

  8. #58
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,236
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by Echo_ View Post
    I think that would work too, but I believe in the "if it's not broken, don't fix it" policy
    Then it would be broken because if there aren't any active players the thing might fail.
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

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

    Default

    So, just found this thread. If no one disagrees I think I'll add this (along with the Global variables) to SRL's antiban.simba.

    Sound okay?

    E: I'd still like to see "Time left in break: " added.
    Last edited by Coh3n; 12-13-2011 at 05:51 AM.

  10. #60
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,491
    Mentioned
    3 Post(s)
    Quoted
    11 Post(s)

    Default

    Simba Code:
    if (HowManyPlayers > 1) then
      begin
        if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
        else
          if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
          begin
          Writeln('Taking a break for about ' + IntToStr(BreakFor) + ' minutes.');
          Logout;
          IncEx(BreakRounds, (w) + (x));
          IncEx(TotalBreaks, 1);
          Writeln('Logging in to ' + Capitalize(Players[CurrentPlayer + 1].Nick) + '.');
          NextPlayer(True);
          Exit; // notice this?
          while (LoggedIn) do Wait((x) + (z));
          Writeln('Switching back to ' + Capitalize(Players[CurrentPlayer - 1].Nick) + '.');
          SwitchToPlayer(CurrentPlayer - 1, True);
          end;
      end;

    Actually this never switches back to the original player... all this function really does is put a timer on your NextPlayer call / break if theres only one player left. You'd need yet another if statement at the top if you actually wanted to switch back to the player who was on break..

    As for Dbgy's system it doesn't currently have the whole login logout stuff so...

    -RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  11. #61
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,033
    Mentioned
    65 Post(s)
    Quoted
    163 Post(s)

    Default

    Quote Originally Posted by Sir R. M8gic1an View Post

    Actually this never switches back to the original player... all this function really does is put a timer on your NextPlayer call / break if theres only one player left. You'd need yet another if statement at the top if you actually wanted to switch back to the player who was on break..

    As for Dbgy's system it doesn't currently have the whole login logout stuff so...

    -RM
    Mine lets people do what they wand in the procedure they pass to SetupBreaks. Mine doesn't actually handle the breaks.

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

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

    Default

    I actually think I'm going to make an "SRL Snippets" section for code just like this. This stuff I think should be done in scripts, not the include (I know, I changed my mind). We want the include to aid the scripter, not do everything for them, if that makes sense.

    E: Moved to SRL Snippets.
    Last edited by Coh3n; 12-13-2011 at 07:02 PM.

  13. #63
    Join Date
    Nov 2018
    Location
    Charlotte; North Carolina
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Haha, why isn't there a function in SRL for this? Everyone used it in their script somehow (usually)...or some variation of it to do something.

  14. #64
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,162
    Mentioned
    111 Post(s)
    Quoted
    1846 Post(s)

    Default

    Quote Originally Posted by Jeames27 View Post
    Haha, why isn't there a function in SRL for this? Everyone used it in their script somehow (usually)...or some variation of it to do something.
    There is a break system in SRL, see https://srl.github.io/SRL/antiban.html
    GitLab projects | Simba for Linux | Find me on IRC or Discord | OSRS scripts

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

  15. #65
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    There is a break system in SRL, see https://srl.github.io/SRL/antiban.html
    Duplicate of this post https://villavu.com/forum/showthread...429#post777429

    Probably just a bot. Or somebody really not trying very hard for junior.

Page 3 of 3 FirstFirst 123

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
  •