Results 1 to 5 of 5

Thread: Need Help With 2007 Combat Script

  1. #1
    Join Date
    Dec 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default Need Help With 2007 Combat Script

    Hi, I am trying to make my first script. What this script will do is attack a scorpion, and after 12 seconds it will find another scorpion and attack it. I do not know how to make the script tell if the scorpion is dead or not, so I just have it 12 seconds since that should be plenty of time for me to kill one.

    Like I said this is my first script ever, and making is for 2007 has made it more difficult. It does not use SMART or have anti-ban.

    I have managed to get the mouse to find the scorpions, but it will not click them. Here is what I have so far:
    Code:
    Program Attack;
    
    {$I SRL/SRL.Simba}
    {$I P07Include.Simba}
    
    Procedure Attack;
    var x, y: integer;
    begin
        repeat
        if P07_FindObj(x, y, 'corpion', 3618629, 1) then
        begin
          Mouse(x, y, 3, 3, false);
          P07_ChooseOptionMulti(['ttack']);
        end;
        repeat
          wait(12000+random(250));
        Until not IsUpText('corpion') or (InvFull);
      until(InvFull);
    end;
    
    begin
      SetUpSRL;
      SetupP07Include;
      Attack;
    end.
    Also, I used a tutorial on how to chop a tree, so that is why the loop will stop when the inventory is full. I didn't bother changing that in fear of messing something up, plus I will not be looting anything with the script so since the inventory will not fill up it shouldn't matter. At this point I am just trying to get the script to function.
    Last edited by bot2stake1; 02-26-2013 at 09:35 PM.

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

    Default

    Better not do that if its your first script. It will look like a bot and will have no randomness at all. An other thing is that you have no way to detect if the scorpion you are attacking is already fighting or not.

    Combat bots needs to be a little bit more advanced..

    For the loop, you can just put "false" and it will make it keep looping, not matter what.

  3. #3
    Join Date
    Dec 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Okay thanks. Any idea why it will not click on the scorpion? The mouse finds them but I cannot get it to click for the life of me... tried so many thing and can never get it to click

  4. #4
    Join Date
    Feb 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Try somthing like this.
    Code:
    If P07_FindObjCustom(x, y, ['Attack', 'corpion'], [Insert, Colorcodes, here], 5) Then
          ClickMouse2(mouse_left);
    Good luck!

  5. #5
    Join Date
    Jan 2012
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Piguhz View Post
    Try somthing like this.
    Code:
    If P07_FindObjCustom(x, y, ['Attack', 'corpion'], [Insert, Colorcodes, here], 5) Then
          ClickMouse2(mouse_left);
    Good luck!
    way to take that out of the chicken killer script

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
  •