1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[OSRS] Drawing on inventory items

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

  1. Geashaw

    Joined:
    Jan 8, 2015
    Messages:
    1,429
    Likes Received:
    252
    I did not get very much further than the following, any tips?

    [​IMG]
     
  2. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    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. PhaseCoder

    Joined:
    Jan 1, 2015
    Messages:
    272
    Likes Received:
    26
    OSRSTab.INVENTORY.isOpen()
    OSRSTab.INVENTORY.open();
     
    #3 PhaseCoder, Feb 17, 2015
    Last edited: Feb 17, 2015
  4. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    InterfaceWindows.getInventory().isOpen()/open() works for both OSRS and RS3
     

Share This Page

Loading...