Author Topic: Looking for "Glory Days"  (Read 650 times)

Offline janiny

  • Vassal
  • *
  • Posts: 7
Looking for "Glory Days"
« on: October 15, 2019, 01:42:30 AM »
I`m very sorry for my impudence, Interested in the version for the Chronicles "Glory days" (update 2) java server , whether there is It and whether it is in the public domain? (I didn`t found)  :'( :'( :'(

Online Minzee

  • Subscriber
  • Baron
  • *****
  • Posts: 205
Re: Looking for "Glory Days"
« Reply #1 on: October 15, 2019, 02:01:03 AM »
Hi, sorry but all what you can found here, you can see in "Download" section ;) https://bitbucket.org/MobiusDev/l2j_mobius/src/master/

Offline janiny

  • Vassal
  • *
  • Posts: 7
Re: Looking for "Glory Days"
« Reply #2 on: October 15, 2019, 04:53:59 PM »
may be some one got archives or something...

Online Minzee

  • Subscriber
  • Baron
  • *****
  • Posts: 205
Re: Looking for "Glory Days"
« Reply #3 on: October 15, 2019, 06:09:55 PM »
You can try to find L2j-Universe, if they still alive, and ask for files 😉 or Mobius still have Lindvior files and ask him to Downgrade it 😬

Offline janiny

  • Vassal
  • *
  • Posts: 7
Re: Looking for "Glory Days"
« Reply #4 on: October 16, 2019, 11:35:07 PM »
up  :'(

Offline janiny

  • Vassal
  • *
  • Posts: 7
Re: Looking for "Glory Days"
« Reply #5 on: November 10, 2019, 05:18:48 PM »
Working with downgrade L2J_Mobius_1.0_Ertheia got some qestions

1. Mage nukes have no att/debuff effects (solved with edding passive skills to tree)
2. Adena drop rate config hase no effect
3. Fail with ATT any items with any type of ATT /

Help with att please.

upd. fixed with moving attributesystem.ini data to character.ini, add config.java


S_WEAPON_STONE = Character.getInt("SWeaponStone", 100);
S80_WEAPON_STONE = Character.getInt("S80WeaponStone", 100);
S84_WEAPON_STONE = Character.getInt("S84WeaponStone", 100);
R_WEAPON_STONE = Character.getInt("RWeaponStone", 100);
R95_WEAPON_STONE = Character.getInt("R95WeaponStone", 100);
R99_WEAPON_STONE = Character.getInt("R99WeaponStone", 100);
   
S_ARMOR_STONE = Character.getInt("SArmorStone", 100);
S80_ARMOR_STONE = Character.getInt("S80ArmorStone", 100);
S84_ARMOR_STONE = Character.getInt("S84ArmorStone", 100);
R_ARMOR_STONE = Character.getInt("RArmorStone", 100);
R95_ARMOR_STONE = Character.getInt("R95ArmorStone", 100);
R99_ARMOR_STONE = Character.getInt("R99ArmorStone", 100);
   
S_WEAPON_CRYSTAL = Character.getInt("SWeaponCrystal", 100);
S80_WEAPON_CRYSTAL = Character.getInt("S80WeaponCrystal", 100);
S84_WEAPON_CRYSTAL = Character.getInt("S84WeaponCrystal", 100);
R_WEAPON_CRYSTAL = Character.getInt("RWeaponCrystal", 100);
R95_WEAPON_CRYSTAL = Character.getInt("R95WeaponCrystal", 100);
R99_WEAPON_CRYSTAL = Character.getInt("R99WeaponCrystal", 100);
   
S_ARMOR_CRYSTAL = Character.getInt("SArmorCrystal", 100);
S80_ARMOR_CRYSTAL = Character.getInt("S80ArmorCrystal", 100);
S84_ARMOR_CRYSTAL = Character.getInt("S84ArmorCrystal", 100);
R_ARMOR_CRYSTAL = Character.getInt("RArmorCrystal", 100);
R95_ARMOR_CRYSTAL = Character.getInt("R95ArmorCrystal", 100);
R99_ARMOR_CRYSTAL = Character.getInt("R99ArmorCrystal", 100);


