Results 1 to 4 of 4

Thread: NextPlayer tweak..

  1. #1
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default NextPlayer tweak..

    SCAR Code:
    procedure NextPlayer(Active: Boolean);
    begin
      if RandomPlayer then
        RandomNextPlayer(Active)
      else
      begin
        WriteLn('NextPlayer(Active: '+booltostr(Active)+');');
        Players[CurrentPlayer].Active := Active;
        Logout;
        PlayerCurTime := (GetSystemTime div 1000);
        Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
          ((PlayerCurTime - PlayerStartTime) / 60);
        CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
        while Players[CurrentPlayer].Active = False do
        begin
          CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
          if (AllPlayersInactive) then Wait(60000); // Everybody False. Endless Loop.
        end;
        SRL_Logs := SRL_Logs + 1;
        LoginPlayer;
      end;
    end;

    All I added was the BoolToStr, so no credits please.

    And it is needed because it is annoying when you get a NextPlayer in the debug window because you do not know if your player just went false or not

    I hope it gets committed


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  2. #2
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I got a problem like this in my script ^^

    I just get NextPlayer out of nowere after 4 hours :/ really annoying..
    Tried to find out were it came from but i cant find it

    I say, Add this

  3. #3
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry for spamming, but I honestly think that this small thingy should be added. It doesn't cause anything to mess up and it is quite handy.


    Edit: Thank you, Wizzup?

  4. #4
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Added.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. NextPlayer
    By Viral in forum OSR Help
    Replies: 9
    Last Post: 11-12-2008, 07:47 AM
  2. NextPlayer help
    By king vash in forum OSR Help
    Replies: 4
    Last Post: 03-28-2007, 12:54 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
  •