devastation317 Posted March 8, 2015 Share Posted March 8, 2015 Need Code can check if npc is underattack and player too please reply fast Quote Link to comment Share on other sites More sharing options...
Precise Posted March 8, 2015 Share Posted March 8, 2015 myPlayer().isUnderAttack(); // // this is the boolean to check whether it is under attack, don't forget to null check! NPC npc = getNpcs().closest("Goblin"); npc.isUnderAttack(); // this is the boolean to check whether it is under attack, don't forget to null check! Please familiarise yourself with the API. Precise. Quote Link to comment Share on other sites More sharing options...
devastation317 Posted March 8, 2015 Author Share Posted March 8, 2015 Thanks! 1 Quote Link to comment Share on other sites More sharing options...