S_WEAPON_STONE_SUPER = Character.getInt("SWeaponStoneSuper", 100);
S80_WEAPON_STONE_SUPER = Character.getInt("S80WeaponStoneSuper", 100);
S84_WEAPON_STONE_SUPER = Character.getInt("S84WeaponStoneSuper", 100);
R_WEAPON_STONE_SUPER = Character.getInt("RWeaponStoneSuper", 100);
R95_WEAPON_STONE_SUPER = Character.getInt("R95WeaponStoneSuper", 100);
R99_WEAPON_STONE_SUPER = Character.getInt("R99WeaponStoneSuper", 100);
   

   
S_ARMOR_STONE_SUPER = Character.getInt("SArmorStoneSuper", 100);
S80_ARMOR_STONE_SUPER = Character.getInt("S80ArmorStoneSuper", 100);
S84_ARMOR_STONE_SUPER = Character.getInt("S84ArmorStoneSuper", 100);
R_ARMOR_STONE_SUPER = Character.getInt("RArmorStoneSuper", 100);
R95_ARMOR_STONE_SUPER = Character.getInt("R95ArmorStoneSuper", 100);
R99_ARMOR_STONE_SUPER = Character.getInt("R99ArmorStoneSuper", 100);
   

   
S_WEAPON_CRYSTAL_SUPER = Character.getInt("SWeaponCrystalSuper", 100);
S80_WEAPON_CRYSTAL_SUPER = Character.getInt("S80WeaponCrystalSuper", 100);
S84_WEAPON_CRYSTAL_SUPER = Character.getInt("S84WeaponCrystalSuper", 100);
R_WEAPON_CRYSTAL_SUPER = Character.getInt("RWeaponCrystalSuper", 100);
R95_WEAPON_CRYSTAL_SUPER = Character.getInt("R95WeaponCrystalSuper", 100);
R99_WEAPON_CRYSTAL_SUPER = Character.getInt("R99WeaponCrystalSuper", 100);
   
   
S_ARMOR_CRYSTAL_SUPER = Character.getInt("SArmorCrystalSuper", 100);
S80_ARMOR_CRYSTAL_SUPER = Character.getInt("S80ArmorCrystalSuper", 100);
S84_ARMOR_CRYSTAL_SUPER = Character.getInt("S84ArmorCrystalSuper", 100);
R_ARMOR_CRYSTAL_SUPER = Character.getInt("RArmorCrystalSuper", 100);
R95_ARMOR_CRYSTAL_SUPER = Character.getInt("R95ArmorCrystalSuper", 100);
R99_ARMOR_CRYSTAL_SUPER = Character.getInt("R99ArmorCrystalSuper", 100);

and fixed in model.elementals

 return Rnd.get(100) < CHANCE_TABLE[row][column]; 
 for
 return Rnd.get(99) < CHANCE_TABLE[row][column];

Online Mobius

  • Administrator
  • Distinguished King
  • *****
  • Posts: 7213
Re: Looking for "Glory Days"
« Reply #6 on: November 12, 2019, 07:46:08 PM »
I would go for this solution instead.
Quote
Index: java/org/l2jmobius/Config.java
===================================================================
--- java/org/l2jmobius/Config.java   (revision 6098)
+++ java/org/l2jmobius/Config.java   (working copy)
@@ -89,6 +89,7 @@
    public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.ini";
    public static final String SIEGE_CONFIG_FILE = "./config/Siege.ini";
    public static final String FORTSIEGE_CONFIG_FILE = "./config/FortSiege.ini";
+   private static final String ATTRIBUTE_SYSTEM_FILE = "./config/AttributeSystem.ini";
    private static final String CHARACTER_CONFIG_FILE = "./config/Character.ini";
    private static final String FEATURE_CONFIG_FILE = "./config/Feature.ini";
    private static final String FLOOD_PROTECTOR_CONFIG_FILE = "./config/FloodProtector.ini";
@@ -1505,6 +1506,79 @@
          ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
          ALLOW_MOUNTS_DURING_SIEGE = Feature.getBoolean("AllowRideMountsDuringSiege", false);
          
