Browse Source

BETA: Adding Zealot of Shilen AI.

	Reviewed by: Adry_85, Zoey76
nonom 12 years ago
parent
commit
5a33ae7735

+ 32 - 0
L2J_DataPack_BETA/dist/game/data/Routes.xml

@@ -699,4 +699,36 @@
 		<point string="" X="-81125" Y="205855" Z="-7984" delay="0" run="false" />
 		<point string="" X="-81938" Y="205856" Z="-7984" delay="0" run="false" />
 	</route>
+	<!-- gludio_airport1 -->
+	<route id="71" repeat="true" repeatStyle="back">
+		<target id="32628" spawnX="-148777" spawnY="254544" spawnZ="-186" />
+		<point string="" X="-149268" Y="254124" Z="-184" delay="0" run="false" />
+		<point string="" X="-148700" Y="254399" Z="-184" delay="0" run="false" />
+		<point string="" X="-148313" Y="254841" Z="-184" delay="0" run="false" />
+		<point string="" X="-148256" Y="255338" Z="-184" delay="0" run="false" />
+	</route>
+	<!-- gludio_airport2 -->
+	<route id="72" repeat="true" repeatStyle="back">
+		<target id="32628" spawnX="-148804" spawnY="254521" spawnZ="-187" />
+		<point string="" X="-149239" Y="254100" Z="-184" delay="0" run="false" />
+		<point string="" X="-148671" Y="254375" Z="-184" delay="0" run="false" />
+		<point string="" X="-148284" Y="254817" Z="-184" delay="0" run="false" />
+		<point string="" X="-148227" Y="255314" Z="-184" delay="0" run="false" />
+	</route>
+	<!-- gludio_airport3 -->
+	<route id="73" repeat="true" repeatStyle="back">
+		<target id="32629" spawnX="-149929" spawnY="254543" spawnZ="-187" />
+		<point string="" X="-149469" Y="254124" Z="-184" delay="0" run="false" />
+		<point string="" X="-150054" Y="254373" Z="-184" delay="0" run="false" />
+		<point string="" X="-150431" Y="254837" Z="-184" delay="0" run="false" />
+		<point string="" X="-150473" Y="255335" Z="-184" delay="0" run="false" />
+	</route>
+	<!-- gludio_airport4 -->
+	<route id="74" repeat="true" repeatStyle="back">
+		<target id="32629" spawnX="-149909" spawnY="254506" spawnZ="-187" />
+		<point string="" X="-149499" Y="254101" Z="-184" delay="0" run="false" />
+		<point string="" X="-150085" Y="254350" Z="-184" delay="0" run="false" />
+		<point string="" X="-150462" Y="254813" Z="-184" delay="0" run="false" />
+		<point string="" X="-150504" Y="255312" Z="-184" delay="0" run="false" />
+	</route>
 </routes>

+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts.cfg

@@ -48,6 +48,7 @@ ai/npc/Teleports/ToIVortex/ToIVortex.java
 ai/npc/Teleports/Warpgate/Warpgate.java
 ai/npc/TerritoryManagers/TerritoryManagers.java
 ai/npc/WeaverOlf/WeaverOlf.java
+ai/npc/ZealotOfShilen/ZealotOfShilen.java
 
 # Fantasy Isle
 ai/fantasy_isle/MC_Show.java

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/ZealotOfShilen/32628-01.html

@@ -0,0 +1,3 @@
+<html><body>Airharbor Guard:<br>
+I'm so busy now! I'd be grateful if you could help me!
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/html/default/32628.htm → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/ZealotOfShilen/32628.html


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/html/default/32629.htm → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/ZealotOfShilen/32629.html


+ 106 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/ZealotOfShilen/ZealotOfShilen.java

