Pārlūkot izejas kodu

BETA: Multiple refactoring of AIs and Instances:

Patch by: jurchiks
Reviewed by: UnAfraid, Zoey76
Zoey76 12 gadi atpakaļ
vecāks
revīzija
340cb76eab
23 mainītis faili ar 365 papildinājumiem un 426 dzēšanām
  1. 39 50
      L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/EnergySeeds.java
  2. 3 3
      L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Lindvior.java
  3. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/AbstractNpcAI.java
  4. 10 8
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortuneTelling/FortuneTelling.java
  5. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortuneTelling/fortune.htm
  6. 3 1
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/PriestOfBlessing/32783-1.htm
  7. 5 5
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/PriestOfBlessing/32783.htm
  8. 26 29
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/PriestOfBlessing/PriestOfBlessing.java
  9. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Rafforty/Rafforty.java
  10. 3 3
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/ElrokiTeleporters.java
  11. 3 3
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/GatekeeperSpirit/GatekeeperSpirit.java
  12. 9 35
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/HuntingGroundsTeleport/HuntingGroundsTeleport.java
  13. 9 7
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/MithrilMines/MithrilMines.java
  14. 36 32
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/PaganTeleporters/PaganTeleporters.java
  15. 2 5
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/SteelCitadelTeleport/32376-02.htm
  16. 2 5
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/SteelCitadelTeleport/32376-02a.htm
  17. 2 5
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/SteelCitadelTeleport/32376-03.htm
  18. 10 10
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/SteelCitadelTeleport/SteelCitadelTeleport.java
  19. 1 2
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminTargetSay.java
  20. 71 79
      L2J_DataPack_BETA/dist/game/data/scripts/instances/Pailaka/PailakaDevilsLegacy.java
  21. 126 138
      L2J_DataPack_BETA/dist/game/data/scripts/instances/Pailaka/PailakaSongOfIceAndFire.java
  22. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00463_IMustBeaGenius/Q00463_IMustBeaGenius.java
  23. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00464_Oath/Q00464_Oath.java

+ 39 - 50
L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/EnergySeeds.java

@@ -61,7 +61,7 @@ public class EnergySeeds extends AbstractNpcAI
 	protected static Map<L2Npc, Integer> _spawnedNpcs = new FastMap<L2Npc, Integer>().shared();
 	
 	private static final int TEMPORARY_TELEPORTER = 32602;
-	private static final int[] SEEDIDS =
+	private static final int[] SEED_IDS =
 	{
 		18678,
 		18679,
@@ -141,17 +141,6 @@ public class EnergySeeds extends AbstractNpcAI
 		ANNIHILATION_COKRAKON
 	}
 	
