[OSRS] Drawing on inventory items

Discussion in 'Developer Support' started by Geashaw, Feb 17, 2015.

  1. I did not get very much further than the following, any tips?

    [​IMG]
     
  2. LegacyTab is RS3 only, it's for the Legacy mode.
    Code (Text):
    1.  
    2. g.setColor(Color.WHITE);
    3. if(InterfaceWindows.getInventory().isOpen()){
    4.     SpriteItemQueryResults results = Inventory.getItems(new Filter<SpriteItem>() {
    5.         @Override
    6.         public boolean accepts(SpriteItem spriteItem) {
    7.             return spriteItem.getDefinition().getUnnotedId() == 199;
    8.         }
    9.     });
    10.     for(SpriteItem item:results){
    11.         Rectangle bounds = item.getBounds();
    12.         g.drawString("Guam", bounds.x + (bounds.width/2), bounds.y + (bounds.height/2));
    13.     }
    14. }
    15.  
     
    #2 SlashnHax, Feb 17, 2015
    Last edited: Feb 17, 2015
  3. OSRSTab.INVENTORY.isOpen()
    OSRSTab.INVENTORY.open();
     
    #3 PhaseCoder, Feb 17, 2015
    Last edited: Feb 17, 2015
  4. InterfaceWindows.getInventory().isOpen()/open() works for both OSRS and RS3
     

Share This Page

Loading...