Results 1 to 7 of 7

Thread: Agility Bot Needed [Barbarian]

  1. #1
    Join Date
    Dec 2010
    Location
    Hawaii
    Posts
    612
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default Agility Bot Needed [Barbarian]

    Hello guys, as I'm still trying to learn how to make a new bot, and the fact that I have to kill blue dragons for my slayer task, and need 70 agility, I am here to request an agility bot that covers the Barbarian Course. Help needed please, I also need that bot for a requirement for the bot I'm thinking of making which would require 70 agility. So please, if anyone can make this bot, I will be very grateful. Thank you.

    ~~~~~~
    Huthaifah

  2. #2
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    I started to make one of these a while ago. Here's what I had made. It might even work, I'm not sure, look at it and see what you think.

    Simba Code:
    program BarbAgility;
    {$DEFINE SMART}
    {$i SRL\SRL.scar}
    {$i Reflection\Reflection.Simba}


    const
      DisplayDebug = true;
      WORLD = 81;
      MEMBERS = True;
      SIGNED = True;
      SUPERDETAIL = False;


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

      with Players[0] do
      begin
        Name := '';
        Pass := '';
        Nick := '';
        Active := True;
      end;
    end;


    procedure Debug(s: string; level: integer);
    var
      StartingString: string;
      i: integer;
    begin
      if DisplayDebug then
      begin
        StartingString := ' ';
        for i := 0 to level do
          StartingString := StartingString + '  ';
        Writeln(StartingString + '> ' + s);
      end;
    end;


    procedure AntiBan;
    begin
      FindNormalRandoms;
      Case Random(30) of
        0: RandomRClick;
        1: HoverSkill(SKILL_HITPOINTS, false);
        2: PickUpMouse;
        3: RandomMovement;
        4: BoredHuman;
        5: ExamineInv;
        6: RandomAngle(1);
      end;
      GameTab(TAB_INV);
    end;


    procedure Die(reason: string);
    begin
      if FindNormalRandoms then
        Exit;
      Writeln('logging out player ' + Players[CurrentPlayer].Nick + ' because ' + Reason);
      logout;
    end;


    var
      OBSTACLE_ROPE_1, OBSTACLE_ROPE_2, OBSTACLE_LOG, OBSTACLE_NET_1, OBSTACLE_NET_2,
      OBSTACLE_EDGE, OBSTACLE_EDGE_LADDER, OBSTACLE_WALL_1, OBSTACLE_WALL_2, LOCATION_ROPE_1,
      LOCATION_ROPE_2, LOCATION_NET_1, LOCATION_NET_2, LOCATION_WALL_1, LOCATION_WALL_2: TTile;
      ANIM_ROPE, ANIM_ROPE_FAIL, ANIM_LOG, ANIM_LOG_FAIL, ANIM_CLIMBNET, ANIM_LEDGE, ANIM_LEDGE_FAIL: Integer;

    procedure DeclareConst;
    begin
      OBSTACLE_ROPE_1 := Tile(2551, 3553);
      OBSTACLE_ROPE_2 := Tile(2552, 3553);
      OBSTACLE_LOG := Tile(2550, 3546);
      OBSTACLE_NET_1 := Tile(2538, 3546);
      OBSTACLE_NET_2 := Tile(2538, 3545);
      OBSTACLE_EDGE := Tile(3535, 3547);
      OBSTACLE_EDGE_LADDER := Tile(2532, 3545);
      OBSTACLE_WALL_1 := Tile(2537, 3553);
      OBSTACLE_WALL_2 := Tile(2542, 3553);
      LOCATION_ROPE_1 := Tile(2551, 3554);
      LOCATION_ROPE_2 := Tile(2551, 3554);
      LOCATION_NET_1 := Tile(2539, 3546);
      LOCATION_NET_2 := Tile(2539, 3545);
      LOCATION_WALL_1 := Tile(2536, 3553);
      LOCATION_WALL_2 := Tile(2541, 3553);

      ANIM_ROPE := 751;
      ANIM_LEDGE := 9908;

      ANIM_LOG_FAIL := 768;
    end;


    function DetermineLocation: string;
    begin
      if not LoggedIn then
        Exit;
      if MeInBox(IntToBox(2550, 3555, 2553, 3554)) then
        Result := 'rope swing';
      if MeInBox(IntToBox(2546, 9955, 2553, 9950)) then
        Result := 'failed rope swing';
      if MeInBox(IntToBox(2550, 3549, 2553, 3545)) then
        Result := 'log balance';
      if MeInBox(IntToBox(2543, 3543, 2548, 3543)) then
        Result := 'failed log balance';
      if MeInBox(IntToBox(2539, 3547, 2542, 3544)) then
        Result := 'obstacle net';
      if (MeInBox(IntToBox(2536, 3547, 2537, 3545)) and (GetPlaneIndex = 1)) then
        Result := 'balance ledge';
      if (MeInBox(IntToBox(2533, 3547, 2537, 3545)) and (GetPlaneIndex = 0)) then
        Result := 'failed balance ledge';
      if MeInBox(IntToBox(2535, 3554, 2537, 3551)) then
        Result := 'crumbling wall 1';
      if MeInBox(IntToBox(2538, 3554, 2542, 3552)) then
        Result := 'crumbling wall 2';
    end;


    function SwingRope: boolean;
    var
      RopeTile: TTile;
      RopePoint: TPoint;
      Me: TMe;
      C: Integer;
    begin
      if not LoggedIn then Exit;
      Debug('SwingRope', 0);
      Debug('orienting camera', 1);
      SetAngle(true);
      MakeCompass('n');
      Debug('Randomizing Tile', 1);
      Case Random(1) of
        0: RopeTile := OBSTACLE_ROPE_1;
        1: RopeTile := OBSTACLE_ROPE_2;
      end;
      Debug('Calculating rope point', 1);
      RopePoint := TileToMSEx(RopeTile, 0.5, 0.4, 0);
      Debug('on screen rope point coords: (' + IntToStr(RopePoint.x) + ', ' + IntToStr(RopePoint.y) + ')', 2);
      MMouse(RopePoint.x, RopePoint.y, 1, 5);
      Debug('searching for uptext', 1);
      if R_WaitUpText('Swing-on', 400 + Random(40)) then
      begin
        Debug('valid uptext found!', 1);
        Debug('right clicking', 1);
        ClickMouse2(false);
        Debug('running R_WaitOption', 1);
        Wait(400 + Random(40));
        Result := R_WaitOption('Swing-on', 600 + Random(60));
        if Result then
          Debug('option chosen!', 2);
      end else
      begin
        Debug('we did not find good uptext; we suspect someone else was using the rope.', 1);
        Debug('we will wait 3 seconds, then check again', 1);
        MakeCompass('e');
        MakeCompass('n');
        C := 0;
        repeat
          Debug('retry #' + IntToStr(C+1), 2);
          if R_WaitUpText('Swing-on', 400 + Random(40)) then
          begin
            Debug('valid uptext found!', 1);
            Debug('right clicking', 1);
            ClickMouse2(false);
            Debug('running R_WaitOption', 1);
            Result := R_WaitOption('Swing-on', 600 + Random(60));
            if Result then
            begin
              Debug('option chosen!', 2);
              Break;
            end;
          end;
          inc(C);
        until (C = 3);
        Die('we could not swing on the rope because we could not find uptext ''Swing-on''');
      end;
      if not(Result) then
        Die('we could not swing on the rope because r_WaitOption failed');

      Wait(1500 + Random(150));
      repeat
        Wait(500 + Random(50));
        Me := GetMe;
      until(Me.Animation = -1);
      Wait(2500 + Random(150));

      AntiBan;
    end;


    function WalkLog: boolean;
    var
      Me: TMe;
      LogPoint: TPoint;
    begin
      Result := False;
      Debug('WalkLog', 0);
      Debug('calculating plog point', 1);
      LogPoint := TileToMS(OBSTACLE_LOG, 0);
      Debug('on screen log point coords: (' + IntToStr(LogPoint.x) + ', ' + IntToStr(LogPoint.y) + ')', 2);
      MMouse(LogPoint.x, LogPoint.y, 12, 12);
      if R_WaitUpText('Walk-across', 400 + Random(40)) then
      begin
        Debug('valid uptext found!', 1);
        ClickMouse2(false);
        Debug('running R_WaitOption', 1);
        Result := R_WaitOption('Walk-across', 400 + Random(40));
        if Result then
          Debug('option chosen!', 2);
      end else
        Die('we could not walk across the log beacuse we could not find uptext ''Walk-across''');
      if not(Result) then
        Die('we could not walk across the log because we could not choose the option ''Walk-across''');

      Wait(1500 + Random(150));
      repeat
        Wait(500 + Random(50));
        Me := GetMe;
      until(Me.Animation = -1);
      Wait(1500 + Random(150));

      AntiBan;
    end;


    function ClimbNet: boolean;
    var
      NetTile: TTile;
      NetPoint: TPoint;
      Me: TMe;
    begin
      Debug('ClimbNet', 0);
      Debug('Randomizing the tile', 1);
      case Random(1) of
        0: NetTile := OBSTACLE_NET_1;
        1: NetTile := OBSTACLE_NET_2;
      end;
      Debug('Calculating net point', 1);
      NetPoint := TileToMS(NetTile, 0);
      Debug('on screen coords of net point: (' + IntToStr(NetPoint.x) + ', ' + IntToStr(NetPoint.y) + ')', 2);
      MMouse(NetPoint.x, NetPoint.y, 5, 12);
      if R_WaitUpText('Climb-over', 400 + Random(40)) then
      begin
        Debug('valid uptext found!', 1);
        Debug('running R_WaitOption', 1);
        ClickMouse2(false);
        Result := R_WaitOption('Climb-over', 400 + Random(40));
        if Result then
          Debug('option chosen!', 2);
      end else
        Die('we could not climb the net because we could not find uptext ''Climb-over''');
      if not(Result) then
        Die('we could not climb the net because we could not choose the option ''Climb-over''');

      Wait(1500 + Random(150));
      repeat
        Wait(500 + Random(50));
        Me := GetMe;
      until(Me.Animation = -1);
      Wait(1500 + Random(150));

      AntiBan;
    end;


    function WalkToCrumbledWall1: boolean;
    begin
      Result := WalkPath([LOCATION_WALL_1]);
      if not Result then
        Die('we could not walk to the first Crumbled wall');
    end;


    function GoDownLadder: Boolean;
    var
      LadPoint: TPoint;
      Me: TMe;
    begin
      if not LoggedIn then
        Exit;
      Result := False;
      Debug('GoDownLadder', 0);
      Debug('Calculating the ladder point', 1);
      LadPoint := TileToMS(OBSTACLE_EDGE_LADDER, 0);
      Debug('on screen coords of ladder point: (' + IntToStr(LadPoint.x) + ', ' + IntToStr(LadPoint.y) + ')', 2);
      MMouse(LadPoint.x, LadPoint.y, 8, 8);
      if R_WaitUpText('Climb-down', 400 + Random(40)) then
      begin
        Debug('valid uptext found!', 1);
        Debug('running R_WaitOption', 1);
        ClickMouse2(false);
        Result := R_WaitOption('Climb-down', 400 + Random(40));
        if Result then
          Debug('option chosen!', 2);
      end else
        Die('we could not climb down the ladder because we could not find uptext ''Climb-down''');
      if not Result then
        Die('we could not climb down the ladder because we could not choose the option ''Climb-down''');

      Wait(1500 + Random(150));
      repeat
        Wait(500 + Random(50));
        Me := GetMe;
      until(Me.Animation = -1);
      Wait(1500 + Random(150));

      WalkToCrumbledWall1;

      AntiBan;
    end;


    function WalkLedge: boolean;
    var
      Me: TMe;
      LedgePoint: TPoint;
    begin
      if not LoggedIn then
        Exit;
      Result := False;
      Debug('WalkLedge', 0);
      Debug('Calculating the ledge point', 1);
      LedgePoint := TileToMSEx(OBSTACLE_EDGE, 0.1, 0.1, 0);
      Debug('on screen coords of ledge point: (' + IntToStr(LedgePoint.x) + ', ' + IntToStr(LedgePoint.y) + ')', 2);
      MMouse(LedgePoint.x, LedgePoint.y, 15, 8);
      if R_WaitUpText('Walk-across', 400 + Random(40)) then
      begin
        Debug('valid uptext found!', 1);
        Debug('running r_WaitOption', 1);
        ClickMouse2(false);
        Result := R_WaitOption('Walk-across', 400 + Random(40));
        if Result then
          Debug('option chosen!', 2);
      end else
        Die('we could not walk across the ledge because we could not find uptext ''Walk-across''');
      if not Result then
        Die('we could not walk across the ledge because we could not choose the option ''Walk-across''');

      Wait(1500 + Random(150));
      repeat
        Wait(500 + Random(50));
        Me := GetMe;
      until(Me.Animation = -1);
      Wait(1500 + Random(150));

      GoDownLadder;

      AntiBan;
    end;





    function ClimbWall1: boolean;
    var
      Me: TMe;
      WallPoint: TPoint;
    begin
      if not LoggedIn then
        Exit;
      SetAngle(true);
      MakeCompass('n');
      Result := False;
      Debug('ClimbWall1', 0);
      Debug('Calculating wall point', 1);
      WallPoint := TileToMSEx(OBSTACLE_WALL_1, 0.95, 0.5, 0);
      Debug('on screen coords of wall point: (' + IntToStr(WallPoint.x) + ', ' + IntToStr(WallPoint.y) + ')', 2);
      MMouse(WallPoint.x, WallPoint.y, 3, 8);
      if R_WaitUpText('Climb-over', 400 + Random(40)) then
      begin
        Debug('valid uptext found!', 1);
        Debug('running R_WaitOption', 1);
        ClickMouse2(false);
        Result := R_WaitOption('Climb-over', 400 + Random(40));
        if Result then
          Debug('option chosen!', 2);
      end else
        Die('we could not climb the first crumbling wall because we could not find uptext ''Climb-over''');
      if not Result then
        Die('we could not climb the first crumbling wall because we could not choose the option ''Climb-over''');

      Wait(1500 + Random(150));
      repeat
        Wait(500 + Random(50));
        Me := GetMe;
      until(Me.Animation = -1);
      Wait(1500 + Random(150));

      AntiBan;
    end;


    function WalkToRope: boolean;
    var LocTile: TTile;
    begin
      case Random(1) of
        0: LocTile := LOCATION_ROPE_1;
        1: LocTile := LOCATION_ROPE_2;
      end;
      Result := WalkPath([LocTile]);
      if not Result then
        Die('we could not walk to the rope swing');

      AntiBan;
    end;


    function ClimbWall2: boolean;
    var
      Me: TMe;
      WallPoint: TPoint;
    begin
      if not LoggedIn then
        Exit;
      SetAngle(true);
      MakeCompass('n');
      Result := False;
      Debug('ClimbWall2', 0);
      Debug('Calculating wall point', 1);
      WallPoint := TileToMSEx(OBSTACLE_WALL_2, 0.95, 0.5, 0);
      Debug('on screen coords of wall point: (' + IntToStr(WallPoint.x) + ', ' + IntToStr(WallPoint.y) + ')', 2);
      MMouse(WallPoint.x, WallPoint.y, 3, 8);
      if R_WaitUpText('Climb-over', 400 + Random(40)) then
      begin
        Debug('valid uptext found!', 1);
        Debug('running R_WaitOption', 1);
        ClickMouse2(false);
        Result := R_WaitOption('Climb-over', 400 + Random(40));
        if Result then
          Debug('option chosen!', 2);
      end else
        Die('we could not climb the second crumbling wall because we could not find uptext ''Climb-over''');
      if not Result then
        Die('we could not climb the second crumbling wall because we could not choose the option ''Climb-over''');

      Wait(1500 + Random(150));
      repeat
        Wait(500 + Random(50));
        Me := GetMe;
      until(Me.Animation = -1);
      Wait(1500 + Random(150));

      WalkToRope;

      AntiBan;
    end;


    begin
      Smart_Members := MEMBERS;
      Smart_Server := WORLD;
      Smart_Signed := SIGNED;
      Smart_SuperDetail := SUPERDETAIL
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      Wait(1000);
      DeclareConst;
      repeat
        repeat
          SetAngle(true);
          case DetermineLocation of
            'rope swing': SwingRope;
            'log balance': WalkLog;
            'obstacle net': ClimbNet;
            'balance ledge': WalkLedge;
            'crumbling wall 1': ClimbWall1;
            'crumbling wall 2': ClimbWall2;
          else Die('WRITE A NEW FUNCTION BITCH');
          end;
          //prog
        until Not LoggedIn;
        //prog
        NextPlayer(false);
      until(AllPlayersInactive);

    end.

  3. #3
    Join Date
    Dec 2010
    Location
    Hawaii
    Posts
    612
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Thanks brotha, will make sure to check it out ASAP. Btw, your cooking bot is pro. 65 cooking in one day, except it stopped because of a random.

  4. #4
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Quote Originally Posted by Huthaifah View Post
    Thanks brotha, will make sure to check it out ASAP. Btw, your cooking bot is pro. 65 cooking in one day, except it stopped because of a random.
    haha thanks, be sure and post progs! (for the cooker i mean)

  5. #5
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by TomTuff View Post
    haha thanks, be sure and post progs! (for the cooker i mean)
    you mean be sure to post progs right?

  6. #6
    Join Date
    Dec 2010
    Location
    Hawaii
    Posts
    612
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Okay, lol, that was unnecessary. But thanks for helping lol.

  7. #7
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Quote Originally Posted by kongking View Post
    you mean be sure to post progs right?
    Yeah.

    edit: nmd wrong thread >_>
    Last edited by TomTuff; 12-29-2010 at 09:48 PM.

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
  •