Parcourir la source

BETA: Quest improvements and fixes:
* By jurchiks:
* PrisonGuards cleanup and improvements.
* BanditStronghold html fixes.
* Improvements:
* CharacterBirthday
* HeavyMedal
* TheValentineEvent
* 215_TrialOfPilgrim
* 218_TestimonyOfLife
* 60_GoodWorkReward
* Q10267_JourneyToGracia
* Q10269_ToTheSeedOfDestruction
* Q10271_TheEnvelopingDarkness
* Q10275_ContainingTheAttributePower
* Q10290_LandDragonConqueror
* Q10291_FireDragonDestroyer
* Q132_MatrasCuriosity
* Q18_MeetingWithTheGoldenRam
* Q19_GoToThePastureland
* Q249_PoisonedPlainsOfTheLizardmen
* Q250_WatchWhatYouEat
* Q309_ForAGoodCause
*By me:
* Q458_PerfectForm html fixes.
* Q461_RumbleInTheBase html fixes.
* BanditStronghold html fixes.

Zoey76 il y a 13 ans
Parent
commit
f4ada5b57b
60 fichiers modifiés avec 248 ajouts et 236 suppressions
  1. 26 20
      L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/PrisonGuards.java
  2. 1 2
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally1choose.htm
  3. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally1result.htm
  4. 2 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally2choose.htm
  5. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally2result.htm
  6. 2 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally3choose.htm
  7. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally3result.htm
  8. 1 4
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally4choose.htm
  9. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally4result.htm
  10. 2 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally5choose.htm
  11. 2 4
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally5result.htm
  12. 3 2
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_allychoose.htm
  13. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_attackersqueuefull.htm
  14. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_cannotunregister.htm
  15. 1 2
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_clanalreadyregistered.htm
  16. 3 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_clannotregistered.htm
  17. 3 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_clanqueuefull.htm
  18. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_curownermessage.htm
  19. 3 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag1.htm
  20. 3 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag2.htm
  21. 3 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag3.htm
  22. 3 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag4.htm
  23. 3 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag5.htm
  24. 2 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_initial.htm
  25. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_leaderdidnotchooseyet.htm
  26. 3 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_noclanmember.htm
  27. 2 6
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_nomoney.htm
  28. 4 5
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_nonsiegeinitial.htm
  29. 2 4
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_noquest.htm
  30. 3 2
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_notclannotleader.htm
  31. 1 2
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_onlyleaderselectally.htm
  32. 9 10
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_registeredclans.htm
  33. 3 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_registrationpassed.htm
  34. 3 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/siege_date.htm
  35. 2 4
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/teleporter.htm
  36. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/events/CharacterBirthday/CharacterBirthday.java
  37. 6 5
      L2J_DataPack_BETA/dist/game/data/scripts/events/HeavyMedal/HeavyMedal.java
  38. 8 4
      L2J_DataPack_BETA/dist/game/data/scripts/events/TheValentineEvent/TheValentineEvent.java
  39. 31 34
      L2J_DataPack_BETA/dist/game/data/scripts/quests/215_TrialOfPilgrim/__init__.py
  40. 47 47
      L2J_DataPack_BETA/dist/game/data/scripts/quests/218_TestimonyOfLife/__init__.py
  41. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/60_GoodWorkReward/__init__.py
  42. 3 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10267_JourneyToGracia/Q10267_JourneyToGracia.java
  43. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10268_ToTheSeedOfInfinity/Q10268_ToTheSeedOfInfinity.java
  44. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10269_ToTheSeedOfDestruction/Q10269_ToTheSeedOfDestruction.java
  45. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/Q10271_TheEnvelopingDarkness.java
  46. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10275_ContainingTheAttributePower/Q10275_ContainingTheAttributePower.java
  47. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10290_LandDragonConqueror/Q10290_LandDragonConqueror.java
  48. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/Q10291_FireDragonDestroyer.java
  49. 7 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q132_MatrasCuriosity/Q132_MatrasCuriosity.java
  50. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q18_MeetingWithTheGoldenRam/Q18_MeetingWithTheGoldenRam.java
  51. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q19_GoToThePastureland/Q19_GoToThePastureland.java
  52. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q249_PoisonedPlainsOfTheLizardmen/Q249_PoisonedPlainsOfTheLizardmen.java
  53. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q250_WatchWhatYouEat/Q250_WatchWhatYouEat.java
  54. 13 15
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q309_ForAGoodCause/Q309_ForAGoodCause.java
  55. 2 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q458_PerfectForm/32768-06.htm
  56. 2 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q458_PerfectForm/32768-07.htm
  57. 1 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q458_PerfectForm/32768-08.htm
  58. 2 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q458_PerfectForm/32768-13.html
  59. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q458_PerfectForm/32768-14.html
  60. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-01.htm

+ 26 - 20
L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/PrisonGuards.java

@@ -25,6 +25,7 @@ import com.l2jserver.gameserver.model.actor.L2Attackable;
 import com.l2jserver.gameserver.model.actor.L2Character;
 import com.l2jserver.gameserver.model.actor.L2Npc;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.quest.QuestState;
 import com.l2jserver.gameserver.model.skills.L2Skill;
 import com.l2jserver.gameserver.network.NpcStringId;
 import com.l2jserver.gameserver.network.serverpackets.NpcSay;
@@ -39,7 +40,10 @@ public class PrisonGuards extends L2AttackableAIScript
 	final private static int STAMP = 10013;
 	final private static String[] GUARDVARS =
 	{
-		"1st", "2nd", "3rd", "4th"
+		"1st",
+		"2nd",
+		"3rd",
+		"4th"
 	};
 	final private static String qn = "IOPRace";
 	
@@ -56,7 +60,8 @@ public class PrisonGuards extends L2AttackableAIScript
 		super(questId, name, descr);
 		int[] mob =
 		{
-			GUARD1, GUARD2
+			GUARD1,
+			GUARD2
 		};
 		registerMobs(mob);
 		
@@ -107,18 +112,15 @@ public class PrisonGuards extends L2AttackableAIScript
 			_guards.remove(npc);
 			_guards.put(newGuard, place);
 		}
-		else if (event.equalsIgnoreCase("attackEnd"))
+		else if (event.equalsIgnoreCase("attackEnd") && (npc.getNpcId() == GUARD2))
 		{
-			if (npc.getNpcId() == GUARD2)
+			if ((npc.getX() != npc.getSpawn().getLocx()) || (npc.getY() != npc.getSpawn().getLocy()))
 			{
-				if (npc.getX() != npc.getSpawn().getLocx() || npc.getY() != npc.getSpawn().getLocy())
-				{
-					npc.teleToLocation(npc.getSpawn().getLocx(), npc.getSpawn().getLocy(), npc.getSpawn().getLocz(), npc.getSpawn().getHeading(), false);
-					npc.setIsImmobilized(true);
-				}
-				((L2Attackable) npc).getAggroList().clear();
-				npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
+				npc.teleToLocation(npc.getSpawn().getLocx(), npc.getSpawn().getLocy(), npc.getSpawn().getLocz(), npc.getSpawn().getHeading(), false);
+				npc.setIsImmobilized(true);
 			}
+			((L2Attackable) npc).getAggroList().clear();
+			npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
 		}
 		
 		return null;
@@ -131,10 +133,12 @@ public class PrisonGuards extends L2AttackableAIScript
 		
 		if (npc.getNpcId() == GUARD2)
 		{
-			if (_firstAttacked && caster.getFirstEffect(eventTimer) == null)
+			if (_firstAttacked && (caster.getFirstEffect(eventTimer) == null))
 			{
 				if (caster.getFirstEffect(silence) == null)
+				{
 					castDebuff(npc, caster, silence, isPet, false, true);
+				}
 			}
 		}
 		
