Page 1 of 7 123 ... LastLast
Results 1 to 25 of 164

Thread: RISK's Range Guilder

  1. #1
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default RISK's Range Guilder

    RISK's Range Guilder
    Version: 1.0.4
    Last updated: 2/26/2012


    Intro:
    This is my take on a range guilding script. I originally had one planned to be released much earlier but I 'Lost' the passion I have for scripting. But I have recently found it again. So I decided to start the script up again and finish it. After a few days of testing and creating the script, here it is.

    Please keep in mind that pre-nuke, this area was a 'Ban spot'. Even though there is a person every one out of five worlds now, you should still be careful.

    I have also not added a break system yet. But it is planned for future releases. This does about 90 competitions an hour, so you can do the math and set the competitions to do in DeclarePlayers as you desire.
    There is also no multiplayer support yet, so please also keep that in mind!

    If you have any errors to report, you can post them here or PM them to me.

    I hope you all enjoy using my script and get many levels with it!

    Special thanks to:
    Flight,
    Kyle Undefined


    Download:
    View the bottom of the post or just copy and paste the following code in to your Simba and save.
    Simba Code:
    (*
      R_RangeGuilder
      ver 1.0.4
      Created by RISK
    *)

    program R_RangeGuilder;
    {$i SRL/SRL/MISC/SMART.simba}
    {$i SRL/SRL.simba}
    {$i SRL/SRL/MISC/PAINTSMART.simba}
    {$i SRL/SRL/MISC/DEBUG.simba}
    {$i SPS/SPS.simba}

    var
      breakRounds, totalBreaks, competitionsDone, startingTickets,
      expLastReport, comInc, compsLastReport, compsDone, startTickets,
      curTickets, gained, expGained, expThisReport, comExp, comComps,
      compsThisReport: Integer;

    const
      WORLD   = 40; // What world do you wish to auto on? 0 = random

      STATS_USER = ''; // What is your SRL stats username? Leave blank if you have none
      STATS_PASS = ''; // What is your SRL stats password? Leave blank if you have none

      ENABLE_BREAKS = True; // Do you want to enable taking breaks?
      (* Ignore these settings if you aren't taking breaks *)
      BREAK_IN  = 35; // Break in how many minutes?
      BREAK_FOR = 10; // Break for how many minutes?
      RAND_IN   = 5; // How many minutes in randomness on BREAK_IN?
      RAND_FOR  = 5; // How many minutes in randomness on BREAK_FOR?
      (*                                                   *)

      AUTO_RETALIATE      = True;  // True = On, False = Off
      ENABLE_MOUSE_PAINT  = True;  // Do you want to have a paint trail behind the mouse?
      ENABLE_DEBUG_MODE   = False; // Do you want to enable debugging?
                                   // This will disable debug clearing when making a progress report

      (* Do not edit this segment *)
      MIN_CLICK_WAIT    = 0;
      MAX_CLICK_WAIT    = 1;
      MIN_TARGET_WAIT   = 2;
      MAX_TARGET_WAIT   = 3;
      HOW_MANY_COMPS    = 4;
      CHECK_FOR_ARROWS  = 0;
      SCRIPT_VERSION    = '1.0.4';
      (*                          *)

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

      with Players[0] do
      begin
        Name := ''; // What is your character's username?
        Pass := ''; // What is your character's password?

        LampSkill  := SKILL_RANGE;
        BoxRewards := ['xp', 'exp', 'emote', 'clothes', 'charms'];

        Integers[HOW_MANY_COMPS]   := 500; // How many competitions do you wish to do?
        Booleans[CHECK_FOR_ARROWS] := False; // Disable this if you want to use your
                                            // own arrows. Remember they must be bronze!

        (* These settings are best to leave default, but you can edit them if you desire *)
        // If you are experiencing a lot of misclicks, you can raise 'MIN_TARGET_WAIT'
        // and 'MAX_TARGET_WAIT' to be customized to your lag and computer
        // The same goes for MIN_CLICK_WAIT and MAX_CLICK_WAIT.
        Integers[MIN_CLICK_WAIT]  := 85;
        Integers[MAX_CLICK_WAIT]  := 125;
        Integers[MIN_TARGET_WAIT] := 800;
        Integers[MAX_TARGET_WAIT] := 1200;

        (* Each of these settings I have adjusted to work well, in what I think, will be
           good for everyone's purposes. But everyone has different computers and desire,
           so if you truly wish to make the script faster in clicking and wait times or slower,
           then you can modify the settings. Here is a short little 'Tutorial' on each
           setting:

           Remember, each of these options are in milliseconds. So 1000 is one second
           and so on.

           MIN_CLICK_WAIT = Minimum amount of time to wait before it clicks the target
           again.

           MAX_CLICK_WAIT = Maximum amount of time to wait before it clicks the target
           again.

           MIN_TARGET_WAIT = The minimum amount of time that the target screen is up before
           it attempts to close it. This is to make sure it closes the target screen if it's
           open for too long.

           MAX_TARGET_WAIT = The maximum amount of time that the target screen is up before
           it attempts to close it. This is to make sure it closes the target screen if it's
           open for too long.
        (*                                                                  *)


        Active := True;
      end;
    end;

    (*


       You do not need to and should not edit beyond this point.


     *)


    procedure Write(T: string);
    begin
      WriteLn(TheTime + ': ' + T);
    end;

    (*
       BenLand's function, modified by Flight(?) to have a paint trail, re-modified
       by RISK to disable the paint option completely if the user is not using SMART
    *)

    procedure WindMouse2(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
    var
      veloX, veloY, windX, windY, veloMag, dist, randomDist, lastDist, step: extended;
      lastX, lastY: integer;
      sqrt2, sqrt3, sqrt5: extended;
    begin
      sqrt2:= sqrt(2);
      sqrt3:= sqrt(3);
      sqrt5:= sqrt(5);
      while hypot(xs - xe, ys - ye) > 1 do
      begin
        dist:= hypot(xs - xe, ys - ye);
        wind:= minE(wind, dist);
        if dist >= targetArea then
        begin
          windX:= windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
          windY:= windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
        end else
        begin
          windX:= windX / sqrt2;
          windY:= windY / sqrt2;
          if (maxStep < 3) then
          begin
            maxStep:= random(3) + 3.0;
          end else
          begin
            maxStep:= maxStep / sqrt5;
          end;
        end;
        veloX:= veloX + windX;
        veloY:= veloY + windY;
        veloX:= veloX + gravity * (xe - xs) / dist;
        veloY:= veloY + gravity * (ye - ys) / dist;
        if hypot(veloX, veloY) > maxStep then
        begin
          randomDist:= maxStep / 2.0 + random(round(maxStep) div 2);
          veloMag:= sqrt(veloX * veloX + veloY * veloY);
          veloX:= (veloX / veloMag) * randomDist;
          veloY:= (veloY / veloMag) * randomDist;
        end;
        lastX:= Round(xs);
        lastY:= Round(ys);
        xs:= xs + veloX;
        ys:= ys + veloY;
        if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
          MoveMouse(Round(xs), Round(ys));
        step:= hypot(xs - lastX, ys - lastY);
        wait(round((maxWait - minWait) * (step / maxStep) + minWait));
        lastdist:= dist;

        {$IFDEF SMART}
          if (ENABLE_MOUSE_PAINT) then
            SMART_DrawDotsEx(False, [Point(lastX, lastY)], clWhite);
        {$ENDIF}

      end;
      if (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) then
        MoveMouse(Round(xe), Round(ye));

    end;

    (*
       Credits to Flight
    *)

    procedure HumanMMouse(eX, eY, ranX, ranY: Integer);
    var
      randSpeed: extended;
      X,Y,X2,Y2,A,Dist,MP: integer;
    begin
      SMART_ClearCanvas;
      A := MouseSpeed;
      GetMousePos(X, Y);
      Dist := Distance(X, Y, eX, eY);
      MP := Round(Dist/150);
      if MP < 0 then
        MP := 1;

      randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
      X2 := RandomRange(eX-(A*MP), eX+(A*MP));
      Y2 := RandomRange(eY-(A*MP), eY+(A*MP));
      WindMouse2(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
      GetMousePos(X, Y);
      MMouse(eX, eY, ranX, ranY);
      MouseSpeed := A;
    end;

    procedure SetCTS(Hue, Saturation: Extended);
    begin
      SetColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(Hue, Saturation);
    end;

    procedure RevertCTS();
    begin
      SetColorSpeed2Modifiers(0.2, 0.2);
      SetColorToleranceSpeed(1);
    end;

    procedure ExitPlayer(Message: string);
    begin
      Write(Message);
      Players[CurrentPlayer].Active := False;
      Logout;
    end;

    procedure RClickMM;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      // Mouses to the minimap and right clicks
      MouseBox(MMX1, MMY1, MMX2, MMY2, MOUSE_RIGHT);
      Wait(RandomRange(300, 400));
      MouseBox(MSX1, MSY1, MSX2, MSY2, MOUSE_MOVE);
    end;

    procedure RClickChat;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      if (FindNPCChatText('.', Nothing)) then
        Exit;

      // Moves the mouse to the chat and right clicks
      MouseBox(MCX1, MCY1, MCX2, MCY2, MOUSE_RIGHT);
      Wait(RandomRange(200, 300)); // A random wait
      MouseBox(MSX1, MSY1, MSX2, MSY2, MOUSE_MOVE);
    end;

    procedure RandomSpacebar;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      if (FindNPCChatText('.', Nothing)) then
        Exit;

      // Presses the spacebar
      KeyDown(1);
      Wait(RandomRange(75, 100));
      KeyUp(1);

      // Waits before backspacing
      Wait(RandomRange(750, 1150));

      // Backspaces to remove the space we have just typed
      KeyDown(1);
      Wait(RandomRange(300, 400));
      KeyUp(1);
    end;

    (*
       Credits to Kyle Undefined
    *)

    function RandomRangeEx(rFrom, rTo : Variant) : Variant;
    var
      r  : Variant;
    begin
      r := RandomRange(Floor(rFrom), Ceil(rTo));
      r := r + RandomE;

      repeat
        begin
          if r <= rFrom then
            r := r + RandomE
          else if r >= rTo then
            r := r - RandomE;
        end;
      until ((r >= rFrom) and (r <= rTo))

      r := (Trunc(r * 100) / 100.00)

      Result := r;
    end;

    // 33.0 ~ 46.7
    procedure FixCompass();
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      MakeCompass(RandomRangeEx(33.0, 46.7));
    end;

    procedure AntiBan();
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      case (Random(375)) of
        0 : RandomRClick;
        1 :
          begin
            BoredHuman;
            SetAngle(SRL_ANGLE_LOW);
          end;
        2 : ExamineInv;
        3 :
          begin
            HoverSkill('Ranged', False);
            Wait(RandomRange(4000, 7000)); // Random wait to 'View' the skill information
          end;
        4 : RClickChat;
        5 : RClickMM;
        6 .. 13 : RandomSpaceBar;
        14 .. 39 : Wait(RandomRange(1000, 8000));
        39 .. 70 : MouseSpeed := (RandomRange(10, 14));
      end;
    end;

    function GetATPA(Col, Tol, W, H: Integer; Hue, Sat: Extended): T2DPointArray;
    var
      X, Y: Integer;
      TPA: TPointArray;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      SetCTS(Hue, Sat);
      FindColorsSpiralTolerance(X, Y, TPA, Col, MSX1, MSY1, MSX2, MSY2, Tol);
      RevertCTS;

      Result := (SplitTPAEx(TPA, W, H));
    end;

    // Updated 2/26/2012 - Added a maximum pixel limit along side the already in
    // place minimum pixel limit to help with mousing over the judge instead of the
    // guards
    function R_MouseTPA(Text: string; Col, Tol, W, H: Integer; Hue, Sat: Extended): Boolean;
    var
      R, I, T, maxT, TT, maxTT: Integer;
      P: TPoint;
      ATPA: T2DPointArray;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      I := 0;
      T := 0;
      TT := 0;
      maxT := (RandomRange(15000, 25000));
      maxTT := (RandomRange(6500, 7500));
      Result := False;

      repeat
        MarkTime(T);

        repeat
          if (not(LoggedIn)) then
            Exit;
          if (FindNormalRandoms) then
            SetAngle(SRL_ANGLE_LOW);

          if (TimeFromMark(T) >= maxT) then
          begin
            Result := False;
            Exit;
          end;

          ATPA := (GetATPA(Col, Tol, W, H, Hue, Sat));
          if (Length(ATPA) > 0) then
            Break;

          Write('Object was not detected. Waiting.');
          AntiBan;
          Wait(RandomRange(500, 1500));
        until(False);

        MarkTime(TT);

        // What to do if the length of ATPA is greater than 0
        SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
        if (ENABLE_DEBUG_MODE) then
          DebugATPABounds(ATPA);
        for I := 0 to High(ATPA) do
        begin
          if (not(LoggedIn)) then
            Exit;
          if (FindNormalRandoms) then
            SetAngle(SRL_ANGLE_LOW);

          if ((Length(ATPA[I]) < 15) and (Length(ATPA[I]) > 40)) then
            Continue;

          P := (MiddleTPA(ATPA[I]));
          HumanMMouse(P.X, P.Y, 5, 5);
          Result := (WaitUpText(Text, RandomRange(750, 1500)));

          if (Result) then
            Break;

          if (TimeFromMark(TT) >= maxTT) then
          begin
            Write('Max time passed. Let''s wait and try to find the object again.');
            AntiBan;
            Wait(RandomRange(500, 1500));
            Break;
          end;

          Wait(RandomRange(450, 750));
        end;

        Inc(R);
      until((Result) or (R >= (RandomRange(4, 6))) or (not(LoggedIn)));
    end;

    // Non CTS 2 version of R_MouseTPA
    function R_MouseObj(Text: string; Col, Tol, W, H: Integer): Boolean;
    var
      X, Y, I, T, maxT: Integer;
      P: TPoint;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      I := 0;
      T := 0;
      maxT := (RandomRange(15000, 25000));

      MarkTime(T);

      repeat
        if (not(LoggedIn)) then
          Exit;
        if (FindNormalRandoms) then
          SetAngle(SRL_ANGLE_LOW);

        if (TimeFromMark(T) >= maxT) then
        begin
          Write('We were unable to find the object.');
          Result := False;
          Exit;
        end;

        FindColorsSpiralTolerance(X, Y, TPA, Col, MSX1, MSY1, MSX2, MSY2, Tol);
        if (Length(TPA) > 0) then
          Break;

        Write('The object is not on the screen. Waiting.');
        AntiBan;
        Wait(RandomRange(500, 1500));
      until(False);

      // What to do if the length of TPA is greater than 0
      ATPA := (TPAToATPAEx(TPA, W, H));
      SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
      if (ENABLE_DEBUG_MODE) then
        DebugATPABounds(ATPA);
      for I := 0 to High(ATPA) do
      begin
        if (not(LoggedIn)) then
          Exit;
        if (FindNormalRandoms) then
          SetAngle(SRL_ANGLE_LOW);

        P := (MiddleTPA(ATPA[I]));
        HumanMMouse(P.X, P.Y, 5, 5);
        Result := (WaitUpText(Text, RandomRange(850, 1500)));

        if (Result) then
          Break;

        AntiBan;
        Wait(RandomRange(250, 500));
      end;

      if (not(Result)) then
        Write('We were unable to mouse the object.');
    end;

    // Point(2525, 2945), Point(2520, 2979)
    // Updated 2/26/2012 thanks to Nebula's tip.
    procedure SPS_FixPosition;
    var
      Path: TPointArray;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      Path := [Point(2525, 2945), Point(2520, 2979)];

      if (SPS_WalkPath(Path)) then
      begin
        FixCompass;
        SetAngle(SRL_ANGLE_LOW);
      end else
        ExitPlayer('SPS repositioning failed. Logging out.');
    end;

    // Created as the main method of fixing our position instead of SPS
    procedure DTM_FixPosition;
    var
      X, Y, DTM, T, maxT: Integer;
      E: Extended;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      T := 0;
      maxT := (RandomRange(3000, 5000));

      DTM := DTMFromString('mggAAAHicY2NgYLAAYi8gFgdiHgYIAPHVgVgAiLWgYiJALAXE1TU6DAnV2gypiaoM2SGODB1VgQx5fYYM/EA5bJgJiBmxYAgAAG0ICHo=');
      MarkTime(T);
      repeat
        if (not(LoggedIn)) then
          Exit;
        FindNormalRandoms;

        if (TimeFromMark(T) >= maxT) then
        begin
          Write('DTM repositioning failed. Let''s try SPS.');
          FreeDTM(DTM);
          SPS_FixPosition;
        end;

        Wait(RandomRange(75, 200));
      until(FindDTMRotated(DTM, X, Y, MMX1, MMY1, MMX2, MMY2, - Pi / 4, Pi / 4, Pi / 60, E));

      FreeDTM(DTM);

      HumanMMouse(X, Y, 5, 5);
      ClickMouse2(MOUSE_LEFT);
      FFlag(5);
      FixCompass;
    end;

    // Fixes the chats so that we can detect if we have a new competition or not
    procedure FixChats;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      SetAllChats('All', 'Off', 'Off', 'Off', 'Off', 'Off', '');
    end;

    procedure HandleNoArrows;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      if (not(FindNPCChatText('standard', Nothing))) then
        Exit;

      ExitPlayer('We have run out of arrows to use.');
      Exit;
    end;

    function TargetScreen(): Boolean;
    begin
      Result := (CountColorTolerance(4500223, MSX1, MSY1, MSX2, MSY2, 10) > 100);
    end;

    procedure CloseTargetScreen();
    var
      X, Y, DTM, I, T, maxT: Integer;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      if (not(TargetScreen)) then
        Exit;

      T := 0;
      maxT := (RandomRange(150000, 250000));
      DTM := DTMFromString('mbQAAAHicY2VgYHjKyMDwFojvQ+l7QKwJFDeEYmUoVpQRZeDk5IRj' +
                           'A01FBi6gODpmxILBAAA7xwas');

      MarkTime(T);

      while (TargetScreen) do
      begin
        if (not(LoggedIn)) then
          Exit;
        if (FindNormalRandoms) then
          SetAngle(SRL_ANGLE_LOW);

        if (TimeFromMark(T) >= maxT) then
        begin
          FreeDTM(DTM);
          ExitPlayer('We were unable to close the target screen.');
          Exit;
        end;

        if (FindDTM(DTM, X, Y, MSX1, MSY1, MSX2, MSY2)) then
        begin
          HumanMMouse(X, Y, 3, 3);
          if (not(WaitUpText('Close', RandomRange(500, 800)))) then
          begin
            FreeDTM(DTM);
            Exit;
          end;

          ClickMouse2(MOUSE_LEFT);
          for I := 0 to 5 do
          begin
            if (not(LoggedIn)) then
              Exit;
            if (FindNormalRandoms) then
              SetAngle(SRL_ANGLE_LOW);

            if (not(TargetScreen)) then
            begin
              FreeDTM(DTM);
              Exit;
            end;

            Wait(RandomRange(500, 600));
          end;
        end;
      end;

      FreeDTM(DTM);
    end;

    procedure FireAtTargets();
    var
      minW, maxW, minC, maxC, I, maxI, T, TT, maxT, TTT, maxTTT, TTTT, maxTTTT: Integer;
      startP, curP: TPoint;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      minW := (Players[CURRENTPLAYER].Integers[MIN_TARGET_WAIT]);
      maxW := (Players[CURRENTPLAYER].Integers[MAX_TARGET_WAIT]);
      minC := (Players[CURRENTPLAYER].Integers[MIN_CLICK_WAIT]);
      maxC := (Players[CURRENTPLAYER].Integers[MAX_CLICK_WAIT]);

      I := 0;
      T := 0;
      maxT := (RandomRange(150000, 250000));
      TT := 0;
      TTT := 0;
      TTTT := 0;
      maxTTTT := (RandomRange(4000, 6000));
      maxTTT := (RandomRange(10000, 20000));

      MarkTime(T);
      MarkTime(TTTT);

      repeat
        if (not(LoggedIn)) then
          Exit;
        if (FindNormalRandoms) then
          SetAngle(SRL_ANGLE_LOW);

        HandleNoArrows;

        if (TargetScreen) then
          CloseTargetScreen;

        if (TimeFromMark(T) >= maxT) then
        begin
          ExitPlayer('We were unable to fire at the targets.');
          Exit;
        end;

        if (R_MouseObj('Fire-a', 5041405, 10, 10, 10)) then
          Break;

        if (TimeFromMark(TTTT) >= maxTTTT) then
        begin
          Write('We were unable to find any targets. We might be out of the area.');
          DTM_FixPosition;

          TTTT := 0;
          maxTTTT := (RandomRange(4000, 6000));
          MarkTime(TTTT);

          AntiBan;
          Wait(RandomRange(550, 850));
        end;

        Write('Unable to mouse over a target. Let''s wait.');
        //if (not(CheckCompass))) then
        //  FixCompass;
        AntiBan;
        Wait(RandomRange(500, 1500));
      until(False);

      GetMousePos(startP.X, startP.Y);
      MarkTime(TT);

      repeat
        if (not(LoggedIn)) then
          Exit;
        if (FindNormalRandoms) then
          SetAngle(SRL_ANGLE_LOW);

        GetMousePos(curP.X, curP.Y);

        HandleNoArrows;

        if (TimeFromMark(TT) >= maxT) then
        begin
          ExitPlayer('We were unable to fire at the targets.');
          Exit;
        end;

        case (Random(30)) of
          1 :
            begin
              GetMousePos(curP.X, curP.Y);
              curP.X := (curP.X + Random(2));
              curP.Y := (curP.Y + Random(2));
              HumanMMouse(curP.X, curP.Y, 0, 0);
            end;

          2 :
            begin
              GetMousePos(curP.X, curP.Y);
              curP.X := (curP.X - Random(2));
              curP.Y := (curP.Y - Random(2));
              HumanMMouse(curP.X, curP.Y, 0, 0);
            end;

          3 :
            begin
              GetMousePos(curP.X, curP.Y);
              curP.X := (curP.X - Random(2));
              curP.Y := (curP.Y + Random(2));
              HumanMMouse(curP.X, curP.Y, 0, 0);
            end;

          4 :
            begin
              GetMousePos(curP.X, curP.Y);
              curP.X := (curP.X + Random(2));
              curP.Y := (curP.Y - Random(2));
              HumanMMouse(curP.X, curP.Y, 0, 0);
            end;
        end;

        // Checking to see if we have clicked to a different position
        if (FindNPCChatText('meant', Nothing)) then
        begin
          Write('We have moved out of the shooting range. Repositioning.');
          DTM_FixPosition;
        end;

        // Misclick handling
        if (not(IsUpText('Fire-a')) and (not(TargetScreen))) then
        begin
          if (not(LoggedIn)) then
            Exit;
          if (FindNormalRandoms) then
            SetAngle(SRL_ANGLE_LOW);

          HandleNoArrows;

          Wait(RandomRange(500, 1500));

          if (not(IsUpText('Fire-a')) and (not(TargetScreen))) then
            if (not(R_MouseObj('Fire-a', 5041405, 10, 10, 10))) then
            begin
              DTM_FixPosition;
              if (not(R_MouseObj('Fire-a', 5041405, 10, 10, 10))) then
              begin
                ExitPlayer('We have misclicked and we were unable to fix our position.');
                Exit;
              end;
            end else
            begin
              GetMousePos(startP.X, startP.Y);
              GetMousePos(curP.X, curP.Y);
            end;
        end;

        // Target screen handling
        if (TargetScreen) then
        begin
          if (not(LoggedIn)) then
            Exit;
          if (FindNormalRandoms) then
            SetAngle(SRL_ANGLE_LOW);

          HandleNoArrows;

          // We have this here to make sure the while .. do loop works properly
          I := 0;
          maxI := (RandomRange(minW, maxW));
          MarkTime(TTT);

          while (not(I >= maxI)) do
          begin
            if (not(LoggedIn)) then
              Exit;
            if (FindNormalRandoms) then
              SetAngle(SRL_ANGLE_LOW);

            // Randomizes the waiting time per 'loop-thru' of the fail-safe
            maxI := (RandomRange(minW, maxW));

            if (TimeFromMark(TTT) >= maxTTT) then
            begin
              ExitPlayer('Error in detecting the target screen.');
              Exit;
            end;

            if (not(TargetScreen)) then
              Break;

            Wait(100);
            IncEx(I, 100);
          end;

          if ((I >= maxI) and ((TargetScreen))) then
          begin
            Write('The target screen has been up for ' + ToStr(maxI) + ' second(s). Closing it.');
            CloseTargetScreen;
            HumanMMouse(startP.X, startP.Y, 5, 5);
          end;
        end;

        // Over the maximum amount of distance from center of target handling
        if (Distance(curP.X, curP.Y, startP.X, startP.Y) >= 10) then
        begin
          Write('Mouse is too far from the center of the target. Fixing it.');
          HumanMMouse(startP.X, startP.Y, 5, 5);
        end;

        // Clicking handling
        ClickMouse2(MOUSE_LEFT);
        Wait(RandomRange(minC, maxC));
      until(FindNPCChatText('Sorry', Nothing) or (not(LoggedIn)));
    end;

    function ArrowsEquipped: Boolean;
    var
      X, Y, DTM: Integer;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      DTM := DTMFromString('mbQAAAHicY2VgYJjIxMAwG4j7gbgTiGcC8Sug+AsgfgLEb4H4HRAbKCgwuKpzAllMYDpOmJeBH8hDx4xYMBgAAO7dCag=');
      GameTab(26);

      Result := (FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2));

      FreeDTM(DTM);
    end;

    procedure EquipArrows();
    var
      DTM, I, T, maxT: Integer;
      P: TPoint;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      I := 0;
      T := 0;
      maxT := (RandomRange(15000, 25000));
      DTM := DTMFromString('mbQAAAHicY2VgYJjIxMAwG4j7gbgTiGcC8Sug+AsgfgLEb4H4HRAbKCgwuKpzAllMYDpOmJeBH8hDx4xYMBgAAO7dCag=');

      MarkTime(T);

      repeat
        if (not(LoggedIn)) then
          Exit;
        if (FindNormalRandoms) then
          SetAngle(SRL_ANGLE_LOW);


        if (TimeFromMark(T) >= maxT) then
        begin
          FreeDTM(DTM);
          ExitPlayer('There are no arrows in our inventory and none are equipped. - Perhaps a DTM failure.');
          Exit;
        end;

        if (FindDTM(DTM, P.X, P.Y, MIX1, MIY1, MIX2, MIY2)) then
        begin
          HumanMMouse(P.X, P.Y, 3, 3);
          if (WaitUpText('ze ar', RandomRange(750, 1500))) then
          begin
            ClickMouse2(MOUSE_LEFT);
            for I := 1 to 5 do
            begin
              if (not(LoggedIn)) then
                Exit;
              if (FindNormalRandoms) then
                SetAngle(SRL_ANGLE_LOW);

              if (not(FindDTM(DTM, P.X, P.Y, MIX1, MIY1, MIX2, MIY2))) then
              begin
                Write('We have equipped the arrows.');
                FreeDTM(DTM);
                Exit;
              end;

              Wait(RandomRange(100, 400));
            end;
          end;
        end;

        Write('There are no arrows in our inventory.');
        AntiBan;
        Wait(RandomRange(750, 1500));

        if (ArrowsEquipped) then
        begin
          Write('We already have arrows equipped.');
          Break;
        end;
      until(False);

      FreeDTM(DTM);
    end;

    // Remade 2/24/2012 to make it less 'One shot'
    // Modified 2/26/2012 - Removed some of the getting a new competition checks
    // due to my new obtained knowledge that you don't need to click the green
    // button or do anything after that to start a new competition. I'm sorry for
    // including it in the first place, I was unaware of this.
    procedure GetCompetition();
    var
      T, TT, TTT, maxT, maxTT, maxTTT, X, Y, iTR, cTR: Integer;
      B, BB: Boolean;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      maxT := (RandomRange(60000, 65000));
      maxTT := (RandomRange(4000, 5000));

      T := 0;
      TT := 0;
      TTT := 0;
      iTR := 0;
      cTR := 0;

      B := False;
      BB := False;

      MarkTime(T);
      MarkTime(TT);
      repeat

        repeat // Attempts to mouse and interact with the judge
          if (not(LoggedIn)) then
            Exit;
          if (FindNormalRandoms) then
            SetAngle(SRL_ANGLE_LOW);

          if (TargetScreen) then
            CloseTargetScreen;


          // Exits the character if we are unable to get a new competition
          if (TimeFromMark(T) >= maxT) then
          begin
            ExitPlayer('We were unable to get a new competition.');
            Exit;
          end;

          // Fixes the position of our character if we are unable to see the judge
          if (TimeFromMark(TT) >= maxTT) then
          begin
            Write('We might be unable to see the judge. Let''s fix our location.');
            DTM_FixPosition;
            TT := 0;
            maxTT := (RandomRange(4000, 5000));

            AntiBan;
            Wait(RandomRange(500, 850));
          end;

          if (R_MouseTPA('Judge', 6906979, 9, 15, 15, 0.31, 0.08)) then
          begin
            ClickMouse2(MOUSE_RIGHT);

            maxTTT := (RandomRange(1500, 2000));
            MarkTime(TTT);

            // Waits for the option that the judge always has upon right click to show
            while (not(OptionsExist(['k-to Comp'], False))) do
            begin
              if (not(LoggedIn)) then
                Exit;
              if (FindNormalRandoms) then
                SetAngle(SRL_ANGLE_LOW);

              if (TimeFromMark(TTT) >= maxTTT) then
                Break;

              Write('Judge options not detected. Waiting.');
              Wait(100);
            end;

            if ((TimeFromMark(TTT) >= maxTTT) and (not(OptionsExist(['k-to Comp'], False)))) then
            begin
              Write('We might have moused over the wrong object. Trying again.');
              Continue;
            end;

            if (not(WaitOption('ete Comp', RandomRange(850, 1250)))) then
            begin
              Write('We have a competition already.');
              Exit;
            end;

            Break; // Breaks out of the first repeat .. until to complete the procedure
          end;

          Write('Waiting for the object to be on the screen.');
          AntiBan;
          Wait(RandomRange(500, 1500));
        until(False);

        // Handles waiting for the pay confirmation dialogue to appear
        for iTR := 1 to 5 do
        begin
          if (not(LoggedIn)) then
            Exit;
          if (FindNormalRandoms) then
            SetAngle(SRL_ANGLE_LOW);

          B := (FindText(X, Y, '1', StatChars, MCX1, MCY1, MCX2, MCY2));
          if (B) then
            Break;

          Write('Waiting for the pay confirmation dialogue to show.');
          Wait(RandomRange(750, 1250));
        end;

        // Continues if we have timed out after waiting for the pay confirmation dialogue
        if ((iTR >= 5) and (not(B))) then
          Continue;

        // Handles clicking 'Yes' for the pay confirmation dialogue
        // We use MMouse here instead of HumanMMouse as HumanMMouse does not look
        // like a human would when choosing a dialoge option.
        MMouse(X, Y, 25, 7);
        ClickMouse2(MOUSE_LEFT);

        if (B) then
        begin
          Write('We have started a new competition!');
          Exit;
        end;
      until(False);
    end;

    procedure StartGame();
    var
      Checking: Boolean;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      Checking := (Players[CURRENTPLAYER].Booleans[CHECK_FOR_ARROWS]);

      GetCompetition;
      if (Checking) then
        EquipArrows;
    end;

    function TicketAmount: Integer;
    var
      DTM: Integer;
    begin
      if (not(LoggedIn)) then
        Exit;
      if (FindNormalRandoms) then
        SetAngle(SRL_ANGLE_LOW);

      DTM := DTMFromString('mbQAAAHicY2VgYMhlYmAoBeJ8IE4E4mQglmZkYJABYnUgVgZicSDOa4sEqmZCwfxAEh0zYsFgAABgUwRn');

      GameTab(25);
      Result := (ItemAmount('inv', 'dtm', DTM, []));

      FreeDTM(DTM);
    end;

    // Five minute report
    procedure ProgressReport;
    var
      XPH, CPH: Integer;
      timeRan: string;
    begin
      if (not(ENABLE_DEBUG_MODE)) then
        ClearDebug;

      compsDone    := (competitionsDone);
      timeRan      := (MSToTime(GetTimeRunning, Time_Bare));
      startTickets := (startingTickets);
      curTickets   := (TicketAmount);
      gained       := (curTickets - startTickets);
      expGained    := (Gained * 5);

      // Borrowed from Nebula's Range Guilder
      CPH := (Round((competitionsDone) * 3600) / ((GetTimeRunning) / 1000));
      XPH := (Round(gained * 5 * 3600) / ((GetTimeRunning) / 1000));

      WriteLn('__________________________');
      WriteLn('');
      WriteLn('  RISK''s Range Guilder');
      WriteLn('  Script version: ' + SCRIPT_VERSION);
      WriteLn('  Time ran: ' + timeRan);
      WriteLn('  Competitions done: ' + ToStr(compsDone));
      WriteLn('  Competitions/h: ' + ToStr(CPH));
      WriteLn('  Tickets gained: ' + ToStr(gained));
      WriteLn('  EXP gained: ' + ToStr(expGained));
      WriteLn('  EXP/h: ' + ToStr(XPH));
      WriteLn('__________________________');
    end;

    // Created by Echo_, modified by Flight
    function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
    var
      realTime, w, x, y, z: Integer;
    begin
      if not LoggedIn then
        Exit;

      w := (BreakIn * 60000);
      x := (BreakFor * 60000);
      y := RandomRange(-randBreakIn * 60000, randBreakIn * 60000);
      z := RandomRange(-randBreakFor * 60000, randBreakFor * 60000);
      realTime := ((x + z) / 60000);

      if (HowManyPlayers = 1) then
      begin
        if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
        else
          if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
          begin
            Writeln('Taking a break for about ' + IntToStr(realTime) + ' minutes.');
            Logout;
            Wait((x) + (z));
            Writeln('Logging in.');
            LoginPlayer;
            Result := LoggedIn;
            FindNormalRandoms;
            IncEx(BreakRounds, (w) + (x));
            IncEx(TotalBreaks, 1);
            Writeln('The next break will occur in about ' + IntToStr(realTime) + ' minutes.');
          end;
      end;

      if (HowManyPlayers > 1) then
      begin
        if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
        else
          if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
          begin
          Writeln('Taking a break for about ' + IntToStr(BreakFor) + ' minutes.');
          Logout;
          IncEx(BreakRounds, (w));
          IncEx(TotalBreaks, 1);
          NextPlayer(True);
          Exit;
          while (LoggedIn) do
            Wait((x) + (z));
          NextPlayer(True);
        end;
      end;
    end;

    procedure MainLoop();
    var
      T, TT, maxComps: Integer;
    begin
      repeat
        maxComps         := (Players[CURRENTPLAYER].Integers[HOW_MANY_COMPS]);
        competitionsDone := 0;
        comInc           := 0;
        startingTickets  := (TicketAmount);

        MarkTime(T);
        MarkTime(TT);
        FixChats;
        Retaliate(AUTO_RETALIATE);

        repeat
          Inc(competitionsDone);

          StartGame;
          Wait(RandomRange(300, 500));
          FireAtTargets;
          Wait(RandomRange(300, 500));
          AntiBan;


          // Stat reporting & 5 minute debug report
          if (TimeFromMark(T) >= 300000) then
          begin
            ProgressReport;

            compsDone    := (competitionsDone);
            startTickets := (startingTickets);
            curTickets   := (TicketAmount);
            gained       := (curTickets - startTickets);
            expGained    := (Gained * 5);

            // Stat committing is now in the main loop as 1.0.4 to test if it works
            expThisReport   := (expGained);
            compsThisReport := (compsDone);
            if (not(comInc = 0)) then
            begin
              comExp   := (expThisReport - expLastReport);
              comComps := (compsThisReport - compsLastReport);
            end else
            begin
              comExp   := (expThisReport);
              comComps := (compsThisReport);
            end;

            expLastReport   := (expThisReport);
            compsLastReport := (compsThisReport);


            stats_IncVariable('Ranged EXP (Gained)', comExp);
            stats_IncVariable('Total EXP Gained', comExp);
            stats_IncVariable('Competitions Done', comComps);
            if (stats_Commit) then
              Write('We have committed stats to SRL stats!');

            Inc(comInc);

            T := 0;
          end;

          // Breaking
          if (ENABLE_BREAKS) then
            if (BreakHandler(BREAK_IN, BREAK_FOR, RAND_IN, RAND_FOR)) then
            begin
              FixCompass;
              SetAngle(SRL_ANGLE_LOW);
            end;
        until((competitionsDone >= maxComps) or (not(LoggedIn)));

        ExitPlayer('');
        Write('If you have encountered an error, please enable debug mode in the script setup and rerun the script.');
        Write('Thank you!');
      until((AllPlayersInactive));
    end;

    procedure Setup();
    begin
      SMART_Server  := WORLD;
      SMART_Members := True;

      AddOnTerminate('ProgressReport');
      SetupSRL;
      SetupSRLStats(836, STATS_USER, STATS_PASS);
      SPS_Setup(RUNESCAPE_SURFACE, ['6_7']);
      MouseSpeed := (RandomRange(10, 12));
      DeclarePlayers;
      LoginPlayer;
      SetAngle(SRL_ANGLE_LOW);
      ClearDebug;
      FixCompass;

      MainLoop;
    end;

    begin
      Setup;
    end.


    Change log:
    1.0.4:
    Code:
    * I've possibly increased the speed of the script by removing some
    of the procedure that gets a new competition. I originally had it go thru 
    all of the dialogue because I did not know that you only had to press the
    payment confirmation button. So I removed the click to continue button
    and chat-box confirmation parts of the procedure. 
    
    * I have added the break system. The user options for it can be found 
    below where you enter your stats username and password. 
    Instructions for the options can be found in the main post of this thread
    under the setup section.
    
    * I have changed the default clicking speeds to be a 'bit slower so that 
    it will not have to close the target screen so much. As always, if
    you would like it to be faster or slower, you can adjust the options in
    DeclarePlayers.
    
    * I have fixed the distance from the target center and the mouse 
    checker. I had the amount at 20 when it should have been at 10. 
    I made it 20 when I was still testing it before I 
    released it due to a bug I could not figure out. I fixed the bug, 
    but I forgot to revert the distance checker maximum
    distance back to 10 from 20. It should hopefully
    misclick a lot less now with the distance checker 
    actually working now.
    
    * I have removed a segment from my TPA mousing 
    function that relies on CTS 2/Hue/Saturation that was 
    useless code that I never really used for some reason. 
    I forgot to remove it, but I have now removed it.
    
    * I have added a maximum pixel check to my TPA mousing
    function that relies on CTS 2/Hue/Saturation. This will work alongside
    the minimum pixel check I already had in place. I'd like some feedback
    on the guard finding now that I have added that, please.
    
    * I have changed the way mousing the confirmation button works. I've
    changed from HumanMMouse (Flight's amazing function) to the regular
    MMouse when clicking the confirmation button in the dialogue as it looks
    a 'bit un-humanlike in my opinion when using HumanMMouse for that.
    
    * In regards to the mousing the confirmation button update, I have also made
    the range of clicking the button itself a 'bit larger to make it more human-like. 
    It would previously only click on the '1' and a 'bit away from it. It looked very 
    bot-like in my opinion, so I have updated it.
    
    * I've fixed the antiban procedure again. Two of the errors that I thought
    I had fixed in the previous update were not fixed as I made a mistake. It 
    should be fixed now and when it does antiban, it shouldn't stop the script
    due to the angle of the screen being at the highest point.
    
    * I've fixed a bug in the random finding. When it would find and solve a 
    random, it would leave the angle of the screen at the highest point, thus
    causing the script to eventually log out. But I believe I have fixed this now.
    
    * I've made the mouse speed a random speed instead of it being just one
    'Preset' speed. In regards to the mouse speed, I have also increased the
    chance of the random mouse speed increase in the anti-ban by a 'bit. 
    I have also decreased the chance of antiban happening, but not by a lot.
    
    * I have implemented Nebula's kind suggestion to my SPS backup position
    fixing method. This should help fix some of the reposition errors that some
    people may have, hopefully resulting in much longer runs for some people
    that have had trouble with the script recently.
    - Thanks, Nebula!
    
    * I have removed the checking if we are in combat and escaping from it
    procedure for now. Until I am able to create my own combat checking and
    running from combat procedures, it will stay removed. As I noticed when 
    another person would be in combat by misclicking on a guard, the script
    will attempt to run away. But it would not as I also had a bug in the running
    away part of the procedure. But since I have removed it, this bug has been
    solved, of course.
    
    * I have added a user option in the settings that will allow them to choose if
    they want to have the script enable auto retaliation from the start or not. This
    is to 'Cater' to the people who might have characters they do not want HP levels
    on and they would rather have their character die than them to gain an HP level.
    
    * I have changed stat reporting to be in the main loop. Even if the variables 
    are not being sent at this time, it will be good to have them just in case. The
    progress report in the debug will still show every five minutes though.
    
    * I have added competitions per hour and experience per hour in to the 
    progress report. I borrowed the code to do it from Nebula's range guilder,
    I have credited them where I use it. I borrowed it because I had no idea
    how to create that type of stuff. But thanks to him, I have learned how.
    - Thanks again, Nebula!
    
    * I have added a target screen checker and closer early in most repeats, just 
    to make sure the script will not get stuck because of the target screen being up
    while the script is trying to get a new competition or a target. So that could have
    been considered a bug, but I have hopefully fixed it.
    
    * I have added a lamp reward option and box reward options
    in to DeclarePlayers.

    Setup:
    Start next to the Competition judge with a bow equipped and enough gold to last you the amount of trips you want. Each competition requires 200 gold to start, so keep that in mind.

    If you are using your own arrows and do not wish to spend time equipping the arrows you receive from the judge each new competition, then please disable "CHECK_FOR_ARROWS" in DeclarePlayers. To disable it you have to change 'True' to 'False', without the ''s, of course.

    Also please make sure you have a free inventory to avoid any confusion with any other items in the inventory for the arrows or tickets to prevent 'Miscounting'. Thanks!

    To enable breaks, look in the script options below where you insert your stats username and password. Set "ENABLE_BREAKS" to "True", without the quotation marks, of course. Then change the values under it.
    BREAK_IN is how many minutes until you take a break,
    BREAK_FOR is how many minutes you will take the break for,
    RAND_IN is how many minutes in randomness you would like BREAK_IN to be,
    RAND_FOR is the same as RAND_IN but for BREAK_FOR.

    Remember, the options are in minutes. So don't enter them in milliseconds. 1 = 1 minute and so on.

    Important:
    Please make sure you have XP popup and display turned off. You can do this by right clicking the XP button next to the minimap and clicking both 'Toggle XP Popup' and 'Toggle XP Display'.

    The only settings you will want to alter are these:

    Simba Code:
    const
      WORLD   = 40; // What world do you wish to auto on? 0 = random

      STATS_USER = ''; // What is your SRL stats username? Leave blank if you have none
      STATS_PASS = ''; // What is your SRL stats password? Leave blank if you have none

      ENABLE_BREAKS = True; // Do you want to enable taking breaks?
      (* Ignore these settings if you aren't taking breaks *)
      BREAK_IN  = 35; // Break in how many minutes?
      BREAK_FOR = 10; // Break for how many minutes?
      RAND_IN   = 5; // How many minutes in randomness on BREAK_IN?
      RAND_FOR  = 5; // How many minutes in randomness on BREAK_FOR?
      (*                                                   *)    

      AUTO_RETALIATE      = True;  // True = On, False = Off
      ENABLE_MOUSE_PAINT = True; // Do you want to have a paint trail behind the mouse?  
         


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

      with Players[0] do
      begin
        Name := ''; // What is your character's username?
        Pass := ''; // What is your character's password?

        Integers[HOW_MANY_COMPS]  := 500; // How many competitions do you wish to do?
        Booleans[CHECK_FOR_ARROWS] := False; // Disable this if you want to use your
                                                                // own arrows. Remember they must be bronze!

        Active := True;
      end;
    end;


    Top Reports:

    RISK:
    Code:
    __________________________
    
      RISK's Range Guilder
      Script version: 1.0.0a
      Time ran: 04:19:54
      Competitions done: 372
      Tickets gained: -3578
      EXP gained: -17890
    __________________________

    Eltardo:
    Code:
    RISK's Range Guilder
    Script version: 1.0.3a
    Time ran: 02:04:42
    Competitions done: 170
    Tickets gained: 11641
    EXP gained: 58205

    kuiper:
    Code:
    __________________________
    
    RISK's Range Guilder
    Script version: 1.0.3a
    Time ran: 02:01:24
    Competitions done: 128
    Tickets gained: -5617
    EXP gained: -28085
    __________________________

    Donations:


    If you have enjoyed my script and feel I deserve a donation of any amount, please click that button. You may also donate RSGP by PMing me.

    Thank you very much! It would mean a lot to me if you did donate.
    Last edited by RISK; 02-27-2012 at 02:14 AM.
    Simba Code:
    (* Main *)

    repeat
      WriteLn('I am an idiot!');
    until(False);

  2. #2
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Nice! I'll have to test this one for sure, and I bet it beats mine even when it was working Awesome release man! Was in high demand.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  3. #3
    Join Date
    Jan 2012
    Location
    Inner Circle of Hell
    Posts
    243
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Will try this out soon once I get mems on my pure

  4. #4
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thank you very much, Kyle! I hope it doesn't disappoint. I've worked very hard on it and I know I have a lot to learn. But I'm getting there!

    Quote Originally Posted by Kyle Undefined View Post
    Nice! I'll have to test this one for sure, and I bet it beats mine even when it was working Awesome release man! Was in high demand.

    I hope you enjoy the script!

    Quote Originally Posted by FifthDimension View Post
    Will try this out soon once I get mems on my pure
    Simba Code:
    (* Main *)

    repeat
      WriteLn('I am an idiot!');
    until(False);

  5. #5
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    Finally RISK it's out Glad you have it working ^.^ You worked DAMN hard on this!

  6. #6
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Quote Originally Posted by RISK View Post
    Thank you very much, Kyle! I hope it doesn't disappoint. I've worked very hard on it and I know I have a lot to learn. But I'm getting there!
    Lol, you put more work into yours than I did mine
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  7. #7
    Join Date
    Jan 2012
    Location
    Under your bed.
    Posts
    414
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'll try it out asap will post a proggy later! .

    Edit: cant find any proggys o: where do they go? O.o
    Last edited by Bwuk; 02-24-2012 at 09:46 PM.
    Pure --> Berserker progress: http://villavu.com/forum/showthread.php?p=907073
    Best SRL Member around (Bonfield): http://villavu.com/forum/showthread.php?p=1106646
    Sorry for my english grammer.
    ~Bwuk.

  8. #8
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    They report every five minutes during script run time in the debug. They'll usually look like:

    Simba Code:
    __________________________

      RISK's Range Guilder
      Script version: 1.0.0
      Time ran: 00:15:52
      Competitions done: 24
      Tickets gained: 1423
      EXP gained: 7115
    __________________________

    I don't have it clear the debug before printing the progress report so you'll have to scroll up thru the debug a 'bit to find it. If you really want me to, I can make it clear the debug before it prints to easily find it.

    Quote Originally Posted by Bwuk View Post
    I'll try it out asap will post a proggy later! .

    Edit: cant find any proggys o: where do they go? O.o
    Simba Code:
    (* Main *)

    repeat
      WriteLn('I am an idiot!');
    until(False);

  9. #9
    Join Date
    Jan 2012
    Location
    Under your bed.
    Posts
    414
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by RISK View Post
    They report every five minutes during script run time in the debug. They'll usually look like:

    Simba Code:
    __________________________

      RISK's Range Guilder
      Script version: 1.0.0
      Time ran: 00:15:52
      Competitions done: 24
      Tickets gained: 1423
      EXP gained: 7115
    __________________________

    I don't have it clear the debug before printing the progress report so you'll have to scroll up thru the debug a 'bit to find it. If you really want me to, I can make it clear the debug before it prints to easily find it.
    Oh I see thanks! you dont have to but could be nice .
    Pure --> Berserker progress: http://villavu.com/forum/showthread.php?p=907073
    Best SRL Member around (Bonfield): http://villavu.com/forum/showthread.php?p=1106646
    Sorry for my english grammer.
    ~Bwuk.

  10. #10
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Will do. I'm so sorry about that.

    Updated the main post with the new version of the script, 1.0.0a:
    Change log for 1.0.0a:
    Code:
    * Added an optional debug mode. When it is set to 'True', the script will not clear the debug upon progress reports. 
    I forgot to add this on the initial release. Sorry about that!
    Again, sorry about that! That's so embarrassing, haha.
    Simba Code:
    (* Main *)

    repeat
      WriteLn('I am an idiot!');
    until(False);

  11. #11
    Join Date
    Jun 2011
    Location
    Anywhere that has WIFI
    Posts
    669
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice job! Ill test it sometime might even post a proggy or 2. Lets see if its better than Home's build it your own!

  12. #12
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks, FallenSabre. Looking forward to it.


    Released 1.0.0b
    * Removed ranged experience gained stat posting in regards to SRL stats for now. I'll add it again tomorrow with a proper system that won't be incorrect.
    Simba Code:
    (* Main *)

    repeat
      WriteLn('I am an idiot!');
    until(False);

  13. #13
    Join Date
    Nov 2011
    Location
    Puerto Rico
    Posts
    905
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sweet release will try some time soon with proggys after 82 mage and dt
    (\__/)
    ( O.o )This is Bunny.
    ( > < )Copy Bunny into your signature to help him on his way to world domination.

  14. #14
    Join Date
    Jun 2008
    Posts
    68
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    <3 Risk!! Ill post a proggie Soon! Love ya!
    <3 RISK, <3 P1nky

  15. #15
    Join Date
    Jan 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Doesn't even work...
    04:41:34 PM: Waiting for the chat-box confirmation text to show.
    04:41:35 PM: We have started a new competition!
    04:41:36 PM: We were unable to find the DTM of the arrows in our inventory.
    04:41:41 PM: We were unable to find the DTM of the arrows in our inventory.
    04:41:52 PM: We already have arrows equipped.
    04:42:06 PM: We were unable to mouse the object.
    04:42:06 PM: We were unable to find any targets. We might be out of the area.
    04:42:09 PM: We were unable to move our character with SPS.

  16. #16
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    That's strange. Can you try running it again, please? Make sure you're at the range next to the judge.

    Thanks.
    Simba Code:
    (* Main *)

    repeat
      WriteLn('I am an idiot!');
    until(False);

  17. #17
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Maybe he was already in the middle of an competition.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  18. #18
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    That'd be weird since my script recognizes that. It seems to work for others since there's one to two commits per minute.
    Simba Code:
    (* Main *)

    repeat
      WriteLn('I am an idiot!');
    until(False);

  19. #19
    Join Date
    Jan 2012
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you. Ran for 1hr and got stuck in a random only attacked a guard once.


    RISK's Range Guilder
    Script version: 1.0.0a
    Time ran: 01:05:47
    Competitions done: 78
    Tickets gained: 5949
    EXP gained: 29745
    ______________________


    RISK's Range Guilder
    Script version: 1.0.4
    Time ran: 02:17:25
    Competitions done: 222
    Competitions/h: 96
    Tickets gained: 16876
    EXP gained: 84380



    RISK's Range Guilder
    Script version: 1.0.4
    Time ran: 02:33:15
    Competitions done: 226
    Competitions/h: 88
    Tickets gained: 16603
    EXP gained: 83015
    EXP/h: 32501

    RISK's Range Guilder
    Script version: 1.0.4
    Time ran: 02:18:45
    Competitions done: 215
    Competitions/h: 92
    Tickets gained: 16246
    EXP gained: 81230
    EXP/h: 35126
    Last edited by baja_blast1; 03-05-2012 at 09:44 PM.

  20. #20
    Join Date
    Jun 2008
    Posts
    68
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    It dosnt work for me either. It miss clicks the range guild guy. and then it thinks it already has arrows and logs off..
    <3 RISK, <3 P1nky

  21. #21
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Ah, it attacked a guard? I've never had that happened before. I wonder what caused that. Tomorrow I'll add a combat check to see if it happens again.

    Thanks for the report, baja_blast1! I really appreciate it and I hope you enjoyed using my script.

    Quote Originally Posted by baja_blast1 View Post
    Thank you. Ran for 1hr and got stuck in a random only attacked a guard once.

    @ phantom1 : I'll check it out and see what I can do. Thanks for the report.

    E: Phantom1, I sent you a PM. I hope I can get the bug solved if there is a bug and not just a bad run. Because I'm running it for almost 3 hours straight now without any problems.
    Last edited by RISK; 02-25-2012 at 05:46 AM.
    Simba Code:
    (* Main *)

    repeat
      WriteLn('I am an idiot!');
    until(False);

  22. #22
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Updated the script to 1.0.1! So please re-download from the first post to get some vital changes to the script!

    Change log:
    Code:
    * I have added a new optional debug 'system' instead of it just clearing the debug 
    if it isn't activated when writing progress reports. Instead, it will do the same as before 
    but it will also show what the script sees when attempting to find an object/NPC. This 
    will help with finding out what causes certain bugs related to object finding in the future. 
    
    * Fixed DTM for bronze arrows. It was really tricky and fun to create. It should work better 
    now and I think that is what was causing the error with it not being able to work for some people. 
    
    * Added DTM-based reposition as the main reposition method instead of SPS. SPS is the backup 
    repositioning method now. So if the DTM repositioning fails, the script will attempt to reposition 
    itself with SPS.
    
    * Added combat checking to the script in the beginning of most repeat .. until's so that if the script
    detects that we are in combat, we'll run away from it. The system is experimental, so I need some feedback on it, 
    please. I don't misclick a lot or start attacking guards a lot, so any suggestions or feedback, as I said, would be great!
    
    * Fixed a bug that occurred in 1.0.0b that caused the experience gained in the progress report 
    to not show. I forgot to add it again as I accidentally removed. I'm sorry for that.
    
    * Reworded some of my debug line writing. I accidentally made it write the wrong line at the wrong 
    time, thus causing confusion as to what was causing the error for some people. It is worded much 
    better now.

    I think I've fixed the bug that you two were having. I've uploaded the script to the first post and added a new feature to the post, a change log. So if anyone is curious as to what I add in each version, you should check that out!

    Thanks to everyone who has been using my script. I really appreciate it and I hope everyone is enjoying my script!
    Simba Code:
    (* Main *)

    repeat
      WriteLn('I am an idiot!');
    until(False);

  23. #23
    Join Date
    Nov 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It bought arrows, but then it doesn't click the targets. It just hovers around until I disable and enable SMART a few times, then it clicks the targets, but it doesn't repeat efficiently.

    Every time it buys arrows it runs to a spot near the edge of the guild and doesn't click targets, then it logs out.

    Here's what I get:

    12:23:18 AM: Waiting for the object to be on the screen.
    12:23:19 AM: We might be unable to see the judge. Let's fix our location.
    12:23:31 AM: Waiting for the object to be on the screen.
    12:23:32 AM: We might be unable to see the judge. Let's fix our location.
    12:23:38 AM: We have a competition already.
    12:23:40 AM: We have equipped the arrows.
    12:23:51 AM: The target screen has been up for 835 second(s). Closing it.
    12:24:00 AM: The target screen has been up for 1053 second(s). Closing it.
    12:24:06 AM: The target screen has been up for 897 second(s). Closing it.
    12:24:16 AM: The target screen has been up for 931 second(s). Closing it.
    12:24:24 AM: Waiting for the pay confirmation dialogue to show.
    12:24:26 AM: The click to continue button has not been detected. Waiting.
    12:24:27 AM: Waiting for the chat-box confirmation text to show.
    12:24:28 AM: Waiting for the chat-box confirmation text to show.
    12:24:29 AM: Waiting for the chat-box confirmation text to show.
    12:24:32 AM: Waiting for the chat-box confirmation text to show.
    12:24:33 AM: Waiting for the chat-box confirmation text to show.
    12:24:35 AM: We might be unable to see the judge. Let's fix our location.
    12:24:53 AM: We have a competition already.
    12:24:56 AM: We have equipped the arrows.
    12:25:01 AM: The target screen has been up for 931 second(s). Closing it.
    12:25:10 AM: The target screen has been up for 834 second(s). Closing it.
    12:25:18 AM: The target screen has been up for 950 second(s). Closing it.
    12:25:27 AM: The target screen has been up for 1037 second(s). Closing it.
    12:25:32 AM: The target screen has been up for 839 second(s). Closing it.
    12:25:52 AM: Waiting for the object to be on the screen.
    12:25:56 AM: We might be unable to see the judge. Let's fix our location.
    12:26:00 AM: DTM repositioning failed. Let's try SPS.
    Error: Exception: The given DTM Index[2] doesn't exist at line 136
    The following DTMs were not freed: [SRL - Lamp bitmap, 1]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
    Last edited by Naggiii; 02-25-2012 at 07:28 AM.

  24. #24
    Join Date
    Dec 2011
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    the script is working great for me. I recommend you to put a paypal link on your page. The only thing you can improve is the spamclicking, sometimes it isn't fast and that will causing the problem it has to close the window. But over-all a great script that need some respect!

  25. #25
    Join Date
    Feb 2012
    Posts
    90
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    RISK great script,

    However your losing alot of time checking whether it has arrows equipped or not.
    You should just edit it to click the bronze arrows and then fire at target instead of getting arrows then checking whether they are in your quiver > fire target.
    Unless it used to work properly but new update made your script not reconize the bronze arrows in inventory.

Page 1 of 7 123 ... LastLast

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
  •