+         // Load AttributeSystem config file (if exists)
+         final PropertiesParser AttributeSystem = new PropertiesParser(ATTRIBUTE_SYSTEM_FILE);
+         
+         S_WEAPON_STONE = AttributeSystem.getInt("SWeaponStone", 50);
+         S80_WEAPON_STONE = AttributeSystem.getInt("S80WeaponStone", 50);
+         S84_WEAPON_STONE = AttributeSystem.getInt("S84WeaponStone", 50);
+         R_WEAPON_STONE = AttributeSystem.getInt("RWeaponStone", 50);
+         R95_WEAPON_STONE = AttributeSystem.getInt("R95WeaponStone", 50);
+         R99_WEAPON_STONE = AttributeSystem.getInt("R99WeaponStone", 50);
+         
+         S_ARMOR_STONE = AttributeSystem.getInt("SArmorStone", 60);
+         S80_ARMOR_STONE = AttributeSystem.getInt("S80ArmorStone", 80);
+         S84_ARMOR_STONE = AttributeSystem.getInt("S84ArmorStone", 80);
+         R_ARMOR_STONE = AttributeSystem.getInt("RArmorStone", 100);
+         R95_ARMOR_STONE = AttributeSystem.getInt("R95ArmorStone", 100);
+         R99_ARMOR_STONE = AttributeSystem.getInt("R99ArmorStone", 100);
+         
+         S_WEAPON_CRYSTAL = AttributeSystem.getInt("SWeaponCrystal", 30);
+         S80_WEAPON_CRYSTAL = AttributeSystem.getInt("S80WeaponCrystal", 40);
+         S84_WEAPON_CRYSTAL = AttributeSystem.getInt("S84WeaponCrystal", 50);
+         R_WEAPON_CRYSTAL = AttributeSystem.getInt("RWeaponCrystal", 60);
+         R95_WEAPON_CRYSTAL = AttributeSystem.getInt("R95WeaponCrystal", 60);
+         R99_WEAPON_CRYSTAL = AttributeSystem.getInt("R99WeaponCrystal", 60);
+         
+         S_ARMOR_CRYSTAL = AttributeSystem.getInt("SArmorCrystal", 50);
+         S80_ARMOR_CRYSTAL = AttributeSystem.getInt("S80ArmorCrystal", 70);
+         S84_ARMOR_CRYSTAL = AttributeSystem.getInt("S84ArmorCrystal", 80);
+         R_ARMOR_CRYSTAL = AttributeSystem.getInt("RArmorCrystal", 80);
+         R95_ARMOR_CRYSTAL = AttributeSystem.getInt("R95ArmorCrystal", 100);
+         R99_ARMOR_CRYSTAL = AttributeSystem.getInt("R99ArmorCrystal", 100);
+         
+         S_WEAPON_STONE_SUPER = AttributeSystem.getInt("SWeaponStoneSuper", 100);
+         S80_WEAPON_STONE_SUPER = AttributeSystem.getInt("S80WeaponStoneSuper", 100);
+         S84_WEAPON_STONE_SUPER = AttributeSystem.getInt("S84WeaponStoneSuper", 100);
+         R_WEAPON_STONE_SUPER = AttributeSystem.getInt("RWeaponStoneSuper", 100);
+         R95_WEAPON_STONE_SUPER = AttributeSystem.getInt("R95WeaponStoneSuper", 100);
+         R99_WEAPON_STONE_SUPER = AttributeSystem.getInt("R99WeaponStoneSuper", 100);
+         
+         S_ARMOR_STONE_SUPER = AttributeSystem.getInt("SArmorStoneSuper", 100);
+         S80_ARMOR_STONE_SUPER = AttributeSystem.getInt("S80ArmorStoneSuper", 100);
+         S84_ARMOR_STONE_SUPER = AttributeSystem.getInt("S84ArmorStoneSuper", 100);
+         R_ARMOR_STONE_SUPER = AttributeSystem.getInt("RArmorStoneSuper", 100);
+         R95_ARMOR_STONE_SUPER = AttributeSystem.getInt("R95ArmorStoneSuper", 100);
+         R99_ARMOR_STONE_SUPER = AttributeSystem.getInt("R99ArmorStoneSuper", 100);
+         
+         S_WEAPON_CRYSTAL_SUPER = AttributeSystem.getInt("SWeaponCrystalSuper", 80);
+         S80_WEAPON_CRYSTAL_SUPER = AttributeSystem.getInt("S80WeaponCrystalSuper", 90);
+         S84_WEAPON_CRYSTAL_SUPER = AttributeSystem.getInt("S84WeaponCrystalSuper", 100);
+         R_WEAPON_CRYSTAL_SUPER = AttributeSystem.getInt("RWeaponCrystalSuper", 100);
+         R95_WEAPON_CRYSTAL_SUPER = AttributeSystem.getInt("R95WeaponCrystalSuper", 100);
+         R99_WEAPON_CRYSTAL_SUPER = AttributeSystem.getInt("R99WeaponCrystalSuper", 100);
+         
+         S_ARMOR_CRYSTAL_SUPER = AttributeSystem.getInt("SArmorCrystalSuper", 100);
+         S80_ARMOR_CRYSTAL_SUPER = AttributeSystem.getInt("S80ArmorCrystalSuper", 100);
+         S84_ARMOR_CRYSTAL_SUPER = AttributeSystem.getInt("S84ArmorCrystalSuper", 100);
+         R_ARMOR_CRYSTAL_SUPER = AttributeSystem.getInt("RArmorCrystalSuper", 100);
+         R95_ARMOR_CRYSTAL_SUPER = AttributeSystem.getInt("R95ArmorCrystalSuper", 100);
+         R99_ARMOR_CRYSTAL_SUPER = AttributeSystem.getInt("R99ArmorCrystalSuper", 100);
+         
+         S_WEAPON_JEWEL = AttributeSystem.getInt("SWeaponJewel", 100);
+         S80_WEAPON_JEWEL = AttributeSystem.getInt("S80WeaponJewel", 100);
+         S84_WEAPON_JEWEL = AttributeSystem.getInt("S84WeaponJewel", 100);
+         R_WEAPON_JEWEL = AttributeSystem.getInt("RWeaponJewel", 100);
+         R95_WEAPON_JEWEL = AttributeSystem.getInt("R95WeaponJewel", 100);
+         R99_WEAPON_JEWEL = AttributeSystem.getInt("R99WeaponJewel", 100);
+         
+         S_ARMOR_JEWEL = AttributeSystem.getInt("SArmorJewel", 100);
+         S80_ARMOR_JEWEL = AttributeSystem.getInt("S80ArmorJewel", 100);
+         S84_ARMOR_JEWEL = AttributeSystem.getInt("S84ArmorJewel", 100);
+         R_ARMOR_JEWEL = AttributeSystem.getInt("RArmorJewel", 100);
+         R95_ARMOR_JEWEL = AttributeSystem.getInt("R95ArmorJewel", 100);
+         R99_ARMOR_JEWEL = AttributeSystem.getInt("R99ArmorJewel", 100);
+         
          // Load Character config file (if exists)
          final PropertiesParser Character = new PropertiesParser(CHARACTER_CONFIG_FILE);
          

