Addition of isTalkable NPC template parameter.

This commit is contained in:
MobiusDev
2018-04-10 21:13:58 +00:00
parent 4ac95b0be1
commit 677d4b027a
17 changed files with 66 additions and 127 deletions

View File

@@ -1,71 +0,0 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.others;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import ai.AbstractNpcAI;
/**
* AI for handle Non-Talking NPCs.
* @author St3eT
*/
public final class NonTalkingNpcs extends AbstractNpcAI
{
// @formatter:off
private static final int[] NONTALKINGNPCS =
{
18684, 18685, 18686, // Red Star Stone
18687, 18688, 18689, // Blue Star Stone
18690, 18691, 18692, // Green Star Stone
18848, 18849, 18926, // Jinia Guild
18927, // Fire
18933, // Fire Feed
31202, 31203, 31204, 31205, 31206, 31207, 31208, 31209, 31266, 31593, 31758, 31955, // Town pets
31557, // Mercenary Sentry
31606, // Alice de Catrina
31671, 31672, 31673, 31674, // Patrol
32026, // Hestui Guard
32030, // Garden Sculpture
32031, // Ice Fairy Sculpture
32032, // Strange Machine
32306, // Native's Corpse
32619, 32620, 32621, // NPCs without name
32715, 32716, 32717, // Lilith's group
32718, 32719, 32720, 32721, // Anakim's group
18839, // Wild Maguen
18915, // Divine Furnace
};
// @formatter:on
public NonTalkingNpcs()
{
addSpawnId(NONTALKINGNPCS);
}
@Override
public String onSpawn(L2Npc npc)
{
npc.setTalking(false);
return super.onSpawn(npc);
}
public static void main(String[] args)
{
new NonTalkingNpcs();
}
}

View File

@@ -4355,7 +4355,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" flying="true" canMove="false" canBeSown="true" />
<status attackable="false" talkable="false" flying="true" canMove="false" canBeSown="true" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->
@@ -4395,7 +4395,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" flying="true" canMove="false" canBeSown="true" />
<status attackable="false" talkable="false" flying="true" canMove="false" canBeSown="true" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->
@@ -4435,7 +4435,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" flying="true" canMove="false" canBeSown="true" />
<status attackable="false" talkable="false" flying="true" canMove="false" canBeSown="true" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->
@@ -4475,7 +4475,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" flying="true" canMove="false" canBeSown="true" />
<status attackable="false" talkable="false" flying="true" canMove="false" canBeSown="true" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->
@@ -4515,7 +4515,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" flying="true" canMove="false" canBeSown="true" />
<status attackable="false" talkable="false" flying="true" canMove="false" canBeSown="true" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->
@@ -4555,7 +4555,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" flying="true" canMove="false" canBeSown="true" />
<status attackable="false" talkable="false" flying="true" canMove="false" canBeSown="true" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->
@@ -4595,7 +4595,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" flying="true" canMove="false" canBeSown="true" />
<status attackable="false" talkable="false" flying="true" canMove="false" canBeSown="true" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->
@@ -4635,7 +4635,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" flying="true" canMove="false" canBeSown="true" />
<status attackable="false" talkable="false" flying="true" canMove="false" canBeSown="true" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->
@@ -4675,7 +4675,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" flying="true" canMove="false" canBeSown="true" />
<status attackable="false" talkable="false" flying="true" canMove="false" canBeSown="true" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->

View File

@@ -1699,7 +1699,7 @@
<run ground="120" />
</speed>
</stats>
<status attackable="false" canBeSown="true" />
<status attackable="false" talkable="false" canBeSown="true" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->
@@ -2044,7 +2044,7 @@
<run ground="160" />
</speed>
</stats>
<status attackable="false" undying="false" canBeSown="true" />
<status attackable="false" talkable="false" undying="false" canBeSown="true" />
<skillList>
<skill id="4032" level="10" /> <!--NPC Strike -->
<skill id="4408" level="10" /> <!--HP Increase (2x) -->

View File

@@ -913,6 +913,7 @@
<run ground="1" />
</speed>
</stats>
<status talkable="false" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->
@@ -1355,7 +1356,7 @@
<run ground="160" />
</speed>
</stats>
<status attackable="false" undying="false" canBeSown="true" />
<status attackable="false" talkable="false" undying="false" canBeSown="true" />
<skillList>
<skill id="4032" level="9" /> <!--NPC Strike -->
<skill id="4408" level="10" /> <!--HP Increase (2x) -->
@@ -1396,7 +1397,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" targetable="false" showName="false" canBeSown="true" />
<status attackable="false" talkable="false" targetable="false" showName="false" canBeSown="true" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->
@@ -1615,7 +1616,7 @@
<run ground="1" />
</speed>
</stats>
<status attackable="false" showName="false" canBeSown="true" />
<status attackable="false" talkable="false" showName="false" canBeSown="true" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->

