show(dialog, player, npc);
}
public void resists() {
L2Player player = (L2Player) getSelf();
L2NpcInstance npc = getNpc();
if (player == null || npc == null) {
return;
}
StringBuilder dialog = new StringBuilder("<html><body><center><font color=\"LEVEL\">");
dialog.append(npc.getName()).append("<br></font></center><table width=\"80%\">");
int FIRE_RECEPTIVE = (int) npc.calcStat(Stats.FIRE_RECEPTIVE, 0, null, null);
if (FIRE_RECEPTIVE != 0) {
dialog.append("<tr><td>Fire</td><td>").append(-FIRE_RECEPTIVE).append("</td></tr>");
}
int WIND_RECEPTIVE = (int) npc.calcStat(Stats.WIND_RECEPTIVE, 0, null, null);
if (WIND_RECEPTIVE != 0) {
dialog.append("<tr><td>Wind</td><td>").append(-WIND_RECEPTIVE).append("</td></tr>");
}
int WATER_RECEPTIVE = (int) npc.calcStat(Stats.WATER_RECEPTIVE, 0, null, null);
if (WATER_RECEPTIVE != 0) {
dialog.append("<tr><td>Water</td><td>").append(-WATER_RECEPTIVE).append("</td></tr>");
}
int EARTH_RECEPTIVE = (int) npc.calcStat(Stats.EARTH_RECEPTIVE, 0, null, null);
if (EARTH_RECEPTIVE != 0) {
dialog.append("<tr><td>Earth</td><td>").append(-EARTH_RECEPTIVE).append("</td></tr>");
}
int SACRED_RECEPTIVE = (int) npc.calcStat(Stats.SACRED_RECEPTIVE, 0, null, null);
if (SACRED_RECEPTIVE != 0) {
dialog.append("<tr><td>Light</td><td>").append(-SACRED_RECEPTIVE).append("</td></tr>");
}
int UNHOLY_RECEPTIVE = (int) npc.calcStat(Stats.UNHOLY_RECEPTIVE, 0, null, null);
if (UNHOLY_RECEPTIVE != 0) {
dialog.append("<tr><td>Darkness</td><td>").append(-UNHOLY_RECEPTIVE).append("</td></tr>");
}
int BLEED_RECEPTIVE = (int) npc.calcStat(Stats.BLEED_RECEPTIVE, null, null);
if (BLEED_RECEPTIVE != 0) {
dialog.append("<tr><td>Bleed</td><td>").append(BLEED_RECEPTIVE).append("</td></tr>");
}
int POISON_RECEPTIVE = (int) npc.calcStat(Stats.POISON_RECEPTIVE, null, null);
if (POISON_RECEPTIVE != 0) {
dialog.append("<tr><td>Poison</td><td>").append(POISON_RECEPTIVE).append("</td></tr>");
}
int STUN_RECEPTIVE = (int) npc.calcStat(Stats.STUN_RECEPTIVE, null, null);
if (STUN_RECEPTIVE != 0) {
dialog.append("<tr><td>Stun</td><td>").append(STUN_RECEPTIVE).append("</td></tr>");
}
int ROOT_RECEPTIVE = (int) npc.calcStat(Stats.ROOT_RECEPTIVE, null, null);
if (ROOT_RECEPTIVE != 0) {
dialog.append("<tr><td>Root</td><td>").append(ROOT_RECEPTIVE).append("</td></tr>");
}
int SLEEP_RECEPTIVE = (int) npc.calcStat(Stats.SLEEP_RECEPTIVE, null, null);
if (SLEEP_RECEPTIVE != 0) {
dialog.append("<tr><td>Sleep</td><td>").append(SLEEP_RECEPTIVE).append("</td></tr>");
}
int PARALYZE_RECEPTIVE = (int) npc.calcStat(Stats.PARALYZE_RECEPTIVE, null, null);
if (PARALYZE_RECEPTIVE != 0) {
dialog.append("<tr><td>Paralyze</td><td>").append(PARALYZE_RECEPTIVE).append("</td></tr>");
}
int MENTAL_RECEPTIVE = (int) npc.calcStat(Stats.MENTAL_RECEPTIVE, null, null);
if (MENTAL_RECEPTIVE != 0) {
dialog.append("<tr><td>Mental</td><td>").append(MENTAL_RECEPTIVE).append("</td></tr>");
}
int DEBUFF_RECEPTIVE = (int) npc.calcStat(Stats.DEBUFF_RECEPTIVE, null, null);
if (DEBUFF_RECEPTIVE != 0) {
dialog.append("<tr><td>Debuff</td><td>").append(DEBUFF_RECEPTIVE).append("</td></tr>");
}
int CANCEL_RECEPTIVE = (int) npc.calcStat(Stats.CANCEL_RECEPTIVE, null, null);
if (CANCEL_RECEPTIVE != 0) {
dialog.append("<tr><td>Cancel</td><td>").append(CANCEL_RECEPTIVE).append("</td></tr>");
}
int SWORD_WPN_RECEPTIVE = 100 - (int) npc.calcStat(Stats.SWORD_WPN_RECEPTIVE, null, null);
if (SWORD_WPN_RECEPTIVE != 0) {
dialog.append("<tr><td>Sword</td><td>").append(SWORD_WPN_RECEPTIVE).append("%</td></tr>");
}
int DUAL_WPN_RECEPTIVE = 100 - (int) npc.calcStat(Stats.DUAL_WPN_RECEPTIVE, null, null);
if (DUAL_WPN_RECEPTIVE != 0) {
dialog.append("<tr><td>Dual Sword</td><td>").append(DUAL_WPN_RECEPTIVE).append("%</td></tr>");
}
int BLUNT_WPN_RECEPTIVE = 100 - (int) npc.calcStat(Stats.BLUNT_WPN_RECEPTIVE, null, null);
if (BLUNT_WPN_RECEPTIVE != 0) {
dialog.append("<tr><td>Blunt</td><td>").append(BLUNT_WPN_RECEPTIVE).append("%</td></tr>");
}
int DAGGER_WPN_RECEPTIVE = 100 - (int) npc.calcStat(Stats.DAGGER_WPN_RECEPTIVE, null, null);
if (DAGGER_WPN_RECEPTIVE != 0) {
dialog.append("<tr><td>Dagger/rapier</td><td>").append(DAGGER_WPN_RECEPTIVE).append("%</td></tr>");
}
int BOW_WPN_RECEPTIVE = 100 - (int) npc.calcStat(Stats.BOW_WPN_RECEPTIVE, null, null);
if (BOW_WPN_RECEPTIVE != 0) {
dialog.append("<tr><td>Bow</td><td>").append(BOW_WPN_RECEPTIVE).append("%</td></tr>");
}
int XBOW_WPN_RECEPTIVE = 100 - (int) npc.calcStat(Stats.CROSSBOW_WPN_RECEPTIVE, null, null);
if (XBOW_WPN_RECEPTIVE != 0) {
dialog.append("<tr><td>Crossbow</td><td>").append(XBOW_WPN_RECEPTIVE).append("%</td></tr>");
}
int POLE_WPN_RECEPTIVE = 100 - (int) npc.calcStat(Stats.POLE_WPN_RECEPTIVE, null, null);
if (POLE_WPN_RECEPTIVE != 0) {
dialog.append("<tr><td>Polearm</td><td>").append(POLE_WPN_RECEPTIVE).append("%</td></tr>");
}
int FIST_WPN_RECEPTIVE = 100 - (int) npc.calcStat(Stats.FIST_WPN_RECEPTIVE, null, null);
if (FIST_WPN_RECEPTIVE != 0) {
dialog.append("<tr><td>Fist weapons</td><td>").append(FIST_WPN_RECEPTIVE).append("%</td></tr>");
}
if (FIRE_RECEPTIVE == 0 && WIND_RECEPTIVE == 0 && WATER_RECEPTIVE == 0 && EARTH_RECEPTIVE == 0 && UNHOLY_RECEPTIVE == 0 && SACRED_RECEPTIVE // primary elements
== 0 && BLEED_RECEPTIVE == 0 && STUN_RECEPTIVE // phys debuff