Results 1 to 21 of 21

Thread: SlideMouse

  1. #1
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default SlideMouse

    Simba Code:
    (*
    SlideMouse
    ~~~~~

    .. code-block:: pascal

        procedure SlideMouse(cx, cy, rx, ry: Integer);

    Moves the mouse 'cx' across the x axis and 'cy' along the y axis
    with a randomness of rx and ry

    .. note::

        by abu_jwka

    Example:

    .. code-block:: pascal

      if IsUptext('ord') then
      begin
        Mouse(x, y, 0, 0, false);
        SlideMouse(0, 10, 0, 0,);
        ChooseOption('aw all');
      end'

    *)


    procedure SlideMouse(cx, cy, rx, ry: Integer);
    var
      x, y: Integer;
    begin
      GetMousePos(x, y);
      MMouse(x + cx, y + cy, rx, ry);
    end;
    Advantages? It moves along the x and y axis rather than to a specific co-ordinate.

    So if two items/objects are a fixed distance from each other but not necessarily always in the same place, then SlideMouse will stop you from having to try and find the second item or object.

    Go this idea mainly from here: http://villavu.com/forum/showthread.php?t=80679

  2. #2
    Join Date
    Dec 2011
    Location
    Berlin
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Seems to be a useful MouseFunction. Will try this later =)

    I will try to answer all Runescape related questions!

  3. #3
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    I can see the benefit, but i dont know if i get this correctly. So theoretically it makes a virtual line to slide between, but instead of being exact it has + cx and +cy which is pixel ofset?

    I like this idea but how would it find items quicker?

  4. #4
    Join Date
    Dec 2011
    Location
    Berlin
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by xtrapsp View Post
    I can see the benefit, but i dont know if i get this correctly. So theoretically it makes a virtual line to slide between, but instead of being exact it has + cx and +cy which is pixel ofset?

    I like this idea but how would it find items quicker?
    I thought it would be more humanlike.

    Because if you look how you are moving you mouse to an object you wont do a straight line you are always going more into x or y then moving to the object. Thought the function would be a bit like that.
    Last edited by Imanoobbot; 04-24-2012 at 06:52 AM.

    I will try to answer all Runescape related questions!

  5. #5
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by xtrapsp View Post
    I can see the benefit, but i dont know if i get this correctly. So theoretically it makes a virtual line to slide between, but instead of being exact it has + cx and +cy which is pixel ofset?

    I like this idea but how would it find items quicker?
    No.
    cx = amount of pixels to move across
    cy = amount of pixels to move up/down

    So say I put SlideMouse(10, 50, 0, 0); it will move the mouse 10 pixels across and 50 pixels down.

    Also for uses, objects such as ores are fixed distances apart. So instead of having to search for the next ore, I could simply find the first ore and then SlideMouse to where the next ore is and check the uptext.
    Last edited by Abu; 04-24-2012 at 06:59 AM.

  6. #6
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    But if thats the case it would have to not have the camera angle change?

  7. #7
    Join Date
    Feb 2007
    Location
    Switzerland
    Posts
    583
    Mentioned
    1 Post(s)
    Quoted
    50 Post(s)

    Default

    Camera angle? I think for inventory uses this doesnt matter.

  8. #8
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    Quote Originally Posted by Gala View Post
    Camera angle? I think for inventory uses this doesnt matter.
    Now it makes sense i was thinking MSX & MSY

  9. #9
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Yeh I mainly only made this function really quickly because a user had a problem with the Withdraw function and I've also had problems with it in the past.

    Also, Gala just gave me a good idea, this could be used for uber-fast dropping no?

  10. #10
    Join Date
    Feb 2007
    Location
    Switzerland
    Posts
    583
    Mentioned
    1 Post(s)
    Quoted
    50 Post(s)

    Default

    As long as you keep it human like, why not?

  11. #11
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by Gala View Post
    As long as you keep it human like, why not?
    And that's why you can add randomness

  12. #12
    Join Date
    Feb 2007
    Location
    Switzerland
    Posts
    583
    Mentioned
    1 Post(s)
    Quoted
    50 Post(s)

    Default

    Randomness isnt all of it. You cant ultra speed drop for hours while powermining. Wouldnt it work with absolute coordinates instead if relativ ones?

  13. #13
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by Gala View Post
    Wouldnt it work with absolute coordinates instead if relativ ones?
    Meaning?

  14. #14
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Simba Code:
    GetMousePos(x, y);
    MMouse(x+10, y+10, 0, 0);

    //Same thing as:

    SlideMouse(10, 10, 0, 0);

    //?

    EDIT: Whoops, that's what I get for not looking at your code first >.<

    I guess I was just trying to say, what's the point of it if it only saves you 1 line? :S
    Last edited by Runaway; 04-24-2012 at 06:45 PM.

  15. #15
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by Runaway View Post
    Simba Code:
    GetMousePos(x, y);
    MMouse(x+10, y+10, 0, 0);

    //Same thing as:

    SlideMouse(10, 10, 0, 0);

    //?
    No. That would move the Mouse to the co-ordinates (10, 10).

    By doing (x+10, y+10), the mouse moves 10 pixels along the x axis and 10 pixel's up/down the y axis from it's current position.


    EDIT:
    I guess I was just trying to say, what's the point of it if it only saves you 1 line? :S
    Well you could say that for a lot of 'Ex' functions.
    Last edited by Abu; 04-24-2012 at 06:49 PM.

  16. #16
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by abu_jwka
    No. That would move the Mouse to the co-ordinates (10, 10).
    You've officially confused me now, as neither of these functions:

    Quote Originally Posted by Runaway
    GetMousePos(x, y);
    MMouse(x+10, y+10, 0, 0);

    SlideMouse(10, 10, 0, 0);
    Would move to (10,10)...

  17. #17
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    AAARAGGHH, you've confused me too

    Just know this:
    In this function, the mouse moves 10 pixels along the x axis and 10 pixel's up/down the y axis from it's current position.

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

    Default

    Quote Originally Posted by abu_jwka View Post
    No. That would move the Mouse to the co-ordinates (10, 10).

    By doing (x+10, y+10), the mouse moves 10 pixels along the x axis and 10 pixel's up/down the y axis from it's current position.


    EDIT:


    Well you could say that for a lot of 'Ex' functions.
    The ways that Runaway posted are exactly the same You're saying no to his question when yours does the same thing.
    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.


  19. #19
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Ok me be legitimately confused

    By saying this:
    Simba Code:
    GetMousePos(x, y);
    MMouse(x+10, y+10, 0, 0);

    //Same thing as:

    SlideMouse(10, 10, 0, 0);

    //?

    You see I have no idea what exactly you are trying to say here.

    EDIT: Yes it would be

    I'm so 'tupid


    EDIT2: The reason I was confused was because I thought you were saying it was the same as MMouse(10, 10, 0, 0), which would explain my little description.
    Last edited by Abu; 04-24-2012 at 07:11 PM.

  20. #20
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    I really cannot see a point in this.

    Why not just find all the possible ore locations on screen (FindColorsSpiral), then mouse over each to verify if they're an ore or not? If it is, then mine, if not, move to the next. The positions of a colour found are not stored relative to the first found point, you know? :S
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  21. #21
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by Daniel View Post
    I really cannot see a point in this.

    Why not just find all the possible ore locations on screen (FindColorsSpiral), then mouse over each to verify if they're an ore or not? If it is, then mine, if not, move to the next. The positions of a colour found are not stored relative to the first found point, you know? :S
    The ore was just a really quick and weak example.

    Tbh, I made it for one purpose - it is faster than ChooseOption.
    Last edited by Abu; 05-02-2012 at 06:30 AM.

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
  •