-	private EnergySeeds(String name, String descr)
-	{
-		super(name, descr);
-		registerMobs(SEEDIDS);
-		addFirstTalkId(SEEDIDS);
-		addFirstTalkId(TEMPORARY_TELEPORTER);
-		addEnterZoneId(SOD_ZONE);
-		addSpawnsToList();
-		startAI();
-	}
-	
 	protected boolean isSeedActive(GraciaSeeds seed)
 	{
 		switch (seed)
@@ -420,25 +409,14 @@ public class EnergySeeds extends AbstractNpcAI
 	
 	private L2MonsterInstance spawnSupriseMob(L2Npc energy, int npcId)
 	{
-		// Get the template of the Minion to spawn
 		L2NpcTemplate supriseMobTemplate = NpcTable.getInstance().getTemplate(npcId);
-		
-		// Create and Init the Minion and generate its Identifier
 		L2MonsterInstance monster = new L2MonsterInstance(IdFactory.getInstance().getNextId(), supriseMobTemplate);
-		
-		// Set the Minion HP, MP and Heading
 		monster.setCurrentHpMp(monster.getMaxHp(), monster.getMaxMp());
 		monster.setHeading(energy.getHeading());
-		
-		// move monster to masters instance
 		monster.setInstanceId(energy.getInstanceId());
-		
 		monster.setShowSummonAnimation(true);
-		
 		monster.spawnMe(energy.getX(), energy.getY(), energy.getZ());
-		
 		startQuestTimer("DeSpawnTask", 30000, monster, null);
-		
 		return monster;
 	}
 	
@@ -470,122 +448,122 @@ public class EnergySeeds extends AbstractNpcAI
 		_spawns.put(4, new ESSpawn(4, GraciaSeeds.DESTRUCTION, new Location(-249448,219256,-12448), new int[]{18678,18679,18680}));
 		_spawns.put(5, new ESSpawn(5, GraciaSeeds.DESTRUCTION, new Location(-249432,220872,-12448), new int[]{18678,18679,18680}));
 		_spawns.put(6, new ESSpawn(6, GraciaSeeds.DESTRUCTION, new Location(-248360,220888,-12448), new int[]{18678,18679,18680}));
-
+		
 		_spawns.put(7, new ESSpawn(7, GraciaSeeds.DESTRUCTION, new Location(-250088,219256,-12448), new int[]{18681,18682}));
 		_spawns.put(8, new ESSpawn(8, GraciaSeeds.DESTRUCTION, new Location(-250600,219272,-12448), new int[]{18681,18682}));
 		_spawns.put(9, new ESSpawn(9, GraciaSeeds.DESTRUCTION, new Location(-250584,220904,-12448), new int[]{18681,18682}));
 		_spawns.put(10, new ESSpawn(10, GraciaSeeds.DESTRUCTION, new Location(-250072,220888,-12448), new int[]{18681,18682}));
-
+		
 		_spawns.put(11, new ESSpawn(11, GraciaSeeds.DESTRUCTION, new Location(-253096,217704,-12296), new int[]{18683,18678}));
 		_spawns.put(12, new ESSpawn(12, GraciaSeeds.DESTRUCTION, new Location(-253112,217048,-12288), new int[]{18683,18678}));
 		_spawns.put(13, new ESSpawn(13, GraciaSeeds.DESTRUCTION, new Location(-251448,217032,-12288), new int[]{18683,18678}));
 		_spawns.put(14, new ESSpawn(14, GraciaSeeds.DESTRUCTION, new Location(-251416,217672,-12296), new int[]{18683,18678}));
-
+		
 		_spawns.put(15, new ESSpawn(15, GraciaSeeds.DESTRUCTION, new Location(-251416,217672,-12296), new int[]{18679,18680}));
 		_spawns.put(16, new ESSpawn(16, GraciaSeeds.DESTRUCTION, new Location(-251416,217016,-12280), new int[]{18679,18680}));
 		_spawns.put(17, new ESSpawn(17, GraciaSeeds.DESTRUCTION, new Location(-249752,217016,-12280), new int[]{18679,18680}));
 		_spawns.put(18, new ESSpawn(18, GraciaSeeds.DESTRUCTION, new Location(-249736,217688,-12296), new int[]{18679,18680}));
-
+		
 		_spawns.put(19, new ESSpawn(19, GraciaSeeds.DESTRUCTION, new Location(-252472,215208,-12120), new int[]{18681,18682}));
 		_spawns.put(20, new ESSpawn(20, GraciaSeeds.DESTRUCTION, new Location(-252552,216760,-12248), new int[]{18681,18682}));
 		_spawns.put(21, new ESSpawn(21, GraciaSeeds.DESTRUCTION, new Location(-253160,216744,-12248), new int[]{18681,18682}));
 		_spawns.put(22, new ESSpawn(22, GraciaSeeds.DESTRUCTION, new Location(-253128,215160,-12096), new int[]{18681,18682}));
-
+		
 		_spawns.put(23, new ESSpawn(23, GraciaSeeds.DESTRUCTION, new Location(-250392,215208,-12120), new int[]{18683,18678}));
 		_spawns.put(24, new ESSpawn(24, GraciaSeeds.DESTRUCTION, new Location(-250264,216744,-12248), new int[]{18683,18678}));
 		_spawns.put(25, new ESSpawn(25, GraciaSeeds.DESTRUCTION, new Location(-249720,216744,-12248), new int[]{18683,18678}));
 		_spawns.put(26, new ESSpawn(26, GraciaSeeds.DESTRUCTION, new Location(-249752,215128,-12096), new int[]{18683,18678}));
-
+		
 		_spawns.put(27, new ESSpawn(27, GraciaSeeds.DESTRUCTION, new Location(-250280,216760,-12248), new int[]{18679,18680,18681}));
 		_spawns.put(28, new ESSpawn(28, GraciaSeeds.DESTRUCTION, new Location(-250344,216152,-12248), new int[]{18679,18680,18681}));
 		_spawns.put(29, new ESSpawn(29, GraciaSeeds.DESTRUCTION, new Location(-252504,216152,-12248), new int[]{18679,18680,18681}));
 		_spawns.put(30, new ESSpawn(30, GraciaSeeds.DESTRUCTION, new Location(-252520,216792,-12248), new int[]{18679,18680,18681}));
-
+		
 		_spawns.put(31, new ESSpawn(31, GraciaSeeds.DESTRUCTION, new Location(-242520,217272,-12384), new int[]{18681,18682,18683}));
 		_spawns.put(32, new ESSpawn(32, GraciaSeeds.DESTRUCTION, new Location(-241432,217288,-12384), new int[]{18681,18682,18683}));
 		_spawns.put(33, new ESSpawn(33, GraciaSeeds.DESTRUCTION, new Location(-241432,218936,-12384), new int[]{18681,18682,18683}));
 		_spawns.put(34, new ESSpawn(34, GraciaSeeds.DESTRUCTION, new Location(-242536,218936,-12384), new int[]{18681,18682,18683}));
-
+		
 		_spawns.put(35, new ESSpawn(35, GraciaSeeds.DESTRUCTION, new Location(-240808,217272,-12384), new int[]{18678,18679}));
 		_spawns.put(36, new ESSpawn(36, GraciaSeeds.DESTRUCTION, new Location(-240280,217272,-12384), new int[]{18678,18679}));
 		_spawns.put(37, new ESSpawn(37, GraciaSeeds.DESTRUCTION, new Location(-240280,218952,-12384), new int[]{18678,18679}));
 		_spawns.put(38, new ESSpawn(38, GraciaSeeds.DESTRUCTION, new Location(-240792,218936,-12384), new int[]{18678,18679}));
-
+		
 		_spawns.put(39, new ESSpawn(39, GraciaSeeds.DESTRUCTION, new Location(-239576,217240,-12640), new int[]{18680,18681,18682}));
 		_spawns.put(40, new ESSpawn(40, GraciaSeeds.DESTRUCTION, new Location(-239560,216168,-12640), new int[]{18680,18681,18682}));
 		_spawns.put(41, new ESSpawn(41, GraciaSeeds.DESTRUCTION, new Location(-237896,216152,-12640), new int[]{18680,18681,18682}));
 		_spawns.put(42, new ESSpawn(42, GraciaSeeds.DESTRUCTION, new Location(-237912,217256,-12640), new int[]{18680,18681,18682}));
-
+		
 		_spawns.put(43, new ESSpawn(43, GraciaSeeds.DESTRUCTION, new Location(-237896,215528,-12640), new int[]{18683,18678}));
 		_spawns.put(44, new ESSpawn(44, GraciaSeeds.DESTRUCTION, new Location(-239560,215528,-12640), new int[]{18683,18678}));
 		_spawns.put(45, new ESSpawn(45, GraciaSeeds.DESTRUCTION, new Location(-239560,214984,-12640), new int[]{18683,18678}));
 		_spawns.put(46, new ESSpawn(46, GraciaSeeds.DESTRUCTION, new Location(-237896,215000,-12640), new int[]{18683,18678}));
-
+		
 		_spawns.put(47, new ESSpawn(47, GraciaSeeds.DESTRUCTION, new Location(-237896,213640,-12768), new int[]{18678,18679,18680}));
 		_spawns.put(48, new ESSpawn(48, GraciaSeeds.DESTRUCTION, new Location(-239560,213640,-12768), new int[]{18678,18679,18680}));
 		_spawns.put(49, new ESSpawn(49, GraciaSeeds.DESTRUCTION, new Location(-239544,212552,-12768), new int[]{18678,18679,18680}));
 		_spawns.put(50, new ESSpawn(50, GraciaSeeds.DESTRUCTION, new Location(-237912,212552,-12768), new int[]{18678,18679,18680}));
-
+		
 		_spawns.put(51, new ESSpawn(51, GraciaSeeds.DESTRUCTION, new Location(-237912,211912,-12768), new int[]{18681,18682}));
 		_spawns.put(52, new ESSpawn(52, GraciaSeeds.DESTRUCTION, new Location(-237912,211400,-12768), new int[]{18681,18682}));
 		_spawns.put(53, new ESSpawn(53, GraciaSeeds.DESTRUCTION, new Location(-239560,211400,-12768), new int[]{18681,18682}));
 		_spawns.put(54, new ESSpawn(54, GraciaSeeds.DESTRUCTION, new Location(-239560,211912,-12768), new int[]{18681,18682}));
-
+		
 		_spawns.put(55, new ESSpawn(55, GraciaSeeds.DESTRUCTION, new Location(-241960,214536,-12512), new int[]{18683,18678,18679}));
 		_spawns.put(56, new ESSpawn(56, GraciaSeeds.DESTRUCTION, new Location(-241976,213448,-12512), new int[]{18683,18678,18679}));
 		_spawns.put(57, new ESSpawn(57, GraciaSeeds.DESTRUCTION, new Location(-243624,213448,-12512), new int[]{18683,18678,18679}));
 		_spawns.put(58, new ESSpawn(58, GraciaSeeds.DESTRUCTION, new Location(-243624,214520,-12512), new int[]{18683,18678,18679}));
-
+		
 		_spawns.put(59, new ESSpawn(59, GraciaSeeds.DESTRUCTION, new Location(-241976,212808,-12504), new int[]{18680,18681}));
 		_spawns.put(60, new ESSpawn(60, GraciaSeeds.DESTRUCTION, new Location(-241960,212280,-12504), new int[]{18680,18681}));
 		_spawns.put(61, new ESSpawn(61, GraciaSeeds.DESTRUCTION, new Location(-243624,212264,-12504), new int[]{18680,18681}));
 		_spawns.put(62, new ESSpawn(62, GraciaSeeds.DESTRUCTION, new Location(-243624,212792,-12504), new int[]{18680,18681}));
-
+		
 		_spawns.put(63, new ESSpawn(63, GraciaSeeds.DESTRUCTION, new Location(-243640,210920,-12640), new int[]{18682,18683,18678}));
 		_spawns.put(64, new ESSpawn(64, GraciaSeeds.DESTRUCTION, new Location(-243624,209832,-12640), new int[]{18682,18683,18678}));
 		_spawns.put(65, new ESSpawn(65, GraciaSeeds.DESTRUCTION, new Location(-241976,209832,-12640), new int[]{18682,18683,18678}));
 		_spawns.put(66, new ESSpawn(66, GraciaSeeds.DESTRUCTION, new Location(-241976,210920,-12640), new int[]{18682,18683,18678}));
-
+		
 		_spawns.put(67, new ESSpawn(67, GraciaSeeds.DESTRUCTION, new Location(-241976,209192,-12640), new int[]{18679,18680}));
 		_spawns.put(68, new ESSpawn(68, GraciaSeeds.DESTRUCTION, new Location(-241976,208664,-12640), new int[]{18679,18680}));
 		_spawns.put(69, new ESSpawn(69, GraciaSeeds.DESTRUCTION, new Location(-243624,208664,-12640), new int[]{18679,18680}));
 		_spawns.put(70, new ESSpawn(70, GraciaSeeds.DESTRUCTION, new Location(-243624,209192,-12640), new int[]{18679,18680}));
-
+		
 		_spawns.put(71, new ESSpawn(71, GraciaSeeds.DESTRUCTION, new Location(-241256,208664,-12896), new int[]{18681,18682,18683}));
 		_spawns.put(72, new ESSpawn(72, GraciaSeeds.DESTRUCTION, new Location(-240168,208648,-12896), new int[]{18681,18682,18683}));
 		_spawns.put(73, new ESSpawn(73, GraciaSeeds.DESTRUCTION, new Location(-240168,207000,-12896), new int[]{18681,18682,18683}));
 		_spawns.put(74, new ESSpawn(74, GraciaSeeds.DESTRUCTION, new Location(-241256,207000,-12896), new int[]{18681,18682,18683}));
-
+		
 		_spawns.put(75, new ESSpawn(75, GraciaSeeds.DESTRUCTION, new Location(-239528,208648,-12896), new int[]{18678,18679}));
 		_spawns.put(76, new ESSpawn(76, GraciaSeeds.DESTRUCTION, new Location(-238984,208664,-12896), new int[]{18678,18679}));
 		_spawns.put(77, new ESSpawn(77, GraciaSeeds.DESTRUCTION, new Location(-239000,207000,-12896), new int[]{18678,18679}));
 		_spawns.put(78, new ESSpawn(78, GraciaSeeds.DESTRUCTION, new Location(-239512,207000,-12896), new int[]{18678,18679}));
-
+		
 		_spawns.put(79, new ESSpawn(79, GraciaSeeds.DESTRUCTION, new Location(-245064,213144,-12384), new int[]{18680,18681,18682}));
 		_spawns.put(80, new ESSpawn(80, GraciaSeeds.DESTRUCTION, new Location(-245064,212072,-12384), new int[]{18680,18681,18682}));
 		_spawns.put(81, new ESSpawn(81, GraciaSeeds.DESTRUCTION, new Location(-246696,212072,-12384), new int[]{18680,18681,18682}));
 		_spawns.put(82, new ESSpawn(82, GraciaSeeds.DESTRUCTION, new Location(-246696,213160,-12384), new int[]{18680,18681,18682}));
-
+		
 		_spawns.put(83, new ESSpawn(83, GraciaSeeds.DESTRUCTION, new Location(-245064,211416,-12384), new int[]{18683,18678}));
 		_spawns.put(84, new ESSpawn(84, GraciaSeeds.DESTRUCTION, new Location(-245048,210904,-12384), new int[]{18683,18678}));
 		_spawns.put(85, new ESSpawn(85, GraciaSeeds.DESTRUCTION, new Location(-246712,210888,-12384), new int[]{18683,18678}));
 		_spawns.put(86, new ESSpawn(86, GraciaSeeds.DESTRUCTION, new Location(-246712,211416,-12384), new int[]{18683,18678}));
-
+		
 		_spawns.put(87, new ESSpawn(87, GraciaSeeds.DESTRUCTION, new Location(-245048,209544,-12512), new int[]{18679,18680,18681}));
 		_spawns.put(88, new ESSpawn(88, GraciaSeeds.DESTRUCTION, new Location(-245064,208456,-12512), new int[]{18679,18680,18681}));
 		_spawns.put(89, new ESSpawn(89, GraciaSeeds.DESTRUCTION, new Location(-246696,208456,-12512), new int[]{18679,18680,18681}));
 		_spawns.put(90, new ESSpawn(90, GraciaSeeds.DESTRUCTION, new Location(-246712,209544,-12512), new int[]{18679,18680,18681}));
-
+		
 		_spawns.put(91, new ESSpawn(91, GraciaSeeds.DESTRUCTION, new Location(-245048,207816,-12512), new int[]{18682,18683}));
 		_spawns.put(92, new ESSpawn(92, GraciaSeeds.DESTRUCTION, new Location(-245048,207288,-12512), new int[]{18682,18683}));
 		_spawns.put(93, new ESSpawn(93, GraciaSeeds.DESTRUCTION, new Location(-246696,207304,-12512), new int[]{18682,18683}));
 		_spawns.put(94, new ESSpawn(94, GraciaSeeds.DESTRUCTION, new Location(-246712,207816,-12512), new int[]{18682,18683}));
-
+		
 		_spawns.put(95, new ESSpawn(95, GraciaSeeds.DESTRUCTION, new Location(-244328,207272,-12768), new int[]{18678,18679,18680}));
 		_spawns.put(96, new ESSpawn(96, GraciaSeeds.DESTRUCTION, new Location(-243256,207256,-12768), new int[]{18678,18679,18680}));
 		_spawns.put(97, new ESSpawn(97, GraciaSeeds.DESTRUCTION, new Location(-243256,205624,-12768), new int[]{18678,18679,18680}));
 		_spawns.put(98, new ESSpawn(98, GraciaSeeds.DESTRUCTION, new Location(-244328,205608,-12768), new int[]{18678,18679,18680}));
-
+		
 		_spawns.put(99, new ESSpawn(99, GraciaSeeds.DESTRUCTION, new Location(-242616,207272,-12768), new int[]{18681,18682}));
 		_spawns.put(100, new ESSpawn(100, GraciaSeeds.DESTRUCTION, new Location(-242104,207272,-12768), new int[]{18681,18682}));
 		_spawns.put(101, new ESSpawn(101, GraciaSeeds.DESTRUCTION, new Location(-242088,205624,-12768), new int[]{18681,18682}));
@@ -646,7 +624,7 @@ public class EnergySeeds extends AbstractNpcAI
 		_spawns.put(154, new ESSpawn(154, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-174975,177172,-10216), new int[]{ 18678, 18679, 18680, 18681, 18682, 18683 }));
 		_spawns.put(155, new ESSpawn(155, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-176019,178242,-10352), new int[]{ 18678, 18679, 18680, 18681, 18682, 18683 }));
 		_spawns.put(156, new ESSpawn(156, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-174801,178456,-10264), new int[]{ 18678, 18679, 18680, 18681, 18682, 18683 }));