@@ -161,7 +165,7 @@ public class PrisonGuards extends L2AttackableAIScript
 			}
 			else
 			{
-				if (npc.getX() != npc.getSpawn().getLocx() || npc.getY() != npc.getSpawn().getLocy())
+				if ((npc.getX() != npc.getSpawn().getLocx()) || (npc.getY() != npc.getSpawn().getLocy()))
 				{
 					npc.teleToLocation(npc.getSpawn().getLocx(), npc.getSpawn().getLocy(), npc.getSpawn().getLocz(), npc.getSpawn().getHeading(), false);
 					npc.setIsImmobilized(true);
@@ -185,7 +189,9 @@ public class PrisonGuards extends L2AttackableAIScript
 		if (attacker.getFirstEffect(eventTimer) == null)
 		{
 			if (attacker.getFirstEffect(pertification) == null)
+			{
 				castDebuff(npc, attacker, pertification, isPet, true, false);
+			}
 			
 			npc.setTarget(null);
 			((L2Attackable) npc).getAggroList().remove(attacker);
@@ -206,12 +212,13 @@ public class PrisonGuards extends L2AttackableAIScript
 			((L2Attackable) npc).addDamageHate(attacker, 0, 999);
 			npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
 		}
-		else if (npc.getNpcId() == GUARD1 && getRandom(100) < 5)
+		else if ((npc.getNpcId() == GUARD1) && (getRandom(100) < 5))
 		{
-			if (player.getQuestState(qn) != null && player.getQuestState(qn).getInt(GUARDVARS[_guards.get(npc)]) != 1)
+			final QuestState qs = player.getQuestState(qn);
+			if ((qs != null) && (qs.getInt(GUARDVARS[_guards.get(npc)]) != 1))
 			{
-				player.getQuestState(qn).set(GUARDVARS[_guards.get(npc)], "1");
-				player.getQuestState(qn).giveItems(STAMP, 1);
+				qs.set(GUARDVARS[_guards.get(npc)], "1");
+				qs.giveItems(STAMP, 1);
 			}
 		}
 		
@@ -222,7 +229,9 @@ public class PrisonGuards extends L2AttackableAIScript
 	public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
 	{
 		if (_guards.containsKey(npc))
+		{
 			startQuestTimer("Respawn", 20000, npc, null);
+		}
 		
 		return super.onKill(npc, player, isPet);
 	}
@@ -231,9 +240,6 @@ public class PrisonGuards extends L2AttackableAIScript
 	{
 		if (fromAttack)
 		{
-			/*
-			 * 1800107 It's not easy to obtain. 1800108 You're out of your mind coming here...
-			 */
 			NpcStringId npcString = (npc.getNpcId() == GUARD1 ? NpcStringId.ITS_NOT_EASY_TO_OBTAIN : NpcStringId.YOURE_OUT_OF_YOUR_MIND_COMING_HERE);
 			npc.broadcastPacket(new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), npcString));
 		}

+ 1 - 2
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally1choose.htm

@@ -1,5 +1,4 @@
-<html><head>
-<body>
+<html><body>
 Ol mahum berserkers live for the most appalling aspects of war. An alliance with them would be quite useful to you. They are superior examples of their kind, but their enthusiasm for battle often prevents their proper healing after injury. They are a challenge to handle but are worth the effort.<br>
 <a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
 <a action="bypass -h Quest BanditStrongHold select_clan_npc 35428">Form an alliance.</a>

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally1result.htm

@@ -1,3 +1,2 @@
-<html><head><body>
-+Ol mahum berserkers live for the most appalling aspects of war. An alliance with them would be quite useful to you. They are superior examples of their kind, but their enthusiasm for battle often prevents their proper healing after injury. They are a challenge to handle but are worth the effort.<br>
-+</body></html>
+<html><body>
+Ol mahum berserkers live for the most appalling aspects of war. An alliance with them would be quite useful to you. They are superior examples of their kind, but their enthusiasm for battle often prevents their proper healing after injury. They are a challenge to handle but are worth the effort.
</body></html>

+ 2 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally2choose.htm

@@ -1,4 +1,5 @@
-<html><head><body>The ol mahum patrol may not appear to be anything special, but he is a slippery foe. I have never seen one captured by a knight!<br>
+<html><body>
+The ol mahum patrol may not appear to be anything special, but he is a slippery foe. I have never seen one captured by a knight!<br>
 <a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
 <a action="bypass -h Quest BanditStrongHold select_clan_npc 35429">Form an alliance.</a>
 </body></html>

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally2result.htm

@@ -1,3 +1,2 @@
-<html><head><body>
-+The ol mahum patrol may not appear to be anything special, but he is a slippery foe. I have never seen one captured by a knight!<br>
-+</body></html>
+<html><body>
+The ol mahum patrol may not appear to be anything special, but he is a slippery foe. I have never seen one captured by a knight!
</body></html>

+ 2 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally3choose.htm

@@ -1,4 +1,5 @@
-<html><head><body>The ol mahum prefects possess a powerful magic. They have been known to burn their enemies alive! Ah, yes, the infamous Aura Burn! They are also masters of their staffs, and are strong enough to withstand attack by swords or clubs. Their only weakness is a susceptibility to magic spells...<br>
+<html><body>
+The ol mahum prefects possess a powerful magic. They have been known to burn their enemies alive! Ah, yes, the infamous Aura Burn! They are also masters of their staffs, and are strong enough to withstand attack by swords or clubs. Their only weakness is a susceptibility to magic spells...<br>
 <a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
 <a action="bypass -h Quest BanditStrongHold select_clan_npc 35430">Form an alliance.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally3result.htm

@@ -1,3 +1,3 @@
-<html><head><body>
+<html><body>
 The ol mahum prefects possess a powerful magic. They have been known to burn their enemies alive! Ah, yes, the infamous Aura Burn! They are also masters of their staffs, and are strong enough to withstand attack by swords or clubs. Their only weakness is a susceptibility to magic spells...<br>
 </body></html>

+ 1 - 4
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally4choose.htm

@@ -1,4 +1 @@
-<html><head><body>Let me tell you what my opinion is regarding the Oel Mahum Clerics... Ah, even Oel Mahums have a god they worship. It is not the same god called Ein... something that you guys believe in. But, having a god for themselves won't change their natural temperament, will it? They would rather kill than eat. Whenever they get into a fight, they fret themselves  to death while trying to blow their enemies' heads off. If an oel mahum feels threatened he will not hesitate to run away and heal himself.... They are the kind of people who always leave a bad taste in your mouth.<br>
-+<a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
-+<a action="bypass -h Quest BanditStrongHold select_clan_npc 35431">Form an alliance.</a>
-+</body></html>
+<html><body>
Let me tell you what my opinion is regarding the Oel Mahum Clerics... Ah, even Oel Mahums have a god they worship. It is not the same god called Ein... something that you guys believe in. But, having a god for themselves won't change their natural temperament, will it? They would rather kill than eat. Whenever they get into a fight, they fret themselves  to death while trying to blow their enemies' heads off. If an oel mahum feels threatened he will not hesitate to run away and heal himself.... They are the kind of people who always leave a bad taste in your mouth.<br>
<a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
<a action="bypass -h Quest BanditStrongHold select_clan_npc 35431">Form an alliance.</a>
</body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally4result.htm

@@ -1,3 +1,3 @@
-<html><head><body>
+<html><body>
 Let me tell you what my opinion is regarding the Oel Mahum Clerics... Ah, even Oel Mahums have a god they worship. It is not the same god called Ein... something that you guys believe in. But, having a god for themselves won't change their natural temperament, will it? They would rather kill than eat. Whenever they get into a fight, they fret themselves  to death while trying to blow their enemies' heads off. If an oel mahum feels threatened he will not hesitate to run away and heal himself.... They are the kind of people who always leave a bad taste in your mouth.
 </body></html>

+ 2 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally5choose.htm

@@ -1,4 +1,5 @@
-<html><head><body>Ol mahum thieves are amusing little fellows. Shorter than the average ol mahum, they are exceptionally lithe. If they think they have the advantage, they will attack a target. But if they feel threatened they will evade direct conflict with the enemy while using a unique method to bind his legs.<br>
+<html><body>
+Ol mahum thieves are amusing little fellows. Shorter than the average ol mahum, they are exceptionally lithe. If they think they have the advantage, they will attack a target. But if they feel threatened they will evade direct conflict with the enemy while using a unique method to bind his legs.<br>
 <a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
 <a action="bypass -h Quest BanditStrongHold select_clan_npc 35432">Form an alliance.</a>
 </body></html>

+ 2 - 4
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally5result.htm

@@ -1,4 +1,2 @@
-<html><head><body>
-+Ol mahum thieves are amusing little fellows. Shorter than the average ol mahum, they are exceptionally lithe. If they think they have the advantage, they will attack a target. But if they feel threatened they will evade direct conflict with the enemy while using a unique strategy to bind his legs.
-+<br>
-+</body></html>
+<html><body>
+Ol mahum thieves are amusing little fellows. Shorter than the average ol mahum, they are exceptionally lithe. If they think they have the advantage, they will attack a target. But if they feel threatened they will evade direct conflict with the enemy while using a unique strategy to bind his legs.
</body></html>

+ 3 - 2
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_allychoose.htm

@@ -1,7 +1,8 @@
-<html><head><body>This siege requires that you ally with an ol mahum warrior for battle. All five of these have good reputations. Now choose!<br>
+<html><body>
+This siege requires that you ally with an ol mahum warrior for battle. All five of these have good reputations. Now choose!<br>
 <a action="bypass -h Quest BanditStrongHold messenger_ally1choose.htm">ol mahum berserker</a><br>
 <a action="bypass -h Quest BanditStrongHold messenger_ally2choose.htm">ol mahum patrol </a><br>
 <a action="bypass -h Quest BanditStrongHold messenger_ally3choose.htm">ol mahum prefect</a><br>
 <a action="bypass -h Quest BanditStrongHold messenger_ally4choose.htm">ol mahum cleric</a><br>
-<a action="bypass -h Quest BanditStrongHold messenger_ally5choose.htm">ol mahum thief</a><br>
+<a action="bypass -h Quest BanditStrongHold messenger_ally5choose.htm">ol mahum thief</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_attackersqueuefull.htm

@@ -1,3 +1,3 @@
-<html><head><body>
+<html><body>
 You are too late! Five clans have already registered. Better luck next time!
 </body></html>

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_cannotunregister.htm

@@ -1,3 +1,2 @@
-<html><head><body>
-+Haven't you learned anything? Surely you don't think you can just walk away from our agreement! See you on the battlefield!
-+</body></html>
+<html><body>
+Haven't you learned anything? Surely you don't think you can just walk away from our agreement! See you on the battlefield!
</body></html>

+ 1 - 2
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_clanalreadyregistered.htm

@@ -1,4 +1,3 @@
-<html><head>
-<body>
+<html><body>
 Ah, yes! Here is your registration! You are all set. Don't be late!
 </body></html>

+ 3 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_clannotregistered.htm

@@ -1 +1,3 @@
-<html><head><body>What was the name of your clan again? What is this? You are not even registered for this siege! Do you think that you are above the rules? Or perhaps you are just an idiot!</body></html>
+<html><body>
+What was the name of your clan again? What is this? You are not even registered for this siege! Do you think that you are above the rules? Or perhaps you are just an idiot!
+</body></html>

+ 3 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_clanqueuefull.htm

@@ -1 +1,3 @@
-<html><head><body>Oops, sorry, but your clan is already fully manned. 18 have already been registered! You are a privateer, aren't you?</body></html>
+<html><body>
+Oops, sorry, but your clan is already fully manned. 18 have already been registered! You are a privateer, aren't you?
+</body></html>

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_curownermessage.htm

@@ -1,3 +1,2 @@
-<html><head><body>
-+Oh, sir, a master such as yourself need not prove himself! Leave such matters to the youngsters! Enjoy the show!
-+</body></html>
+<html><body>
+Oh, sir, a master such as yourself need not prove himself! Leave such matters to the youngsters! Enjoy the show!
</body></html>

+ 3 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag1.htm

@@ -1 +1,3 @@
-<html><head><body>It is very important that you understand that our team fights under the red flag. We will rally there and start the battle! Don't forget!</body></html>
+<html><body>
+It is very important that you understand that our team fights under the red flag. We will rally there and start the battle! Don't forget!
+</body></html>

+ 3 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag2.htm

@@ -1 +1,3 @@
-<html><head><body>It is very important that you understand that our team fights under the yellow flag. We will rally there and start the battle! Don't forget!</body></html>
+<html><body>
+It is very important that you understand that our team fights under the yellow flag. We will rally there and start the battle! Don't forget!
+</body></html>

+ 3 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag3.htm

@@ -1 +1,3 @@
-<html><head><body>Our team fights under the green flag. We will rally there and start the battle! Don't forget!</body></html>
+<html><body>
+Our team fights under the green flag. We will rally there and start the battle! Don't forget!
+</body></html>

+ 3 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag4.htm

@@ -1 +1,3 @@
-<html><head><body>It is very important that you understand that our team fights under the blue flag. We will rally there and start the battle! Don't forget!</body></html>
+<html><body>
+It is very important that you understand that our team fights under the blue flag. We will rally there and start the battle! Don't forget!
+</body></html>

+ 3 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag5.htm

@@ -1 +1,3 @@
-<html><head><body>It is very important that you understand that our team fights under the purple flag. We will rally there and start the battle! Don't forget!</body></html>
+<html><body>
+It is very important that you understand that our team fights under the purple flag. We will rally there and start the battle! Don't forget!
+</body></html>

+ 2 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_initial.htm

@@ -1,4 +1,5 @@
-<html><head><body>I'm just here to make sure the siege comes off without a hitch. I'll try to stay out of the way. Knock yourselves out!<br>
+<html><body>
+I'm just here to make sure the siege comes off without a hitch. I'll try to stay out of the way. Knock yourselves out!<br>
 <a action="bypass -h Quest BanditStrongHold register_clan wQuest">Register a clan (must be a clan leader)</a><br>
 <a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_6.htm">Select a Clan NPC (must be a clan leader)</a><br>
 <a action="bypass -h Quest BanditStrongHold view_clan_npc">View a Clan NPC (any clan member)</a><br>

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_leaderdidnotchooseyet.htm

@@ -1,3 +1,2 @@
-<html><head><body>
-+Your clan leader has not yet chosen who he will ally himself with! Go and tell him that his decision is required!
-+</body></html>
+<html><body>
+Your clan leader has not yet chosen who he will ally himself with! Go and tell him that his decision is required!
</body></html>

+ 3 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_noclanmember.htm

@@ -1 +1,3 @@
-<html><head><body>You must be a clan member to register one. Your business is elsewhere! Go to it!</body></html>
+<html><body>
+You must be a clan member to register one. Your business is elsewhere! Go to it!
+</body></html>

+ 2 - 6
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_nomoney.htm

@@ -1,6 +1,2 @@
-<html><head><body>
-+So you want to register for free, eh? There is a way... You can take a test if you can't afford the fee...<br>
-+<center>
-+<a action="bypass -h npc_%objectId%_Quest Q504_CompetitionfortheBanditStronghold">"I want to take the test."</a><br>
-+</center>
-+</body></html>
+<html><body>
+So you want to register for free, eh? There is a way... You can take a test if you can't afford the fee...<br>
<center>
<a action="bypass -h npc_%objectId%_Quest Q504_CompetitionfortheBanditStronghold">"I want to take the test."</a>
</center>
</body></html>

+ 4 - 5
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_nonsiegeinitial.htm

@@ -1,8 +1,7 @@
-<html><head>
-
-<body>Messenger:<br> What do you want from me?  I don't like that strangers can walk around on this land as they like.<br>
-Whew~,  but the stronghold is under the rule of <font color="00FFFF">%clanName%</font>clans at present...<br>
+<html><body>Messenger:<br>
+What do you want from me?  I don't like that strangers can walk around on this land as they like.<br>
+Whew~, but the stronghold is under the rule of <font color="00FFFF">%clanName%</font>clans at present...<br>
 <a action="bypass -h npc_%objectId%_Quest 504_CompetitionfortheBanditStronghold">Clan Hall War Registration Qualification Test</a><br>
 <a action="bypass -h Quest BanditStronghold register_clan"> Register for Clan Hall War</a><br>
-<a action="bypass -h Quest BanditStronghold view_attacker_list">View Clans Participating in Tournaments </a><br>
+<a action="bypass -h Quest BanditStronghold view_attacker_list">View Clans Participating in Tournaments</a>
 </body></html>

+ 2 - 4
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_noquest.htm

@@ -1,4 +1,2 @@
-<html><head><body>
-+What's that, you want to register without qualifying? Well, maybe we can work something out... 200,000 adena might get this conversation started...
-+<br><a action="bypass -h Quest BanditStrongHold register_clan wFee">Pay the adena and register a clan. (clan leader)</a>
-+</body></html>
+<html><body>
+What's that, you want to register without qualifying? Well, maybe we can work something out... 200,000 adena might get this conversation started...<br>
<a action="bypass -h Quest BanditStrongHold register_clan wFee">Pay the adena and register a clan. (clan leader)</a>
</body></html>

+ 3 - 2
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_notclannotleader.htm

@@ -1,3 +1,4 @@
-<html><head><body>
-What a nerve! And not even a clan leader! When someone tries something like that in the ol mahum troops we eat him for dinner! (This option is only available to a clan leader.)
+<html><body>
+What a nerve! And not even a clan leader! When someone tries something like that in the ol mahum troops we eat him for dinner!<br>
+(This option is only available to a clan leader.)
 </body></html>

+ 1 - 2
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_onlyleaderselectally.htm

@@ -1,4 +1,3 @@
-<html><head>
-<body>
+<html><body>
 You clan leader is dithering on his selection of allies! Go and tell him to hurry up and decide!
 </body></html>

+ 9 - 10
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_registeredclans.htm

@@ -1,11 +1,10 @@
-<html><head>
-<body>Messenger: <br>
- If you're having second thoughts, now's the time to back out.  <br>The following Clans are participating in preliminaries:<br>
-=== Clans Registered for the Preliminary Contest ===
-<BR>1. <FONT color=00ffff>%clan1%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem1%</FONT>)
-<BR>2. <FONT color=00ffff>%clan2%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem2%</FONT>)
-<BR>3. <FONT color=00ffff>%clan3%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem3%</FONT>)
-<BR>4. <FONT color=00ffff>%clan4%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem4%</FONT>)
-<BR>5. <FONT color=00ffff>%clan5%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem5%</FONT>)
-<BR>
+<html><body>Messenger:<br>
+If you're having second thoughts, now's the time to back out.<br>
+The following Clans are participating in preliminaries:<br>
+=== Clans Registered for the Preliminary Contest ===<br>
+1. <FONT color=00ffff>%clan1%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem1%</FONT>)<br>
+2. <FONT color=00ffff>%clan2%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem2%</FONT>)<br>
+3. <FONT color=00ffff>%clan3%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem3%</FONT>)<br>
+4. <FONT color=00ffff>%clan4%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem4%</FONT>)<br>
+5. <FONT color=00ffff>%clan5%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem5%</FONT>)
 </body></html>

