Results 1 to 6 of 6

Thread: Broken?

  1. #1
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Broken?

    I need a confirmation on whether or not RadialWalk is working. I tried it in different locations with Autocolor and it didn't work. Autocolor works, because I've tried with the FindColor function.

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

    Default

    RadialWalk in SRL looks like it should work perfectly fine, you might've given it some faulty search coords.

    If you want, post your script where you're using this and I or someone else will take a look at it.

  3. #3
    Join Date
    Dec 2008
    Location
    Québec
    Posts
    419
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you should use that WONDERFULL MAGICULOUSICUL tool in include:
    Includes\SRL\Scripting Tools/Radial Walking Aid by Yakman.scar
    Formerly known as FrancisHelie

  4. #4
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    program New;
    {.include SRL\SRL\Misc\Smart.scar}
    {.include srl/srl.scar}
    var
    x, y: integer;

    const
      LoadsToDo = 50;
      SmartWorld= 39;  //Smart World?
      SignedC= False;  //Use signed client?

    Procedure DeclarePlayers;
    begin
      HowManyPlayers:= 1;
      CurrentPlayer:= 0;
      NumberOfPlayers(HowManyPlayers);

      Players[0].Name:= '';
      Players[0].Pass:= '';
      Players[0].Nick:= '';
      Players[0].Active:= True;
    end;

    procedure FindNormalRandom;
    begin
      LampSkill := 'strength';
      if FindNormalRandoms then UseRewardBox;
      solvesrlrandoms:=true;
    end;

    procedure AntiBan;
    begin
      case random(80) of
      0: MouseBox(MSX1, MSY1, MSX2, MSY2,3);
      1: RandomMovement;
      2: RandomRClick;
      3: BoredHuman;
      4: PickUpMouse;
      5: SleepAndMoveMouse(50);
      6: HoverSkill('random', false);
      7: Exit;
      end;
    end;

    function OpenBankChest: boolean;
    begin
      MakeCompass('S');
      SetAngle(True);
      if  FindObjCustom(x, y, ['ank', 'hest'], [4676201, 8750479, 2634299], 10) then
      begin
        Mouse(x, y, 5, 5, true);
        Result := True;
      end;
    end;

    procedure WalkToChest;
    begin
      if FindSymbol(x, y, 'bank') then Mouse(x, y, 5, 5, True) else
      if FindSymbol(x, y, 'minigame') then
      begin
        MakeCompass('W');
        Fflag(random(10));
      end;
    end;

    function DetectedCape: boolean;
    begin
      if WearingItem(2) then
      begin
        TakeOff(2);
        Result := True;
      end;
    end;

    function SWRoadColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      R, G, B: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.53, 0.17);

      FindColorsSpiralTolerance(MMCX, MMCY, arP, 6122868, MMX1, MMY1, MMX2, MMY2, 5);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the road color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        ColorToRGB(arC[i], R, G, B);

        if (R >= 102) and (R <= 131) and (G >= 96) and (G <= 123) and (B >= 81) and (B <= 104) then
        begin
          ColorToXYZ(arC[i], X, Y, Z);

          if (X >= 11.37) and (X <= 18.39) and (Y >= 12.02) and (Y <= 19.41) and (Z >= 9.68) and (Z <= 15.58) then
          begin
            Result := arC[i];
            Writeln('RoadColor = ' + IntToStr(arC[i]));
            Break;
          end;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        Writeln('Failed in finding the color.');
    end;

    procedure BankItems;
    begin
      WalkToChest;
      FFlag(random(10));
      Writeln('We have arrived at the banking chest.');
      if OpenBankChest then
      begin
        Writeln('We found the bank chest!');
        wait(5000+random(5000));
        if BankScreen then
        begin
          Writeln('I think we just found the banking screen.');
          DepositAll;
          CloseWindow;
          wait(1000+random(1000));
          MakeCompass('N');
         if RadialWalk(SWRoadColor, 180, 190, 65, -1, -1) then Writeln('We have clicked near the portal region.') else
         begin
            Writeln('We couldn''t walk back to the portal area, so we are terminating.');
            Wait(1000+random(500));
            LogOut;
            TerminateScript;
          end;
        end else
        begin
          Writeln('Something went Wrong! We couldn''t find the bankscreen!');
          TerminateScript;
        end;
      end else
      begin
        Writeln('We couldn''t open the bank chest.');
        TerminateScript;
      end;
    end;

    begin
      Smart_Server:= (SmartWorld);
      Smart_Members:= True;
      Smart_Signed:= (SignedC);
      Smart_SuperDetail:= false;
      SetupSRL;
      ActivateClient;
      DeclarePlayers;
      LogInPlayer;
      Wait(10000+random(25000));
      repeat
        if (DetectedCape) then BankItems;
      until (True);
    end.
    Last edited by DeSnob; 08-12-2009 at 06:16 PM.

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

    Default

    Looks like you just need to expand your angles.
    Instead of 180-190, try 150-220?

  6. #6
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    [offtopic]Did you go on my account?[/offtopic]

    Thanks! It worked! Rep

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
  •