Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • isAttackable()


    Nex

    Recommended Posts

    isAttackable()

    do we have this? if so please tell me cause i cannot find it 

     

    would be used to see if a npc has a attack option

     

    if not can we get this added? 

    Link to comment
    Share on other sites

    Well why would it not work, also edited my post

    NPC port = getNpcs().closest(n -> n != null  && getMap().canReach(n) && n.hasAction("Attack") && n.getName().equals("Portal"));
    

    Using this line and that doesnt seem to be working

    Link to comment
    Share on other sites

    The reason why it may not be working is because has action is returning null. I had the same problem trying to get a gameobject's actions whilst creating my agility script. One of the obstacles just returned null everytime i called get actions on it so I had to do it another way.

    Link to comment
    Share on other sites

    The reason why it may not be working is because has action is returning null. I had the same problem trying to get a gameobject's actions whilst creating my agility script. One of the obstacles just returned null everytime i called get actions on it so I had to do it another way.

    yea im getting nulled, trying other stuff now

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.