Ejemplo n.º 1
0
 /**
  * Actual pickpocketing action
  *
  * @param npcId
  * @return
  */
 public boolean pickpocketNpc(int npcId) {
   Npc pickpocketTarget = Npcs.getNearest(npcId);
   if (pickpocketTarget != null && Camera.isVisible(pickpocketTarget)) {
     pickpocketTarget.interact("Pick-pocket", true);
     xpGained += getNpcXp(npcId);
     antiBan(pickpocketTarget);
   } else {
     Camera.pitch(0);
     while (!Camera.isVisible(pickpocketTarget)) {
       Camera.rotateRandomly();
       Sleep.millis(300, 1700);
     }
   }
   return true;
 }
Ejemplo n.º 2
0
 /**
  * Anti ban
  *
  * @param npc
  * @return true
  */
 public boolean antiBan(Npc npc) {
   Logger.print("Anti-ban");
   int val = Random.next(1, 7);
   switch (val) {
     case 1:
       Camera.rotateRandomly();
       break;
     case 2:
       Camera.face(npc);
       break;
     case 3:
       Mouse.moveRandomly(0, 1000);
       break;
   }
   Sleep.millis(100, 400);
   return true;
 }