Results 1 to 5 of 5

Thread: Combining color randoms and reflection

  1. #1
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Combining color randoms and reflection

    ok, so what i tried to do with my script is combine both the color and reflection randoms to try and optimally solve them.

    it does not have the FindDead as my script deathwalks

    this is what i have so far
    Simba Code:
    function FindRandoms: Boolean; //copied findnormalrandoms from antirandoms include and edited out FindDead so i can do deathwalking.
    var
      I: Byte;
      Cont : boolean;
    begin
      if (SRL_OnFindRandomCall <> nil) then
      begin;
        Result := SRL_OnFindRandomCall(cont);
        if not Cont then
          exit;
      end;
      for I := 1 to 8 do
      begin
        case I of
          1: Result := SolveTeleportRandoms;
          2: Respond;
          3: Result := FindLamp(LampSkill);
          4: Result :=  RC;
          5: Result := FindMod;
          6: if (SRL_Procs[srl_OnRandomCall] <> nil) then
               SRL_Procs[srl_OnRandomCall]();
          7: Result := UseRewardBox;
          8: Result := R_FindRandoms;
        end;
        if (Result) then
        begin
          if (SRL_Procs[srl_OnFindRandom] <> nil) then
            SRL_Procs[srl_OnFindRandom]();
          Break;
        end;
      end;
    end;

    i dont think this will work as if it fails one would it not stop instead of continuing down the loop?

    thought please

  2. #2
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Simba Code:
    function RandomCheck : Boolean;
    var I : Integer;
    begin
      for I := 0 to 1 do
      begin
        case I of
          1: Result := R_FindRandoms;
          2: Result := FindNormalRandoms;
        end;
        if Result then Exit;
      end;
    end;
    This is what I used in an old script of mine. I would also use this as a failsafe.
    Simba Code:
    if RandomCheck then
      if not LoggedIn then Exit;

  3. #3
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok, but i need it not to do the FindDead check thats in FindNormalRandoms, so i suppose i could just do
    Simba Code:
    function FindRandoms: Boolean; //copied findnormalrandoms from antirandoms include and edited out FindDead so i can do deathwalking.
    var
      I: Byte;
      Cont : boolean;
    begin
      if (SRL_OnFindRandomCall <> nil) then
      begin;
        Result := SRL_OnFindRandomCall(cont);
        if not Cont then
          exit;
      end;
      for I := 1 to 7 do
      begin
        case I of
          1: Result := SolveTeleportRandoms;
          2: Respond;
          3: Result := FindLamp(LampSkill);
          4: Result :=  RC;
          5: Result := FindMod;
          6: if (SRL_Procs[srl_OnRandomCall] <> nil) then
               SRL_Procs[srl_OnRandomCall]();
          7: Result := UseRewardBox;
        end;
        if (Result) then
        begin
          if (SRL_Procs[srl_OnFindRandom] <> nil) then
            SRL_Procs[srl_OnFindRandom]();
          Break;
        end;
      end;
    end;

    function RandomCheck : Boolean;
    var I : Integer;
    begin
      for I := 0 to 1 do
      begin
        case I of
          1: Result := R_FindRandoms;
          2: Result := FindRandoms;
        end;
        if Result then Exit;
      end;
    end;

    if RandomCheck then
      if not loggedin then exit;

    any reason you put r_FindRandoms before FindNormalRandoms

  4. #4
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by bobzilla69 View Post
    ok, but i need it not to do the FindDead check thats in FindNormalRandoms, so i suppose i could just do
    Simba Code:
    function FindRandoms: Boolean; //copied findnormalrandoms from antirandoms include and edited out FindDead so i can do deathwalking.
    var
      I: Byte;
      Cont : boolean;
    begin
      if (SRL_OnFindRandomCall <> nil) then
      begin;
        Result := SRL_OnFindRandomCall(cont);
        if not Cont then
          exit;
      end;
      for I := 1 to 7 do
      begin
        case I of
          1: Result := SolveTeleportRandoms;
          2: Respond;
          3: Result := FindLamp(LampSkill);
          4: Result :=  RC;
          5: Result := FindMod;
          6: if (SRL_Procs[srl_OnRandomCall] <> nil) then
               SRL_Procs[srl_OnRandomCall]();
          7: Result := UseRewardBox;
        end;
        if (Result) then
        begin
          if (SRL_Procs[srl_OnFindRandom] <> nil) then
            SRL_Procs[srl_OnFindRandom]();
          Break;
        end;
      end;
    end;

    function RandomCheck : Boolean;
    var I : Integer;
    begin
      for I := 0 to 1 do
      begin
        case I of
          1: Result := R_FindRandoms;
          2: Result := FindRandoms;
        end;
        if Result then Exit;
      end;
    end;

    if RandomCheck then
      if not loggedin then exit;

    any reason you put r_FindRandoms before FindNormalRandoms
    Because I wanted to use the reflection solvers, this was back when the color randoms were actually detected the majority of the time but they didn't solve them very well.

  5. #5
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok cool, cheers for the help

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
  •