Results 1 to 4 of 4

Thread: [Range] Setuprangestyle

  1. #1
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default [Range] Setuprangestyle

    SCAR Code:
    function setuprangestyle(style : string):boolean;
    var
      j, p, h, m, tx, ty : integer;
    begin
      case Lowercase(style) of
        'accurate': begin
                      j := 577; p:= 259; h := 624; m := 285;
                    end;
        'rapid': begin
                   j := 658; p:= 257; h := 708; m:= 286;
                 end;
        'longrange':begin
                      j:= 578; p:= 314; h := 628; m:= 340;
                    end;
      end;
      gametab(tab_Combat);
      mousebox(j, p, h, m, 3);
      getmousepos(tx, ty);
      if GetColor(tx,ty) > 3000000 then // checks if its red therefore already selected
      begin
        writeln('Already selected');
        exit
      end else
      mouse(tx, ty, 0, 0, true);
    end;

    very simple but should work

  2. #2
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    How about SetFightMode(x)
    x = 1 -> Accurate
    x = 2 -> Rapid
    x = 3 -> Long range

  3. #3
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    where is that on srl?

  4. #4
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by J_Pizzle View Post
    where is that on srl?
    GameTab.scar

    SCAR Code:
    {*******************************************************************************
    function SetFightMode(oFightMode: Integer): Boolean;
    By: Nielsie95, Nava2
    Description: Sets fight mode.  Returns false if failed to set desired mode.
    *******************************************************************************}


    function SetFightMode(oFightMode: Integer): Boolean;
    var
      i, x, y: Integer;
      b: TBox;
      cmbBoxes: array of TBox;
    begin
      Result := False;
      if not(Loggedin)then Exit;
      GameTab(tab_Combat);
      Wait(200 + Random(100));

      cmbBoxes := [IntToBox(575, 255, 630, 290), IntToBox(660, 255, 710, 290),
                   IntToBox(575, 310, 630, 345), IntToBox(660, 310, 710, 345)];
      b := cmbBoxes[oFightMode - 1];
      if (not FindColorTolerance(x, y, 5527896, b.x1, b.y1, b.x2, b.y2, 2)) and (oFightMode = 4) then
        b := cmbBoxes[2];
      i := 0;
      while (i < 4) do
      begin
        Result := FindColorTolerance(x, y, 1777020, b.x1, b.y1, b.x2, b.y2, 2);
        if (Result) then Exit;
        Mouse(RandomRange(b.x1, b.x2), RandomRange(b.y1, b.y2), 0, 0, True);
        Wait(500 + Random(300));
        Inc(i);
      end;
    end;

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
  •