Results 1 to 7 of 7

Thread: I want to make a barbarian agility bot for SoulSplit

  1. #1
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Question I want to make a barbarian agility bot for SoulSplit

    i got this code right now:
    Code:
    program SoulSplitAgility;
    {$i SRL/SRL.simba}
    var
      x, y : Integer;
    procedure ClickRope;
    begin
    wait(1000);
    if
      FindColorTolerance(x, y, 10543, 187, 167, 361, 314, 2) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(3000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    
    procedure WalkToLog;
    begin
      if
      FindColorTolerance(x, y, 7702932, 230, 251, 267, 287, 10) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(3000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    
    procedure ClickLog;
      begin
      if
      FindColorTolerance(x, y, 935537, 201, 150, 263, 200, 10) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(5000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    
    procedure ClickNet;
    begin
      if
      FindColorTolerance(x, y, 2307136, 122, 135, 145, 218, 10) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(4000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure ClickLedge;
    begin
      if
      FindColortolerance(x, y, 14424, 174, 91, 218, 162, 1) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(4000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure ClickLadder;
    begin
      if
      FindColorTolerance(x, y, 737368, 3, 181, 514, 336, 1) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(3000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure WalkWall;
    begin
      if
      FindColorTolerance(x, y, 608609, 246, 6, 288, 29, 50) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(5000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure ClickWall;
    begin
      if
      FindColorTolerance(x, y, 8553356, 386, 82, 432, 134, 50) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(4000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure ClickWall1;
    begin
      if
      FindColorTolerance(x, y, 6580328, 320, 146, 368, 191, 50) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(3000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure ClickWall2;
    begin
      if
      FindColorTolerance(x, y, 6580328, 320, 146, 368, 191, 50) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(3000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure WalkRound;
    begin
      if
      FindColorTolerance(x, y, 608609, 388, 170, 421, 199, 50) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(4000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure WalkEnd;
    begin
      if
      FindColorTolerance(x, y, 5529705, 385, 129, 422, 164, 50) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(4000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    
    begin
      setupsrl;
      repeat
      ClickRope;
      WalkToLog;
      ClickLog;
      ClickNet;
      ClickLedge;
      ClickLadder;
      WalkWall;
      ClickWall;
      ClickWall1;
      ClickWall2;
      WalkRound;
      WalkEnd;
      until (IsKeyDown(114)); // F3 to stop the script
    end.
    how can i make it more accurate and better because if i run the script now it will just click most of the times miss
    anyone maybe a better way to do this
    i like to hear it from you

  2. #2
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Why not make it go up and down the ladder -.- faster xp/hr

  3. #3
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Does it miss by clicking near what you want of does it click something else altogether? I recommend using ACA to get colors to make sure they're the best possible

  4. #4
    Join Date
    Mar 2013
    Location
    0100111001001100
    Posts
    56
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    So you just created an script with no camera rotation...
    writeln('move your camera a little bit'); Haha

  5. #5
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Does it miss by clicking near what you want of does it click something else altogether? I recommend using ACA to get colors to make sure they're the best possible

    So you just created an script with no camera rotation...
    writeln('move your camera a little bit'); Haha

    sometimes it click on something other and sometimes it click on the good thing but,
    then it doesn't work because there was no swing or climb etc option.
    maikel how can i make that rotation then?
    and it's on a rsps
    Last edited by remember me; 04-29-2013 at 08:28 AM.

  6. #6
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    i got this code now:
    Code:
    program SoulSplitAgility;
    {$i SRL/SRL.simba}
    var
      x, y : Integer;
    procedure ClickRope;
    begin
    wait(1000);
    if
      FindColorTolerance(x, y, 10543, 187, 167, 361, 314, 2) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(3000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    
    procedure WalkToLog;
    begin
      if
      FindColorTolerance(x, y, 7702932, 230, 251, 267, 287, 10) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(3000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    
    procedure ClickLog;
      begin
      if
      FindColorTolerance(x, y, 935537, 201, 150, 263, 200, 10) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(5000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    
    procedure ClickNet;
    begin
      if
      FindColorTolerance(x, y, 2307136, 122, 135, 145, 218, 10) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(4000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    function LedgeColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.15, 2.73);
    
      FindColorsSpiralTolerance(MSCX, MSCY, arP, 1265516, MSX1, MSY1, MSX2, MSY2, 11);
      if (Length(arP) = 0) then
      begin
        //Writeln('Failed to find the 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
        ColorToXYZ(arC[i], X, Y, Z);
    
        if (X >= 3.71) and (X <= 14.54) and (Y >= 3.47) and (Y <= 14.78) and (Z >= 0.46) and (Z <= 5.59) then
        begin
          Result := arC[i];
          //Writeln('AutoColor = ' + IntToStr(arC[i]));
          Break;
        end;
      end;
    
      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      if (i = arL + 1) then
        //Writeln('AutoColor failed in finding the color.');
    end;
    procedure ClickLedge;
    begin
      if
      FindColortolerance(x, y, 14424, 174, 91, 218, 162, 1) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(4000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    function LadderColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.00, 0.00);
    
      FindColorsSpiralTolerance(MSCX, MSCY, arP, 2907004, MSX1, MSY1, MSX2, MSY2, 0);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the 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
        ColorToXYZ(arC[i], X, Y, Z);
    
        if (X >= 12.49) and (X <= 12.53) and (Y >= 11.93) and (Y <= 11.97) and (Z >= 4.01) and (Z <= 4.05) then
        begin
          Result := arC[i];
          //Writeln('AutoColor = ' + IntToStr(arC[i]));
          Break;
        end;
      end;
    
      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      if (i = arL + 1) then
        //Writeln('AutoColor failed in finding the color.');
    end;
    procedure ClickLadder;
    begin
      if
      FindColorTolerance(x, y, LadderColor, 3, 181, 514, 336, 5) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(3000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure WalkWall;
    begin
      if
      FindColorTolerance(x, y, 608609, 246, 6, 288, 29, 50) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(5000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure ClickWall;
    begin
      if
      FindColorTolerance(x, y, 8553356, 386, 82, 432, 134, 50) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(4000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure ClickWall1;
    begin
      if
      FindColorTolerance(x, y, 6580328, 320, 146, 368, 191, 50) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(3000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure ClickWall2;
    begin
      if
      FindColorTolerance(x, y, 6580328, 320, 146, 368, 191, 50) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(3000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure WalkRound;
    begin
      if
      FindColorTolerance(x, y, 608609, 388, 170, 421, 199, 50) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(4000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    procedure WalkEnd;
    begin
      if
      FindColorTolerance(x, y, 5529705, 385, 129, 422, 164, 50) then
      begin
      MMouse(x, y, 0, 0);
      Wait(500);
      ClickMouse2(mouse_Left);
      Wait(4000);
      end else
      begin
      writeln('i cant find the color');
      writeln('move your camera a little bit');
      Terminatescript
      end
    end;
    
    begin
      setupsrl;
      repeat
      ClickRope;
      WalkToLog;
      ClickLog;
      ClickNet;
      ClickLedge;
      ClickLadder;
      WalkWall;
      ClickWall;
      ClickWall1;
      ClickWall2;
      WalkRound;
      WalkEnd;
      until (IsKeyDown(114)); // F3 to stop the script
    end.
    does someone knows what the best way of walking is because my walking now is just colorclicking and fails much

  7. #7
    Join Date
    May 2012
    Posts
    704
    Mentioned
    4 Post(s)
    Quoted
    147 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    Why not make it go up and down the ladder -.- faster xp/hr
    This. Only annoying thing that happens is that screen always rotates to one or another direction by 1 degree and auto clicker will fail after some time.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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