コード例 #1
0
ファイル: AttackOneOf.java プロジェクト: unknown909/RSBot
 public static NPC[] getNearestAgressiveMob() {
   return NPCs.getLoaded(
       new Filter<NPC>() {
         @Override
         public boolean accept(NPC mob) {
           return mob != null
               && mob.getInteracting() != null
               && !mob.equals(Summoning.getFamiliar())
               && mob.getInteracting().equals(Players.getLocal());
         }
       });
 }
コード例 #2
0
ファイル: FightTask.java プロジェクト: Re4PzZ/Re4PzZ
 public static boolean underAttack() {
   Filter ghoul =
       new Filter<NPC>() {
         public boolean accept(NPC npc) {
           return npc.getId() == 49;
         }
       };
   for (NPC attackingGhoul : NPCs.getLoaded(ghoul)) {
     if (attackingGhoul.getInteracting() == Players.getLocal()) {
       return true;
     }
   }
   return false;
 }