Exemple #1
0
 public static void resetPlayerAttack(Client c) {
   c.usingMagic = false;
   c.npcIndex = 0;
   c.faceUpdate(0);
   c.playerIndex = 0;
   c.getPA().resetFollow();
 }
Exemple #2
0
  public static int getBlockEmote(Client c) {
    String shield = c.getItems().getItemName(c.playerEquipment[c.playerShield]).toLowerCase();
    String weapon = c.getItems().getItemName(c.playerEquipment[c.playerWeapon]).toLowerCase();
    if (shield.contains("defender")) return 4177;
    if (shield.contains("2h")) return 7050;
    if (shield.contains("book") && (weapon.contains("wand"))) return 420;
    if (shield.contains("shield")) return 1156;
    switch (c.playerEquipment[c.playerWeapon]) {
      case 4755:
        return 2063;
      case 15241:
        return 12156;
      case 13899:
        return 13042;
      case 18355:
        return 13046;
      case 14484:
        return 397;
      case 11716:
        return 12008;
      case 4153:
        return 1666;
      case 4151:
        return 1659;
      case 15486:
        return 12806;
      case 18349:
        return 12030;
      case 18353:
        return 13054;
      case 18351:
        return 13042;

      case 11694:
      case 11698:
      case 11700:
      case 11696:
      case 11730:
        return 7050;
      case -1:
        return 424;
      default:
        return 424;
    }
  }
Exemple #3
0
 @Test
 public void connectTest() throws IOException {
   c.connect(s, 9000);
   assertEquals(100, score.getScore());
 }
Exemple #4
0
  public static void getPlayerAnimIndex(Client c, String weaponName) {
    c.playerStandIndex = 0x328;
    c.playerTurnIndex = 0x337;
    c.playerWalkIndex = 0x333;
    c.playerTurn180Index = 0x334;
    c.playerTurn90CWIndex = 0x335;
    c.playerTurn90CCWIndex = 0x336;
    c.playerRunIndex = 0x338;

    if (weaponName.contains("halberd")
        || weaponName.contains("hasta")
        || weaponName.contains("guthan")
        || weaponName.contains("sceptre")) {
      c.playerStandIndex = 809;
      c.playerWalkIndex = 1146;
      c.playerRunIndex = 1210;
      return;
    }
    if (weaponName.contains("sled")) {
      c.playerStandIndex = 1461;
      c.playerWalkIndex = 1468;
      c.playerRunIndex = 1467;
      return;
    }
    if (weaponName.contains("dharok")) {
      c.playerStandIndex = 0x811;
      c.playerWalkIndex = 2064;
      return;
    }
    if (weaponName.contains("ahrim")) {
      c.playerStandIndex = 809;
      c.playerWalkIndex = 1146;
      c.playerRunIndex = 1210;
      return;
    }
    if (weaponName.contains("verac")) {
      c.playerStandIndex = 1832;
      c.playerWalkIndex = 1830;
      c.playerRunIndex = 1831;
      return;
    }
    if (weaponName.contains("wand") || weaponName.contains("staff")) {
      c.playerStandIndex = 809;
      c.playerRunIndex = 1210;
      c.playerWalkIndex = 1146;
      return;
    }
    if (weaponName.contains("karil")) {
      c.playerStandIndex = 2074;
      c.playerWalkIndex = 2076;
      c.playerRunIndex = 2077;
      return;
    }
    if (weaponName.contains("2h sword")
        || weaponName.contains("godsword")
        || weaponName.contains("saradomin sw")) {
      c.playerStandIndex = 7047;
      c.playerWalkIndex = 7046;
      c.playerRunIndex = 7039;
      c.playerTurnIndex = 7044;
      c.playerTurn180Index = 7044;
      c.playerTurn90CWIndex = 7044;
      c.playerTurn90CCWIndex = 7044;
      return;
    }
    if (weaponName.contains("bow")) {
      c.playerStandIndex = 808;
      c.playerWalkIndex = 819;
      c.playerRunIndex = 824;
      return;
    }

    switch (c.playerEquipment[c.playerWeapon]) {
      case 4151:
        c.playerWalkIndex = 1660;
        c.playerRunIndex = 1661;
        break;
      case 8004:
      case 7960:
        c.playerStandIndex = 2065;
        c.playerWalkIndex = 2064;
        break;
      case 6528:
        c.playerStandIndex = 0x811;
        c.playerWalkIndex = 2064;
        c.playerRunIndex = 1664;
        break;
      case 4153:
        c.playerStandIndex = 1662;
        c.playerWalkIndex = 1663;
        c.playerRunIndex = 1664;
        break;
      case 10887:
        c.playerStandIndex = 5869;
        c.playerWalkIndex = 5867;
        c.playerRunIndex = 5868;
        break;
      case 11694:
      case 11696:
      case 11730:
      case 11698:
      case 11700:
        c.playerStandIndex = 7047;
        c.playerWalkIndex = 7046;
        c.playerRunIndex = 7039;
        c.playerTurnIndex = 7044;
        c.playerTurn180Index = 7044;
        c.playerTurn90CWIndex = 7044;
        c.playerTurn90CCWIndex = 7044;
        break;
      case 1305:
        c.playerStandIndex = 809;
        break;
    }
  }