Results 1 to 7 of 7

Thread: Mime.scar

  1. #1
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default Mime.scar

    People were complaining about it mime not clicking continue.
    So simple fix
    SCAR Code:
    //-----------------------------------------------------------------//
    //--               Scar Standard Resource Library                --//
    //--               » Mime Routines                               --//
    //-----------------------------------------------------------------//
    // * function Mime_InSlot: Boolean;                                // * by Nava2 Edited by The Man
    // * procedure Mime_ClickOption(Action: String);                   // * by Nava2
    // * function SolveMime;                                           // * by Nava2
    {--------------------------Plugin Routines-----------------------------}
    // * function Mime_AnalyzeAnimation(ClientHDC: HDC): String;       // * by Iroki

    {*******************************************************************************
    function Mime_InSlot: Boolean;
    by: Nava2
    Description: Checks if the player is in the Slot to watch the Mime.
    *******************************************************************************}

    function Mime_InSlot: Boolean;
    var
      TPA: TPointArray;
    begin
    ClickContinue;
    Wait(1000);
      FindColorsTolerance(TPA, 15657968, MMX1, MMY1, MMX2, MMY2 - 20, 20);
      SortTPAFrom(TPA, Point(MMCX, MMCY));
      //Writeln(IntToStr(Distance(MMCX, MMCY, TPA[0].x, TPA[0].y)));
      //DebugTPA(TPA, '');
      Result := (Distance(MMCX, MMCY, TPA[0].x, TPA[0].y) <= 7);
    end;

    {*******************************************************************************
    procedure Mime_ClickOption(Action: String);
    by: Nava2
    Description: Uses the Action to and clicks on it.
    *******************************************************************************}

    procedure Mime_ClickOption(Action: String);
    var
      t: TPointArray;
      a: T2DPointArray;
      b: TBox;
      i, c: Integer;
      iis: TIntegerArray;
      ss: TStringArray;
    begin
      Action := LowerCase(Action);
      if (Action = '') or (Action = 'unknown') or (not LoggedIn) then Exit;
      FindColorsTolerance(t, 11503238, MCX1, MCY1, MCX2, MCY2, 3);
      a := SplitTPAEx(t, 15, 2);
      iis := [104, 59, 96, 140, 164, 141, 181, 103];
      ss := ['laugh', 'cry', 'dance', 'lean on air', 'glass wall', 'glass box', 'climb rope', 'think'];
      c := 0;
      for i := 0 to 7 do
        if Action = ss[i] then
          c := iis[i];

      for i := 0 to 7 do
        if High(a[i]) = c then
        begin
          b := GetTPABounds(a[i]);
          MouseBox(b.x1, b.y1, b.x2, b.y2, 1);
          Break;
        end;
    end;

    {*******************************************************************************
    function SolveMime: Boolean;
    by: Nava2
    Description: Solves the Mime Random.
    *******************************************************************************}

    function SolveMime: Boolean;
    var
      TheAction: String;
      t, x, y, cts, fT: Integer;
    begin
      Result := False;
      if not LoggedIn then Exit;
     
      fT := GetTimeRunning + 300000;
     
      cts := GetColorToleranceSpeed;
      ColorToleranceSpeed(1);
      while ClickContinue(True, True) do
        Wait(50 + Random(25));

      while not Mime_InSlot do
        Wait(300 + Random(200));
      SetAngle(True);
      MakeCompass(0);

      MMouse(RandomRange(MSX1, MSX2), RandomRange(MSCY, MSY2), 0, 0);
      while (CountColor(0, MCX1, MCY1, MCX2, MCY2) <> 625) and LoggedIn do
        wait(100);
         
      repeat
        if not LoggedIn then Break;
       
        TheAction := '';
        t := GetSystemTime + 60000;
        while (TheAction = '') and LoggedIn and (t > GetSystemTime) do
          TheAction := Mime_AnalyzeAnimation(GetClientCanvas.Handle);

        if TheAction = 'unknown' then Continue;
        //Writeln('[Mime] - Found Action: '#39 + TheAction + #39);

        t := GetSystemTime + 25000;
        while (not FindColorTolerance(x, y, 11503238, MCX1, MCY1, MCX2, MCY2, 3)) and (LoggedIn) and (t > GetSystemTime) do
          Wait(100 + Random(50));

        Wait(RandomRange(200, 600));
        Mime_ClickOption(TheAction);
        while (FindColorTolerance(x, y, 11503238, MCX1, MCY1, MCX2, MCY2, 3)) and (LoggedIn) and (t > GetSystemTime) do
          Wait(100 + Random(50));
        MMouse(RandomRange(MSX1, MSX2), RandomRange(MSCY, MSY2), 0, 0);
        while (CountColor(0, MCX1, MCY1, MCX2, MCY2) <> 625) and LoggedIn do
          wait(100);
      until TabExists(2) or (GetTimeRunning > fT);
     
      Result := TabExists(2);
      ColorToleranceSpeed(cts);
    end;
    It just ClickContinue in InSlot.

    T~M

  2. #2
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You don't deserve credits for that .

  3. #3
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Da 0wner View Post
    You don't deserve credits for that .
    Ofc he does, He fixed it.

  4. #4
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Yeah lol. Why wouldn't he.
    Ce ne sont que des gueux


  5. #5
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    If you kook through that code, I'm pretty sure mime_InSlot is used as a looping check. You just made it anciently slow.

    Thanks for helping though
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  6. #6
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    If you kook through that code, I'm pretty sure mime_InSlot is used as a looping check. You just made it anciently slow.

    Thanks for helping though
    Since when are you mixster-->mister I-ALWAYS-HAVE-THE-LAST-AND..... nah this is getting to long(and tiring).:P

    Good Job!
    ~Hermen

  7. #7
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    OK. Well I try to do what I can to help
    What I post is normally wrong or slow, but it needs pointed out, and I would rather try it than say:
    0m6 7h15 n33d5 f1x1n6 |)3\/5!!!!!!!11113|3v3n
    I don't really mind if I don't get credits, that isn't what its about

    T~M

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
  •