Lineage Justice

Spells & Skills

Lookup and validate skills and spells.

Call Of Nature
MP: 50 HP: 0 Item: 40319 Amount: 1 Duration: 0 Skill Type: Restore
Delay: 0 Cast Invis: Yes Ignores CM: Yes Element: Water Range: 8 Area: N/A
Dmg Value: 0.0 Dmg Dice: 0 Dice Count: 0 Prob Value: 0 Prob Dice: 0 Prob Max: N/A
L1SkillUse Execution:

if (_skillId == CALL_OF_NATURE) {
	if (cha instanceof L1PcInstance) {
		L1PcInstance pc = (L1PcInstance) cha;
		if (_player.getId() != pc.getId()) {
			if (L1World.getInstance().getVisiblePlayer(pc, 0)
					.size() > 0) {
				for (L1PcInstance visiblePc : L1World
						.getInstance().getVisiblePlayer(pc, 0)) {
					if (!visiblePc.isDead()) {
						_player.sendPackets(new S_ServerMessage(592)); 
						return;
					}
				}
			}
			if (pc.getCurrentHp() == 0 && pc.isDead()) {
				pc.setTempID(_player.getId());
				pc.sendPackets(new S_MessageYN(322, ""));
			}
		}
	}
	if (cha instanceof L1NpcInstance) {
		if (!(cha instanceof L1TowerInstance)) {
			L1NpcInstance npc = (L1NpcInstance) cha;
			if (npc.getNpcTemplate().isCantResurrect()
					&& !(npc instanceof L1PetInstance)) {
				return;
			}
			if (npc instanceof L1PetInstance
					&& L1World.getInstance()
							.getVisiblePlayer(npc, 0).size() > 0) {
				for (L1PcInstance visiblePc : L1World
						.getInstance().getVisiblePlayer(npc, 0)) {
					if (!visiblePc.isDead()) {
						_player.sendPackets(new S_ServerMessage(592)); 
						return;
					}
				}
			}
			if (npc.getCurrentHp() == 0 && npc.isDead()) {
				npc.resurrect(cha.getMaxHp());
				npc.resurrect(cha.getMaxMp() / 100);
				npc.setResurrect(true);
			}
		}
	}
	}