Soldtodie Posted February 23, 2015 Share Posted February 23, 2015 (edited) Deleted. Edited March 1, 2015 by Soldtodie Quote Link to comment Share on other sites More sharing options...
VladBots Posted February 24, 2015 Share Posted February 24, 2015 public static Rectangle getItemRectangleInBank(int slot) { Rectangle rect = getItemRectangle(slot); rect.width += 4; return rect; } public static Rectangle getItemRectangle(int slot) { int freeSpaceX = 11; int freeSpaceY = 5; int width = 31; int height = 31; int x = 563; int y = 213; int newX = x + ((slot % 4) * width) + ((slot % 4) * freeSpaceX); int newY = y + ((slot / 4) * height) + ((slot / 4) * freeSpaceY); return new Rectangle(newX, newY, width, height); } why Quote Link to comment Share on other sites More sharing options...
Soldtodie Posted February 24, 2015 Author Share Posted February 24, 2015 To get the rectangle lol? Quote Link to comment Share on other sites More sharing options...
Isolate Posted February 24, 2015 Share Posted February 24, 2015 To get the rectangle lol? I don't understand the purpose of what this does. please explain a case where this would be used Quote Link to comment Share on other sites More sharing options...
VladBots Posted February 24, 2015 Share Posted February 24, 2015 To get the rectangle lol? those hardcoded values tho Quote Link to comment Share on other sites More sharing options...
Joseph Posted February 24, 2015 Share Posted February 24, 2015 Ok let me help you out there buddy. Like they said thats a bit hard core. I'm not really sure what you trying to do here. To get the rec of the item use abstract mouse destination class. For bank use BankSlotDestination and for inventory use inventoryslotdestination. Osb already did all the hard coding for us. To get slot of item in bank or inventory use the itemcontainer abstract class Use the menu class, it has great methods like select action. Quote Link to comment Share on other sites More sharing options...
Soldtodie Posted February 24, 2015 Author Share Posted February 24, 2015 You can use this method for your own interacting method. For example you want tp interact with the item on slot 0 but the menu for this item is already open you can check if it's really the menu of this item and interact with it instead of close and reopen it. Quote Link to comment Share on other sites More sharing options...