Results 1 to 24 of 24

Thread: Mime.scar - The First Color Mime Solver!

  1. #1
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default Mime.scar - The First Color Mime Solver!

    SEE NAIRI



    Mime Solver!
    by NaumanAkhlaQ and manfromczech

    Note : BETA Release

    Hello everyone, after long hours of hard work on this project which me and manfromczech put in, we have finished it!! And believe it or not - that little .rar file contains the first ever Mime solver.


    What it includes

    The main finding procedures in this script are from manfromczech's Mime Plugin. They are included along with Mime.scar, and there are instructions on how to run it.
    The Main Procedures:
    SCAR Code:
    //-----------------------------------------------------------------//
    //--               Scar Standard Resource Library                --//
    //--               » Mime Routines                               --//
    //-----------------------------------------------------------------//
    // * function InMimeRandom : Boolean  // * by NaumanAkhlaQ
    // * function InSpotLight : Boolean;  // * by NaumanAkhlaQ and manfromczech
    // * function WaitToSlot : Boolean  // * by manfromczech
    // * procedure MakeCamera // * by NaumanAkhlaQ and Manfromczech
    // * function SolveAnimation : Boolean; // * by manfromczech and NaumanAkhlaQ
    // * procedure SolveMime; // * by NaumanAkhlaQ + manfromczech
    {--------------------------Plugin Routines-----------------------------}
    // * Mime_AnalyzeAnimation(ClientHDC: HDC): String; // * by manfromczech


    Credits
    I'd like to say a big thanks to Tarajunky as without his accounts we couldn't have started developing it.

    Current Version 0.7 BETA.

  2. #2
    Join Date
    Aug 2008
    Location
    England
    Posts
    320
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Nauman, I'm going to test now, I got an account in the mime random!
    Hope for the best!
    EDIT: Sorry, can't test it, it got banned 2 weeks ago, I just remembered.

    -- BP

  3. #3
    Join Date
    Jul 2008
    Location
    Poland
    Posts
    375
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah!!, Yeah , now Mr.mordaut solver :P
    :P

  4. #4
    Join Date
    Oct 2008
    Posts
    59
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    im going to bot tons soon, i gues hopefully ill get a mime... although i hopefully dont get flagged, id like to be thre to watch the mime
    is this reflection?
    ~~ziggy~~
    if anyone would mind teaching me over MSN how to make scripts please copy and paste:
    zimmermannjake@hotmail.com
    thank you

    also will test scripts just send them to me and instructions

  5. #5
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Quote Originally Posted by hamgooof View Post
    is this reflection?
    Mime.scar - The First Color Mime Solver!
    Very nice Nauman and Czech. Will defiantly try to get a Mime just for this.

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  6. #6
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    emote done --- emote supposed to do
    glass wall = glass box
    think = ok
    pull rope = glass wall
    lean on air = ok
    glass wall = ok
    glass box = glass wall

    then i stoped it cus i praise his char too much

    scar part was fine, detecting was off.

    also nauman, please, don't include srl in mime.scar >.> cus then I used Solvemime and just simply got a duplicate identifier >.>

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  7. #7
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Cool thanks for the feedback, Will get to it in the morning

  8. #8
    Join Date
    Jul 2008
    Location
    Poland
    Posts
    375
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Test now

    btw, it's not easy to make solver cuz mime is so smalllll... , but it should works now better :P.
    :P

  9. #9
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Umm, Took n board all the suggestions that Rasta told me and also added the newest Plugin, So

    REDOWNLOAD!!

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

    Default

    You should share the source since your partner got a past of scamming..

    *I know i will regret posting this*

  11. #11
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Umm, sure, you have a right to be suspicious.

    Here it is:
    SCAR Code:
    library MimePlugin;


    uses
      FastShareMem,
      SysUtils,
      Classes,
      Windows,
      Math,
      Graphics;

    {$R *.res}


    type
      TSCARPlugFunc = record
        Name: string;
        Ptr: Pointer;
      end;


      TSCARWindowHandle = function(): Integer;

    type
      TRGB32 = packed record
        B, G, R, A: Byte;
      end;
      TRGB32Array = packed array[0..MaxInt div SizeOf(TRGB32) - 1] of TRGB32;
      PRGB32Array = ^TRGB32Array;


    var
      GetClientWindowHandle: TSCARWindowHandle;
      c: array of array of Integer;
      b: array of array of Boolean;
      w, h: Integer;






    {

       Mime solver
       By: ManFromCzech + NaumanAkhlaQ

    }



    function Mime_AnalyzeAnimation(ClientHDC: HDC): string;  stdcall;

    var
      BMP: TBitmap;
      Line: PRGB32Array;
      Sx1, Sy1, Sx2, Sy2, ObjectArea, x, y, CoMax, CoMin,
      BlackArea, BMaxArea, BMinArea, sx, sy, a1, a2, b1, b2, BArea: integer;
      Start, Stop, Freq: int64;
      Time: double;
      Obj: string;
      Lum: extended;

    begin
      a1 := 0; b1 := 0; a2 := 0; b2 := 0;
      CoMax := 0; CoMin := 20000; BMinArea := 0; BMaxArea := 20000;
      Sx1 := 300; Sx2 := 410; Sy1 := 100; Sy2 := 200;


      QueryPerformanceFrequency(Freq);
      QueryPerformanceCounter(Start);
      repeat


        w := 430; h := 210;
        Bmp := TBitmap.Create;
        Bmp.Width := w;
        Bmp.Height:= h;
        Bmp.PixelFormat := pf32bit;
        SetLength(c, w + 1, h + 1);
        SetLength(b, w + 1, h + 1);
        BitBlt(Bmp.Canvas.Handle, 0, 0, w, h, ClientHDC, 0, 0, SRCCOPY);


        BlackArea := 0;
       

        for y := Sy1 to Sy2 do
        begin
          Line := bmp.ScanLine[y];
          for x := Sx1 to Sx2 do
          begin
            c[x][y] := RGB(Line[x].R, Line[x].G, Line[x].B);
            if (Line[x].R <> 0) then
            begin
              if (Line[x].R < 190) and (Line[x].G < 180) and (Line[x].B < 170) then
                begin
                  c[x][y] := 0;
                  b[x][y] := True;
                  inc(BlackArea);
                end;
            end else
            begin
              c[x][y] := 0;
              b[x][y] := True;
              inc(BlackArea);
            end;
          end;
        end;


        ObjectArea := (11211 - BlackArea);

    ////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////

        for sx := Sx2 - 1 downto Sx1 + 1 do
          for sy := Sy1 + 1 to Sy2 - 1 do
          begin
            if (c[sx][sy] <> 0) then
            begin
              a2 := sx;
              break;
            end;
          end;

        for sx := Sx1 + 1 to Sx2 - 1 do
          for sy := Sy1 + 1 to Sy2 - 1 do
          begin
            if (c[sx][sy] <> 0) then
            begin
              a1 := sx;
              break;
            end;
          end;


        for sy := Sy2 - 1 downto Sy1 + 1 do
          for sx := Sx1 + 1 to Sx2 - 1 do
          begin
            if (c[sx][sy] <> 0) then
            begin
              b2 := sy;
              break;
            end;
          end;

        for sy := Sy1 + 1 to Sy2 - 1 do
          for sx := Sx1 + 1 to Sx2 - 1 do
          begin
            if (c[sx][sy] <> 0) then
            begin
              b1 := sy;
              break;
            end;
          end;


        BArea := (a2 - a1)*(b2 - b1);

    ////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////



        if (ObjectArea > CoMax) then
        begin
          CoMax := ObjectArea;
          BMaxArea := BArea;
        end;

        if (ObjectArea < CoMin) then
        begin
          CoMin := ObjectArea;
          BMinArea := BArea;
        end;

        Bmp.Free;

        QueryPerformanceCounter(Stop);
        Time := (1E3 * (Stop - Start) / Freq);
      Until (Time >= 2500);

      Lum := 0;
      if (CoMax <> 0) then Lum := (BMaxArea/CoMax);
      Obj := 'unknow';


     if (Obj = 'unknow') then
      if InRange(Lum, 1.8, 2.6) and InRange(BMaxArea, 220, 350) and InRange(BMinArea, 50, 250) and InRange(CoMax, 50, 170) and InRange(CoMin , 0, 60) then Obj := 'Laugh';


      if (Obj = 'unknow') then
      if InRange(Lum, 1.9, 3.2) and InRange(BMaxArea, 190, 350) and InRange(BMinArea, 150, 550) and InRange(CoMax, 70, 150) and InRange(CoMin , 30, 100) then Obj := 'Think';


      if (Obj = 'unknow') then
      if InRange(Lum, 2.5, 4.9) and InRange(BMaxArea, 250, 350) and InRange(BMinArea, 20, 100) and InRange(CoMax, 50, 110) and InRange(CoMin , 0, 40) then Obj := 'Cry';


      if (Obj = 'unknow') then
      if InRange(Lum, 3.0, 6.7) and InRange(BMaxArea, 250, 550) and InRange(BMinArea, 300, 510) and InRange(CoMax, 60, 110) and InRange(CoMin , 40, 90) then Obj := 'Lean on air';


      if (Obj = 'unknow') then
      if InRange(Lum, 5.2, 7.9) and InRange(BMaxArea, 500, 870) and (InRange(BMinArea, 90, 330) or InRange(BMinArea, 400, 750)) and InRange(CoMax, 100, 150) and InRange(CoMin , 20, 100) then Obj := 'Glass Box';


      if ((Obj = 'unknow') or (Obj = 'Glass Box')) then
      if InRange(Lum, 3.2, 5.7) and InRange(BMaxArea, 550, 800) and InRange(BMinArea, 40, 350) and InRange(CoMax, 50, 250) and InRange(CoMin , 0, 100) then Obj := 'Dance';


      if (Obj = 'unknow') then
      if InRange(Lum, 2.5, 4.5) and InRange(BMaxArea, 250, 350) and InRange(BMinArea, 80, 250) and InRange(CoMax, 60, 130) and InRange(CoMin , 30, 70) then Obj := 'Climb Rope';

     
      if (Obj = 'unknow') then  Obj := 'Glass Wall';


      Result := Obj;
     
    //   {if (Result = 'unknow') then } Result := (Obj + ' Lum ' + FloatToStr(Lum) + ' BMax: '+ IntToStr(BMaxArea) + ' BMin: ' + IntToStr(BMinArea) + ' ColoredMax: '+ IntToStr(CoMax) + ' ColoredMin: '+ IntToStr(CoMin));

    end;







    function GetFunctionCount(): Integer; stdcall; export;
    begin
      Result := 1;
    end;






    function GetFunctionInfo(x: Integer; var ProcAddr: Pointer; var ProcDef: PChar): Integer; stdcall;
    begin
      case x of
        0:
          begin
            ProcAddr := @Mime_AnalyzeAnimation;
            StrPCopy(ProcDef, 'function Mime_AnalyzeAnimation(ClientHDC: HDC): string;');
          end;
      else
        x := -1;
      end;
      Result := x;
    end;





     
    procedure SetFunctions(Funcs: array of TSCARPlugFunc); stdcall;
    var
      i: Integer;
    begin
      for i := 0 to Length(Funcs) - 1 do
      begin
        if Funcs[i].Name = 'GetClientWindowHandle' then
          GetClientWindowHandle := Funcs[i].Ptr;
      end;
    end;
     

    exports GetFunctionCount;
    exports GetFunctionInfo;
    exports SetFunctions;

    end.

  12. #12
    Join Date
    Jul 2008
    Location
    Poland
    Posts
    375
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by N1ke! View Post
    You should share the source since your partner got a past of scamming..

    *I know i will regret posting this*
    Sad past
    :P

  13. #13
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    wow this is finally done? I can't wait to test this for you guys, once I get an account in mime random I'll definitely use this and tell you guys how it went.

  14. #14
    Join Date
    Jul 2008
    Location
    Poland
    Posts
    375
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes, finally done
    :P

  15. #15
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    I'm trying to get it to work, but I can't. I added a couple of writeln's to see where it was and it knows it is in the spotlight but it doesn't do anything. I could have done it wrong or something. I'll let you know if I can get it working.

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  16. #16
    Join Date
    Sep 2006
    Location
    include srl/srl.scar ( aussie)
    Posts
    2,875
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Camo¤Kyle View Post
    I'm trying to get it to work, but I can't. I added a couple of writeln's to see where it was and it knows it is in the spotlight but it doesn't do anything. I could have done it wrong or something. I'll let you know if I can get it working.

    ~Camo
    +1 just sits there.

  17. #17
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Oh, also I forgot to mention this. In your SolveAnimation function, you're missing an ";" here:
    SCAR Code:
    Until InSpotLight
    I went ahead and put it in mine. Just thought I would let you know.

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  18. #18
    Join Date
    Jul 2008
    Location
    Poland
    Posts
    375
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    put ActivateClient; before SolveMime;

    t means right recognized and f means bad recognized:
    SCAR Code:
    Clicked Emote : Glass Wall         f
    Clicked Emote : Climb Rope          t
    Clicked Emote : Glass Box           t
    Clicked Emote : Dance               t
    Clicked Emote : Glass Wall          t
    Clicked Emote : Cry                 t
    Clicked Emote : Glass Box           t
    Clicked Emote : Glass Wall         f
    Clicked Emote : Glass Wall         f
    Clicked Emote : Lean on air         t
    Clicked Emote : Glass Box           t
    Clicked Emote : Lean on air         t
    Clicked Emote : Glass Wall         f
    Clicked Emote : Think               t
    Clicked Emote : Cry                 t
    Clicked Emote : Glass Box           t
    Clicked Emote : Dance               t
    Clicked Emote : Climb Rope         f
    Clicked Emote : Laugh               t

    It'll solve mime
    :P

  19. #19
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    1 question, how to add your mime and scunerape to the script?
    I know how to include them.. but in script part, like before I do FindNormalRandoms; I call SolveMime; or... ?
    Thanks in advance,
    ~Eerik~

  20. #20
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by heavenzeyez1 View Post
    1 question, how to add your mime and scunerape to the script?
    I know how to include them.. but in script part, like before I do FindNormalRandoms; I call SolveMime; or... ?
    Thanks in advance,
    ~Eerik~
    manfromczech's solvers have not been included in SRL yet. So if you call FindNormalRandoms it will not check for mime or prison pete. I suggest you wait until these solvers are inducted into SRL until including them in your script.

  21. #21
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Yeah, we're waiting to solve mordaut then were putting all thosse solvers into one big Plugin

  22. #22
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Okay, thanks guys.
    So, basicly, I'm not able to run em yet?
    I tryed the mime solver one day... but it froze.
    ~Eerik~

  23. #23
    Join Date
    Jul 2008
    Location
    Poland
    Posts
    375
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by heavenzeyez1 View Post
    Okay, thanks guys.
    So, basicly, I'm not able to run em yet?
    I tryed the mime solver one day... but it froze.
    ~Eerik~
    You are able to run em. They should work.
    :P

  24. #24
    Join Date
    Oct 2006
    Posts
    1,211
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    SEE NAIRI



    Mime Solver!
    by NaumanAkhlaQ and manfromczech

    Note : BETA Release

    Hello everyone, after long hours of hard work on this project which me and manfromczech put in, we have finished it!! And believe it or not - that little .rar file contains the first ever Mime solver.


    Current Version 0.7 BETA.
    Eh, not the first ever, but maybe first COLOR solver ever :P (This is color right? haha)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mime Solver [color based]
    By Iroki in forum Research & Development Lounge
    Replies: 11
    Last Post: 01-18-2009, 12:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •