Lineage Justice
Spells & Skills
Lookup and validate skills and spells.
|
TameMonster
|
MP:
|
30
|
HP:
|
20
|
Item:
|
40318
|
Amount:
|
1
|
Duration:
|
3600
|
Skill Type:
|
Probability
|
Delay:
|
10
|
Cast Invis:
|
No
|
Ignores CM:
|
No
|
Element:
|
None
|
Range:
|
20
|
Area:
|
N/A
|
Dmg Value:
|
0.0
|
Dmg Dice:
|
0
|
Dice Count:
|
0
|
Prob Value:
|
0
|
Prob Dice:
|
6
|
Prob Max:
|
45
|
L1SkillUse Execution:
if (_skillId == TAMING_MONSTER
&& ((L1MonsterInstance) cha).getNpcTemplate()
.isTamable()) {
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, false);
_target = summon;
} else {
_player.sendPackets(new S_ServerMessage(319)); // You can't control more monsters.
}
}