-
+		
 		_spawns.put(157, new ESSpawn(157, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185648,183384,-15680), new int[]{ 18678, 18679, 18680, 18681, 18682, 18683 }));
 		_spawns.put(158, new ESSpawn(158, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186740,180908,-15528), new int[]{ 18678, 18679, 18680, 18681, 18682, 18683 }));
 		_spawns.put(159, new ESSpawn(159, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185297,184658,-15680), new int[]{ 18678, 18679, 18680, 18681, 18682, 18683 }));
@@ -713,7 +691,7 @@ public class EnergySeeds extends AbstractNpcAI
 		_spawns.put(220, new ESSpawn(220, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174240,182391,-15688), new int[]{ 18678, 18679, 18680, 18681, 18682, 18683 }));
 		_spawns.put(221, new ESSpawn(221, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174105,182806,-15672), new int[]{ 18678, 18679, 18680, 18681, 18682, 18683 }));
 		_spawns.put(222, new ESSpawn(222, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174645,182806,-15712), new int[]{ 18678, 18679, 18680, 18681, 18682, 18683 }));
-
+		
 		_spawns.put(223, new ESSpawn(223, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214962,182403,-10992), new int[]{ 18678, 18679, 18680, 18681, 18682, 18683 }));
 		_spawns.put(224, new ESSpawn(224, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-215019,182493,-11000), new int[]{ 18678, 18679, 18680, 18681, 18682, 18683 }));
 		_spawns.put(225, new ESSpawn(225, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-211374,180793,-11672), new int[]{ 18678, 18679, 18680, 18681, 18682, 18683 }));
@@ -830,8 +808,19 @@ public class EnergySeeds extends AbstractNpcAI
 		}
 	}
 	
+	private EnergySeeds()
+	{
+		super(EnergySeeds.class.getSimpleName(), "instances");
+		registerMobs(SEED_IDS);
+		addFirstTalkId(SEED_IDS);
+		addFirstTalkId(TEMPORARY_TELEPORTER);
+		addEnterZoneId(SOD_ZONE);
+		addSpawnsToList();
+		startAI();
+	}
+	
 	public static void main(String[] args)
 	{
-		new EnergySeeds(EnergySeeds.class.getSimpleName(), "instances");
+		new EnergySeeds();
 	}
 }

+ 3 - 3
L2J_DataPack_BETA/dist/game/data/scripts/ai/individual/Lindvior.java

@@ -54,9 +54,9 @@ public class Lindvior extends AbstractNpcAI
 	private L2Npc _tomaris = null;
 	private L2Npc _artius = null;
 	
-	private Lindvior(String name, String descr)
+	private Lindvior()
 	{
-		super(name, descr);
+		super(Lindvior.class.getSimpleName(), "ai/individual/");
 		scheduleNextLindviorVisit();
 	}
 	
@@ -146,6 +146,6 @@ public class Lindvior extends AbstractNpcAI
 	
 	public static void main(String[] args)
 	{
-		new Lindvior(Lindvior.class.getSimpleName(), "ai/individual");
+		new Lindvior();
 	}
 }

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/AbstractNpcAI.java

@@ -55,7 +55,7 @@ public abstract class AbstractNpcAI extends L2Script
 	}
 	
 	/**
-	 * Registers the fallowing events to the current script:<br>
+	 * Registers the following events to the current script:<br>
 	 * <ul>
 	 * <li>ON_ATTACK</li>
 	 * <li>ON_KILL</li>

+ 10 - 8
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortuneTelling/FortuneTelling.java

@@ -27,18 +27,20 @@ import com.l2jserver.gameserver.model.itemcontainer.PcInventory;
 /**
  * Fortune Telling AI.<br>
  * Original Jython script by Kerberos.
- * @authors Nyaran
+ * @author Nyaran
  */
 public class FortuneTelling extends AbstractNpcAI
 {
-	private static final int NPC_ID = 32616;
+	// NPC
+	private static final int MINE = 32616;
+	// Misc
 	private static final int COST = 1000;
 	
-	public FortuneTelling(String name, String descr)
+	public FortuneTelling()
 	{
-		super(name, descr);
-		addStartNpc(NPC_ID);
-		addTalkId(NPC_ID);
+		super(FortuneTelling.class.getSimpleName(), "ai/npc/");
+		addStartNpc(MINE);
+		addTalkId(MINE);
 	}
 	
 	@Override
@@ -52,13 +54,13 @@ public class FortuneTelling extends AbstractNpcAI
 		else
 		{
 			takeItems(player, PcInventory.ADENA_ID, COST);
-			htmltext = getHtm(player.getHtmlPrefix(), "fortune.htm").replace("%fortune%", "<fstring>" + (1800309 + getRandom(386)) + "</fstring>");
+			htmltext = getHtm(player.getHtmlPrefix(), "fortune.htm").replace("%fortune%", String.valueOf(getRandom(1800309, 1800695)));
 		}
 		return htmltext;
 	}
 	
 	public static void main(String args[])
 	{
-		new FortuneTelling(FortuneTelling.class.getSimpleName(), "ai/npc");
+		new FortuneTelling();
 	}
 }

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortuneTelling/fortune.htm

@@ -1,6 +1,6 @@
 <html><body>Fortune-Teller Mine:<br>
 I see an image approaching before you... It is difficult to put what I saw into words.<br>
 How can I say this? Okay, listen closely:<br>
-<center>%fortune%</center><br><br>
+<center><fstring>%fortune%</fstring></center><br><br>
 Take these words to heart. You should seriously consider the meaning...
 </body></html>

+ 3 - 1
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/PriestOfBlessing/32783-1.htm

@@ -1,4 +1,6 @@
 <html><body>
 Nevit's Voice is item which gives you 10 recommendation points in addition to 10 recommendations that you can use on other players.<br> 
