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

Right Clicking Menus

Discussion in 'Developer Support' started by Jonny16, Jun 17, 2020.

  1. Jonny16

    Joined:
    May 4, 2020
    Messages:
    1
    Likes Received:
    0
    Hi,

    I am currently learning how to program using runemate, does anybody have the code for interacting with a menu. For example, right clicking an NPC and then selected attack from the menu list.

    Thanks
     
  2. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    Locatable thing = Npcs.newQuery().first();
    if(thing != null){
    if(Mouse.move(thing) && Mouse.click(Mouse.Button.Right){
    Menuitem menuitem = Menu.getAt(#):
    if(menuitem != null){
    menuitem.click();
    }
    }

    I think you can also do menuitem.interact("String");
     

Share This Page

Loading...