Results 1 to 4 of 4

Thread: Magic.scar possible Misclicks/False positives

  1. #1
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default Magic.scar possible Misclicks/False positives

    Neither of the following functions check to make sure that tab_Magic is selected. If the correct tab isn't selected then it will result in a misclick or a possible false positive.
    SCAR Code:
    {*******************************************************************************
    Function DefCastIs: Boolean;
    By: N1ke!
    Rev: 39
    Date: 12 Sep 09
    Description: Results if defensive casting is enabled.
    *******************************************************************************}

    function DefCastIs: Boolean;
    begin
      Result := (LoggedIn) and (GetColor(563, 441) = 16777215);
    end;

    {*******************************************************************************
    procedure ToggleDefCast(SetTo: Boolean);
    By: N1ke!
    Rev: 39
    Date: 12 Sep 09
    Description: Turns defensive casting on/off.
    *******************************************************************************}

    procedure ToggleDefCast(SetTo: Boolean);
    begin
      if DefCastIs = SetTo then
        Exit;

      Mouse(556, 443, 12, 14, True);
      Wait(70+Random(70));
    end;

    Fix:
    SCAR Code:
    {*******************************************************************************
    Function DefCastIs: Boolean;
    By: N1ke!
    Rev: 39
    Date: 12 Sep 09
    Description: Results if defensive casting is enabled.
    *******************************************************************************}

    function DefCastIs: Boolean;
    begin
      if not Gametab(tab_Magic) then
        Exit;
      Result := (LoggedIn) and (GetColor(563, 441) = 16777215);
    end;

    {*******************************************************************************
    procedure ToggleDefCast(SetTo: Boolean);
    By: N1ke!
    Rev: 39
    Date: 12 Sep 09
    Description: Turns defensive casting on/off.
    *******************************************************************************}

    procedure ToggleDefCast(SetTo: Boolean);
    begin
      if not Gametab(tab_Magic) then
        Exit;
      if DefCastIs = SetTo then
        Exit;

      Mouse(556, 443, 12, 14, True);
      Wait(70+Random(70));
    end;

    Maybe I'm missing something, correct me if I'm wrong.

  2. #2
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Thanks, committed.

  3. #3
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    I'm sure the color is not white if it the game tab isnt magic?
    There used to be something meaningful here.

  4. #4
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by Frement View Post
    I'm sure the color is not white if it the game tab isnt magic?
    But why take the chance?

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
  •