Results 1 to 11 of 11

Thread: TrueOther

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

    Default TrueOther

    It is kinda the same as http://www.srl-forums.com/forum/play...tml#post156755 .

    But heres how I explain it.. I am running Sum Power Miner, and I have 12 players total. The players I want 60 mining are players 0-5. So Active=True.. the 6-11 are just noobs to keep the script running (for proggies )

    So 6-11, active would be "TrueOther" so after 0-5 is false from some random like scaperune, it will run 6-11..

    Sound good? It does to me!

    -Harry


    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
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    ? Any Ideas ?


    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!

  3. #3
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm not sure if there is a function called no more players active.. If there isn't then just make your own But you could just set the players you want to auto with first (0-5) to active, and the others to active false. Then, do this:

    SCAR Code:
    var I: Integer;

    begin
      repeat
        //main loop stuff
      if(NoMorePlayersActive)tehn
      begin
        for I := 6 to 10 do
          Players[I].Active := True;
      end;
      until(False);
    end.

    Get it? =) Once those players you want to auto with mainly are done, it will set the other batch to true, so it will auto with those.

  4. #4
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Hy: http://www.srl-forums.com/forum/play...tml#post156755
    Isnt that just the same thing you are talking about?

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

    Default

    I said that in the first post.. but my idea is a little different.. easier to put into scripts.


    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!

  6. #6
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    im sure its the exact same thing

    The script first starts on his lv60+ characters, the script doesn't use the lv16 characters.
    But after 6 hours, all of his elite characters are false. He got like 400 iron an hour, so he'll earn some nice profit.
    Now all his priority 0 chars are false, it'll switch over to the priority 1 chars, they are lower mining, but instead of earning no iron (all his high level chars are false), it'll continue on his lower level chars, instead of 0 iron now, it'll keep mining (but a bit slower), so he'll still earns profit.
    what you said is basically that in a nutshell

  7. #7
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yea, just declare this with the other variables at the top of the script:

    SCAR Code:
    var
      CurrentPrioritie : integer;
      HighestPrioritie : integer;

    replace declareplayers with this
    your good miners prioritie 0, noobs prioritie 1
    remember to change highestprioritie

    SCAR Code:
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 9; //No CurrentPlayer, The priorities will sort that out
      CurrentPrioritie := 0; //Will start at this priorite, stops at highest prioritie (last group of players)
      HighestPrioritie := 5;
      NumberOfPlayers(HowManyPlayers);
     
      Players[0].Name :='apple0';
      Players[0].Integer1 := 0; //Prioritie
      Players[0].Active:= True;
     
      Players[1].Name :='bill1';
      Players[1].Integer1 := 1; //Prioritie
      Players[1].Active:= True;
     
      Players[2].Name :='chicken3';
      Players[2].Integer1 := 3; //Prioritie
      Players[2].Active:= True;
     
      Players[3].Name :='dewww1';
      Players[3].Integer1 := 1; //Prioritie
      Players[3].Active:= True;
     
      Players[4].Name :='eww2';
      Players[4].Integer1 := 2; //Prioritie
      Players[4].Active:= True;
     
      Players[5].Name :='failure2';
      Players[5].Integer1 := 2; //Prioritie
      Players[5].Active:= True;
     
      Players[6].Name :='giggity5';
      Players[6].Integer1 := 5; //Prioritie
      Players[6].Active:= True;
     
      Players[7].Name :='holley5';
      Players[7].Integer1 := 5; //Prioritie
      Players[7].Active:= True;
     
      Players[8].Name :='import6'; //shouldn't play, prioritie 6.
      Players[8].Integer1 := 6; //Prioritie
      Players[8].Active:= True;
     
    end;

    add these 3 functions anywhere:

    SCAR Code:
    function AnyActive(Prioritie : integer) : boolean;
    var
      i, a : integer;
    begin
      a := GetArrayLength(Players) - 1;
      for i := 0 to a do
        if Players[i].integer1 = Prioritie then
          if Players[i].Active then
          begin
            Result := True;
            Exit;
          end;
    end;
     
    function IsLastActiveInPrioritie(Player, Prioritie : integer) : boolean;
    var
      i,a : integer;
    begin
      result := True;
      a := GetArrayLength(Players) - 1;
      if Player = a then Exit;
      for i := Player + 1 to a do
        if Players[i].Active then
          if Players[i].Integer1 = Prioritie then
          begin
            Result := False
            Exit;
          end;
    end;
     
    procedure PNextPlayer(active : boolean);
    var
      i, a : integer;
      firstloop : boolean;
    begin
      Players[CurrentPlayer].Active := active;
      if AnyActive(CurrentPrioritie) then
      begin
        a := GetArrayLength(Players) - 1;
        if IsLastActiveInPrioritie(CurrentPlayer, CurrentPrioritie) then
          CurrentPlayer := -1;
        for i := CurrentPlayer + 1 to a do
          if Players[i].Integer1 = CurrentPrioritie then
            if Players[i].Active then
            begin
              CurrentPlayer := i;
              LoginPlayer;
              Writeln(Players[i].Name);
              Exit;
            end;
      end else
      begin
        if CurrentPrioritie = HighestPrioritie then
        begin
          if not AnyActive(HighestPrioritie) then
          begin
            Writeln('No More Players! Terminating!');
            TerminateScript;
          end;
        end;
        CurrentPrioritie := CurrentPrioritie + 1;
        PNextPlayer(Active);
      end;
    end;

    Edit -> Replace in script

    SCAR Code:
    NextPlayer

    with

    SCAR Code:
    PNextPlayer

    Its pretty much does what you say =S just a bit more complicated.. overall, it gets the job done.

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

    Default

    Ah.. ok, thanks! I will try to implant it into my next script.. muhaha.


    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!

  9. #9
    Join Date
    Jan 2007
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hold on. So say there is 8 players, it will do 1,2,3,4 but in case 3 gets stuck in a random it will then do 1,2,4,5 ??
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  10. #10
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no.

    say there are 8 players. # 0 - 4 are your good miners (say 60+) and 5-8 are your noobs.

    you set 0 - 4 on prioritie 0.
    then you set 5-8 on prioritie 1.

    it will only run on players 0 - 4 since there prioritie 0 (first).
    once all 5 players(0,1,2,3,4) are fale, then it will start autoing on prioritie 1, which is 5-8 players.

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

    Default

    Damit im kinda late but this works, no extra variables needed, short code:

    SCAR Code:
    function NoPlayersActive(FromP, ToP: Integer): Boolean;
    // by n3ss3s
    var
      F: Integer;
      AnyActive: Boolean;
    begin
      for F := FromP to ToP do
      begin
        if(Players[F].Active)then
        begin
          AnyActive := True;
        end;
      end;
      Result := AnyActive;
    end;
    Owned

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
  •