Lineage Justice

Spells & Skills

Lookup and validate skills and spells.

CreateZombie
MP: 5 HP: 80 Item: 40318 Amount: 1 Duration: 3600 Skill Type: Restore
Delay: 10 Cast Invis: No Ignores CM: No Element: Earth Range: 20 Area: N/A
Dmg Value: 0.0 Dmg Dice: 0 Dice Count: 0 Prob Value: 0 Prob Dice: 0 Prob Max: N/A
L1Skill Execution:

if (_skillId == CREATE_ZOMBIE) {
	int petcost = 0;
	Object[] petlist = _user.getPetList().values()
			.toArray();
	for (Object pet : petlist) {
		petcost += ((L1NpcInstance) pet).getPetcost();
	}
	int charisma = _user.getCha();
	if (_player.isElf()) {
		if (charisma > 30) { // max count = 7
			charisma = 30;
		}
		charisma += 12;
	} else if (_player.isWizard()) {
		if (charisma > 36) { // max count = 7
			charisma = 36;
		}
		charisma += 6;
	}
	charisma -= petcost;
	if (charisma >= 6) {
		L1SummonInstance summon = new L1SummonInstance(
				_targetNpc, _user, true);
		_target = summon;
	} else {
		_player.sendPackets(new S_ServerMessage(319)); // You can't control more monsters.
	}
}