Results 1 to 11 of 11

Thread: Mmtoms

  1. #1
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Mmtoms

    how do i convert MMPoints to MSPoints using
    SCAR Code:
    RAaSTPAEx
    then using
    SCAR Code:
    MMTOMS

  2. #2
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Do you have some sort of a object finding function that returns a TPA?

  3. #3
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yes, but doesn't this work :
    Code:
      RAaSTPAEx(TPA, 6, 9);
      For I := 0 To HIGH(TPA) DO
      MMToMS(TPA[I]);

  4. #4
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

  5. #5
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    um its not complete but ill tell u the general idea i search for colors in mm then do RAaSTPAEx and then like the edit above then move mouse over these points
    EDIT :> NVM I won't be using this but i got this procedure
    Code:
    Procedure Mining;
    
    Var
    
      TPA: TPointArray;
      I: Integer;
      x, y: Integer;
      
    Begin
    
      FindColorsPie(TPA,  4608851, 20, 0, 360, 0, 30, MMX1, MMY1, MMX2, MMY2, MMCX, MMCY);
      RAaSTPAEx(TPA, 6, 9);
      For I := 0 To HIGH(TPA) DO
      Begin
        MMToMS(TPA[I]);
        MMouse(TPA[I].x, TPA[I].Y, 6, 6);
        GetMousePos(x, y);
        If IsUptext('ine') Then
        Mouse(x - 5, y - 5, 5, 5, True);
      End;
      
    End;
    but it moves mouse in mm can u tell me y?
    Last edited by hackncrack1; 08-09-2009 at 12:22 AM.

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

    Default

    MMToMS is a TPoint data type, Hence one must be assigned to it, try this:

    SCAR Code:
    Procedure Mining;

    Var

      TPA: TPointArray;
      I: Integer;
      x, y: Integer;
      Tp : TPoint;
    Begin

      FindColorsPie(TPA,  4608851, 20, 0, 360, 0, 30, MMX1, MMY1, MMX2, MMY2, MMCX, MMCY);
      RAaSTPAEx(TPA, 6, 9);
      For I := 0 To HIGH(TPA) DO
      Begin
        TP := MMToMS(TPA[i]);
        MMouse(TP.x, TP.Y, 6, 6);
        GetMousePos(x, y);
        If IsUptext('ine') Then
        Mouse(x - 5, y - 5, 5, 5, True);
      End;
     
    End;

    Hope that resolved your question. Apologies for not being able to help you, but I was on my mobile

  7. #7
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah, sorry, though I'd implement it in your function.
    Anyway, made something that does what you want, take a look:

    SCAR Code:
    {.include SRL/SRL.scar}

    // WhatDot can be  'npc', 'cape','item', 'player' or 'friend'.
    function FindObjectThroughMM(WhatDot, ObjectUpText: string): Boolean;
    var
      TPA: TPointArray;
      P: TPoint;
      I, Hi: Integer;
     
    begin
      Result := False;
      if (not LoggedIn) then exit;
      TPA := GetMiniMapDots(WhatDot);
      Hi := High(TPA);
      for I := 0 to Hi do
      begin
        P := MMToMS(TPA[I]);
        MMouse(P.X, P.Y, 5, 5);
        if WaitUptext(ObjectUpText, 375) then
        begin
          Result := True;
          GetMousePos(P.X, P.Y);
          Mouse(P.X, P.Y, 0, 0, True);
          Exit;
        end;
      end;
    end;

    begin
    end.

    Haven't tested this, but it should work.
    Enjoy



    E: BAH, why do I get ninja'd every time ..?
    I'm too slow. =__=

    Still, Naum -- you should use GetMiniMapDots instead.
    Last edited by EvilChicken!; 08-09-2009 at 12:49 AM.

  8. #8
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Naum it worked thank you Evil chicken i appreciate ur help but i was looking for a rock ur function wouldn't help me but thanks all the same=)

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

    Default

    Quote Originally Posted by EvilChicken! View Post
    Ah, sorry, though I'd implement it in your function.
    Anyway, made something that does what you want, take a look:

    SCAR Code:
    {.include SRL/SRL.scar}

    // WhatDot can be  'npc', 'cape','item', 'player' or 'friend'.
    function FindObjectThroughMM(WhatDot, ObjectUpText: string): Boolean;
    var
      TPA: TPointArray;
      P: TPoint;
      I, Hi: Integer;
     
    begin
      Result := False;
      if (not LoggedIn) then exit;
      TPA := GetMiniMapDots(WhatDot);
      Hi := High(TPA);
      for I := 0 to Hi do
      begin
        P := MMToMS(TPA[I]);
        MMouse(P.X, P.Y, 5, 5);
        if WaitUptext(ObjectUpText, 375) then
        begin
          Result := True;
          GetMousePos(P.X, P.Y);
          Mouse(P.X, P.Y, 0, 0, True);
          Exit;
        end;
      end;
    end;

    begin
    end.

    Haven't tested this, but it should work.
    Enjoy



    E: BAH, why do I get ninja'd every time ..?
    I'm too slow. =__=

    Still, Naum -- you should use GetMiniMapDots instead.
    GetMiniMapDots often throws up an out of range error, due to the length of the TPA being set to -1. I made a fix somewhere, I believe.

  10. #10
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure Mining;

    Var

      TPA: TPointArray;
      ATPA: T2DPOintARRAY;
      i:integer;
      TP, NP : TPoint;

    Begin

      FindColorsPie(TPA,  4608851, 20, 0, 360, 0, 30, MMX1, MMY1, MMX2, MMY2, MMCX, MMCY);
      ATPA := TPATOATPA(TPA, 4);
      FOR I := 0 To High(ATPA) DO
      Begin
        TP := MiddleTPA(ATPA[I]);
        NP:= MMToMS(Point(TP.x, TP.y));
        MMouse(NP.x, NP.y , 0, 0);
        IF IsUptext('ine') then
        Writeln(' Rock Found');
        Wait(1000);
      End;

    End;
    why doesnt the mouse even move?:S

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

    Default

    Quote Originally Posted by hackncrack1 View Post
    SCAR Code:
    Procedure Mining;

    Var

      TPA: TPointArray;
      ATPA: T2DPOintARRAY;
      i:integer;
      TP, NP : TPoint;

    Begin

      FindColorsPie(TPA,  4608851, 20, 0, 360, 0, 30, MMX1, MMY1, MMX2, MMY2, MMCX, MMCY);
      ATPA := TPATOATPA(TPA, 4);
      FOR I := 0 To High(ATPA) DO
      Begin
        TP := MiddleTPA(ATPA[I]);
        NP:= MMToMS(Point(TP.x, TP.y));
        MMouse(NP.x, NP.y , 0, 0);
        IF IsUptext('ine') then
        Writeln(' Rock Found');
        Wait(1000);
      End;

    End;
    why doesnt the mouse even move?:S
    Try cutting out the middle man of 'TP'

    SCAR Code:
    Procedure Mining;

    Var

      TPA: TPointArray;
      ATPA: T2DPOintARRAY;
      i:integer;
      NP : TPoint;

    Begin

      FindColorsPie(TPA,  4608851, 20, 0, 360, 0, 30, MMX1, MMY1, MMX2, MMY2, MMCX, MMCY);
      ATPA := TPATOATPA(TPA, 4);
      FOR I := 0 To High(ATPA) DO
      Begin
        NP:= MMToMS(MiddleTPA(ATPA[I]));
        MMouse(NP.x, NP.y , 0, 0);
        IF IsUptext('ine') then
        Writeln(' Rock Found');
        Wait(1000);
      End;

    End;

    If that won't work then come on msn.

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
  •