Results 1 to 6 of 6

Thread: Smart NoMouse

  1. #1
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default Smart NoMouse

    When running a script ... sometimes then mouse goes out of the mainscreen and does not come back. Like it goes off screen of something.

    Any ideas. Im guessing right then and there the obj tiles probably changed to -1...

    Edit: Turns out no to be the problem... Its still going off screen.
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  2. #2
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    What script?
    Link.

    ~Home

  3. #3
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    A personal one ...
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  4. #4
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Replace all your MM/Mouses with a copy from SRL, but with writelning the values? It's probably object finding, TileToMS is weird. (I assume you're using Reflection, anyways)

    Try something like this (I use this, works like a charm, no longer leaves the screen):
    Simba Code:
    function r_TileOnMSH(moix,moiy: integer) : Boolean; // Drags111
    begin
      Result := PointInBox(Point(moix,moiy), IntToBox(MSX1, MSY1, MSX2, MSY2));
    end;

    procedure objStuff;
    var J: TPoint; tx,ty: integer;
    begin
      J := TileToMS(Tile(3048,3270), 300); // example - replace it with something like
      if r_TileOnMSH(J.X,J.Y) then
      begin
        Mouse(J.X,J.Y,10,10,True);
        writeln('etc');
      end else
      begin
        WriteLn('run the object finding again / walkToTile (if static object) / etc');
        wait(1);
      end;
    end;


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  5. #5
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I've found it to do this, it's what happens if the object/tile isn't found, it just defaults to -1 as it's not an actual value for the client, or so I think.
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  6. #6
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    ok yeah I added a few failsafes for mull points/tiles and so far so good ... thanks
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

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
  •