-The waiting time for donation starts at the last time you donated.<br>In addition, this waiting time is shared by all characters on an account, meaning that if you donate with one of your characters, all of your characters will have to wait 20 hours before donating again.<br> However, once you've obtained the item, there is no waiting time between use and you may use as many of them as you wish at the same time.
+The waiting time for donation starts at the last time you donated.<br>
+In addition, this waiting time is shared by all characters on an account, meaning that if you donate with one of your characters, all of your characters will have to wait 20 hours before donating again.<br>
+However, once you've obtained the item, there is no waiting time between use and you may use as many of them as you wish at the same time.
 </body></html>

+ 5 - 5
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/PriestOfBlessing/32783.htm

@@ -1,9 +1,9 @@
 <html><body>Priest of Blessing:<br>
-The Einhasad Temple is currently accepting donations for the needy and helpless. Those who donate will receive a small token of appreciation, allowing them to remain blessed by Nevit. Remember, true love is shown in giving, not receiving! <br> 
-Your soul is as beautiful as your appearance. We have also prepared Nevit's Voice in a form called Nevit's Hourglass, which will last a fair while. I'd give them all to you but we have to share them amongst all who donate to the temple. Let me know how much Adena you wish to donate. And may the blessing of the gods be with you always.<br> 
-Remember, choose carefully because you won't be able to donate again for 20 hours. <br><br> 
-<a action="bypass -h Quest PriestOfBlessing buy_voice">Donate 100,000 Adena.<br>(Nevit's Voice)</a><br> 
+The Einhasad Temple is currently accepting donations for the needy and helpless. Those who donate will receive a small token of appreciation, allowing them to remain blessed by Nevit. Remember, true love is shown in giving, not receiving!<br> 
+Your soul is as beautiful as your appearance. We have also prepared Nevit's Voice in a form called Nevit's Hourglass, which will last a fair while. I'd give them all to you but we have to share them amongst all who donate to the temple. Let me know how much Adena you wish to donate. And may the blessing of the gods be with you always.<br>
+Remember, choose carefully because you won't be able to donate again for 20 hours.<br><br>
+<a action="bypass -h Quest PriestOfBlessing buy_voice">Donate 100,000 Adena.<br>(Nevit's Voice)</a><br>
 <a action="bypass -h Quest PriestOfBlessing buy_hourglass">Donate %donate% Adena.<br>(Nevit's Hourglass for 60~85 levels)</a><br> 
-<a action="bypass -h Quest PriestOfBlessing 32783-1.htm">Ask about Nevit's Voice.</a><br> 
+<a action="bypass -h Quest PriestOfBlessing 32783-1.htm">Ask about Nevit's Voice.</a><br>
 <a action="bypass -h Quest PriestOfBlessing 32783-2.htm">Ask about Nevit's Hourglass.</a>
 </body></html>

+ 26 - 29
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/PriestOfBlessing/PriestOfBlessing.java

@@ -25,7 +25,6 @@ import com.l2jserver.gameserver.model.actor.L2Npc;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.model.itemcontainer.PcInventory;
 import com.l2jserver.gameserver.network.SystemMessageId;
-import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
 import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
 import com.l2jserver.gameserver.util.Util;
 
@@ -35,23 +34,12 @@ import com.l2jserver.gameserver.util.Util;
  */
 public class PriestOfBlessing extends AbstractNpcAI
 {
-	// Spawn state
-	private static boolean SPAWNED = false;
 	// NPC
 	private static final int PRIEST = 32783;
-	// Prices
-	private static final int PRICE_VOICE = 100000;
+	// Spawn state
+	private static boolean SPAWNED = false;
+	// Items
 	private static final int NEVIT_VOICE = 17094;
-	private static final int[] PRIEVE_HOURGLASS =
-	{
-		4000,
-		30000,
-		110000,
-		310000,
-		970000,
-		2160000,
-		5000000
-	};
 	// @formatter:off
 	private static final int[][] HOURGLASSES =
 	{
@@ -64,7 +52,19 @@ public class PriestOfBlessing extends AbstractNpcAI
 		{ 17125, 17126, 17127, 17128, 17129 }
 	};
 	// @formatter:on
-	// Spawns
+	// Prices
+	private static final int PRICE_VOICE = 100000;
+	private static final int[] PRICE_HOURGLASS =
+	{
+		4000,
+		30000,
+		110000,
+		310000,
+		970000,
+		2160000,
+		5000000
+	};
+	// Locations
 	private static final Location[] SPAWNS =
 	{
 		new Location(-84139, 243145, -3704, 8473),
@@ -86,13 +86,13 @@ public class PriestOfBlessing extends AbstractNpcAI
 		new Location(116972, 77255, -2688, 41951)
 	};
 	
-	public PriestOfBlessing(String name, String descr)
+	public PriestOfBlessing()
 	{
-		super(name, descr);
-		
+		super(PriestOfBlessing.class.getSimpleName(), "ai/npc/");
 		addStartNpc(PRIEST);
 		addFirstTalkId(PRIEST);
 		addTalkId(PRIEST);
+		
 		if (!SPAWNED)
 		{
 			for (Location spawn : SPAWNS)
@@ -117,7 +117,7 @@ public class PriestOfBlessing extends AbstractNpcAI
 				if (System.currentTimeMillis() > _reuse_time)
 				{
 					takeItems(player, PcInventory.ADENA_ID, PRICE_VOICE);
-					giveItems(player, NEVIT_VOICE, 1, -1);
+					giveItems(player, NEVIT_VOICE, 1);
 					saveGlobalQuestVar(player.getAccountName() + "_voice", Long.toString(System.currentTimeMillis() + (20 * 3600000)));
 				}
 				else
@@ -138,7 +138,7 @@ public class PriestOfBlessing extends AbstractNpcAI
 		else if (event.equalsIgnoreCase("buy_hourglass"))
 		{
 			int _index = getHGIndex(player.getLevel());
-			int _price_hourglass = PRIEVE_HOURGLASS[_index];
+			int _price_hourglass = PRICE_HOURGLASS[_index];
 			
 			if (player.getAdena() >= _price_hourglass)
 			{
@@ -150,7 +150,7 @@ public class PriestOfBlessing extends AbstractNpcAI
 					int[] _hg = HOURGLASSES[_index];
 					int _nevit_hourglass = _hg[getRandom(0, _hg.length - 1)];
 					takeItems(player, PcInventory.ADENA_ID, _price_hourglass);
-					giveItems(player, _nevit_hourglass, 1, -1);
+					giveItems(player, _nevit_hourglass, 1);
 					saveGlobalQuestVar(player.getAccountName() + "_hg_" + _index, Long.toString(System.currentTimeMillis() + (20 * 3600000)));
 				}
 				else
@@ -174,12 +174,9 @@ public class PriestOfBlessing extends AbstractNpcAI
 	@Override
 	public String onFirstTalk(L2Npc npc, L2PcInstance player)
 	{
-		final NpcHtmlMessage html = new NpcHtmlMessage(0);
-		final String content = getHtm(player.getHtmlPrefix(), "32783.htm");
-		html.setHtml(content);
-		html.replace("%donate%", Util.formatAdena(PRIEVE_HOURGLASS[getHGIndex(player.getLevel())]));
-		player.sendPacket(html);
-		return null;
+		String content = getHtm(player.getHtmlPrefix(), "32783.htm");
+		content = content.replace("%donate%", Util.formatAdena(PRICE_HOURGLASS[getHGIndex(player.getLevel())]));
+		return content;
 	}
 	
 	private int getHGIndex(int lvl)
@@ -218,6 +215,6 @@ public class PriestOfBlessing extends AbstractNpcAI
 	
 	public static void main(String[] args)
 	{
-		new PriestOfBlessing(PriestOfBlessing.class.getSimpleName(), "ai/npc/");
+		new PriestOfBlessing();
 	}
 }

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Rafforty/Rafforty.java

@@ -24,14 +24,13 @@ import com.l2jserver.gameserver.model.actor.L2Npc;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 
 /**
- * Rafforty AI
+ * Rafforty AI.
  * @author malyelfik, Gladicek
  */
 public class Rafforty extends AbstractNpcAI
 {
-	// NPC ID
+	// NPC
 	private static final int RAFFORTY = 32020;
-	
 	// Items
 	private static final int NECKLACE = 16025;
 	private static final int BLESSED_NECKLACE = 16026;

+ 3 - 3
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/ElrokiTeleporters/ElrokiTeleporters.java

@@ -57,15 +57,15 @@ public class ElrokiTeleporters extends AbstractNpcAI
 		return super.onTalk(npc, player);
 	}
 	
-	private ElrokiTeleporters(String name, String descr)
+	private ElrokiTeleporters()
 	{
-		super(name, descr);
+		super(ElrokiTeleporters.class.getSimpleName(), "ai/npc/Teleports/");
 		addStartNpc(ORAHOCHIN, GARIACHIN);
 		addTalkId(ORAHOCHIN, GARIACHIN);
 	}
 	
 	public static void main(String[] args)
 	{
-		new ElrokiTeleporters(ElrokiTeleporters.class.getSimpleName(), "ai/npc/Teleports/");
+		new ElrokiTeleporters();
 	}
 }

+ 3 - 3
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/GatekeeperSpirit/GatekeeperSpirit.java

@@ -37,9 +37,9 @@ public class GatekeeperSpirit extends AbstractNpcAI
 	private final static int LILITH = 25283;
 	private final static int ANAKIM = 25286;
 	
-	private GatekeeperSpirit(String name, String descr)
+	private GatekeeperSpirit()
 	{
-		super(name, descr);
+		super(GatekeeperSpirit.class.getSimpleName(), "ai/npc/Teleports/");
 		addStartNpc(GATEKEEPER_SPIRIT_ENTER);
 		addFirstTalkId(GATEKEEPER_SPIRIT_ENTER);
 		addTalkId(GATEKEEPER_SPIRIT_ENTER);
@@ -102,6 +102,6 @@ public class GatekeeperSpirit extends AbstractNpcAI
 	
 	public static void main(String[] args)
 	{
-		new GatekeeperSpirit(GatekeeperSpirit.class.getSimpleName(), "ai/npc/Teleports/");
+		new GatekeeperSpirit();
 	}
 }

+ 9 - 35
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/HuntingGroundsTeleport/HuntingGroundsTeleport.java

@@ -32,50 +32,24 @@ import com.l2jserver.gameserver.util.Util;
 public class HuntingGroundsTeleport extends AbstractNpcAI
 {
 	// NPCs
+	// @formatter:off
 	private final static int[] PRIESTS =
 	{
-		31078,
-		31079,
-		31080,
-		31081,
-		31082,
-		31083,
-		31084,
-		31085,
-		31086,
-		31087,
-		31088,
-		31089,
-		31090,
-		31091,
-		31168,
-		31169,
-		31692,
-		31693,
-		31694,
-		31695,
-		31997,
-		31998
+		31078, 31079, 31080, 31081, 31082, 31083, 31084, 31085, 31086, 31087,
+		31088, 31089, 31090, 31091, 31168, 31169, 31692, 31693, 31694, 31695,
+		31997, 31998
 	};
 	
 	private static final int[] DAWN_NPCS =
 	{
-		31078,
-		31079,
-		31080,
-		31081,
-		31082,
-		31083,
-		31084,
-		31168,
-		31692,
-		31694,
+		31078, 31079, 31080, 31081, 31082, 31083, 31084, 31168, 31692, 31694,
 		31997
 	};
+	// @formatter:on
 	
-	private HuntingGroundsTeleport(String name, String descr)
+	private HuntingGroundsTeleport()
 	{
-		super(name, descr);
+		super(HuntingGroundsTeleport.class.getSimpleName(), "ai/npc/Teleports/");
 		addStartNpc(PRIESTS);
 		addTalkId(PRIESTS);
 	}
@@ -171,6 +145,6 @@ public class HuntingGroundsTeleport extends AbstractNpcAI
 	
 	public static void main(String[] args)
 	{
-		new HuntingGroundsTeleport(HuntingGroundsTeleport.class.getSimpleName(), "ai/npc/Teleports/");
+		new HuntingGroundsTeleport();
 	}
 }

+ 9 - 7
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/MithrilMines/MithrilMines.java

@@ -30,6 +30,8 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  */
 public class MithrilMines extends AbstractNpcAI
 {
+	// NPC
+	private final static int TELEPORT_CRYSTAL = 32652;
 	// Location
 	private static final Location[] LOCS =
 	{
@@ -40,12 +42,10 @@ public class MithrilMines extends AbstractNpcAI
 		new Location(178591, -184615, 360),
 		new Location(175499, -181586, -904)
 	};
-	// NPC
-	private final static int TELEPORT_CRYSTAL = 32652;
 	
-	private MithrilMines(String name, String descr)
+	private MithrilMines()
 	{
-		super(name, descr);
+		super(MithrilMines.class.getSimpleName(), "ai/npc/Teleports/");
 		addStartNpc(TELEPORT_CRYSTAL);
 		addFirstTalkId(TELEPORT_CRYSTAL);
 		addTalkId(TELEPORT_CRYSTAL);
@@ -70,11 +70,13 @@ public class MithrilMines extends AbstractNpcAI
 		{
 			return "32652-01.htm";
 		}
-		else if (npc.isInsideRadius(181941, -174614, L2Npc.INTERACTION_DISTANCE, true))
+		
+		if (npc.isInsideRadius(181941, -174614, L2Npc.INTERACTION_DISTANCE, true))
 		{
 			return "32652-02.htm";
 		}
-		else if (npc.isInsideRadius(179560, -182956, L2Npc.INTERACTION_DISTANCE, true))
+		
+		if (npc.isInsideRadius(179560, -182956, L2Npc.INTERACTION_DISTANCE, true))
 		{
 			return "32652-03.htm";
 		}
@@ -83,6 +85,6 @@ public class MithrilMines extends AbstractNpcAI
 	
 	public static void main(String[] args)
 	{
-		new MithrilMines(MithrilMines.class.getSimpleName(), "ai/npc/Teleports/");
+		new MithrilMines();
 	}
 }

+ 36 - 32
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/PaganTeleporters/PaganTeleporters.java

@@ -20,7 +20,6 @@ package ai.npc.Teleports.PaganTeleporters;
 
 import ai.npc.AbstractNpcAI;
 
-import com.l2jserver.gameserver.datatables.DoorTable;
 import com.l2jserver.gameserver.model.actor.L2Npc;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 
@@ -34,17 +33,12 @@ public class PaganTeleporters extends AbstractNpcAI
 	// NPCs
 	private static final int TRIOLS_MIRROR_1 = 32039;
 	private static final int TRIOLS_MIRROR_2 = 32040;
-	
+	// @formatter:off
 	private static final int[] NPCS =
 	{
-		32034,
-		32035,
-		32036,
-		32037,
-		32039,
-		32040
+		32034, 32035, 32036, 32037, 32039, 32040
 	};
-	
+	// @formatter:on
 	// Items
 	private static final int VISITORS_MARK = 8064;
 	private static final int FADED_VISITORS_MARK = 8065;
@@ -53,14 +47,19 @@ public class PaganTeleporters extends AbstractNpcAI
 	@Override
 	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
 	{
-		if (event.equalsIgnoreCase("Close_Door1"))
-		{
-			DoorTable.getInstance().getDoor(19160001).closeMe();
-		}
-		else if (event.equalsIgnoreCase("Close_Door2"))
+		switch (event)
 		{
-			DoorTable.getInstance().getDoor(19160010).closeMe();
-			DoorTable.getInstance().getDoor(19160011).closeMe();
+			case "Close_Door1":
+			{
+				closeDoor(19160001, 0);
+				break;
+			}
+			case "Close_Door2":
+			{
+				closeDoor(19160010, 0);
+				closeDoor(19160011, 0);
+				break;
+			}
 		}
 		return "";
 	}
@@ -68,13 +67,18 @@ public class PaganTeleporters extends AbstractNpcAI
 	@Override
 	public String onFirstTalk(L2Npc npc, L2PcInstance player)
 	{
-		if (npc.getNpcId() == TRIOLS_MIRROR_1)
-		{
-			player.teleToLocation(-12766, -35840, -10856);
-		}
-		else if (npc.getNpcId() == TRIOLS_MIRROR_2)
+		switch (npc.getNpcId())
 		{
-			player.teleToLocation(36640, -51218, 718);
+			case TRIOLS_MIRROR_1:
+			{
+				player.teleToLocation(-12766, -35840, -10856);
+				break;
+			}
+			case TRIOLS_MIRROR_2:
+			{
+				player.teleToLocation(36640, -51218, 718);
+				break;
+			}
 		}
 		return "";
 	}
@@ -86,17 +90,17 @@ public class PaganTeleporters extends AbstractNpcAI
 		{
 			case 32034:
 			{
-				if (!hasQuestItems(player, VISITORS_MARK) && !hasQuestItems(player, FADED_VISITORS_MARK) && !hasQuestItems(player, PAGANS_MARK))
+				if (!hasAtLeastOneQuestItem(player, VISITORS_MARK, FADED_VISITORS_MARK, PAGANS_MARK))
 				{
 					return "noItem.htm";
 				}
-				DoorTable.getInstance().getDoor(19160001).openMe();
+				openDoor(19160001, 0);
 				startQuestTimer("Close_Door1", 10000, null, null);
 				return "FadedMark.htm";
 			}
 			case 32035:
 			{
-				DoorTable.getInstance().getDoor(19160001).openMe();
+				openDoor(19160001, 0);
 				startQuestTimer("Close_Door1", 10000, null, null);
 				return "FadedMark.htm";
 			}
@@ -107,14 +111,14 @@ public class PaganTeleporters extends AbstractNpcAI
 					return "noMark.htm";
 				}
 				startQuestTimer("Close_Door2", 10000, null, null);
-				DoorTable.getInstance().getDoor(19160010).openMe();
-				DoorTable.getInstance().getDoor(19160011).openMe();
+				openDoor(19160010, 0);
+				openDoor(19160011, 0);
 				return "openDoor.htm";
 			}
 			case 32037:
 			{
-				DoorTable.getInstance().getDoor(19160010).openMe();
-				DoorTable.getInstance().getDoor(19160011).openMe();
+				openDoor(19160010, 0);
+				openDoor(19160011, 0);
 				startQuestTimer("Close_Door2", 10000, null, null);
 				return "FadedMark.htm";
 			}
@@ -122,9 +126,9 @@ public class PaganTeleporters extends AbstractNpcAI
 		return super.onTalk(npc, player);
 	}
 	
-	private PaganTeleporters(String name, String descr)
+	private PaganTeleporters()
 	{
-		super(name, descr);
+		super(PaganTeleporters.class.getSimpleName(), "ai/npc/Teleports/");
 		addStartNpc(NPCS);
 		addTalkId(NPCS);
 		addFirstTalkId(TRIOLS_MIRROR_1, TRIOLS_MIRROR_2);
@@ -132,6 +136,6 @@ public class PaganTeleporters extends AbstractNpcAI
 	
 	public static void main(String[] args)
 	{
-		new PaganTeleporters(PaganTeleporters.class.getSimpleName(), "ai/npc/Teleports/");
+		new PaganTeleporters();
 	}
 }

+ 2 - 5
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/SteelCitadelTeleport/32376-02.htm

@@ -1,6 +1,3 @@
-<html><head>
-<body>
-Teleportation Cubic:<br>
+<html><body>Teleportation Cubic:<br>
 The machine is unable to draw on Beleth's energy and so is not functioning properly at this time.
-</body></html>
-
+</body></html>

+ 2 - 5
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/SteelCitadelTeleport/32376-02a.htm

@@ -1,7 +1,4 @@
-<html><head>
-<body>
-Teleportation Cubic:<br>
+<html><body>Teleportation Cubic:<br>
 The machine is not functioning properly at this time. You should gather more companions.<br>
 (A leader who can create a command channel of 36 or more people should initiate the conversation.)
-</body></html>
-
+</body></html>

+ 2 - 5
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/SteelCitadelTeleport/32376-03.htm

@@ -1,6 +1,3 @@
-<html><head>
-<body>
-Teleportation Cubic:<br>
+<html><body>Teleportation Cubic:<br>
 Beleth is already engaged in combat with others.
-</body></html>
-
+</body></html>

+ 10 - 10
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/SteelCitadelTeleport/SteelCitadelTeleport.java

@@ -39,9 +39,9 @@ public class SteelCitadelTeleport extends AbstractNpcAI
 	private static final int BELETH = 29118;
 	private static final int NAIA_CUBE = 32376;
 	
-	private SteelCitadelTeleport(String name, String descr)
+	private SteelCitadelTeleport()
 	{
-		super(name, descr);
+		super(SteelCitadelTeleport.class.getSimpleName(), "ai/npc/Teleports/");
 		addStartNpc(NAIA_CUBE);
 		addTalkId(NAIA_CUBE);
 	}
@@ -49,21 +49,21 @@ public class SteelCitadelTeleport extends AbstractNpcAI
 	@Override
 	public String onTalk(L2Npc npc, L2PcInstance player)
 	{
-		if (GrandBossManager.getInstance().getBossStatus(BELETH) == 3)
+		final int belethStatus = GrandBossManager.getInstance().getBossStatus(BELETH);
+		if (belethStatus == 3)
 		{
 			return "32376-02.htm";
 		}
 		
-		final L2CommandChannel channel = player.getParty() == null ? null : player.getParty().getCommandChannel();
-		
-		if ((channel == null) || (channel.getLeader().getObjectId() != player.getObjectId()) || (channel.getMemberCount() < Config.BELETH_MIN_PLAYERS))
+		if (belethStatus > 0)
 		{
-			return "32376-02a.htm";
+			return "32376-03.htm";
 		}
 		
-		if (GrandBossManager.getInstance().getBossStatus(BELETH) > 0)
+		final L2CommandChannel channel = player.getParty() == null ? null : player.getParty().getCommandChannel();
+		if ((channel == null) || (channel.getLeader().getObjectId() != player.getObjectId()) || (channel.getMemberCount() < Config.BELETH_MIN_PLAYERS))
 		{
-			return "32376-03.htm";
+			return "32376-02a.htm";
 		}
 		
 		final L2BossZone zone = (L2BossZone) ZoneManager.getInstance().getZoneById(12018);
@@ -93,6 +93,6 @@ public class SteelCitadelTeleport extends AbstractNpcAI
 	
 	public static void main(String[] args)
 	{
-		new SteelCitadelTeleport(SteelCitadelTeleport.class.getSimpleName(), "ai/npc/Teleports/");
+		new SteelCitadelTeleport();
 	}
 }

+ 1 - 2
L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminTargetSay.java

@@ -54,8 +54,7 @@ public class AdminTargetSay implements IAdminCommandHandler
 				
 				final String message = command.substring(16);
 				final L2Character target = (L2Character) obj;
-				int type = target.isPlayer() ? Say2.ALL : Say2.NPC_ALL;
-				target.broadcastPacket(new CreatureSay(target.getObjectId(), type, target.getName(), message));
+				target.broadcastPacket(new CreatureSay(target.getObjectId(), (target.isPlayer() ? Say2.ALL : Say2.NPC_ALL), target.getName(), message));
 			}
 			catch (StringIndexOutOfBoundsException e)
 			{

+ 71 - 79
L2J_DataPack_BETA/dist/game/data/scripts/instances/Pailaka/PailakaDevilsLegacy.java

@@ -41,7 +41,6 @@ import com.l2jserver.gameserver.model.skills.L2Skill;
 import com.l2jserver.gameserver.model.zone.L2ZoneType;
 import com.l2jserver.gameserver.network.SystemMessageId;
 import com.l2jserver.gameserver.network.serverpackets.MagicSkillUse;
-import com.l2jserver.util.Rnd;
 
 /**
  * Pailaka (Devil's Isle) instance zone.
@@ -172,7 +171,7 @@ public class PailakaDevilsLegacy extends Quest
 		{ 84808, -208633, -3339, 65039, 60 },
 		{ 84808, -208856, -3339,     0, 60 },
 		{ 85144, -208855, -3341, 33380, 60 },
-		{ 85139, -208630, -3339, 31777, 60 }		
+		{ 85139, -208630, -3339, 31777, 60 }
 	};
 	// @formatter:on
 	
@@ -188,7 +187,7 @@ public class PailakaDevilsLegacy extends Quest
 	
 	private static final void dropHerb(L2Npc mob, L2PcInstance player, int[][] drop)
 	{
-		final int chance = Rnd.get(100);
+		final int chance = getRandom(100);
 		for (int[] element : drop)
 		{
 			if (chance < element[2])
@@ -202,14 +201,14 @@ public class PailakaDevilsLegacy extends Quest
 	private static final void dropItem(L2Npc mob, L2PcInstance player)
 	{
 		final int npcId = mob.getNpcId();
-		final int chance = Rnd.get(100);
+		final int chance = getRandom(100);
 		for (int[] drop : DROPLIST)
 		{
 			if (npcId == drop[0])
 			{
 				if (chance < drop[2])
 				{
-					((L2MonsterInstance) mob).dropItem(player, drop[1], Rnd.get(1, 6));
+					((L2MonsterInstance) mob).dropItem(player, drop[1], getRandom(1, 6));
 					return;
 				}
 			}
@@ -270,7 +269,7 @@ public class PailakaDevilsLegacy extends Quest
 				npc.setTarget(_lematanNpc);
 				npc.doCast(energy_skill);
 			}
-			startQuestTimer("follower_cast", 2000 + Rnd.get(100, 1000), npc, null);
+			startQuestTimer("follower_cast", 2000 + getRandom(100, 1000), npc, null);
 			return null;
 		}
 		else if ((npc.getNpcId() == POWDER_KEG) && event.equalsIgnoreCase("keg_trigger"))
@@ -289,7 +288,7 @@ public class PailakaDevilsLegacy extends Quest
 			enterInstance(player);
 			if (st.isCond(1))
 			{
-				st.setCond(2);
+				st.setCond(2, true);
 				return "32498-07.htm";
 			}
 			return "32498-09.htm";
@@ -305,13 +304,12 @@ public class PailakaDevilsLegacy extends Quest
 		{
 			if (st.isCond(2))
 			{
-				st.giveItems(SWORD, 1);
+				giveItems(player, SWORD, 1);
 				st.setCond(3, true);
 			}
 		}
 		else if (event.equalsIgnoreCase("32510-02.htm"))
 		{
-			st.unset("cond");
 			st.exitQuest(false, true);
 			
 			Instance inst = InstanceManager.getInstance().getInstance(npc.getInstanceId());
@@ -324,7 +322,7 @@ public class PailakaDevilsLegacy extends Quest
 				st.addExpAndSp(810000, 50000);
 				for (int id : REWARDS)
 				{
-					st.giveItems(id, 1);
+					giveItems(player, id, 1);
 				}
 			}
 		}
@@ -378,11 +376,11 @@ public class PailakaDevilsLegacy extends Quest
 	public final String onFirstTalk(L2Npc npc, L2PcInstance player)
 	{
 		final QuestState st = player.getQuestState(qn);
-		if ((st != null) && (npc.getNpcId() == ADVENTURER2) && st.isCompleted())
+		if ((npc.getNpcId() != ADVENTURER2) || (st == null) || !st.isCompleted())
 		{
-			return "32511-03.htm";
+			return npc.getNpcId() + ".htm";
 		}
-		return npc.getNpcId() + ".htm";
+		return "32511-03.htm";
 	}
 	
 	@Override
@@ -429,42 +427,40 @@ public class PailakaDevilsLegacy extends Quest
 			case ADVENTURER1:
 				if (!player.hasSummon())
 				{
-					if (st.hasQuestItems(SWORD))
+					if (hasQuestItems(player, SWORD))
 					{
-						if (st.getQuestItemsCount(SCROLL_1) > 0)
+						if (hasQuestItems(player, SCROLL_1))
 						{
-							st.takeItems(SWORD, -1);
-							st.takeItems(SCROLL_1, -1);
-							st.giveItems(ENH_SWORD1, 1);
+							takeItems(player, SWORD, -1);
+							takeItems(player, SCROLL_1, -1);
+							giveItems(player, ENH_SWORD1, 1);
 							return "32508-03.htm";
 						}
 						return "32508-02.htm";
 					}
-					else if (st.getQuestItemsCount(ENH_SWORD1) > 0)
+					
+					if (hasQuestItems(player, ENH_SWORD1))
 					{
-						if (st.getQuestItemsCount(SCROLL_2) > 0)
+						if (hasQuestItems(player, SCROLL_2))
 						{
-							st.takeItems(ENH_SWORD1, -1);
-							st.takeItems(SCROLL_2, -1);
-							st.giveItems(ENH_SWORD2, 1);
+							takeItems(player, ENH_SWORD1, -1);
+							takeItems(player, SCROLL_2, -1);
+							giveItems(player, ENH_SWORD2, 1);
 							return "32508-05.htm";
 						}
 						return "32508-04.htm";
 					}
-					else if (st.getQuestItemsCount(ENH_SWORD2) > 0)
+					
+					if (hasQuestItems(player, ENH_SWORD2))
 					{
 						return "32508-06.htm";
 					}
-					else
-					{
-						return "32508-00.htm";
-					}
+					return "32508-00.htm";
 				}
 				return "32508-07.htm";
 			case ADVENTURER2:
 				if (!player.hasSummon())
 				{
-					st.unset("cond");
 					st.exitQuest(false, true);
 					
 					Instance inst = InstanceManager.getInstance().getInstance(npc.getInstanceId());
@@ -474,10 +470,10 @@ public class PailakaDevilsLegacy extends Quest
 					if (inst.containsPlayer(player.getObjectId()))
 					{
 						player.setVitalityPoints(20000, true);
-						st.addExpAndSp(10800000, 950000);
+						addExpAndSp(player, 10800000, 950000);
 						for (int id : REWARDS)
 						{
-							st.giveItems(id, 1);
+							giveItems(player, id, 1);
 						}
 					}
 					return "32511-01.htm";
@@ -498,7 +494,7 @@ public class PailakaDevilsLegacy extends Quest
 			{
 				for (L2Character target : npc.getKnownList().getKnownCharactersInRadius(900))
 				{
-					target.reduceCurrentHp(500 + Rnd.get(0, 200), npc, boom_skill);
+					target.reduceCurrentHp(500 + getRandom(0, 200), npc, boom_skill);
 					
 					if (target instanceof L2MonsterInstance)
 					{
@@ -542,49 +538,47 @@ public class PailakaDevilsLegacy extends Quest
 	public final String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
 	{
 		QuestState st = player.getQuestState(qn);
-		if ((st == null) || (st.getState() != State.STARTED))
-		{
-			return null;
-		}
-		
-		switch (npc.getNpcId())
+		if ((st != null) && st.isStarted())
 		{
-			case KAMS:
-				if (st.hasQuestItems(SWORD))
-				{
-					st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
-					st.giveItems(SCROLL_1, 1);
-				}
-				break;
-			case ALKASO:
-				if (st.hasQuestItems(ENH_SWORD1))
-				{
-					st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
-					st.giveItems(SCROLL_2, 1);
-				}
-				break;
-			case LEMATAN:
-				if ((_followerslist != null) && !_followerslist.isEmpty())
-				{
-					for (L2Npc _follower : _followerslist)
+			switch (npc.getNpcId())
+			{
+				case KAMS:
+					if (hasQuestItems(player, SWORD))
 					{
-						_follower.deleteMe();
+						giveItems(player, SCROLL_1, 1);
+						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
 					}
-					_followerslist.clear();
-				}
-				st.setCond(4, true);
-				addSpawn(ADVENTURER2, 84983, -208736, -3336, 49915, false, 0, false, npc.getInstanceId());
-				break;
-			case POWDER_KEG:
-			case TREASURE_BOX:
-			case FOLLOWERS:
-				// do nothing
-				break;
-			default:
-				// hardcoded herb drops
-				dropHerb(npc, player, HP_HERBS_DROPLIST);
-				dropHerb(npc, player, MP_HERBS_DROPLIST);
-				break;
+					break;
+				case ALKASO:
+					if (hasQuestItems(player, ENH_SWORD1))
+					{
+						giveItems(player, SCROLL_2, 1);
+						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+					}
+					break;
+				case LEMATAN:
+					if ((_followerslist != null) && !_followerslist.isEmpty())
+					{
+						for (L2Npc _follower : _followerslist)
+						{
+							_follower.deleteMe();
+						}
+						_followerslist.clear();
+					}
+					st.setCond(4, true);
+					addSpawn(ADVENTURER2, 84983, -208736, -3336, 49915, false, 0, false, npc.getInstanceId());
+					break;
+				case POWDER_KEG:
+				case TREASURE_BOX:
+				case FOLLOWERS:
+					// do nothing
+					break;
+				default:
+					// hardcoded herb drops
+					dropHerb(npc, player, HP_HERBS_DROPLIST);
+					dropHerb(npc, player, MP_HERBS_DROPLIST);
+					break;
+			}
 		}
 		return super.onKill(npc, player, isPet);
 	}
@@ -592,7 +586,7 @@ public class PailakaDevilsLegacy extends Quest
 	@Override
 	public final String onSpawn(L2Npc npc)
 	{
-		startQuestTimer("follower_cast", 1000 + Rnd.get(100, 1000), npc, null);
+		startQuestTimer("follower_cast", 1000 + getRandom(100, 1000), npc, null);
 		npc.disableCoreAI(true);
 		return null;
 	}
@@ -636,18 +630,16 @@ public class PailakaDevilsLegacy extends Quest
 		}
 	}
 	
-	public PailakaDevilsLegacy(int questId, String name, String descr)
+	public PailakaDevilsLegacy()
 	{
-		super(questId, name, descr);
+		super(129, qn, "Pailaka - Devil's Legacy");
 		addStartNpc(SURVIVOR);
 		for (int npcId : NPCS)
 		{
 			addFirstTalkId(npcId);
 			addTalkId(npcId);
 		}
-		addAttackId(TREASURE_BOX);
-		addAttackId(POWDER_KEG);
-		addAttackId(LEMATAN);
+		addAttackId(TREASURE_BOX, POWDER_KEG, LEMATAN);
 		addKillId(MONSTERS);
 		addEnterZoneId(ZONE);
 		addSpawnId(FOLLOWERS);
@@ -656,6 +648,6 @@ public class PailakaDevilsLegacy extends Quest
 	
 	public static void main(String[] args)
 	{
-		new PailakaDevilsLegacy(129, qn, "Pailaka - Devil's Legacy");
+		new PailakaDevilsLegacy();
 	}
 }

+ 126 - 138
L2J_DataPack_BETA/dist/game/data/scripts/instances/Pailaka/PailakaSongOfIceAndFire.java

@@ -277,71 +277,64 @@ public class PailakaSongOfIceAndFire extends Quest
 			return getNoQuestMsg(player);
 		}
 		
-		if (event.equalsIgnoreCase("enter"))
+		switch (event)
 		{
-			enterInstance(player);
-			return null;
-		}
-		else if (event.equalsIgnoreCase("32497-03.htm"))
-		{
-			if (st.isCond(0))
-			{
-				st.startQuest();
-			}
-		}
-		else if (event.equalsIgnoreCase("32500-06.htm"))
-		{
-			if (st.isCond(1))
-			{
-				st.setCond(2);
-				st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
-				st.giveItems(SWORD, 1);
-				st.giveItems(BOOK1, 1);
-			}
-		}
-		else if (event.equalsIgnoreCase("32507-04.htm"))
-		{
-			if (st.isCond(3))
-			{
-				st.setCond(4, true);
-				st.takeItems(SWORD, -1);
-				st.takeItems(WATER_ESSENCE, -1);
-				st.takeItems(BOOK2, -1);
-				st.giveItems(BOOK3, 1);
-				st.giveItems(ENH_SWORD1, 1);
-			}
-		}
-		else if (event.equalsIgnoreCase("32507-08.htm"))
-		{
-			if (st.isCond(6))
-			{
-				st.setCond(7);
-				st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
-				st.takeItems(ENH_SWORD1, -1);
-				st.takeItems(BOOK5, -1);
-				st.takeItems(FIRE_ESSENCE, -1);
-				st.giveItems(ENH_SWORD2, 1);
-				st.giveItems(BOOK6, 1);
-			}
-		}
-		else if (event.equalsIgnoreCase("32510-02.htm"))
-		{
-			st.unset("cond");
-			st.exitQuest(false, true);
-			
-			Instance inst = InstanceManager.getInstance().getInstance(npc.getInstanceId());
-			inst.setDuration(EXIT_TIME * 60000);
-			inst.setEmptyDestroyTime(0);
-			
-			if (inst.containsPlayer(player.getObjectId()))
-			{
-				player.setVitalityPoints(20000, true);
-				st.addExpAndSp(810000, 50000);
-				for (int id : REWARDS)
+			case "enter":
+				enterInstance(player);
+				return null;
+			case "32497-03.htm":
+				if (!st.isStarted())
 				{
-					st.giveItems(id, 1);
+					st.startQuest();
 				}
-			}
+				break;
+			case "32500-06.htm":
+				if (st.isCond(1))
+				{
+					st.setCond(2, true);
+					giveItems(player, SWORD, 1);
+					giveItems(player, BOOK1, 1);
+				}
+				break;
+			case "32507-04.htm":
+				if (st.isCond(3))
+				{
+					st.setCond(4, true);
+					takeItems(player, SWORD, -1);
+					takeItems(player, WATER_ESSENCE, -1);
+					takeItems(player, BOOK2, -1);
+					giveItems(player, BOOK3, 1);
+					giveItems(player, ENH_SWORD1, 1);
+				}
+				break;
+			case "32507-08.htm":
+				if (st.isCond(6))
+				{
+					st.setCond(7, true);
+					takeItems(player, ENH_SWORD1, -1);
+					takeItems(player, BOOK5, -1);
+					takeItems(player, FIRE_ESSENCE, -1);
+					giveItems(player, ENH_SWORD2, 1);
+					giveItems(player, BOOK6, 1);
+				}
+				break;
+			case "32510-02.htm":
+				st.exitQuest(false, true);
+				
+				Instance inst = InstanceManager.getInstance().getInstance(npc.getInstanceId());
+				inst.setDuration(EXIT_TIME * 60000);
+				inst.setEmptyDestroyTime(0);
+				
+				if (inst.containsPlayer(player.getObjectId()))
+				{
+					player.setVitalityPoints(20000, true);
+					addExpAndSp(player, 810000, 50000);
+					for (int id : REWARDS)
+					{
+						giveItems(player, id, 1);
+					}
+				}
+				break;
 		}
 		return event;
 	}
@@ -438,74 +431,73 @@ public class PailakaSongOfIceAndFire extends Quest
 	public final String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
 	{
 		QuestState st = player.getQuestState(qn);
-		if ((st == null) || (st.getState() != State.STARTED))
-		{
-			return null;
-		}
-		
-		switch (npc.getNpcId())
+		if ((st != null) && !st.isStarted())
 		{
-			case HILLAS:
-				if (st.isCond(2))
-				{
-					st.setCond(3);
-					st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
-					st.takeItems(BOOK1, -1);
-					st.giveItems(BOOK2, 1);
-					st.giveItems(WATER_ESSENCE, 1);
-				}
-				addSpawn(PAPION, -53903, 181484, -4555, 30456, false, 0, false, npc.getInstanceId());
-				break;
-			case PAPION:
-				if (st.isCond(4))
-				{
-					st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
-					st.takeItems(BOOK3, -1);
-					st.giveItems(BOOK4, 1);
-					st.setCond(5);
-				}
-				addSpawn(KINSUS, -61415, 181418, -4818, 63852, false, 0, false, npc.getInstanceId());
-				break;
-			case KINSUS:
-				if (st.isCond(5))
-				{
-					st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
-					st.takeItems(BOOK4, -1);
-					st.giveItems(BOOK5, 1);
-					st.giveItems(FIRE_ESSENCE, 1);
-					st.setCond(6);
-				}
-				addSpawn(GARGOS, -61354, 183624, -4821, 63613, false, 0, false, npc.getInstanceId());
-				break;
-			case GARGOS:
-				if (st.isCond(7))
-				{
-					st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
-					st.takeItems(BOOK6, -1);
-					st.giveItems(BOOK7, 1);
-					st.setCond(8);
-				}
-				addSpawn(ADIANTUM, -53297, 185027, -4617, 1512, false, 0, false, npc.getInstanceId());
-				break;
-			case ADIANTUM:
-				if (st.isCond(8))
-				{
-					st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
-					st.takeItems(BOOK7, -1);
-					addSpawn(ADLER2, -53297, 185027, -4617, 33486, false, 0, false, npc.getInstanceId());
-					st.setCond(9);
-				}
-				break;
-			case BOTTLE:
-			case BRAZIER:
-			case BLOOM:
-				dropItem(npc, player);
-				break;
-			default:
-				// hardcoded herb drops
-				dropHerb(npc, player, HP_HERBS_DROPLIST);
-				dropHerb(npc, player, MP_HERBS_DROPLIST);
-				break;
+			final int cond = st.getCond();
+			switch (npc.getNpcId())
+			{
+				case HILLAS:
+					if (cond == 2)
+					{
+						st.setCond(3);
+						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+						takeItems(player, BOOK1, -1);
+						giveItems(player, BOOK2, 1);
+						giveItems(player, WATER_ESSENCE, 1);
+					}
+					addSpawn(PAPION, -53903, 181484, -4555, 30456, false, 0, false, npc.getInstanceId());
+					break;
+				case PAPION:
+					if (cond == 4)
+					{
+						st.setCond(5);
+						takeItems(player, BOOK3, -1);
+						giveItems(player, BOOK4, 1);
+						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+					}
+					addSpawn(KINSUS, -61415, 181418, -4818, 63852, false, 0, false, npc.getInstanceId());
+					break;
+				case KINSUS:
+					if (cond == 5)
+					{
+						st.setCond(6);
+						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+						takeItems(player, BOOK4, -1);
+						giveItems(player, BOOK5, 1);
+						giveItems(player, FIRE_ESSENCE, 1);
+					}
+					addSpawn(GARGOS, -61354, 183624, -4821, 63613, false, 0, false, npc.getInstanceId());
+					break;
+				case GARGOS:
+					if (cond == 7)
+					{
+						st.setCond(8);
+						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+						takeItems(player, BOOK6, -1);
+						giveItems(player, BOOK7, 1);
+					}
+					addSpawn(ADIANTUM, -53297, 185027, -4617, 1512, false, 0, false, npc.getInstanceId());
+					break;
+				case ADIANTUM:
+					if (cond == 8)
+					{
+						st.setCond(9);
+						playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
+						takeItems(player, BOOK7, -1);
+						addSpawn(ADLER2, -53297, 185027, -4617, 33486, false, 0, false, npc.getInstanceId());
+					}
+					break;
+				case BOTTLE:
+				case BRAZIER:
+				case BLOOM:
+					dropItem(npc, player);
+					break;
+				default:
+					// hardcoded herb drops
+					dropHerb(npc, player, HP_HERBS_DROPLIST);
+					dropHerb(npc, player, MP_HERBS_DROPLIST);
+					break;
+			}
 		}
 		return super.onKill(npc, player, isPet);
 	}
@@ -549,27 +541,23 @@ public class PailakaSongOfIceAndFire extends Quest
 		}
 	}
 	
-	public PailakaSongOfIceAndFire(int questId, String name, String descr)
+	public PailakaSongOfIceAndFire()
 	{
-		super(questId, name, descr);
+		super(128, qn, "Pailaka - Song of Ice and Fire");
 		addStartNpc(ADLER1);
 		for (int npcId : NPCS)
 		{
 			addFirstTalkId(npcId);
 			addTalkId(npcId);
 		}
-		addAttackId(BOTTLE);
-		addAttackId(BRAZIER);
-		for (int mobId : MONSTERS)
-		{
-			addKillId(mobId);
-		}
+		addAttackId(BOTTLE, BRAZIER);
+		addKillId(MONSTERS);
 		addExitZoneId(ZONE);
 		registerQuestItems(ITEMS);
 	}
 	
 	public static void main(String[] args)
 	{
-		new PailakaSongOfIceAndFire(128, qn, "Pailaka - Song of Ice and Fire");
+		new PailakaSongOfIceAndFire();
 	}
 }

+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00463_IMustBeaGenius/Q00463_IMustBeaGenius.java

@@ -59,6 +59,7 @@ public class Q00463_IMustBeaGenius extends Quest
 			return _chance;
 		}
 	}
+	
 	// NPC
 	private static final int GUTENHAGEN = 32069;
 	// Items

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00464_Oath/Q00464_Oath.java

@@ -62,7 +62,6 @@ public class Q00464_Oath extends Quest
 	// Monsters
 	private static final Map<Integer, Integer> MOBS = new HashMap<>();
 	
-	
 	static
 	{
 		MOBS.put(22799, 9);