View File

@@ -108,7 +108,7 @@
</speed>
<hitTime>390</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -145,7 +145,7 @@
</speed>
<hitTime>390</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -182,7 +182,7 @@
</speed>
<hitTime>390</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -219,7 +219,7 @@
</speed>
<hitTime>270</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -256,7 +256,7 @@
</speed>
<hitTime>270</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -293,7 +293,7 @@
</speed>
<hitTime>270</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -330,7 +330,7 @@
</speed>
<hitTime>270</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -367,7 +367,7 @@
</speed>
<hitTime>390</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -2681,7 +2681,7 @@
</speed>
<hitTime>450</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->

View File

@@ -2392,7 +2392,7 @@
<run ground="120" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -3865,7 +3865,7 @@
</speed>
<hitTime>720</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4390" level="1" /> <!--NPC Abnormal Immunity -->

View File

@@ -264,7 +264,7 @@
</speed>
<hitTime>480</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -2915,7 +2915,7 @@
<run ground="120" />
</speed>
</stats>
<status attackable="false" undying="false" />
<status attackable="false" talkable="false" undying="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -2957,7 +2957,7 @@
<run ground="120" />
</speed>
</stats>
<status attackable="false" undying="false" />
<status attackable="false" talkable="false" undying="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -2999,7 +2999,7 @@
<run ground="120" />
</speed>
</stats>
<status attackable="false" undying="false" />
<status attackable="false" talkable="false" undying="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -3041,7 +3041,7 @@
<run ground="120" />
</speed>
</stats>
<status attackable="false" undying="false" />
<status attackable="false" talkable="false" undying="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->

View File

@@ -2219,7 +2219,7 @@
</speed>
<hitTime>270</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->

View File

@@ -2695,7 +2695,7 @@
</speed>
<hitTime>480</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
<skill id="4409" level="1" /> <!--MP Increase (1x) -->

View File

@@ -1037,7 +1037,7 @@
<run ground="120" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -1184,7 +1184,7 @@
<run ground="120" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4390" level="1" /> <!--NPC Abnormal Immunity -->
@@ -1225,7 +1225,7 @@
<run ground="120" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4390" level="1" /> <!--NPC Abnormal Immunity -->
@@ -1266,7 +1266,7 @@
<run ground="120" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4390" level="1" /> <!--NPC Abnormal Immunity -->

View File

@@ -252,7 +252,7 @@
</speed>
<hitTime>430</hitTime>
</stats>
<status attackable="false" canMove="false" />
<status attackable="false" talkable="false" canMove="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->

View File

@@ -770,7 +770,7 @@
<run ground="160" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -810,7 +810,7 @@
<run ground="160" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -850,7 +850,7 @@
<run ground="160" />
</speed>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->

View File

@@ -552,7 +552,7 @@
</speed>
<hitTime>500</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -588,7 +588,7 @@
</speed>
<hitTime>500</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -625,7 +625,7 @@
</speed>
<hitTime>460</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4273" level="3" /> <!--Resist Daggers/Rapier Weapon -->
@@ -662,7 +662,7 @@
</speed>
<hitTime>560</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -698,7 +698,7 @@
</speed>
<hitTime>480</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->
@@ -734,7 +734,7 @@
</speed>
<hitTime>630</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4273" level="3" /> <!--Resist Daggers/Rapier Weapon -->
@@ -771,7 +771,7 @@
</speed>
<hitTime>630</hitTime>
</stats>
<status attackable="false" />
<status attackable="false" talkable="false" />
<skillList>
<skill id="4045" level="1" /> <!--Resist Full Magic Attack -->
<skill id="4408" level="1" /> <!--HP Increase (1x) -->

View File

@@ -275,6 +275,7 @@
<xs:complexType name="statusType">
<xs:attribute name="unique" type="xs:boolean" />
<xs:attribute name="attackable" type="xs:boolean" />
<xs:attribute name="talkable" type="xs:boolean" />
<xs:attribute name="targetable" type="xs:boolean" />
<xs:attribute name="undying" type="xs:boolean" />
<xs:attribute name="showName" type="xs:boolean" />