Results 1 to 3 of 3

Thread: First fighting script

  1. #1
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default First fighting script

    Hey guys, I was hoping someone would help me with this:
    Simba Code:
    program Fighter;

    {$i SRL/SRL.simba}

    var
    x, y:integer;
    i:integer;

    procedure fight;
      begin
      if FindColorSpiralTolerance(x, y, 7834773, MSX1, MSY1, MSX2, MSY2, 5) then
      begin
      MMouse(x, y, 0, 0);
      GetMousePos(x,y);
      Mouse(x, y, 0 , 0 ,true);
      end;
      end;
      procedure screen;
      begin
      case random(10) of
        0: begin Keydown(39);
        wait(500+randomrange(500,700));
        KeyUp(39); end;
        1: begin Keydown(37);
        wait(500+randomrange(300,600));
        Keyup(37);end;
        end;
        end;




    begin
      SetUpSRL;
      repeat
      fight;
      wait(1500+randomrange(1200,1600));
      screen;
      until(false);
    end.


    It is for an rsps just killing some rock crabs (they're always walking around not like rs) I was wondering how instead of using waits that it'd know when the creature was killed, also how can I make the finding colors more exact I have tried setting tolerance lower, but too low doesn't work.

    Thank you greatly !

  2. #2
    Join Date
    Jun 2012
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    For the colors, use ACA 3, Auto Color Aid to select the best colors for the crabs, as for checking if you are in a fight, maybe you could use dtm`s or a bitmap to check if you are in a fight, have`nt done a fighting script yet and none on private servers.

  3. #3
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Use AveragePixelShift, or make a bitmap of the hp bar or the hit splashes or check xp gain (if that exists in ps).

    Also better to start early and correct ur standards (http://villavu.com/forum/showthread.php?t=60288).

    TPA finding can be more accurate, and you can also use autocolor to get the color during run-time and hence able to lower the tolerance for subsequent searches.

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
  •