@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ * 
+ * This file is part of L2J DataPack.
+ * 
+ * L2J DataPack 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.
+ * 
+ * L2J DataPack 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.npc.ZealotOfShilen;
+
+import ai.npc.AbstractNpcAI;
+
+import com.l2jserver.gameserver.ai.CtrlIntention;
+import com.l2jserver.gameserver.datatables.SpawnTable;
+import com.l2jserver.gameserver.model.L2Spawn;
+import com.l2jserver.gameserver.model.actor.L2Attackable;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+ * Zealot of Shilen AI.
+ * @author nonom
+ */
+public class ZealotOfShilen extends AbstractNpcAI
+{
+	// NPCs
+	private static final int ZEALOT = 18782;
+	private static final int[] GUARDS =
+	{
+		32628,
+		32629
+	};
+	
+	private static final L2Npc[] _guards = new L2Npc[4];
+	
+	private ZealotOfShilen(String name, String descr)
+	{
+		super(name, descr);
+		addSpawnId(ZEALOT);
+		addFirstTalkId(GUARDS);
+		
+		int i = 0;
+		for (int npcId : GUARDS)
+		{
+			for (L2Spawn spawn : SpawnTable.getInstance().getSpawns(npcId))
+			{
+				L2Npc guard = spawn.getLastSpawn();
+				guard.setIsInvul(true);
+				((L2Attackable) guard).setCanReturnToSpawnPoint(false);
+				startQuestTimer("WATCHING", 10000, guard, null, true);
+				_guards[i++] = guard;
+			}
+		}
+		for (L2Spawn spawn : SpawnTable.getInstance().getSpawns(ZEALOT))
+		{
+			spawn.getLastSpawn().setIsNoRndWalk(true);
+		}
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		if (event.equalsIgnoreCase("WATCHING") && !npc.isAttackingNow())
+		{
+			for (L2Character character : npc.getKnownList().getKnownCharacters())
+			{
+				if (character.isMonster() && !character.isDead() && !((L2Attackable) character).isDecayed())
+				{
+					npc.setRunning();
+					((L2Attackable) npc).addDamageHate(character, 0, 999);
+					npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, character, null);
+				}
+			}
+		}
+		return null;
+	}
+	
+	@Override
+	public String onFirstTalk(L2Npc npc, L2PcInstance player)
+	{
+		return (npc.isAttackingNow()) ? "32628-01.html" : npc.getNpcId() + ".html";
+	}
+	
+	@Override
+	public String onSpawn(L2Npc npc)
+	{
+		npc.setIsNoRndWalk(true);
+		return super.onSpawn(npc);
+	}
+	
+	public static void main(String[] args)
+	{
+		new ZealotOfShilen(ZealotOfShilen.class.getSimpleName(), "ai/npc");
+	}
+}

+ 2 - 2
L2J_DataPack_BETA/dist/sql/game/npc.sql

@@ -8659,8 +8659,8 @@ INSERT INTO `npc` VALUES
 (32625, 32625, "Anciel", 0, "Soldier", 0, "LineageNPC.a_fighterguild_teacher_MElf", 7, 22.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 100, 0, 1), 
 (32626, 32626, "Royal Guard", 0, "Soldier", 0, "LineageNPC2.gracia_soldier", 11, 25, 70, "female", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 13524, 13525, 0, 50, 160, 0, 1), 
 (32627, 32627, "Nottingale", 0, "Wizard", 0, "LineageNPC.a_teleporter_FElf", 8.5, 23.5, 70, "female", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 100, 0, 1), 
-(32628, 32628, "Wharf Patrol", 0, "", 0, "LineageNPC.a_guard_MHuman", 8, 24, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 94, 0, 0, 50, 120, 0, 1), 
-(32629, 32629, "Wharf Patrol", 0, "", 0, "LineageNPC.a_guard_MHuman", 8, 24, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 94, 0, 0, 50, 120, 0, 1), 
+(32628, 32628, "Wharf Patrol", 0, "", 0, "LineageNPC.a_guard_MHuman", 8, 24, 70, "male", "L2Guard", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 94, 0, 0, 50, 120, 0, 1), 
+(32629, 32629, "Wharf Patrol", 0, "", 0, "LineageNPC.a_guard_MHuman", 8, 24, 70, "male", "L2Guard", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 94, 0, 0, 50, 120, 0, 1), 
 (32630, 32630, "Gracia Server Helper", 0, "", 0, "LineageNPC2.message_event_master", 10, 20, 70, "female", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 160, 0, 1), 
 (32631, 32631, "Gracia Server Proof Exchanger", 0, "", 0, "LineageNPC2.message_event_master", 10, 20, 70, "female", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 160, 0, 1), 
 (32632, 32632, "Gracia Survivor", 0, "", 0, "LineageNPC2.gracia_remnants_a", 9.5, 22.5, 70, "female", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 160, 0, 1), 