+ 3 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_registrationpassed.htm

@@ -1 +1,3 @@
-<html><head><body>You are too late, registration is over. Maybe next time you should get here earlier!</body></html>
+<html><body>
+You are too late, registration is over. Maybe next time you should get here earlier!
+</body></html>

+ 3 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/siege_date.htm

@@ -1,3 +1,5 @@
-<html><head><body>Messenger:<br>I thought I made it clear that registration does not begin until one hour before the next siege at %nextSiege%.</body></html>
+<html><body>Messenger:<br>
+I thought I made it clear that registration does not begin until one hour before the next siege at %nextSiege%.
+</body></html>
 
  

+ 2 - 4
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/teleporter.htm

@@ -1,5 +1,3 @@
-<html>
-<body>
+<html><body>
 You will be teleporter to the battlefield in 30 seconds.
-</body>
-</html>
+</body></html>

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/events/CharacterBirthday/CharacterBirthday.java

@@ -59,7 +59,7 @@ public class CharacterBirthday extends Quest
 			
 			htmltext = null;
 		}
-		if (event.equalsIgnoreCase("change"))
+		else if (event.equalsIgnoreCase("change"))
 		{
 			// Change Hat
 			if (st.hasQuestItems(10250))
@@ -90,7 +90,7 @@ public class CharacterBirthday extends Quest
 		QuestState st = player.getQuestState(getName());
 		if (st == null)
 		{
-			return null;
+			st = newQuestState(player);
 		}
 		
 		if (!Util.checkIfInRange(10, npc, player, true))

+ 6 - 5
L2J_DataPack_BETA/dist/game/data/scripts/events/HeavyMedal/HeavyMedal.java

@@ -149,8 +149,13 @@ public class HeavyMedal extends Quest
 	@Override
 	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
 	{
-		String htmltext = event;
 		final QuestState st = player.getQuestState(getName());
+		if (st == null)
+		{
+			return getNoQuestMsg(player);
+		}
+		
+		String htmltext = event;
 		int level = checkLevel(st);
 		
 		if (event.equalsIgnoreCase("game"))
@@ -204,10 +209,6 @@ public class HeavyMedal extends Quest
 	public int checkLevel(QuestState st)
 	{
 		int _lev = 0;
-		if (st == null)
-		{
-			return 0;
-		}
 		if (st.hasQuestItems(6402))
 		{
 			_lev = 4;

+ 8 - 4
L2J_DataPack_BETA/dist/game/data/scripts/events/TheValentineEvent/TheValentineEvent.java

@@ -91,8 +91,13 @@ public class TheValentineEvent extends Quest
 	@Override
 	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
 	{
+		final QuestState st = player.getQuestState(getName());
+		if (st == null)
+		{
+			return getNoQuestMsg(player);
+		}
+		
 		String htmltext = event;
-		QuestState st = player.getQuestState(getName());
 		if (event.equalsIgnoreCase("4301-3.htm"))
 		{
 			if (st.isCompleted())
@@ -112,10 +117,9 @@ public class TheValentineEvent extends Quest
 	@Override
 	public String onFirstTalk(L2Npc npc, L2PcInstance player)
 	{
-		QuestState st = player.getQuestState(getName());
-		if (st == null)
+		if (player.getQuestState(getName()) == null)
 		{
-			st = newQuestState(player);
+			newQuestState(player);
 		}
 		return npc.getNpcId() + ".htm";
 	}

+ 31 - 34
L2J_DataPack_BETA/dist/game/data/scripts/quests/215_TrialOfPilgrim/__init__.py

@@ -110,27 +110,26 @@ class Quest (JQuest) :
    elif npcId == 30648 and cond==0 and id == State.COMPLETED :
       htmltext = Quest.getAlreadyCompletedMsg(player)
 
-   elif npcId == 30648 and cond==1 and st.getQuestItemsCount(VOUCHER_OF_TRIAL) :
+   elif npcId == 30648 and cond==1 and st.hasQuestItems(VOUCHER_OF_TRIAL) :
       htmltext = "30648-09.htm"
-   elif npcId == 30648 and cond==17 and st.getQuestItemsCount(BOOK_OF_SAGE) :
+   elif npcId == 30648 and cond==17 and st.hasQuestItems(BOOK_OF_SAGE) :
       st.addExpAndSp(629125,40803)
       st.giveItems(7562,49)
-      st.giveItems(ADENA,114649)
+      st.giveAdena(114649,True)
       player.sendPacket(SocialAction(player.getObjectId(),3))
       htmltext = "30648-10.htm"
       st.giveItems(MARK_OF_PILGRIM,1)
       st.takeItems(BOOK_OF_SAGE,1)
       st.exitQuest(False)
       st.playSound("ItemSound.quest_finish")
-      st.unset("cond")
-   elif npcId == 30571 and cond==1 and st.getQuestItemsCount(VOUCHER_OF_TRIAL) :
+   elif npcId == 30571 and cond==1 and st.hasQuestItems(VOUCHER_OF_TRIAL) :
       htmltext = "30571-01.htm"
       st.takeItems(VOUCHER_OF_TRIAL,1)
       st.set("cond","2")
       st.playSound("ItemSound.quest_middle")
    elif npcId == 30571 and cond==2 :
       htmltext = "30571-02.htm"
-   elif npcId == 30571 and cond in [5,6] and st.getQuestItemsCount(SPIRIT_OF_FLAME) :
+   elif npcId == 30571 and cond in [5,6] and st.hasQuestItems(SPIRIT_OF_FLAME) :
       htmltext = "30571-03.htm"
       st.set("cond","6")
       st.playSound("ItemSound.quest_middle")
@@ -140,28 +139,28 @@ class Quest (JQuest) :
       st.playSound("ItemSound.quest_middle")
    elif npcId == 30649 and cond==3 :
       htmltext = "30649-02.htm"
-   elif npcId == 30649 and cond==4 and st.getQuestItemsCount(ESSENSE_OF_FLAME) :
+   elif npcId == 30649 and cond==4 and st.hasQuestItems(ESSENSE_OF_FLAME) :
       htmltext = "30649-03.htm"
-   elif npcId == 30550 and cond==6 and st.getQuestItemsCount(SPIRIT_OF_FLAME) :
+   elif npcId == 30550 and cond==6 and st.hasQuestItems(SPIRIT_OF_FLAME) :
       htmltext = "30550-01.htm"
       st.giveItems(TAG_OF_RUMOR,1)
       st.set("cond","7")
       st.playSound("ItemSound.quest_middle")
    elif npcId == 30550 and cond==7 :
       htmltext = "30550-02.htm"
-   elif npcId == 30650 and cond==7 and st.getQuestItemsCount(TAG_OF_RUMOR) :
+   elif npcId == 30650 and cond==7 and st.hasQuestItems(TAG_OF_RUMOR) :
       htmltext = st.showHtmlFile("30650-01.htm").replace("RequiredAdena", str(100000))
-   elif npcId == 30650 and cond>=9 and st.getQuestItemsCount(GREY_BADGE) and st.getQuestItemsCount(BOOK_OF_GERALD) :
+   elif npcId == 30650 and cond>=9 and st.hasQuestItems(GREY_BADGE) and st.hasQuestItems(BOOK_OF_GERALD) :
       htmltext = "30650-04.htm"
-      st.giveAdena(100000,False)
+      st.giveAdena(100000,True)
       st.takeItems(BOOK_OF_GERALD,1)
-   elif npcId == 30651 and cond==7 and st.getQuestItemsCount(TAG_OF_RUMOR) :
+   elif npcId == 30651 and cond==7 and st.hasQuestItems(TAG_OF_RUMOR) :
       htmltext = "30651-01.htm"
       st.giveItems(GREY_BADGE,1)
       st.takeItems(TAG_OF_RUMOR,1)
       st.set("cond","9")
       st.playSound("ItemSound.quest_middle")
-   elif npcId == 30651 and cond==8 and st.getQuestItemsCount(TAG_OF_RUMOR) :
+   elif npcId == 30651 and cond==8 and st.hasQuestItems(TAG_OF_RUMOR) :
       htmltext = "30651-02.htm"
       st.giveItems(GREY_BADGE,1)
       st.takeItems(TAG_OF_RUMOR,1)
@@ -189,7 +188,7 @@ class Quest (JQuest) :
       st.takeItems(HAIR_OF_NAHIR,1)
       st.set("cond","12")
       st.playSound("ItemSound.quest_middle")
-   elif npcId == 30036 and cond==12 and st.getQuestItemsCount(STATUE_OF_EINHASAD) :
+   elif npcId == 30036 and cond==12 and st.hasQuestItems(STATUE_OF_EINHASAD) :
       htmltext = "30036-04.htm"
    elif npcId == 30362 and cond==12 :
       htmltext = "30362-01.htm"
@@ -197,20 +196,20 @@ class Quest (JQuest) :
       st.playSound("ItemSound.quest_middle")
    elif npcId == 30362 and cond==13 :
       htmltext = "30362-02.htm"
-   elif npcId == 30362 and cond==15 and st.getQuestItemsCount(BOOK_OF_DARKNESS) :
+   elif npcId == 30362 and cond==15 and st.hasQuestItems(BOOK_OF_DARKNESS) :
       htmltext = "30362-03.htm"
    elif npcId == 30362 and cond==16 :
       htmltext = "30362-06.htm"
-   elif npcId == 30362 and cond==15 and st.getQuestItemsCount(BOOK_OF_DARKNESS)==0 :
+   elif npcId == 30362 and cond==15 and not st.hasQuestItems(BOOK_OF_DARKNESS) :
       htmltext = "30362-07.htm"
-   elif npcId == 30652 and cond==14 and st.getQuestItemsCount(DEBRIS_OF_WILLOW) :
+   elif npcId == 30652 and cond==14 and st.hasQuestItems(DEBRIS_OF_WILLOW) :
       htmltext = "30652-01.htm"
-   elif npcId == 30652 and cond==15 and st.getQuestItemsCount(BOOK_OF_DARKNESS) :
+   elif npcId == 30652 and cond==15 and st.hasQuestItems(BOOK_OF_DARKNESS) :
       htmltext = "30652-03.htm"
    elif npcId == 30612 and cond==16 :
       htmltext = "30612-01.htm"
       st.giveItems(BOOK_OF_SAGE,1)
-      if st.getQuestItemsCount(BOOK_OF_DARKNESS) :
+      if st.hasQuestItems(BOOK_OF_DARKNESS) :
         st.takeItems(BOOK_OF_DARKNESS,1)
       st.set("cond","17")
       st.playSound("ItemSound.quest_middle")
@@ -224,26 +223,24 @@ class Quest (JQuest) :
  def onKill(self,npc,player,isPet):
    st = player.getQuestState(qn)
    if not st : return 
-   if st.getState() != State.STARTED : return 
+   if not st.isStarted() : return 
    npcId = npc.getNpcId()
    cond=st.getInt("cond")
    if npcId == 27116 :
-      if cond == 3 and not st.getQuestItemsCount(ESSENSE_OF_FLAME) :
-        if not self.getRandom(5) :
-          st.giveItems(ESSENSE_OF_FLAME,1)
-          st.set("cond","4")
-          st.playSound("ItemSound.quest_middle")
+     if cond == 3 and not st.hasQuestItems(ESSENSE_OF_FLAME) and not self.getRandom(5) :
+       st.giveItems(ESSENSE_OF_FLAME,1)
+       st.set("cond","4")
+       st.playSound("ItemSound.quest_middle")
    elif npcId == 27117 :
-      if cond == 10 and not st.getQuestItemsCount(HAIR_OF_NAHIR) :
-        st.giveItems(HAIR_OF_NAHIR,1)
-        st.set("cond","11")
-        st.playSound("ItemSound.quest_middle")
+     if cond == 10 and not st.hasQuestItems(HAIR_OF_NAHIR) :
+       st.giveItems(HAIR_OF_NAHIR,1)
+       st.set("cond","11")
+       st.playSound("ItemSound.quest_middle")
    elif npcId == 27118 :
-      if cond == 13 and not st.getQuestItemsCount(DEBRIS_OF_WILLOW) :
-        if not self.getRandom(5) :
-          st.giveItems(DEBRIS_OF_WILLOW,1)
-          st.set("cond","14")
-          st.playSound("ItemSound.quest_middle")
+     if cond == 13 and not st.hasQuestItems(DEBRIS_OF_WILLOW) and not self.getRandom(5) :
+       st.giveItems(DEBRIS_OF_WILLOW,1)
+       st.set("cond","14")
+       st.playSound("ItemSound.quest_middle")
    return
 
 QUEST       = Quest(215,qn,"Trial Of Pilgrim")

+ 47 - 47
L2J_DataPack_BETA/dist/game/data/scripts/quests/218_TestimonyOfLife/__init__.py

@@ -114,9 +114,9 @@ class Quest(JQuest):
 		elif event == "30300_7" :
 			htmltext = "30300-10.htm"
 			st.set("cond","6")
-			st.takeItems(PURE_MITHRIL_ORE_ID,st.getQuestItemsCount(PURE_MITHRIL_ORE_ID))
-			st.takeItems(ANT_SOLDIER_ACID_ID,st.getQuestItemsCount(ANT_SOLDIER_ACID_ID))
-			st.takeItems(WYRMS_TALON1_ID,st.getQuestItemsCount(WYRMS_TALON1_ID))
+			st.takeItems(PURE_MITHRIL_ORE_ID,-1)
+			st.takeItems(ANT_SOLDIER_ACID_ID,-1)
+			st.takeItems(WYRMS_TALON1_ID,-1)
 			st.takeItems(PUSHKINS_LIST_ID,1)
 			st.giveItems(PURE_MITHRIL_CUP_ID,1)
 		elif event == "30419_1" :
@@ -166,8 +166,8 @@ class Quest(JQuest):
 			elif st.getQuestItemsCount(MOONFLOWER_CHARM_ID):
 				htmltext = "30460-06.htm"
 			elif st.getQuestItemsCount(CAMOMILE_CHARM_ID):
-				if st.getGameTicks() != st.getInt("id"):
-					st.set("id",str(st.getGameTicks()))
+				if self.getGameTicks() != st.getInt("id"):
+					st.set("id",str(self.getGameTicks())) # TODO should it really be like this?
 					st.addExpAndSp(943416,62959)
 					st.giveItems(57,171144)
 					st.giveItems(7562,16)
@@ -178,37 +178,37 @@ class Quest(JQuest):
 					st.exitQuest(False)
 					st.playSound("ItemSound.quest_finish")
 		elif npcId == 30154:
-			if st.getQuestItemsCount(CARDIENS_LETTER_ID):
+			if st.hasQuestItems(CARDIENS_LETTER_ID):
 				htmltext = "30154-01.htm"
-			elif st.getQuestItemsCount(WATER_OF_LIFE_ID):
+			elif st.hasQuestItems(WATER_OF_LIFE_ID):
 				htmltext = "30154-09.htm"
 				st.set("cond","21")
 				st.takeItems(WATER_OF_LIFE_ID,1)
 				st.takeItems(MOONFLOWER_CHARM_ID,1)
 				st.giveItems(CAMOMILE_CHARM_ID,1)
-			elif st.getQuestItemsCount(MOONFLOWER_CHARM_ID):
+			elif st.hasQuestItems(MOONFLOWER_CHARM_ID):
 				htmltext = "30154-08.htm"
-			elif st.getQuestItemsCount(CAMOMILE_CHARM_ID):
+			elif st.hasQuestItems(CAMOMILE_CHARM_ID):
 				htmltext = "30154-10.htm"
 		elif npcId == 30371:
-			if st.getQuestItemsCount(HIERARCHS_LETTER_ID):
+			if st.hasQuestItems(HIERARCHS_LETTER_ID):
 				htmltext = "30371-01.htm"
-			elif st.getQuestItemsCount(GRAIL_DIAGRAM_ID):
+			elif st.hasQuestItems(GRAIL_DIAGRAM_ID):
 				htmltext = "30371-04.htm"
-			elif st.getQuestItemsCount(PUSHKINS_LIST_ID):
+			elif st.hasQuestItems(PUSHKINS_LIST_ID):
 				htmltext = "30371-05.htm"
-			elif st.getQuestItemsCount(PURE_MITHRIL_CUP_ID):
+			elif st.hasQuestItems(PURE_MITHRIL_CUP_ID):
 				htmltext = "30371-06.htm"
 				st.set("cond","7")
 				st.takeItems(PURE_MITHRIL_CUP_ID,1)
 				st.giveItems(THALIAS_LETTER1_ID,1)
-			elif st.getQuestItemsCount(THALIAS_LETTER1_ID):
+			elif st.hasQuestItems(THALIAS_LETTER1_ID):
 				htmltext = "30371-07.htm"
-			elif st.getQuestItemsCount(ARKENIAS_CONTRACT_ID):
+			elif st.hasQuestItems(ARKENIAS_CONTRACT_ID):
 				htmltext = "30371-08.htm"
-			elif st.getQuestItemsCount(STARDUST_ID):
+			elif st.hasQuestItems(STARDUST_ID):
 				htmltext = "30371-09.htm"
-			elif st.getQuestItemsCount(THALIAS_INSTRUCTIONS_ID):
+			elif st.hasQuestItems(THALIAS_INSTRUCTIONS_ID):
 				if player.getLevel() < 37:
 					htmltext = "30371-12.htm"
 					st.set("cond","13")
@@ -216,60 +216,60 @@ class Quest(JQuest):
 					st.set("cond","14")
 					st.takeItems(THALIAS_INSTRUCTIONS_ID,1)
 					st.giveItems(THALIAS_LETTER2_ID,1)
-			elif st.getQuestItemsCount(THALIAS_LETTER2_ID):
+			elif st.hasQuestItems(THALIAS_LETTER2_ID):
 				htmltext = "30371-14.htm"
-			elif st.getQuestItemsCount(ISAELS_INSTRUCTIONS_ID):
+			elif st.hasQuestItems(ISAELS_INSTRUCTIONS_ID):
 				htmltext = "30371-15.htm"
-			elif st.getQuestItemsCount(ISAELS_LETTER_ID):
+			elif st.hasQuestItems(ISAELS_LETTER_ID):
 				htmltext = "30371-16.htm"
 				st.set("cond","18")
 				st.takeItems(ISAELS_LETTER_ID,1)
 				st.giveItems(GRAIL_OF_PURITY_ID,1)
-			elif st.getQuestItemsCount(GRAIL_OF_PURITY_ID):
+			elif st.hasQuestItems(GRAIL_OF_PURITY_ID):
 				htmltext = "30371-17.htm"
-			elif st.getQuestItemsCount(TEARS_OF_UNICORN_ID):
+			elif st.hasQuestItems(TEARS_OF_UNICORN_ID):
 				htmltext = "30371-18.htm"
 				st.set("cond","20")
 				st.takeItems(TEARS_OF_UNICORN_ID,1)
 				st.giveItems(WATER_OF_LIFE_ID,1)
-			elif st.getQuestItemsCount(WATER_OF_LIFE_ID):
+			elif st.hasQuestItems(WATER_OF_LIFE_ID):
 				htmltext = "30371-19.htm"
 		elif npcId == 30300:
-			if st.getQuestItemsCount(GRAIL_DIAGRAM_ID):
+			if st.hasQuestItems(GRAIL_DIAGRAM_ID):
 				htmltext = "30300-01.htm"
-			elif st.getQuestItemsCount(PUSHKINS_LIST_ID):
+			elif st.hasQuestItems(PUSHKINS_LIST_ID):
 				if st.getInt("cond")==5:
 					htmltext = "30300-08.htm"
 				else:
 					htmltext = "30300-07.htm"
-			elif st.getQuestItemsCount(PURE_MITHRIL_CUP_ID):
+			elif st.hasQuestItems(PURE_MITHRIL_CUP_ID):
 				htmltext = "30300-11.htm"
 			elif st.getInt("cond")>5:
 				htmltext = "30300-12.htm"
 		elif npcId == 30419:
-			if st.getQuestItemsCount(THALIAS_LETTER1_ID):
+			if st.hasQuestItems(THALIAS_LETTER1_ID):
 				htmltext = "30419-01.htm"
-			elif st.getQuestItemsCount(ARKENIAS_INSTRUCTIONS_ID) or st.getQuestItemsCount(ADONIUS_LIST_ID):
+			elif st.hasQuestItems(ARKENIAS_INSTRUCTIONS_ID) or st.hasQuestItems(ADONIUS_LIST_ID):
 				htmltext = "30419-05.htm"
-			elif st.getQuestItemsCount(ANDARIEL_SCRIPTURE_COPY_ID):
+			elif st.hasQuestItems(ANDARIEL_SCRIPTURE_COPY_ID):
 				htmltext = "30419-06.htm"
 				st.set("cond","12")
 				st.takeItems(ARKENIAS_CONTRACT_ID,1)
 				st.takeItems(ANDARIEL_SCRIPTURE_COPY_ID,1)
 				st.giveItems(STARDUST_ID,1)
-			elif st.getQuestItemsCount(STARDUST_ID):
+			elif st.hasQuestItems(STARDUST_ID):
 				htmltext = "30419-07.htm"
 			else:
 				htmltext = "30419-08.htm"
 		elif npcId == 30375:
-			if st.getQuestItemsCount(ARKENIAS_INSTRUCTIONS_ID):
+			if st.hasQuestItems(ARKENIAS_INSTRUCTIONS_ID):
 				htmltext = "30375-01.htm"
-			elif st.getQuestItemsCount(ADONIUS_LIST_ID):
+			elif st.hasQuestItems(ADONIUS_LIST_ID):
 				if st.getInt("cond")==10:
 					htmltext = "30375-04.htm"
 					st.set("cond","11")
-					st.takeItems(SPIDER_ICHOR_ID,st.getQuestItemsCount(SPIDER_ICHOR_ID))
-					st.takeItems(HARPYS_DOWN_ID,st.getQuestItemsCount(HARPYS_DOWN_ID))
+					st.takeItems(SPIDER_ICHOR_ID,-1)
+					st.takeItems(HARPYS_DOWN_ID,-1)
 					st.takeItems(ADONIUS_LIST_ID,1)
 					st.giveItems(ANDARIEL_SCRIPTURE_COPY_ID,1)
 				else:
@@ -282,8 +282,8 @@ class Quest(JQuest):
 			if st.getQuestItemsCount(THALIAS_LETTER2_ID):
 				htmltext = "30655-01.htm"
 			elif st.getQuestItemsCount(ISAELS_INSTRUCTIONS_ID):
-				if st.getQuestItemsCount(TALINS_SPEAR_BLADE_ID) and st.getQuestItemsCount(TALINS_SPEAR_SHAFT_ID) and st.getQuestItemsCount(TALINS_RUBY_ID) \
-				and st.getQuestItemsCount(TALINS_AQUAMARINE_ID) and st.getQuestItemsCount(TALINS_AMETHYST_ID) and st.getQuestItemsCount(TALINS_PERIDOT_ID):
+				if st.hasQuestItems(TALINS_SPEAR_BLADE_ID) and st.hasQuestItems(TALINS_SPEAR_SHAFT_ID) and st.hasQuestItems(TALINS_RUBY_ID) \
+				and st.hasQuestItems(TALINS_AQUAMARINE_ID) and st.hasQuestItems(TALINS_AMETHYST_ID) and st.hasQuestItems(TALINS_PERIDOT_ID):
 					htmltext = "30655-04.htm"
 					st.set("cond","17")
 					st.takeItems(TALINS_SPEAR_BLADE_ID,1)
@@ -297,9 +297,9 @@ class Quest(JQuest):
 					st.giveItems(TALINS_SPEAR_ID,1)
 				else:
 					htmltext = "30655-03.htm"
-			elif st.getQuestItemsCount(TALINS_SPEAR_ID) and st.getQuestItemsCount(ISAELS_LETTER_ID):
+			elif st.hasQuestItems(TALINS_SPEAR_ID) and st.hasQuestItems(ISAELS_LETTER_ID):
 				htmltext = "30655-05.htm"
-			elif st.getQuestItemsCount(GRAIL_OF_PURITY_ID) or st.getQuestItemsCount(CAMOMILE_CHARM_ID):
+			elif st.hasQuestItems(GRAIL_OF_PURITY_ID) or st.hasQuestItems(CAMOMILE_CHARM_ID):
 				htmltext = "30655-06.htm"
 		return htmltext
 
@@ -309,7 +309,7 @@ class Quest(JQuest):
 		if st.getState() != State.STARTED : return
 		npcId = npc.getNpcId()
 		if npcId == 20550:
-			if st.getQuestItemsCount(PUSHKINS_LIST_ID) and st.getQuestItemsCount(PURE_MITHRIL_ORE_ID)<10:
+			if st.hasQuestItems(PUSHKINS_LIST_ID) and st.getQuestItemsCount(PURE_MITHRIL_ORE_ID)<10:
 				if self.getRandom(100)<50:
 					st.giveItems(PURE_MITHRIL_ORE_ID,1)
 					if st.getQuestItemsCount(PURE_MITHRIL_ORE_ID) < 10:
@@ -319,7 +319,7 @@ class Quest(JQuest):
 						if st.getQuestItemsCount(WYRMS_TALON1_ID)>=20 and st.getQuestItemsCount(ANT_SOLDIER_ACID_ID)>=20:
 							st.set("cond","5")
 		elif npcId == 20176:
-			if st.getQuestItemsCount(PUSHKINS_LIST_ID) and st.getQuestItemsCount(WYRMS_TALON1_ID)<20:
+			if st.hasQuestItems(PUSHKINS_LIST_ID) and st.getQuestItemsCount(WYRMS_TALON1_ID)<20:
 				if self.getRandom(100)<50 :
 					st.giveItems(WYRMS_TALON1_ID,1)
 					if st.getQuestItemsCount(WYRMS_TALON1_ID) < 20:
@@ -329,7 +329,7 @@ class Quest(JQuest):
 						if st.getQuestItemsCount(PURE_MITHRIL_ORE_ID)>=10 and st.getQuestItemsCount(ANT_SOLDIER_ACID_ID)>=20:
 							st.set("cond","5")
 		elif npcId in [20082,20084,20086,20087,20088]:
-			if st.getQuestItemsCount(PUSHKINS_LIST_ID) and st.getQuestItemsCount(ANT_SOLDIER_ACID_ID)<20:
+			if st.hasQuestItems(PUSHKINS_LIST_ID) and st.getQuestItemsCount(ANT_SOLDIER_ACID_ID)<20:
 				chance=80
 				if npcId in [20087,20088]:
 					chance=50
@@ -342,7 +342,7 @@ class Quest(JQuest):
 						if st.getQuestItemsCount(PURE_MITHRIL_ORE_ID)>=10 and st.getQuestItemsCount(WYRMS_TALON1_ID)>=20:
 							st.set("cond","5")
 		elif npcId == 20233:
-			if st.getQuestItemsCount(ADONIUS_LIST_ID) and st.getQuestItemsCount(SPIDER_ICHOR_ID)<20:
+			if st.hasQuestItems(ADONIUS_LIST_ID) and st.getQuestItemsCount(SPIDER_ICHOR_ID)<20:
 				if self.getRandom(100)<50:
 					st.giveItems(SPIDER_ICHOR_ID,1)
 					if st.getQuestItemsCount(SPIDER_ICHOR_ID) < 20:
@@ -352,7 +352,7 @@ class Quest(JQuest):
 						if st.getQuestItemsCount(HARPYS_DOWN_ID)>=20:
 							st.set("cond","10")
 		elif npcId == 20145 :
-			if st.getQuestItemsCount(ADONIUS_LIST_ID) and st.getQuestItemsCount(HARPYS_DOWN_ID)<20:
+			if st.hasQuestItems(ADONIUS_LIST_ID) and st.getQuestItemsCount(HARPYS_DOWN_ID)<20:
 				if self.getRandom(100)<50:
 					st.giveItems(HARPYS_DOWN_ID,1)
 					if st.getQuestItemsCount(HARPYS_DOWN_ID) < 20:
@@ -362,19 +362,19 @@ class Quest(JQuest):
 						if st.getQuestItemsCount(SPIDER_ICHOR_ID)>=20:
 							st.set("cond","10")
 		elif npcId == 27077:
-			if st.getQuestItemsCount(TALINS_SPEAR_ID) and st.getQuestItemsCount(GRAIL_OF_PURITY_ID) and not st.getQuestItemsCount(TEARS_OF_UNICORN_ID):
+			if st.hasQuestItems(TALINS_SPEAR_ID) and st.hasQuestItems(GRAIL_OF_PURITY_ID) and not st.hasQuestItems(TEARS_OF_UNICORN_ID):
 				st.takeItems(GRAIL_OF_PURITY_ID,1)
 				st.takeItems(TALINS_SPEAR_ID,1)
 				st.giveItems(TEARS_OF_UNICORN_ID,1)
 				st.set("cond","19")
 		elif npcId in [20581,20582]:
-			if st.getQuestItemsCount(ISAELS_INSTRUCTIONS_ID) and self.getRandom(100) < 50 :
+			if st.hasQuestItems(ISAELS_INSTRUCTIONS_ID) and self.getRandom(100) < 50 :
 				for id in [TALINS_SPEAR_BLADE_ID, TALINS_SPEAR_SHAFT_ID, TALINS_RUBY_ID, TALINS_AQUAMARINE_ID, TALINS_AMETHYST_ID]:
-					if not st.getQuestItemsCount(id):
+					if not st.hasQuestItems(id):
 						st.giveItems(id,1)
 						st.playSound("ItemSound.quest_itemget")
 						return
-				if not st.getQuestItemsCount(TALINS_PERIDOT_ID) :
+				if not st.hasQuestItems(TALINS_PERIDOT_ID) :
 					st.giveItems(TALINS_PERIDOT_ID,1)
 					st.playSound("ItemSound.quest_itemget")
 					st.set("cond","16")

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/60_GoodWorkReward/__init__.py

@@ -129,7 +129,7 @@ class Quest (JQuest) :
       text = BYPASS[player.getClassId().getId()]
       htmltext = "<html><body>Black Marketeer of Mammon:<br>If you are finished thinking, select one. Which class would you like to be?<br>"+text+"</body></html>"
     elif event == "31092-07.htm" :
-      st.giveAdena(3000000, False)
+      st.giveAdena(3000000,True)
       st.set("onlyone","1")
     elif event in CLASSES.keys():
          newclass,req_item=CLASSES[event]
@@ -142,7 +142,7 @@ class Quest (JQuest) :
          if adena == 3 :
             return "31092-06.htm"
          if adena > 0 :
-            st.giveAdena(adena*1000000,False)
+            st.giveAdena(adena*1000000,True)
          htmltext = "31092-05.htm"
          st.set("onlyone","1")
     return htmltext

+ 3 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10267_JourneyToGracia/Q10267_JourneyToGracia.java

@@ -88,11 +88,10 @@ public class Q10267_JourneyToGracia extends Quest
 	@Override
 	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
 	{
-		String htmltext = event;
 		final QuestState st = player.getQuestState(qn);
 		if (st == null)
 		{
-			return htmltext;
+			return getNoQuestMsg(player);
 		}
 		
 		switch (event)
@@ -108,13 +107,13 @@ public class Q10267_JourneyToGracia extends Quest
 				st.playSound("ItemSound.quest_middle");
 				break;
 			case "32548-02.htm":
-				st.giveAdena(92500, false);
+				st.giveAdena(92500, true);
 				st.addExpAndSp(75480, 7570);
 				st.playSound("ItemSound.quest_finish");
 				st.exitQuest(false);
 				break;
 		}
-		return htmltext;
+		return event;
 	}
 	
 	public Q10267_JourneyToGracia(int questId, String name, String descr)

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

@@ -66,7 +66,7 @@ public class Q10268_ToTheSeedOfInfinity extends Quest
 				else if (npcId == TEPIOS)
 				{
 					htmltext = "32530-01.htm";
-					st.giveAdena(16671, false);
+					st.giveAdena(16671, true);
 					st.addExpAndSp(100640, 10098);
 					st.playSound("ItemSound.quest_finish");
 					st.exitQuest(false);

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

@@ -66,7 +66,7 @@ public class Q10269_ToTheSeedOfDestruction extends Quest
 				else if (npcId == ALLENOS)
 				{
 					htmltext = "32526-01.htm";
-					st.giveAdena(29174, false);
+					st.giveAdena(29174, true);
 					st.addExpAndSp(176121, 7671);
 					st.playSound("ItemSound.quest_finish");
 					st.exitQuest(false);

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

@@ -78,7 +78,7 @@ public class Q10271_TheEnvelopingDarkness extends Quest
 					break;
 				case 4:
 					htmltext = "32560-08.htm";
-					st.giveAdena(62516, false);
+					st.giveAdena(62516, true);
 					st.addExpAndSp(377403, 37867);
 					st.playSound("ItemSound.quest_finish");
 					st.exitQuest(false);

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

@@ -142,6 +142,7 @@ public class Q10275_ContainingTheAttributePower extends Quest
 								htmltext = "32325-10.htm";
 								break;
 						}
+						break;
 					case YANG:
 						switch (cond)
 						{

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

@@ -109,7 +109,7 @@ public class Q10290_LandDragonConqueror extends Quest
 				else if (cond == 2)
 				{
 					st.takeItems(MiracleNecklace, 1);
-					st.giveAdena(131236, false);
+					st.giveAdena(131236, true);
 					st.addExpAndSp(702557, 76334);
 					st.giveItems(AntharaSlayerCirclet, 1);
 					st.playSound("ItemSound.quest_finish");

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

@@ -103,7 +103,7 @@ public class Q10291_FireDragonDestroyer extends Quest
 				else if (cond == 2)
 				{
 					st.takeItems(ValorNecklace, 1);
-					st.giveAdena(126549, false);
+					st.giveAdena(126549, true);
 					st.addExpAndSp(717291, 77397);
 					st.giveItems(ValakaSlayerCirclet, 1);
 					st.playSound("ItemSound.quest_finish");

+ 7 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q132_MatrasCuriosity/Q132_MatrasCuriosity.java

@@ -45,13 +45,14 @@ public final class Q132_MatrasCuriosity extends Quest
 	@Override
 	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
 	{
-		String htmltext = event;
 		final QuestState st = player.getQuestState(qn);
 		if (st == null)
 		{
 			return getNoQuestMsg(player);
 		}
 		
+		String htmltext = event;
+		
 		if (event.equalsIgnoreCase("32245-03.htm") && (player.getLevel() >= 76) && !st.isCompleted())
 		{
 			if (st.isCreated())
@@ -77,7 +78,7 @@ public final class Q132_MatrasCuriosity extends Quest
 			st.giveItems(WIND, 1);
 			st.giveItems(DARKNESS, 1);
 			st.giveItems(DIVINITY, 1);
-			st.playSound("IItemSound.quest_finish");
+			st.playSound("ItemSound.quest_finish");
 			st.exitQuest(false);
 		}
 		return htmltext;
@@ -86,7 +87,7 @@ public final class Q132_MatrasCuriosity extends Quest
 	@Override
 	public final String onTalk(L2Npc npc, L2PcInstance player)
 	{
-		String htmltext = Quest.getNoQuestMsg(player);
+		String htmltext = getNoQuestMsg(player);
 		final QuestState st = player.getQuestState(qn);
 		if (st == null)
 		{
@@ -144,8 +145,8 @@ public final class Q132_MatrasCuriosity extends Quest
 					
 					if (st.hasQuestItems(BLUEPRINT_RANKU))
 					{
-						st.playSound("ItemSound.quest_middle");
 						st.set("cond", "2");
+						st.playSound("ItemSound.quest_middle");
 					}
 					else
 					{
@@ -161,10 +162,10 @@ public final class Q132_MatrasCuriosity extends Quest
 					st.giveItems(BLUEPRINT_RANKU, 1);
 					st.set("rewarded_ranku", "2");
 					
-					if (st.getQuestItemsCount(BLUEPRINT_PRINCE) > 0)
+					if (st.hasQuestItems(BLUEPRINT_PRINCE))
 					{
-						st.playSound("ItemSound.quest_middle");
 						st.set("cond", "2");
+						st.playSound("ItemSound.quest_middle");
 					}
 					else
 					{

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

@@ -109,7 +109,7 @@ public class Q18_MeetingWithTheGoldenRam extends Quest
 			case "31555-02.html":
 				if (st.hasQuestItems(BOX))
 				{
-					st.giveAdena(40000, false);
+					st.giveAdena(40000, true);
 					st.takeItems(BOX, -1);
 					st.addExpAndSp(126668, 11731);
 					st.playSound("ItemSound.quest_finish");

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q19_GoToThePastureland/Q19_GoToThePastureland.java

@@ -58,7 +58,7 @@ public class Q19_GoToThePastureland extends Quest
 			if (st.hasQuestItems(YoungWildBeastMeat))
 			{
 				st.takeItems(YoungWildBeastMeat, -1);
-				st.giveAdena(50000, false);
+				st.giveAdena(50000, true);
 				st.addExpAndSp(136766, 12688);
 				st.playSound("ItemSound.quest_finish");
 				st.exitQuest(false);
@@ -67,7 +67,7 @@ public class Q19_GoToThePastureland extends Quest
 			else if (st.hasQuestItems(Veal))
 			{
 				st.takeItems(Veal, -1);
-				st.giveAdena(147200, false);
+				st.giveAdena(147200, true);
 				st.addExpAndSp(385040, 75250);
 				st.playSound("ItemSound.quest_finish");
 				st.exitQuest(false);

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

@@ -52,7 +52,7 @@ public class Q249_PoisonedPlainsOfTheLizardmen extends Quest
 		}
 		else if ((npc.getNpcId() == _johnny) && event.equalsIgnoreCase("32744-03.htm"))
 		{
-			st.giveAdena(83056, false);
+			st.giveAdena(83056, true);
 			st.addExpAndSp(477496, 58743);
 			st.playSound("ItemSound.quest_finish");
 			st.exitQuest(false);

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

@@ -68,7 +68,7 @@ public class Q250_WatchWhatYouEat extends Quest
 			}
 			else if (event.equalsIgnoreCase("32743-end.htm"))
 			{
-				st.giveAdena(135661, false);
+				st.giveAdena(135661, true);
 				st.addExpAndSp(698334, 76369);
 				st.playSound("ItemSound.quest_finish");
 				st.exitQuest(false);

+ 13 - 15
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q309_ForAGoodCause/Q309_ForAGoodCause.java

@@ -85,13 +85,13 @@ public class Q309_ForAGoodCause extends Quest
 	@Override
 	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
 	{
-		String htmltext = event;
-		QuestState st = player.getQuestState(qn);
+		final QuestState st = player.getQuestState(qn);
 		if (st == null)
 		{
-			return htmltext;
+			return getNoQuestMsg(player);
 		}
 		
+		String htmltext = event;
 		if (event.equalsIgnoreCase("32647-05.htm"))
 		{
 			st.setState(State.STARTED);
@@ -101,13 +101,15 @@ public class Q309_ForAGoodCause extends Quest
 		}
 		else if (event.equalsIgnoreCase("claimreward"))
 		{
-			QuestState qs = player.getQuestState("239_WontYouJoinUs");
+			final QuestState qs = player.getQuestState("239_WontYouJoinUs");
 			if (qs != null)
 			{
 				htmltext = (qs.isCompleted()) ? "32647-11.htm" : "32647-10.htm";
 			}
-			
-			htmltext = "32647-09.htm";
+			else
+			{
+				htmltext = "32647-09.htm";
+			}
 		}
 		else if (event.equalsIgnoreCase("receivepieces"))
 		{
@@ -257,7 +259,7 @@ public class Q309_ForAGoodCause extends Quest
 	public String onTalk(L2Npc npc, L2PcInstance player)
 	{
 		String htmltext = getNoQuestMsg(player);
-		QuestState st = player.getQuestState(qn);
+		final QuestState st = player.getQuestState(qn);
 		if (st == null)
 		{
 			return htmltext;
@@ -265,13 +267,10 @@ public class Q309_ForAGoodCause extends Quest
 		
 		if (npc.getNpcId() == ATRA)
 		{
-			QuestState qs = player.getQuestState("308_ReedFieldMaintenance");
-			if (qs != null)
+			final QuestState qs = player.getQuestState("308_ReedFieldMaintenance");
+			if ((qs != null) && qs.isStarted())
 			{
-				if (qs.isStarted())
-				{
-					htmltext = "32647-17.htm";
-				}
+				htmltext = "32647-17.htm";
 			}
 			else if (st.isStarted())
 			{
@@ -288,7 +287,7 @@ public class Q309_ForAGoodCause extends Quest
 	@Override
 	public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
 	{
-		QuestState st = player.getQuestState(qn);
+		final QuestState st = player.getQuestState(qn);
 		if (st == null)
 		{
 			return null;
@@ -348,7 +347,6 @@ public class Q309_ForAGoodCause extends Quest
 		
 		addStartNpc(ATRA);
 		addTalkId(ATRA);
-		
 		addKillId(MUCROKIANS);
 	}
 	

+ 2 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q458_PerfectForm/32768-06.htm

@@ -1,5 +1,6 @@
 <html><body>Kelleyia:<br>
-Right. Down to business.<br>As you can see, there are <font color="LEVEL">Alpine Buffalo, Grendel, Cougar, and Kookaburra</font> all over the place. Cute in their infant state, but vicious if they are raised incorrectly.<br>
+Right. Down to business.<br>
+As you can see, there are <font color="LEVEL">Alpine Buffalo, Grendel, Cougar, and Kookaburra</font> all over the place. Cute in their infant state, but vicious if they are raised incorrectly.<br>
 There are 3 parts to the challenge.Part 1: Raise an Alpine animal to their adult state. Part 2: Slaughter the beast. Part 3...<br>
 <a action="bypass -h Quest 458_PerfectForm 32768-07.htm">&quot;Look good I think I get it.&quot;</a>
 </body></html>

+ 2 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q458_PerfectForm/32768-07.htm

@@ -1,5 +1,6 @@
 <html><body>Kelleyia:<br>
 No, you do NOT get it you amateur. Part 3 is the most important part of the challenge. It separates the no talent wannabes from the pros.<br>
-You must score <font color="LEVEL">Over-hits on fully grown Alpine animals</font>. A kill is a kill and that is all fine and dandy, but we are looking for perfection here. Bonus points are scored for performing <font color="LEVEL">Critical Over-hits</font>.<br>Do you understand the challenge?<br>
+You must score <font color="LEVEL">Over-hits on fully grown Alpine animals</font>. A kill is a kill and that is all fine and dandy, but we are looking for perfection here. Bonus points are scored for performing <font color="LEVEL">Critical Over-hits</font>.<br>
+Do you understand the challenge?<br>
 <a action="bypass -h Quest 458_PerfectForm 32768-08.htm">&quot;Yes... I think.&quot;</a>
 </body></html>

+ 1 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q458_PerfectForm/32768-08.htm

@@ -1,6 +1,5 @@
 <html><body>Kelleyia:<br>
-Really... you really want me to go over this again? It is simple. 
-Find an <font color="LEVEL">Alpine Kookaburra, Alpine Cougar, Alpine Buffalo, or Alpine Grendel</font> and feed it on spice until it grows into an adult. Speak to my associate over here to purchase spice.<br>
+Really... you really want me to go over this again? It is simple. Find an <font color="LEVEL">Alpine Kookaburra, Alpine Cougar, Alpine Buffalo, or Alpine Grendel</font> and feed it on spice until it grows into an adult. Speak to my associate over here to purchase spice.<br>
 Once it is an adult, kill it trying to score as many <font color="LEVEL">Over-hits and Critical Over-hits</font> as possible.<br>
 The limit is <font color="LEVEL">10 of each</font> type of animal. That's a total of 40 if you can't add. If you can't score an Over-hit before killing an animal, you'll have to wait until tomorrow to try again.<br>
 Do you think you can follow these directions?<br>

+ 2 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q458_PerfectForm/32768-13.html

@@ -1,3 +1,4 @@
 <html><body>Kelleyia:<br>
-Remember, we will be judging you based on skill, technique, and consistency. We are looking for total perfection.<br>Fully grown <font color="LEVEL">Alpine Kookaburra, Alpine Cougar, Alpine Buffalo, Alpine Grendel</font> and <font color="LEVEL">Over-hits</font> count. Anything else is worthless.
+Remember, we will be judging you based on skill, technique, and consistency. We are looking for total perfection.<br>
+Fully grown <font color="LEVEL">Alpine Kookaburra, Alpine Cougar, Alpine Buffalo, Alpine Grendel</font> and <font color="LEVEL">Over-hits</font> count. Anything else is worthless.
 </body></html>

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q458_PerfectForm/32768-14.html

@@ -1,4 +1,4 @@
 <html><body>Kelleyia:<br>
 Our spotters have reported you aren't quite finished yet.<br>
-Get back in the field and show us what you got.</body>
-</html>
+Get back in the field and show us what you got.
+</body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-01.htm

@@ -1,4 +1,4 @@
 <html><body>Guard Stan:<br>
-You've seen Sel Mahums train? It's impressive, isn't it. Pinaps fears they are becoming too powerful. He doesn't know what to do. But I do... <br>
+You've seen Sel Mahums train? It's impressive, isn't it. Pinaps fears they are becoming too powerful. He doesn't know what to do. But I do...<br>
 <a action="bypass -h Quest 461_RumbleInTheBase 30200-04.htm">Ask about his idea.</a>
 </body></html>