Results 1 to 13 of 13

Thread: Bot doesn't Attack nor loot

  1. #1
    Join Date
    Mar 2013
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default Bot doesn't Attack nor loot

    SCAR Code:
    program AIOFighter;
        // I, Shorteh96, would like to thank the following users:
        // RequiredOne: I used part of your AutoFighter script as backbone.
        // Eduard: I used a lot of your Fight Cave script as backbone to convert to SMART.
        // Ogre: Thank you for helping me with my remedial errors in the chatbox.

        // I, Shorteh96, would like to take very little credit for this script
        // as I have no idea how to code in all honesty but am capable of reading
        // and copying premade code into a new working script. Thank you!
       
    {$Define SMART}
    {$i SRL/SRL.simba}
    {$i P07Include.simba}
    {$include SRL/SRL/Misc/SmartGraphics.simba}

    var
    x, y: Integer;
    Combat1, num1, num2, attnum: Integer;

    const

        // REQUIRED CONFIGURATION BY USER:
      FightStyle = 1;                     // 1 = Att, 2 = Str, 3 = Contr, 4 = Def
      MNick = 'Oblin';                    // Monster name without the first letter
      MColor = 7184261;                   // Monster Color 1
      MColor2 = 4486329;                  // Monster Color 2

        // OPTIONAL CONFIGURATION BY USER
      ABan1 = 'Attack';                   // First skill for the anti-ban to check
      ABan2 = 'Hitpoints';                // Second skill for the anti-ban to check
      Loot = 'Bones';                     // Loot name including the first letter
      LColor = 10132390;                  // Color of the loot to pick up

    procedure P07_DeclarePlayers;
      begin
        P07_PlayerName := '';  // Username for 07Scape
        P07_PlayerPass := '';   // Password for 07Scape
      end;
        // END OF CONFIGURATION

    procedure P07_SetRun(Run: Boolean);
    var
      x, y: integer;
    begin
      if not P07_TabInventoryTab(12) then
      begin
        writeln('ERROR: Could not P07_TabInventoryTab(12) -> Error in P07 include or random! Exiting');
        Exit;
        end;
      if (FindColor(x, y, 4342852, 627, 416, 658, 444)) then
      begin
        writeln('-> Run = on!');

        mouse(x, y, 1, 1, 1);
      end;
      writeln('-> Going to inventory tab');
      P07_TabInventoryTab(4);
    end;

    procedure SetMeUp;
    begin
      writeln('-- Configuring player --');
      writeln('-> Checking AutoRetaliate.');
      P07_AutoRetaliate(true);
      writeln('-> Checking CombatStance');
      if(FightStyle = 0) then
      begin
      writeln('ERROR: Please fill in the FightStyle settings!');
      TerminateScript;
      end;
      P07_CombatStance(FightStyle);
      writeln('-> CombatStance = '+Inttostr(FightStyle)+'');
      writeln('-> Making Compass South');
      P07_MakeCompassSouth;
      writeln('-> Making Camera Angle High');
      P07_MakeCameraAngleHigh;
      P07_SetRun(true);
      writeln('-- Configuration completed --');
      writeln('');
    end;

    procedure ProgressReport;
      begin
        Wait(5000);
        cleardebug();
        writeln('-- AIO Fighter Alpha 0.1 --');
        writeln(' Time Running: '+TimeRunning+'');
      end;

    procedure Random1;
      begin
        attnum := (Random(1000));
      end;

    procedure Attack;
    var x, y: Integer;
      begin
          wait(500 + random(800))
          if P07_FindObjCustom(x,y, ['ttack', MNick], [MColor, MColor2], 5) then
          begin
            if combat1 = (0) then
             begin
               P07_MouseBox(X, Y, X, Y, mouse_left);
               wait(random(500));
             end;
          end;
      end;

    procedure Combat;
      begin
        Combat1 := 1;
          begin
            if (FindColor(X, Y, 65280, 220, 110, 330, 220)) then
            begin
              WriteLn('Combatting mobs');
            end
            else Combat1 := 0;
            if (FindColor(X, Y, 65280, 220, 110, 330, 220)) = false then
            if Loot = ('') = false then
              if P07_FindObjCustom(x,y, [Loot], [LColor], 5) then
              begin
                wait (randomrange(100, 200));
                ClickMouse2(mouse_right);
                wait(randomrange(800, 1000));
                P07_ChooseOptionMulti(['balsl ' + Loot]);
              end;
          end;
      end;

    Procedure Antiban;
      Begin
        num2 := (5);
        num1 := (random(30));
        WriteLn(num1)
        sleep(2000)
        if num2 < num1 then
          Case Random(10) Of
            1: P07_HoverSkill(ABan1,RandomRange(2500,3500));
            3: Boredhuman;
            4: Wait(2500 + random(4500));
            5: p07_HoverSkill(ABan2,RandomRange(2500,3500));
            6: PickUpMouse;
            7: RandomMovement;
            8: RandomRClick;
            9: P07_MakeCompassdegree(randomrange(0, 360));
          end;
      end;

    begin
      P07_DeclarePlayers;
      SetupSRL();
      SetupP07Include;
      ClearDebug;
        writeln('Hello, welcome to SMART AIO Fighter Alpha 0.1');
        writeln('Please submit all bugs/troubles on the forum for fast fixes!');
        writeln('');
      if (not P07_LoggedIn) then
        P07_LogInPlayer;
      SetMeUp;
      repeat
        if (not P07_LoggedIn) then
        begin
          P07_LogInPlayer;
          SetMeUp;
        if combat1 = 0 then
        Random1;
        Combat;
        if Combat1 = 0 then
        Attack;
        end;
        Antiban;
        progressreport;
            wait(2000 + random(100));
      until (false)
    end.

    The first, and major problem is that once the bot runs "SetMeUp" it continues to check Antiban and does not attack any monsters nor loot. I can not release without this being fixed.

    The second, and miniscule in importance as the first is that the debug box of SIMBA is used as a time report for the script but random numbers appear on the third line while some times these numbers are gone:





    Last edited by Shorteh96; 03-07-2013 at 04:38 AM.

  2. #2
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    Seems like the colors are no longer valid. Re-select your colors and see how that goes.

    Forum account issues? Please send me a PM

  3. #3
    Join Date
    Mar 2013
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by Justin View Post
    Seems like the colors are no longer valid. Re-select your colors and see how that goes.
    Thanks for the speedy reply, I want this solved ASAP. I just changed the colors to no avail unfortunately

  4. #4
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    Does it move the mouse to the NPC?

    Forum account issues? Please send me a PM

  5. #5
    Join Date
    Mar 2013
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by Justin View Post
    Does it move the mouse to the NPC?
    That is a no go, it does not.

  6. #6
    Join Date
    Jul 2012
    Posts
    437
    Mentioned
    10 Post(s)
    Quoted
    165 Post(s)

    Default

    try 'Oblin'->'oblin'

    the random number is caused by
    Simba Code:
    WriteLn(num1)
    Last edited by tealc; 03-07-2013 at 04:51 AM.

  7. #7
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    It could be a anti-leech, try posting on the script thread

    Forum account issues? Please send me a PM

  8. #8
    Join Date
    Mar 2013
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by tealc View Post
    try 'Oblin'->'oblin'
    Ah, that didn't solve it but that is correct, it should be oblin. Thanks, still doesn't attack or hover over NPC's however.

    Quote Originally Posted by Justin View Post
    It could be a anti-leech, try posting on the script thread
    It isn't an anti-leech lul, I'm trying to make this script.

  9. #9
    Join Date
    Mar 2013
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    I really want help getting this solved, I'd pay someone $2.00 - $3.00 if they could fix it as I just don't want my efforts wasted.

  10. #10
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    Quote Originally Posted by Shorteh96 View Post
    I really want help getting this solved, I'd pay someone $2.00 - $3.00 if they could fix it as I just don't want my efforts wasted.
    We don't accept payment for help, if you really want to donate, you can donate to villavu - http://villavu.com/forum/misc.php?do=donate

    Forum account issues? Please send me a PM

  11. #11
    Join Date
    Mar 2013
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by Justin View Post
    We don't accept payment for help, if you really want to donate, you can donate to villavu - http://villavu.com/forum/misc.php?do=donate
    Gah, not as an incentive to whom ever can help me? I'm not trying to bribe anyone . . . just make it so someone doesn't put forth effort and not receive anything.

  12. #12
    Join Date
    Jul 2012
    Posts
    437
    Mentioned
    10 Post(s)
    Quoted
    165 Post(s)

    Default

    found it you put the end; of an if statement in the wrong spot. change from this
    Simba Code:
    if (not P07_LoggedIn) then
        begin
          P07_LogInPlayer;
          SetMeUp;
        if combat1 = 0 then
        Random1;
        Combat;
        if Combat1 = 0 then
        Attack;
        end;

    to this
    Simba Code:
    if (not P07_LoggedIn) then
        begin
          P07_LogInPlayer;
          SetMeUp;
    end;
        if combat1 = 0 then
        Random1;
        Combat;
        if Combat1 = 0 then
        Attack;


    It now moves the mouse.

  13. #13
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

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
  •