SRL Archive - OSR Help

ClickItemID Close to Cursor


smurg

2011-02-04 15:35:39

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.)

mormonman

2011-02-04 16:19:24

Use the srl inventory include.
{*******************************************************************************
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.

smurg

2011-02-04 16:21:43

From: mormonman
Use the srl inventory include.
Simba Code:
[LEFT]{*******************************************************************************
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.
*******************************************************************************}

[/LEFT]


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.