Results 1 to 5 of 5

Thread: next player any help appreciated

  1. #1
    Join Date
    Dec 2007
    Posts
    77
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default next player any help appreciated

    does anyone know how i can make a random to set different times my bots wait before logging back in?

    im going to be switching players
    im trying to make it wait a different random time before logging back in

    i modified the nextplayer functing thing to do it for a set time but i would like it random

    this is the script im changing it does the switch player part
    SCAR Code:
    procedure NextPlayer(Active: Boolean);
    var
      I : integer;
      OneActive : Boolean;
    begin
      if RandomPlayer then
        RandomNextPlayer(Active)
      else
      begin
        WriteLn('NextPlayer');
        Players[CurrentPlayer].Active := Active;
        Logout;
        Sleep(900000); //<----------i did this and it works for waiting 15 minutes and loggin in
        PlayerCurTime := (GetSystemTime div 1000);
        Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
          ((PlayerCurTime - PlayerStartTime) / 60);
        CurrentPlayer := (CurrentPlayer + 1) mod HowManyPlayers;
        while Players[CurrentPlayer].Active = False do
        begin
          OneActive := False;
          CurrentPlayer := (CurrentPlayer + 1) mod HowManyPlayers;
          for I := 0 to HowManyPlayers - 1 do
            if Players[i].Active then
              OneActive := True;
          if OneActive = False then
            Wait(60000); // Everybody False. Endless Loop.
        end;
        SRL_Logs := SRL_Logs + 1;
        LoginPlayer;
      end;
    end;

    well this is the seconds time i posted no one seeemed intersed in answering the first time... anyone?

  2. #2
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Sleep(Time + Random(Time));

  3. #3
    Join Date
    Dec 2007
    Posts
    77
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wow i love you guys. could u possibley explain how it works.. i kno the milliseconds part but it would be helpfull if someone knew a tut that showed how

  4. #4
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Random() is actually not hard at all. You would put 'Sleep(600000+Random(300000))' to wait for 10 minutes plus a random amount between 0 and 5 minuts (so from 10 to 15 minutes). All random does is choose a random integer between 0 and the value you put into the brackets

  5. #5
    Join Date
    Dec 2007
    Posts
    77
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    kk thank you again very much im using
    Sleep(300000 + random(900000));

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Ultimate Merchanter (first player to player seller!)
    By Timothegreat in forum RS3 Outdated / Broken Scripts
    Replies: 63
    Last Post: 05-14-2009, 02:07 PM
  2. Player not found in player array?quikchat?
    By jerrysyron in forum OSR Help
    Replies: 2
    Last Post: 08-01-2008, 12:44 AM
  3. Need an OS! Help Greatly Appreciated!
    By IEatJ00erBaybees in forum News and General
    Replies: 22
    Last Post: 05-12-2007, 10:55 AM

Posting Permissions

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