Also you can try to upgrade HighFive, I would not recommend downgrading Ertheia.
Not even for Valiance or Lindvior.

Offline janiny

  • Vassal
  • *
  • Posts: 7
Re: Looking for "Glory Days"
« Reply #7 on: November 13, 2019, 04:06:59 PM »
same =)

i havent found working Glory days compile.. so deside fix Ertheya

Ertheya game client  work and look better of lindvior, i dont know how to cut off ertheya race (for a while)
, already done some skill patch made of my vision ( monks range nuke is broken in data pack,
fixed:
[spoiler]

 <skill id="10327" toLevel="7" name="Momentum Flash">
      <!-- Attacks target with 17348 Power added to P. Atk. Requires a sword/dagger/blunt weapon/fist weapon. Damage increases when using Momentum, which you can use up to 3. Over-hit. Critical. -->
      <icon>icon.skill10327</icon>
      <operateType>A1</operateType>
      <targetType>ENEMY</targetType>
      <affectScope>SINGLE</affectScope>
      <magicLvl>
         <value level="1">85</value>
         <value level="2">90</value>
         <value level="3">95</value>
         <value level="4">99</value>
         <value level="5">101</value>
         <value level="6">103</value>
         <value level="7">105</value>
      </magicLvl>
      <mpConsume>
         <value level="1">98</value>
         <value level="2">105</value>
         <value level="3">112</value>
         <value level="4">119</value>
         <value level="5">126</value>
         <value level="6">133</value>
         <value level="7">140</value>
      </mpConsume>
      <nextAction>ATTACK</nextAction>
      <castRange>600</castRange>
      <hitTime>1500</hitTime>
      <coolTime>500</coolTime>
      <effectPoint>
         <value level="1">-183</value>
         <value level="2">-188</value>
         <value level="3">-193</value>
         <value level="4">-198</value>
         <value level="5">-203</value>
         <value level="6">-208</value>
         <value level="7">-213</value>
      </effectPoint>
      <reuseDelay>10000</reuseDelay>
      <conditions>
         <condition name="EquipWeapon">
            <weaponType>
                    <item>SWORD</item>
               <item>BLUNT</item>
               <item>DUALFIST</item>
            </weaponType>
         </condition>
      </conditions>
      <effects>
         <effect name="EnergyAttack">
            <power>
               <value level="1">17348</value>
               <value level="2">20033</value>
               <value level="3">22717</value>
               <value level="4">25700</value>
               <value level="5">27419</value>
               <value level="6">28665</value>
               <value level="7">29911</value>
                </power>
            <overHit>true</overHit>
            <criticalChance>
               <value fromLevel="1" toLevel="7">15</value>
            </criticalChance>
            <chargeConsume>3</chargeConsume>
         </effect>
      </effects>
   </skill>
[/spoiler]

also hardin.java, 131

giveItems(player, player.isDualClassActive() ? CHAOS_POMANDER_DUAL_CLASS : CHAOS_POMANDER, 2);

classmaster dont give items with 4th class (not fixed)


Offline janiny

  • Vassal
  • *
  • Posts: 7
Re: Looking for "Glory Days"
« Reply #8 on: November 13, 2019, 04:12:37 PM »
also combo skills dont working..

Offline janiny

  • Vassal
  • *
  • Posts: 7
Re: Looking for "Glory Days"
« Reply #9 on: November 16, 2019, 05:37:01 AM »
and what about noobles quest.. it stopes on 4to5 and 6to7 condition steps. i cutt two text meseges and got working java..
may be some one need

/*
 * 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 quests.Q10369_NoblesseSoulTesting;

import org.l2jmobius.Config;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.enums.Movie;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.instancemanager.QuestManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.SkillHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;

import instances.EvasHiddenSpace.EvasHiddenSpace;

/**
 * Noblesse, Soul Testing (10369)
 * @author Gladicek, St3eT
 */
public class Q10369_NoblesseSoulTesting extends Quest
{
   // NPCs
   private static final int CERENAS = 31281;
   private static final int ONE_WHO_EATS_PROPHECIES = 27482;
   private static final int EVAS_AVATAR = 33686;
   private static final int LANYA = 33696;
   private static final int HELPING_TREE_SUMMON_DEVICE = 19293;
   private static final int HELPING_TREE = 27486;
   private static final int INVISIBLE_NPC_NOBLE = 27484;
   private static final int INVISIBLE_NPC_NOBLE_2 = 27487;
   private static final int FLAME_FLOWER = 33735;
   // Items
   private static final int SUMMONING_STONE = 34912;
   private static final int NOVELLA_PROPHECY = 34886;
   private static final int EMPTY_HOT_SPRINGS_WATER_BOTTLE = 34887;
   private static final int HOT_SPRINGS_WATER_BOTTLE = 34888;
   private static final int DURABLE_LEATHER = 34889;
   private static final int TROWEL = 34890;
   private static final int FIRE_ENERGY = 34891;
   private static final int HARD_FOSSIL_CONTAINING_WATER_ENERGY = 34892;
   private static final int SACK_CONTAINING_INGREDIENTS = 34913;
   private static final int HELPING_SEED = 34961;
   private static final int ASHES_OF_REMNANTS = 34962;
   private static final int DIMENSIONAL_DIAMOND = 7562;
   private static final int STEEL_COIN = 37045;
   private static final int NOBLESSE_TIARA = 7694;
   private static final int SOE_HOT_SPRINGS = 34978;
   private static final int SOE_ADEN_CASTLE = 34981;
   private static final int SOE_RUNE_CASTLE = 34982;
   private static final int SOE_ISLE_OF_PRAYER = 34980;
   private static final int SOE_FORGE_OF_GODS = 34979;
   private static final int SOE_SECRET_ROOM = 39517;
   // Skills
   private static final SkillHolder EMPTY_WATER_SKILL = new SkillHolder(9443, 1);
   private static final SkillHolder TROWEL_SKILL = new SkillHolder(9442, 1);
   private static final SkillHolder HELPING_SEED_SKILL = new SkillHolder(9444, 1);
   // TODO: Casting this skill on HELPING_TREE_SUMMON_DEVICE?? Or its AOE??
   // private static final SkillHolder HELPING_TREE_CP_RECOVERY_RANGE = new SkillHolder(7103, 1);
   private static final SkillHolder NOBLESSE_PRESENTATION = new SkillHolder(18176, 1);
   // Locations
   private static final Location HELPING_TREE_LOC_1 = new Location(148223, 14869, -1368, 23);
   private static final Location HELPING_TREE_LOC_2 = new Location(22036, -49785, -1296, 23);
   // Monsters
   private static final int[] HOT_SPRINGS =
   {
      21320, // Hot Springs Yeti
      21322, // Hot Springs Bandersnatch
      21323, // Hot Springs Grendel
      21314, // Hot Springs Bandersnatch
   };
   private static final int[] ISLE_OF_PRAYER =
   {
      22261, // Seychelles
      22262, // Naiad
      22263, // Sonneratia
      22264, // Castalia
      22265, // Chrysocolla
      22266, // Pythia
   };
   // Misc
   private static final int MIN_LEVEL = 75;
   
   public Q10369_NoblesseSoulTesting()
   {
      super(10369);
      addStartNpc(CERENAS);
      addTalkId(CERENAS, EVAS_AVATAR, LANYA);
      addKillId(ONE_WHO_EATS_PROPHECIES);
      addKillId(HOT_SPRINGS);
      addKillId(ISLE_OF_PRAYER);
      addSeeCreatureId(INVISIBLE_NPC_NOBLE);
      addSpawnId(INVISIBLE_NPC_NOBLE_2, FLAME_FLOWER, LANYA, HELPING_TREE);
      addSkillSeeId(INVISIBLE_NPC_NOBLE, FLAME_FLOWER, HELPING_TREE_SUMMON_DEVICE);
      addFirstTalkId(FLAME_FLOWER, HELPING_TREE_SUMMON_DEVICE, HELPING_TREE);
      addCondMinLevel(MIN_LEVEL, "31281-13.htm");
      addCondIsSubClassActive("");
      registerQuestItems(SUMMONING_STONE, NOVELLA_PROPHECY, EMPTY_HOT_SPRINGS_WATER_BOTTLE, HOT_SPRINGS_WATER_BOTTLE, DURABLE_LEATHER, TROWEL, FIRE_ENERGY, HARD_FOSSIL_CONTAINING_WATER_ENERGY, HELPING_SEED, ASHES_OF_REMNANTS, SOE_HOT_SPRINGS, SOE_ADEN_CASTLE, SOE_RUNE_CASTLE, SOE_ISLE_OF_PRAYER, SOE_FORGE_OF_GODS, SOE_SECRET_ROOM);
   }
   
   @Override
   public String onAdvEvent(String event, Npc npc, PlayerInstance player)
   {
      if (player == null)
      {
         return super.onAdvEvent(event, npc, player);
      }
      
      final QuestState qs = getQuestState(player, false);
      if (qs == null)
      {
         return null;
      }
      
      String htmltext = null;
      
      switch (event)
      {
         case "31281-02.htm":
         {
            htmltext = event;
            break;
         }
         case "31281-04.html":
         case "33686-02.html":
         {
            if (canProgress(player))
            {
               htmltext = event;
            }
            break;
         }
         case "31281-05.html":
         {
            if (canProgress(player) && qs.isCond(1))
            {
               qs.setCond(2, true);
               htmltext = event;
            }
            break;
         }
         case "31281-06.html":
         {
            if (canProgress(player) && qs.isCond(2) && hasQuestItems(player, NOVELLA_PROPHECY))
            {
               takeItems(player, NOVELLA_PROPHECY, -1);
               qs.setCond(3, true);
               htmltext = event;
            }
            break;
         }
            case "33686-03.html":
         {
            if (canProgress(player) && qs.isCond(5))
            {
               giveItems(player, EMPTY_HOT_SPRINGS_WATER_BOTTLE, 1);
               giveItems(player, SOE_HOT_SPRINGS, 1);
               giveItems(player, SUMMONING_STONE, 1);
               qs.setCond(6, true);
               htmltext = event;
            }
            break;
         }
         case "33686-06.html":
         {
            if (canProgress(player) && qs.isCond(15))
            {
               takeItems(player, SACK_CONTAINING_INGREDIENTS, -1);
               takeItems(player, SUMMONING_STONE, -1);
               giveItems(player, HELPING_SEED, 1);
               giveItems(player, getRandomBoolean() ? SOE_RUNE_CASTLE : SOE_ADEN_CASTLE, 1);
               qs.setCond(16, true);
               htmltext = event;
            }
            break;
         }
         case "33696-03.html":
         {
            if (canProgress(player) && qs.isCond(7))
            {
               qs.setCond(8, true);
               takeItems(player, HOT_SPRINGS_WATER_BOTTLE, -1);
               takeItems(player, EMPTY_HOT_SPRINGS_WATER_BOTTLE, -1);
               htmltext = event;
            }
            break;
         }
         case "33696-06.html":
         {
            if (canProgress(player) && qs.isCond(9))
            {
               qs.setCond(10, true);
               takeItems(player, DURABLE_LEATHER, -1);
               giveItems(player, TROWEL, 1);
               giveItems(player, SOE_FORGE_OF_GODS, 1);
               htmltext = event;
            }
            break;
         }
         case "33696-09.html":
         {
            if (canProgress(player) && qs.isCond(11))
            {
               qs.setCond(12, true);
               takeItems(player, FIRE_ENERGY, -1);
               takeItems(player, TROWEL, 1);
               giveItems(player, SOE_ISLE_OF_PRAYER, 1);
               htmltext = event;
            }
            break;
         }
         case "startQuest":
         {
            if (canProgress(player))
            {
               qs.startQuest();
               playMovie(player, Movie.SC_NOBLE_OPENING);
            }
            break;
         }
         case "movieQuest":
         {
            if (canProgress(player) && qs.isCond(3))
            {
               qs.setCond(5, true);
               playMovie(player, Movie.SC_NOBLE_ENDING);
            }
            break;
         }
         case "bottle":
         {
            if (qs.isCond(6) && canProgress(player) && !hasQuestItems(player, HOT_SPRINGS_WATER_BOTTLE))
            {
                qs.setCond(7, true);
            }
            else
            {
               htmltext = "33696-01.html";
            }
            break;
         }
      }
      return htmltext;
   }
   
   @Override
   public String onTalk(Npc npc, PlayerInstance player)
   {
      String htmltext = getNoQuestMsg(player);
      final QuestState qs = getQuestState(player, true);
      
      switch (qs.getState())
      {
         case State.CREATED:
         {
            if (npc.getId() == CERENAS)
            {
               htmltext = "31281-01.htm";
            }
            break;
         }
         case State.STARTED:
         {
            if (canProgress(player))
            {
               switch (npc.getId())
               {
                  case CERENAS:
                  {
                     switch (qs.getCond())
                     {
                        case 1:
                        {
                           htmltext = "31281-03.html";
                           break;
                        }
                        case 2:
                        {
                           htmltext = "31281-06.html";
                           break;
                        }
                        case 3:
                        {
                           htmltext = "31281-07.html";
                           break;
                        }
                        case 5:
                        {
                           htmltext = "31281-09.html";
                           break;
                        }
                        case 14:
                        {
                           final Quest instance = QuestManager.getInstance().getQuest(EvasHiddenSpace.class.getSimpleName());
                           if (instance != null)
                           {
                              instance.onAdvEvent("enterInstance", npc, player);
                           }
                           htmltext = null;
                           break;
                        }
                        case 17:
                        {
                           htmltext = "31281-11.html";
                           break;
                        }
                     }
                     break;
                  }
                  case EVAS_AVATAR:
                  {
                     switch (qs.getCond())
                     {
                        case 5:
                        {
                           htmltext = "33686-01.html";
                           break;
                        }
                        case 6:
                        {
                           htmltext = "33686-04.html";
                           break;
                        }
                        case 15:
                        {
                           htmltext = "33686-05.html";
                           break;
                        }
                        case 16:
                        {
                           htmltext = "33686-06.html";
                           break;
                        }
                        case 18:
                        {
                           player.doCast(NOBLESSE_PRESENTATION.getSkill());
                           showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_YOU_ARE_NOW_A_NOBLESSE, ExShowScreenMessage.TOP_CENTER, 5000);
                           player.setNoble(true);
                           player.broadcastUserInfo();
                           giveItems(player, DIMENSIONAL_DIAMOND, 10);
                           giveItems(player, NOBLESSE_TIARA, 1);
                           takeItems(player, ASHES_OF_REMNANTS, -1);
                           giveItems(player, STEEL_COIN, 87);
                           addExpAndSp(player, 12_625_440, 0);
                           qs.exitQuest(false, true);
                           htmltext = "33686-07.html";
                           break;
                        }
                     }
                     break;
                  }
                  case LANYA:
                  {
                     switch (qs.getCond())
                     {
                        case 7:
                        {
                           htmltext = "33696-02.html";
                           break;
                        }
                        case 8:
                        {
                           htmltext = "33696-04.html";
                           break;
                        }
                        case 9:
                        {
                           htmltext = "33696-05.html";
                           break;
                        }
                        case 10:
                        {
                           htmltext = "33696-07.html";
                           break;
                        }
                        case 11:
                        {
                           htmltext = "33696-08.html";
                           break;
                        }
                        case 12:
                        {
                           htmltext = "33696-10.html";
                           break;
                        }
                        case 13:
                        {
                           qs.setCond(14, true);
                           takeItems(player, HARD_FOSSIL_CONTAINING_WATER_ENERGY, -1);
                           giveItems(player, SACK_CONTAINING_INGREDIENTS, 1);
                           giveItems(player, SOE_SECRET_ROOM, 1);
                           htmltext = "33696-11.html";
                           break;
                        }
                     }
                     break;
                  }
               }
            }
            break;
         }
         case State.COMPLETED:
         {
            if (npc.getId() == CERENAS)
            {
               htmltext = "31281-12.html";
               break;
            }
         }
      }
      return htmltext;
   }
   
   @Override
   public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
   {
      final PlayerInstance partyMember = getRandomPartyMember(killer);
      final QuestState qs = getQuestState(partyMember, false);
      
      if (canProgress(partyMember) && (qs != null) && qs.isStarted() && (partyMember.calculateDistance2D(npc) <= Config.ALT_PARTY_RANGE))
      {
         switch (qs.getCond())
         {
            case 2:
            {
               if (npc.getId() == ONE_WHO_EATS_PROPHECIES)
               {
                  giveItems(partyMember, NOVELLA_PROPHECY, 1);
                  qs.setCond(3, true);
               }
               break;
            }
            case 8:
            {
               if (CommonUtil.contains(HOT_SPRINGS, npc.getId()))
               {
                  giveItems(partyMember, DURABLE_LEATHER, 1);
                  
                  if (getQuestItemsCount(killer, DURABLE_LEATHER) >= 10)
                  {
                     {
                        qs.setCond(9, true);
                        showOnScreenMsg(partyMember, NpcStringId.CLICK_ON_THE_SUMMONING_STONE_TO_TALK_TO_LANYA_THE_WATER_SPIRIT, ExShowScreenMessage.TOP_CENTER, 5000);
                     }
                  }
                  else
                  {
                     playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
                  }
               }
               break;
            }
            case 12:
            {
               if (CommonUtil.contains(ISLE_OF_PRAYER, npc.getId()))
               {
                  giveItems(partyMember, HARD_FOSSIL_CONTAINING_WATER_ENERGY, 1);
                  
                  if (getQuestItemsCount(killer, HARD_FOSSIL_CONTAINING_WATER_ENERGY) >= 10)
                  {
                     qs.setCond(13, true);
                     showOnScreenMsg(partyMember, NpcStringId.CLICK_ON_THE_SUMMONING_STONE_TO_TALK_TO_LANYA_THE_WATER_SPIRIT, ExShowScreenMessage.TOP_CENTER, 5000);
                  }
                  else
                  {
                     playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
                  }
               }
               break;
            }
         }
      }
      return super.onKill(npc, killer, isSummon);
   }
   
   @Override
   public String onSeeCreature(Npc npc, Creature creature, boolean isSummon)
   {
      if (creature.isPlayer())
      {
         final PlayerInstance player = creature.getActingPlayer();
         final QuestState qs = getQuestState(player, false);
         
         if ((qs != null) && qs.isStarted())
         {
            if (qs.isCond(6))
            {
               if (!hasQuestItems(player, HOT_SPRINGS_WATER_BOTTLE))
               {
                  showOnScreenMsg(player, NpcStringId.OPEN_THE_ITEM_SCREEN_AND_DOUBLE_CLICK_THE_EMPTY_WATER_BOTTLE, ExShowScreenMessage.TOP_CENTER, 5000);
                  getTimers().addTimer("LOL", null, 5000, npc, player, event -> showOnScreenMsg(event.getPlayer(), NpcStringId.IF_YOU_DOUBLE_CLICK_THE_EMPTY_BOTTLE_IT_WILL_BECOME_FULL_OF_WATER, ExShowScreenMessage.TOP_CENTER, 5000));
               }
            }
            else if (qs.isCond(16))
            {
               if (hasQuestItems(player, HELPING_SEED))
               {
                  showOnScreenMsg(player, NpcStringId.IF_YOU_DOUBLE_CLICK_THE_HELPING_SEED_ITEM_A_TREE_OF_HELPING_WILL_BE_PLANTED, ExShowScreenMessage.TOP_CENTER, 5000);
               }
            }
         }
      }
      return super.onSeeCreature(npc, creature, isSummon);
   }
   
   @Override
   public String onSpawn(Npc npc)
   {
      switch (npc.getId())
      {
         case INVISIBLE_NPC_NOBLE_2:
         {
            final Creature summoner = npc.getSummoner();
            if (summoner != null)
            {
               final QuestState qs = getQuestState(summoner.getActingPlayer(), false);
               if ((qs != null) && qs.isStarted() && qs.isCond(6) && hasQuestItems(summoner.getActingPlayer(), HOT_SPRINGS_WATER_BOTTLE))
               {
                  qs.setCond(7, true);
               }
            }
            break;
         }
         case LANYA:
         {
            final Creature summoner = npc.getSummoner();
            if (summoner != null)
            {
               final QuestState qs = getQuestState(summoner.getActingPlayer(), false);
               if ((qs != null) && qs.isStarted())
               {
                  npc.setTitle(summoner.getActingPlayer().getName());
                  npc.broadcastInfo();
               }
            }
            break;
         }
         case FLAME_FLOWER:
         case HELPING_TREE:
         case HELPING_TREE_SUMMON_DEVICE:
         {
            npc.disableCoreAI(true);
            npc.setUndying(true);
            break;
         }
      }
      return super.onSpawn(npc);
   }
   
   @Override
   public String onSkillSee(Npc npc, PlayerInstance player, Skill skill, WorldObject[] targets, boolean isSummon)
   {
      if (player != null)
      {
         switch (npc.getId())
         {
            case INVISIBLE_NPC_NOBLE:
            {
               if (skill == EMPTY_WATER_SKILL.getSkill())
               {
                  final QuestState qs = getQuestState(player, false);
                  
                  if ((qs != null) && qs.isStarted() && qs.isCond(6))
                  {
                     qs.setCond(7, true);
                     showOnScreenMsg(player, NpcStringId.CLICK_ON_THE_SUMMONING_STONE_TO_TALK_TO_LANYA_THE_WATER_SPIRIT, ExShowScreenMessage.TOP_CENTER, 5000);
                  }
               }
               break;
            }
            case FLAME_FLOWER:
            {
               if ((skill == TROWEL_SKILL.getSkill()) && (CommonUtil.contains(targets, npc)))
               {
                  final QuestState qs = getQuestState(player, false);
                  
                  if ((qs != null) && qs.isStarted() && qs.isCond(10))
                  {
                     giveItems(player, FIRE_ENERGY, 1);
                     
                     if (getQuestItemsCount(player, FIRE_ENERGY) >= 5)
                     {
                        qs.setCond(11, true);
                        showOnScreenMsg(player, NpcStringId.CLICK_ON_THE_SUMMONING_STONE_TO_TALK_TO_LANYA_THE_WATER_SPIRIT, ExShowScreenMessage.TOP_CENTER, 5000);
                     }
                     else
                     {
                        playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
                     }
                     npc.doDie(player);
                  }
               }
               break;
            }
            case HELPING_TREE_SUMMON_DEVICE:
            {
               if ((skill == HELPING_SEED_SKILL.getSkill()) && (CommonUtil.contains(targets, npc)))
               {
                  final QuestState qs = getQuestState(player, false);
                  
                  if ((qs != null) && qs.isStarted() && qs.isCond(16))
                  {
                     qs.setCond(17, true);
                     giveItems(player, ASHES_OF_REMNANTS, 1);
                     
                     if (npc.isInsideRadius2D(HELPING_TREE_LOC_1, 2000))
                     {
                        addSpawn(HELPING_TREE, HELPING_TREE_LOC_1, false, 300000);
                     }
                     else if (npc.isInsideRadius2D(HELPING_TREE_LOC_2, 2000))
                     {
                        addSpawn(HELPING_TREE, HELPING_TREE_LOC_2, false, 300000);
                     }
                  }
               }
               break;
            }
         }
      }
      return super.onSkillSee(npc, player, skill, targets, isSummon);
   }
   
   @Override
   public String onFirstTalk(Npc npc, PlayerInstance player)
   {
      final QuestState qs = getQuestState(player, false);
      
      if ((qs != null) && qs.isStarted() && qs.isCond(10))
      {
         showOnScreenMsg(player, NpcStringId.CLICK_THE_FLAME_FLOWER_THEN_DOUBLE_CLICK_THE_TROWEL, ExShowScreenMessage.TOP_CENTER, 5000);
      }
      return super.onFirstTalk(npc, player);
   }
   
   private boolean canProgress(PlayerInstance player)
   {
      return ((player.getLevel() > MIN_LEVEL) && player.isSubClassActive());
   }
}