+ 3 - 3
L2J_DataPack_BETA/dist/sql/game/npcaidata.sql

@@ -2282,7 +2282,7 @@ INSERT INTO `npcaidata` VALUES
 (18779, 7, 15, 0, 300, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 300, "null", 0, 0, "balanced"), -- 
 (18780, 7, 15, 0, 300, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "aceed_clan", 300, "null", 0, 0, "balanced"), -- Symbol of Cohemenes
 (18781, 7, 15, 0, 300, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 300, "null", 0, 0, "balanced"), -- Young Drake Wing
-(18782, 7, 15, 0, 300, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 300, "null", 0, 0, "balanced"), -- Zealot of Shilen
+(18782, 7, 15, 0, 300, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "zealot_clan", 300, "airport_patrol", 0, 0, "balanced"), -- Zealot of Shilen
 (18783, 7, 15, 0, 450, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "des_dragon", 1000, "null", 0, 0, "balanced"), -- Defeated Troops Commander
 (18784, 7, 15, 0, 450, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "des_dragon", 1000, "null", 0, 0, "balanced"), -- Defeated Troops No 1 Battalion Commander
 (18785, 7, 15, 0, 450, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "des_dragon", 1000, "null", 0, 0, "balanced"), -- Defeated Troops White Dragon Leader
@@ -8644,8 +8644,8 @@ INSERT INTO `npcaidata` VALUES
 (32625, 7, 15, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 0, "null", 0, 0, "balanced"), -- Anciel
 (32626, 7, 15, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 0, "null", 0, 0, "balanced"), -- Royal Guard
 (32627, 7, 15, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 0, "null", 0, 0, "balanced"), -- Nottingale
-(32628, 7, 15, 0, 300, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 0, "null", 0, 0, "balanced"), -- Wharf Patrol
-(32629, 7, 15, 0, 300, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 0, "null", 0, 0, "balanced"), -- Wharf Patrol
+(32628, 7, 15, 0, 300, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "airport_patrol", 1500, "zealot_clan", 1500, 0, "balanced"), -- Wharf Patrol
+(32629, 7, 15, 0, 300, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "airport_patrol", 1500, "zealot_clan", 1500, 0, "balanced"), -- Wharf Patrol
 (32630, 7, 15, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 0, "null", 0, 0, "balanced"), -- Gracia Server Helper
 (32631, 7, 15, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 0, "null", 0, 0, "balanced"), -- Gracia Server Mark Manager
 (32632, 7, 15, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "null", 0, "null", 0, 0, "balanced"), -- Gracian Survivor

+ 7 - 4
L2J_DataPack_BETA/dist/sql/game/spawnlist.sql

@@ -845,11 +845,14 @@ INSERT INTO `spawnlist` VALUES
 -- Mine
 ("unset", 1, 32616, -148656, 253841, -184, 0, 0, 24576, 60, 0, 0, 0),
 -- Wharf Patrol
-("unset", 1, 32628, -148835, 254344, -184, 0, 0, 37690, 60, 0, 0, 0),
-("unset", 1, 32628, -148610, 254449, -184, 0, 0, 42005, 60, 0, 0, 0),
+("unset", 1, 32628, -148777, 254544, -186, 0, 0, 0, 60, 0, 0, 0),
+("unset", 1, 32628, -148804, 254521, -187, 0, 0, 0, 60, 0, 0, 0),
 -- Wharf Patrol
-("unset", 1, 32629, -150456, 255134, -176, 0, 0, 50030, 60, 0, 0, 0),
-("unset", 1, 32629, -149957, 254295, -184, 0, 0, 28583, 60, 0, 0, 0),
+("unset", 1, 32629, -149929, 254543, -187, 0, 0, 0, 60, 0, 0, 0),
+("unset", 1, 32629, -149909, 254506, -187, 0, 0, 0, 60, 0, 0, 0),
+-- Zealot of Shilen
+("Gludio_AirShip_Field", 1, 18782, -148656, 254304, -185, 0, 0, 0, 420, 0, 0, 0),
+("Gludio_AirShip_Field", 1, 18782, -150107, 254288, -185, 0, 0, 0, 780, 0, 0, 0),
 
 -- [16_12]