Results 1 to 3 of 3

Thread: ClickItemID Close to Cursor

  1. #1
    Join Date
    Oct 2010
    Posts
    1,255
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default ClickItemID Close to Cursor

    I want to make a function which would find your mouse position, tell which slot it's near and click the closest raw material (superheating). Right now, I have the superheating icon low and click on the last ore.

    I couldn't find in the includes where the slots were dimensioned out, is there a spot? Or would there be a better way than just finding the slot via coords? (I have no experience in interfaces.)
    I'm back

  2. #2
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Use the srl inventory include.
    Simba Code:
    {*******************************************************************************
    function CoordsToItem(X, Y: Integer): Integer;
    By: Boreas
    Description: Returns which Inventory slot the X and Y coords are in. If the
    coords are between slots (or not in the inventory area at all) it will return 0.
    *******************************************************************************}

    Looks like what you want, although you may want to edit it to find the closest if it isn't in any of the boxes.

  3. #3
    Join Date
    Oct 2010
    Posts
    1,255
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    Use the srl inventory include.
    Simba Code:
    {************************************************* ******************************
    function CoordsToItem(X, Y: Integer): Integer;
    By: Boreas
    Description: Returns which Inventory slot the X and Y coords are in. If the
    coords are between slots (or not in the inventory area at all) it will return 0.
    ************************************************** *****************************}



    Looks like what you want, although you may want to edit it to find the closest if it isn't in any of the boxes.
    Ooh looks good. If I have to edit and post inside the script, will credit.
    I'm back

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
  •