diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/MissingQuests.txt index a1f274547f..a2e83026ad 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/MissingQuests.txt @@ -187,7 +187,6 @@ 10576 Glittering Weapons 10577 Temper a Rusting Blade 10578 The Soul of a Sword -10579 Containing the Attribute Power 10580 Special Mission: Defeat Spezion 10594 Fergason's Scheme 10595 The Dimensional Warp, Part 8 diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10566_BestChoice/Q10566_BestChoice.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10566_BestChoice/Q10566_BestChoice.java index 22d89850d9..62ae58660b 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10566_BestChoice/Q10566_BestChoice.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10566_BestChoice/Q10566_BestChoice.java @@ -26,7 +26,7 @@ import org.l2jmobius.gameserver.model.quest.State; /** * Best Choice (10566) * @URL https://l2wiki.com/Best_Choice - * @author Werum / Standardization by NightBR + * @author Werum / NightBR */ public class Q10566_BestChoice extends Quest { @@ -40,8 +40,9 @@ public class Q10566_BestChoice extends Quest private static final int CERTIFICATE_FLUTTER = 48175; private static final int CERTIFICATE_VINCENZ = 48176; private static final int CERTIFICATE_FERRIS = 48177; - private static final int HERPHAHS_SUPPORT_BOX = 48250; private static final int HERPHAHS_MISSION_LIST = 48172; + // Rewards + private static final int HERPHAHS_SUPPORT_BOX = 48250; public Q10566_BestChoice() { @@ -102,13 +103,16 @@ public class Q10566_BestChoice extends Quest { if (qs.isCond(1)) { - boolean hasItems = hasQuestItems(player, CERTIFICATE_SANTIAGO, CERTIFICATE_RUPIO, CERTIFICATE_FLUTTER, CERTIFICATE_VINCENZ, CERTIFICATE_FERRIS); - // Chck if player has the necessary quest items to complete the quest - if (hasItems) + // Check if player has the necessary quest items to complete the quest + if (hasQuestItems(player, CERTIFICATE_SANTIAGO, CERTIFICATE_RUPIO, CERTIFICATE_FLUTTER, CERTIFICATE_VINCENZ, CERTIFICATE_FERRIS)) { qs.setCond(2, true); + htmltext = "34362-06.html"; + } + else + { + htmltext = "34362-05.html"; } - htmltext = (hasItems) ? "34362-06.html" : "34362-05.html"; } break; } diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10575_LetsGoFishing/34138-99.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10575_LetsGoFishing/34138-99.html index 3d7c38ff25..3ed950f2c4 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10575_LetsGoFishing/34138-99.html +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10575_LetsGoFishing/34138-99.html @@ -1,4 +1,4 @@ Fishing Guild Leader Santiago:
Hey, let nature take its course. It's not good for us to go against it.
-(Only Premium characters who have the quest "Best Choice" in progress, can play this quest.) +(Only characters who have the quest "Best Choice" in progress, can play this quest.) \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java index 569048c491..98a635fb88 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java @@ -51,6 +51,10 @@ public class Q10575_LetsGoFishing extends Quest private static final int PRACTICE_BAIT = 46737; private static final int PRACTICE_FISH = 46736; private static final int PRACTICE_FISHING_ROD = 46738; + // Misc + private static final int MIN_LEVEL = 95; + private static final String COUNT_VAR = "FishWinCount"; + private static final int NPCSTRING_ID = NpcStringId.CATCH_PRACTICE_FISH.getId(); // Rewards private static final int XP = 597699960; private static final int SP = 597690; @@ -58,10 +62,6 @@ public class Q10575_LetsGoFishing extends Quest private static final int FISHING_SHOT = 38154; private static final int REWARD_FISHING_ROD_PACK = 46739; private static final int BAIT = 48537; - // Misc - private static final int MIN_LEVEL = 95; - private static final String COUNT_VAR = "FishWinCount"; - private static final int NPCSTRING_ID = NpcStringId.CATCH_PRACTICE_FISH.getId(); public Q10575_LetsGoFishing() { @@ -115,6 +115,7 @@ public class Q10575_LetsGoFishing extends Quest giveItems(player, FISHING_SHOT, 60); giveItems(player, REWARD_FISHING_ROD_PACK, 1); giveItems(player, BAIT, 60); + qs.unset(COUNT_VAR); qs.exitQuest(QuestType.ONE_TIME, true); htmltext = event; } @@ -134,7 +135,7 @@ public class Q10575_LetsGoFishing extends Quest { case State.CREATED: { - htmltext = (player.hasPremiumStatus()) ? "34138-01.htm" : "34138-99.html"; + htmltext = "34138-01.htm"; break; } case State.STARTED: diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-01.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-01.htm new file mode 100644 index 0000000000..380677baae --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-01.htm @@ -0,0 +1,4 @@ +Head Blacksmith Ferris:
+Could it be that you'd like to learn about attributes, but don't know where to start or don't have the necessary equipments? Boy, do I have a great opportunity for you.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-02.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-02.htm new file mode 100644 index 0000000000..81f44c8a14 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-02.htm @@ -0,0 +1,4 @@ +Head Blacksmith Ferris:
+The opportunity that I can give you is quite simple. If you want, I can give you the items to grant an attribute. All you need to do is actually grant the attribute to a weapon. A good opportunity, don't you think? If you agree, I'll get started.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-03.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-03.htm new file mode 100644 index 0000000000..2f85638778 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-03.htm @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+I'll assume that means you would like to experience granting an attribute. Let me explain the basic theory briefly first. You have to have an Attribute Stone or an Attribute Crystal.
+If you don't have these items, you'll have to get them first. There are many ways to obtain the items, but I recommend using the Auction House. Let me explain.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-04.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-04.html new file mode 100644 index 0000000000..4e390c7aaf --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-04.html @@ -0,0 +1,7 @@ +Head Blacksmith Ferris:
+The Auction House allows you to sell or buy items through the Auction House NPCs. Therefore, if you use this function, you don't need to be logged into the game when you want to trade the items.
+To use this function, find the Auction House Manager in town. You can open the map to check the location, so it shouldn't be difficult.
+A brokerage fee will be deducted after a listed item has been sold.
+You can search for items but make sure that the quantity is correct, or you may accidentally buy more than you intended. Anyway, if you get the materials using this method, you'll be ready for leaming about granting attributes.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-05.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-05.html new file mode 100644 index 0000000000..aafd320b60 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-05.html @@ -0,0 +1,4 @@ +Head Blacksmith Ferris:
+Now, we have all the necessary items, we can learn about what an attribute is. There are Elemental Attribute and Characteristic Attribute. Fire, Water, Earth, and Air are Elemental Attributes, and Holy Attacks and Dark Attacks are Characteristic Attributes.There are some,conflicting attributes,such as, Fire and Water, earth and Air, Holy and Dark. The key to understanding attributes is to understand conflicting attributes.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-06.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-06.html new file mode 100644 index 0000000000..b2e0eaa9e9 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-06.html @@ -0,0 +1,6 @@ +Head Blacksmith Ferris:
+Now, let me tell you about how to grant attributes! First of all, remember that an attribute can only be applied to items with S-grade and above. The method is the same with Enchantment. Double-click the Attribute Crystal or Attribute Stone.
+Only one attribute can be applied to a Weapon and when you grant an attribute, additional attribute damage can be applied too. Corresponding to the attribute of the monster that you are fighting, the attribute damage can increase or decrease.
+On the other hand, you can apply as many as three attributes to armor. However, you can't grant conflicting attributes to armor. If you apply an attribute to armor, it will gain the resistance to that attribute. The higher the monsters level is, there is a higher probability it will attack with an attribute. It'll be helpful to know the monsters attribute so you can prepare accordingly.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-07.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-07.html new file mode 100644 index 0000000000..bb46b4b1ae --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-07.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Regarding the attributes, go to the Attribute Master NPCs in the Town of Aden or Town of Rune. They release the attributes applied to weapons and armor and can also exchange the Attribute Stones. Of course, there is a fee. In addition, they also sell potions that can enhance the attribute for a short period.
+Now, let's practice. It won't be difficult. I'll give you a Attribute Practice Long Sword. So, using the Practice Attribute Stone, apply an attribute. Are you ready?
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-08.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-08.html new file mode 100644 index 0000000000..7995c17510 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-08.html @@ -0,0 +1,10 @@ +Head Blacksmith Ferris:
+Then, choose one. What attribute do you want to apply to the Attribute Practice Long Sword that I'll give you?
+Here, choose an Attribute Stone.
+ + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-09.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-09.html new file mode 100644 index 0000000000..b40fa77fb5 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-09.html @@ -0,0 +1,4 @@ +Head Blacksmith Ferris:
+It looks like you're finished.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-10.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-10.html new file mode 100644 index 0000000000..5f8e5c6007 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-10.html @@ -0,0 +1,3 @@ +Head Blacksmith Ferris:
+Good,then the mission is done. I hope you'll utilize what you learned from me!
+ \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-11.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-11.html new file mode 100644 index 0000000000..c7e0032299 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-11.html @@ -0,0 +1,7 @@ +Head Blacksmith Ferris:
+You're not done with the attribution mission yet.
+What's up? Why are you here?
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-12.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-12.html new file mode 100644 index 0000000000..84246d5fe4 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-12.html @@ -0,0 +1,9 @@ +Head Blacksmith Ferris:
+The Auction House allows you to sell or buy items through the Auction House NPCs. Therefore, if you use this function, you don't need to be logged into the game when you want to trade the items.
+To use this function, find the Auction House Manager in town. You can open the map to check the location, so it shouldn't be difficult.
+A brokerage fee will be deducted after a listed item has been sold.
+You can search for items but make sure that the quantity is correct, or you may accidentally buy more than you intended. Anyway, if you get the materials using this method, you'll be ready for leaming about granting attributes.
+Is there anything else you need?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-13.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-13.html new file mode 100644 index 0000000000..e76cf1183a --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-13.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+You want to hear about attributes again? there are Elemental Attribute and Characteristic Attribute. Fire, Water, Earth, and Air are Elemental Attributes, and Holy Attacks and Dark Attacks are Characteristic Attributes. When there is no specific attribute, it is called Non-attribute.
+There are some conflicting attributes, such as, Fire and Water, Earth and Air, Holy and Dark. The key to understanding attributes is to understand conflicting attributes.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-14.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-14.html new file mode 100644 index 0000000000..190e148e1c --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-14.html @@ -0,0 +1,3 @@ +Head Blacksmith Ferris:
+OK, do the attribute practice again. Use the Attribute Practice Fire Stone to grant an attribute to theAttribute Practice Long Sword.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-15.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-15.html new file mode 100644 index 0000000000..0536c27228 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-15.html @@ -0,0 +1,6 @@ +Head Blacksmith Ferris:
+Now, for granting attributes! First of all, remember that an attribute can only be applied to items with S-grade and above. The method is the same with Enchantment Double-click the Attribute Stone or Attribute Crystal.
+Only one attribute can be applied to a Weapon and when you grant an attribute, additional attribute damage can be applied too. Corresponding to the attribute of the monster that you are fighting, the attribute damage can increase or decrease.
+On the other hand, you can apply as many as three attributes to armor. However, you can't grant conflicting attributes to armor. If you apply an attribute to armor, it will gain the resistance to that attribute. The higher the monsters level is, there is a higher probability it will attack with an attribute. It'll be helpful to know the monsters � attribute so you can prepare accordingly.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-16.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-16.html new file mode 100644 index 0000000000..e53b54e874 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-16.html @@ -0,0 +1,6 @@ +Head Blacksmith Ferris:
+Regarding the attributes, go to the Attribute Master NPCs in the Town of Aden or Town of Rune. They release the attributes applied to weapons and armor and can also exchange the Attribute Stones. Of course, there is a fee. In addition, they also sell potions that can enhance the attribute for a short period.
+That's all for my attribute lesson. Anything else you need?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-dark.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-dark.html new file mode 100644 index 0000000000..a6c5fbf52c --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-dark.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Dark Stone! This practice is going to be on Dark!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-earth.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-earth.html new file mode 100644 index 0000000000..f65c1b0284 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-earth.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Earth Stone! This practice is going to be on Earth!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-fire.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-fire.html new file mode 100644 index 0000000000..71ec3e5141 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-fire.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Fire Stone! This practice is going to be on fire!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-holy.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-holy.html new file mode 100644 index 0000000000..d62c064735 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-holy.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Holy Stone! This practice is going to be on Holy!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-water.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-water.html new file mode 100644 index 0000000000..71e9030c9c --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-water.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Water Stone! This practice is going to be on Water!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-wind.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-wind.html new file mode 100644 index 0000000000..ad8742a164 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-wind.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Wind Stone! This practice is going to be on Wind!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/Q10579_ContainingTheAttributePower.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/Q10579_ContainingTheAttributePower.java new file mode 100644 index 0000000000..166af73dbd --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/Q10579_ContainingTheAttributePower.java @@ -0,0 +1,248 @@ +/* + * 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 . + */ +package quests.Q10579_ContainingTheAttributePower; + +import org.l2jmobius.gameserver.enums.QuestType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.events.Containers; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.impl.item.OnItemAttributeAdd; +import org.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; +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.network.serverpackets.ExTutorialShowId; + +import quests.Q10566_BestChoice.Q10566_BestChoice; + +/** + * Containing the Attribute Power (10579) + * @URL https://l2wiki.com/Containing_the_Attribute_Power + * @author Werum / NightBR + */ +public class Q10579_ContainingTheAttributePower extends Quest +{ + // NPC + private static final int FERRIS = 30847; + // Items + // TODO: Need to add some of the Stones that are not present in the current client + private static final int ATTRIBUTE_PRACTICE_LONG_SWORD = 48168; + private static final int ATTRIBUTE_PRACTICE_FIRE_STONE = 48169; + private static final int ATTRIBUTE_PRACTICE_WATER_STONE = 48169; // FIXME: Does not exist. + private static final int ATTRIBUTE_PRACTICE_EARTH_STONE = 48169; // FIXME: Does not exist. + private static final int ATTRIBUTE_PRACTICE_WIND_STONE = 48169; // FIXME: Does not exist. + private static final int ATTRIBUTE_PRACTICE_HOLY_STONE = 48169; // FIXME: Does not exist. + private static final int ATTRIBUTE_PRACTICE_DARK_STONE = 48169; // FIXME: Does not exist. + // Rewards + private static final int XP = 597699960; + private static final int SP = 597690; + private static final int CERTIFICATE_FROM_FERRIS = 48177; + // Misc + private static final int MIN_LEVEL = 95; + + public Q10579_ContainingTheAttributePower() + { + super(10579); + addStartNpc(FERRIS); + addTalkId(FERRIS); + addCondMinLevel(MIN_LEVEL, "noLevel.html"); + registerQuestItems(ATTRIBUTE_PRACTICE_LONG_SWORD, ATTRIBUTE_PRACTICE_FIRE_STONE, ATTRIBUTE_PRACTICE_WATER_STONE, ATTRIBUTE_PRACTICE_EARTH_STONE, ATTRIBUTE_PRACTICE_WIND_STONE, ATTRIBUTE_PRACTICE_HOLY_STONE, ATTRIBUTE_PRACTICE_DARK_STONE); + addCondStartedQuest(Q10566_BestChoice.class.getSimpleName(), "34138-99.html"); + Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_ITEM_ATTRIBUTE_ADD, (OnItemAttributeAdd event) -> OnItemAttributeAdd(event), this)); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return getNoQuestMsg(player); + } + String htmltext = null; + switch (event) + { + case "30847-02.htm": + case "30847-05.html": + case "30847-06.html": + case "30847-07.html": + case "30847-13.html": + case "30847-15.html": + { + htmltext = event; + break; + } + case "30847-03.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "30847-04.html": + { + // show Service/Help/Auction House page + player.sendPacket(new ExTutorialShowId(58)); + htmltext = event; + break; + } + case "30847-08.html": + { + qs.setCond(2, true); + htmltext = event; + break; + } + case "30847-12.html": + { + // show Service/Help/Auction House page + player.sendPacket(new ExTutorialShowId(58)); + htmltext = event; + break; + } + case "30847-16.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + htmltext = event; + break; + } + case "30847-fire.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_FIRE_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-water.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_WATER_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-earth.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_EARTH_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-wind.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_WIND_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-holy.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_HOLY_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-dark.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_DARK_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-10.html": + { + addExpAndSp(player, XP, SP); + giveItems(player, CERTIFICATE_FROM_FERRIS, 1); + qs.exitQuest(QuestType.ONE_TIME, true); + htmltext = event; + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "30847-01.htm"; + break; + } + case State.STARTED: + { + if (qs.isCond(1)) + { + htmltext = "30847-04.html"; + } + else if (qs.isCond(2)) + { + htmltext = "30847-08.html"; + } + else + { + htmltext = (qs.isCond(4)) ? "30847-09.html" : "30847-11.html"; + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + public void OnItemAttributeAdd(OnItemAttributeAdd event) + { + final PlayerInstance player = event.getPlayer(); + if ((player == null) || (event.getItem().getId() != ATTRIBUTE_PRACTICE_LONG_SWORD)) + { + return; + } + + final QuestState qs = getQuestState(player, false); + // Check weapon has elemental enchant to complete the quest + if ((qs != null) && qs.isCond(3) && (player.getInventory().getItemByItemId(ATTRIBUTE_PRACTICE_LONG_SWORD).hasAttributes())) + { + qs.setCond(4, true); + } + } +} diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/QuestMasterHandler.java index 4f04ea3e79..e63e2a63d6 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -356,6 +356,7 @@ import quests.Q10561_AcrossTheDeathLine.Q10561_AcrossTheDeathLine; import quests.Q10562_TakeUpArms.Q10562_TakeUpArms; import quests.Q10566_BestChoice.Q10566_BestChoice; import quests.Q10575_LetsGoFishing.Q10575_LetsGoFishing; +import quests.Q10579_ContainingTheAttributePower.Q10579_ContainingTheAttributePower; import quests.Q10658_MakkumInTheDimension.Q10658_MakkumInTheDimension; import quests.Q10701_TheRoadToDestruction.Q10701_TheRoadToDestruction; import quests.Q10702_TheRoadToInfinity.Q10702_TheRoadToInfinity; @@ -914,7 +915,7 @@ public class QuestMasterHandler Q10576_GlitteringWeapons.class, // TODO: Not done. Q10577_TemperARustingBlade.class, // TODO: Not done. Q10578_TheSoulOfASword.class, // TODO: Not done. - Q10579_ContainingTheAttributePower.class, // TODO: Not done. + Q10579_ContainingTheAttributePower.class, Q10580_SpecialMissionDefeatSpezion.class, // TODO: Not done. Q10594_FergasonsScheme.class, // TODO: Not done. Q10595_TheDimensionalWarpPart8.class, // TODO: Not done. diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/not_done/Q10579_ContainingTheAttributePower.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/not_done/Q10579_ContainingTheAttributePower.java deleted file mode 100644 index 2d1db69483..0000000000 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/not_done/Q10579_ContainingTheAttributePower.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package quests.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q10579_ContainingTheAttributePower extends Quest -{ - private static final int START_NPC = 30847; - - public Q10579_ContainingTheAttributePower() - { - super(10579); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/stats/items/48100-48199.xml b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/items/48100-48199.xml index 6ddca55b9d..1174aa2b82 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/stats/items/48100-48199.xml +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/items/48100-48199.xml @@ -894,16 +894,20 @@ + + + + 24 17 @@ -917,6 +921,8 @@ + + @@ -925,6 +931,11 @@ + + + + + diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/Elementals.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/Elementals.java index c5654df9ba..68d61edf1f 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/Elementals.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/Elementals.java @@ -100,6 +100,8 @@ public final class Elementals public enum ElementalItems { + attributePracticeFireStone(FIRE, 48169, ElementalItemType.Stone, 0), + fireStone(FIRE, 9546, ElementalItemType.Stone, 0), waterStone(WATER, 9547, ElementalItemType.Stone, 0), windStone(WIND, 9549, ElementalItemType.Stone, 0), diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/events/EventType.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/events/EventType.java index 2514710fdf..b87a8f7bfb 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/events/EventType.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/events/EventType.java @@ -120,6 +120,7 @@ import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceDestroy; import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceEnter; import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceLeave; import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; +import org.l2jmobius.gameserver.model.events.impl.item.OnItemAttributeAdd; import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent; import org.l2jmobius.gameserver.model.events.impl.item.OnItemCreate; import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk; @@ -181,6 +182,7 @@ public enum EventType ON_ITEM_BYPASS_EVENT(OnItemBypassEvent.class, void.class), ON_ITEM_CREATE(OnItemCreate.class, void.class), ON_ITEM_TALK(OnItemTalk.class, void.class), + ON_ITEM_ATTRIBUTE_ADD(OnItemAttributeAdd.class, void.class), // NPC events ON_NPC_CAN_BE_SEEN(OnNpcCanBeSeen.class, void.class, TerminateReturn.class), diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/events/impl/item/OnItemAttributeAdd.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/events/impl/item/OnItemAttributeAdd.java new file mode 100644 index 0000000000..8a229f8f83 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/events/impl/item/OnItemAttributeAdd.java @@ -0,0 +1,53 @@ +/* + * 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 . + */ +package org.l2jmobius.gameserver.model.events.impl.item; + +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.impl.IBaseEvent; +import org.l2jmobius.gameserver.model.items.instance.ItemInstance; + +/** + * @author NightBR + */ +public class OnItemAttributeAdd implements IBaseEvent +{ + private final PlayerInstance _player; + private final ItemInstance _item; + + public OnItemAttributeAdd(PlayerInstance player, ItemInstance item) + { + _player = player; + _item = item; + } + + public PlayerInstance getPlayer() + { + return _player; + } + + public ItemInstance getItem() + { + return _item; + } + + @Override + public EventType getType() + { + return EventType.ON_ITEM_ATTRIBUTE_ADD; + } +} diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java index e64e0750c3..a5e2ab5ade 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java @@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.events.EventDispatcher; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerAugment; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemDrop; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPickup; +import org.l2jmobius.gameserver.model.events.impl.item.OnItemAttributeAdd; import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent; import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk; import org.l2jmobius.gameserver.model.instancezone.Instance; @@ -1215,6 +1216,9 @@ public final class ItemInstance extends WorldObject _elementals.put(holder.getType(), holder); } } + + // Notify to Scripts + EventDispatcher.getInstance().notifyEventAsync(new OnItemAttributeAdd(getActingPlayer(), this)); } /** diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java index 6d03548432..7595d68397 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java @@ -104,6 +104,14 @@ public class RequestExEnchantItemAttribute implements IClientIncomingPacket return; } + // Quest Q10579_ContainingTheAttributePower check. + if ((item.getItem().getId() == 48168) && (stone.getItem().getId() != 48169)) + { + player.removeRequest(request.getClass()); + client.sendPacket(SystemMessageId.ATTRIBUTE_ITEM_USAGE_HAS_BEEN_CANCELLED); + return; + } + if (!item.isElementable()) { client.sendPacket(SystemMessageId.ELEMENTAL_POWER_ENHANCER_USAGE_REQUIREMENT_IS_NOT_SUFFICIENT); diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/MissingQuests.txt index d32a3dc29e..59fd1ec7df 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/MissingQuests.txt @@ -199,7 +199,6 @@ 10576 Glittering Weapons 10577 Temper a Rusting Blade 10578 The Soul of a Sword -10579 Containing the Attribute Power 10580 Special Mission: Defeat Spezion 10594 Fergason's Scheme 10595 The Dimensional Warp, Part 8 diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10566_BestChoice/Q10566_BestChoice.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10566_BestChoice/Q10566_BestChoice.java index 22d89850d9..62ae58660b 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10566_BestChoice/Q10566_BestChoice.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10566_BestChoice/Q10566_BestChoice.java @@ -26,7 +26,7 @@ import org.l2jmobius.gameserver.model.quest.State; /** * Best Choice (10566) * @URL https://l2wiki.com/Best_Choice - * @author Werum / Standardization by NightBR + * @author Werum / NightBR */ public class Q10566_BestChoice extends Quest { @@ -40,8 +40,9 @@ public class Q10566_BestChoice extends Quest private static final int CERTIFICATE_FLUTTER = 48175; private static final int CERTIFICATE_VINCENZ = 48176; private static final int CERTIFICATE_FERRIS = 48177; - private static final int HERPHAHS_SUPPORT_BOX = 48250; private static final int HERPHAHS_MISSION_LIST = 48172; + // Rewards + private static final int HERPHAHS_SUPPORT_BOX = 48250; public Q10566_BestChoice() { @@ -102,13 +103,16 @@ public class Q10566_BestChoice extends Quest { if (qs.isCond(1)) { - boolean hasItems = hasQuestItems(player, CERTIFICATE_SANTIAGO, CERTIFICATE_RUPIO, CERTIFICATE_FLUTTER, CERTIFICATE_VINCENZ, CERTIFICATE_FERRIS); - // Chck if player has the necessary quest items to complete the quest - if (hasItems) + // Check if player has the necessary quest items to complete the quest + if (hasQuestItems(player, CERTIFICATE_SANTIAGO, CERTIFICATE_RUPIO, CERTIFICATE_FLUTTER, CERTIFICATE_VINCENZ, CERTIFICATE_FERRIS)) { qs.setCond(2, true); + htmltext = "34362-06.html"; + } + else + { + htmltext = "34362-05.html"; } - htmltext = (hasItems) ? "34362-06.html" : "34362-05.html"; } break; } diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10575_LetsGoFishing/34138-99.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10575_LetsGoFishing/34138-99.html index 3d7c38ff25..3ed950f2c4 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10575_LetsGoFishing/34138-99.html +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10575_LetsGoFishing/34138-99.html @@ -1,4 +1,4 @@ Fishing Guild Leader Santiago:
Hey, let nature take its course. It's not good for us to go against it.
-(Only Premium characters who have the quest "Best Choice" in progress, can play this quest.) +(Only characters who have the quest "Best Choice" in progress, can play this quest.) \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java index 569048c491..98a635fb88 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java @@ -51,6 +51,10 @@ public class Q10575_LetsGoFishing extends Quest private static final int PRACTICE_BAIT = 46737; private static final int PRACTICE_FISH = 46736; private static final int PRACTICE_FISHING_ROD = 46738; + // Misc + private static final int MIN_LEVEL = 95; + private static final String COUNT_VAR = "FishWinCount"; + private static final int NPCSTRING_ID = NpcStringId.CATCH_PRACTICE_FISH.getId(); // Rewards private static final int XP = 597699960; private static final int SP = 597690; @@ -58,10 +62,6 @@ public class Q10575_LetsGoFishing extends Quest private static final int FISHING_SHOT = 38154; private static final int REWARD_FISHING_ROD_PACK = 46739; private static final int BAIT = 48537; - // Misc - private static final int MIN_LEVEL = 95; - private static final String COUNT_VAR = "FishWinCount"; - private static final int NPCSTRING_ID = NpcStringId.CATCH_PRACTICE_FISH.getId(); public Q10575_LetsGoFishing() { @@ -115,6 +115,7 @@ public class Q10575_LetsGoFishing extends Quest giveItems(player, FISHING_SHOT, 60); giveItems(player, REWARD_FISHING_ROD_PACK, 1); giveItems(player, BAIT, 60); + qs.unset(COUNT_VAR); qs.exitQuest(QuestType.ONE_TIME, true); htmltext = event; } @@ -134,7 +135,7 @@ public class Q10575_LetsGoFishing extends Quest { case State.CREATED: { - htmltext = (player.hasPremiumStatus()) ? "34138-01.htm" : "34138-99.html"; + htmltext = "34138-01.htm"; break; } case State.STARTED: diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-01.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-01.htm new file mode 100644 index 0000000000..380677baae --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-01.htm @@ -0,0 +1,4 @@ +Head Blacksmith Ferris:
+Could it be that you'd like to learn about attributes, but don't know where to start or don't have the necessary equipments? Boy, do I have a great opportunity for you.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-02.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-02.htm new file mode 100644 index 0000000000..81f44c8a14 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-02.htm @@ -0,0 +1,4 @@ +Head Blacksmith Ferris:
+The opportunity that I can give you is quite simple. If you want, I can give you the items to grant an attribute. All you need to do is actually grant the attribute to a weapon. A good opportunity, don't you think? If you agree, I'll get started.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-03.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-03.htm new file mode 100644 index 0000000000..2f85638778 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-03.htm @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+I'll assume that means you would like to experience granting an attribute. Let me explain the basic theory briefly first. You have to have an Attribute Stone or an Attribute Crystal.
+If you don't have these items, you'll have to get them first. There are many ways to obtain the items, but I recommend using the Auction House. Let me explain.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-04.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-04.html new file mode 100644 index 0000000000..4e390c7aaf --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-04.html @@ -0,0 +1,7 @@ +Head Blacksmith Ferris:
+The Auction House allows you to sell or buy items through the Auction House NPCs. Therefore, if you use this function, you don't need to be logged into the game when you want to trade the items.
+To use this function, find the Auction House Manager in town. You can open the map to check the location, so it shouldn't be difficult.
+A brokerage fee will be deducted after a listed item has been sold.
+You can search for items but make sure that the quantity is correct, or you may accidentally buy more than you intended. Anyway, if you get the materials using this method, you'll be ready for leaming about granting attributes.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-05.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-05.html new file mode 100644 index 0000000000..aafd320b60 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-05.html @@ -0,0 +1,4 @@ +Head Blacksmith Ferris:
+Now, we have all the necessary items, we can learn about what an attribute is. There are Elemental Attribute and Characteristic Attribute. Fire, Water, Earth, and Air are Elemental Attributes, and Holy Attacks and Dark Attacks are Characteristic Attributes.There are some,conflicting attributes,such as, Fire and Water, earth and Air, Holy and Dark. The key to understanding attributes is to understand conflicting attributes.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-06.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-06.html new file mode 100644 index 0000000000..b2e0eaa9e9 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-06.html @@ -0,0 +1,6 @@ +Head Blacksmith Ferris:
+Now, let me tell you about how to grant attributes! First of all, remember that an attribute can only be applied to items with S-grade and above. The method is the same with Enchantment. Double-click the Attribute Crystal or Attribute Stone.
+Only one attribute can be applied to a Weapon and when you grant an attribute, additional attribute damage can be applied too. Corresponding to the attribute of the monster that you are fighting, the attribute damage can increase or decrease.
+On the other hand, you can apply as many as three attributes to armor. However, you can't grant conflicting attributes to armor. If you apply an attribute to armor, it will gain the resistance to that attribute. The higher the monsters level is, there is a higher probability it will attack with an attribute. It'll be helpful to know the monsters attribute so you can prepare accordingly.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-07.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-07.html new file mode 100644 index 0000000000..bb46b4b1ae --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-07.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Regarding the attributes, go to the Attribute Master NPCs in the Town of Aden or Town of Rune. They release the attributes applied to weapons and armor and can also exchange the Attribute Stones. Of course, there is a fee. In addition, they also sell potions that can enhance the attribute for a short period.
+Now, let's practice. It won't be difficult. I'll give you a Attribute Practice Long Sword. So, using the Practice Attribute Stone, apply an attribute. Are you ready?
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-08.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-08.html new file mode 100644 index 0000000000..7995c17510 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-08.html @@ -0,0 +1,10 @@ +Head Blacksmith Ferris:
+Then, choose one. What attribute do you want to apply to the Attribute Practice Long Sword that I'll give you?
+Here, choose an Attribute Stone.
+ + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-09.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-09.html new file mode 100644 index 0000000000..b40fa77fb5 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-09.html @@ -0,0 +1,4 @@ +Head Blacksmith Ferris:
+It looks like you're finished.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-10.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-10.html new file mode 100644 index 0000000000..5f8e5c6007 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-10.html @@ -0,0 +1,3 @@ +Head Blacksmith Ferris:
+Good,then the mission is done. I hope you'll utilize what you learned from me!
+ \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-11.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-11.html new file mode 100644 index 0000000000..c7e0032299 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-11.html @@ -0,0 +1,7 @@ +Head Blacksmith Ferris:
+You're not done with the attribution mission yet.
+What's up? Why are you here?
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-12.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-12.html new file mode 100644 index 0000000000..84246d5fe4 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-12.html @@ -0,0 +1,9 @@ +Head Blacksmith Ferris:
+The Auction House allows you to sell or buy items through the Auction House NPCs. Therefore, if you use this function, you don't need to be logged into the game when you want to trade the items.
+To use this function, find the Auction House Manager in town. You can open the map to check the location, so it shouldn't be difficult.
+A brokerage fee will be deducted after a listed item has been sold.
+You can search for items but make sure that the quantity is correct, or you may accidentally buy more than you intended. Anyway, if you get the materials using this method, you'll be ready for leaming about granting attributes.
+Is there anything else you need?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-13.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-13.html new file mode 100644 index 0000000000..e76cf1183a --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-13.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+You want to hear about attributes again? there are Elemental Attribute and Characteristic Attribute. Fire, Water, Earth, and Air are Elemental Attributes, and Holy Attacks and Dark Attacks are Characteristic Attributes. When there is no specific attribute, it is called Non-attribute.
+There are some conflicting attributes, such as, Fire and Water, Earth and Air, Holy and Dark. The key to understanding attributes is to understand conflicting attributes.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-14.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-14.html new file mode 100644 index 0000000000..190e148e1c --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-14.html @@ -0,0 +1,3 @@ +Head Blacksmith Ferris:
+OK, do the attribute practice again. Use the Attribute Practice Fire Stone to grant an attribute to theAttribute Practice Long Sword.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-15.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-15.html new file mode 100644 index 0000000000..0536c27228 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-15.html @@ -0,0 +1,6 @@ +Head Blacksmith Ferris:
+Now, for granting attributes! First of all, remember that an attribute can only be applied to items with S-grade and above. The method is the same with Enchantment Double-click the Attribute Stone or Attribute Crystal.
+Only one attribute can be applied to a Weapon and when you grant an attribute, additional attribute damage can be applied too. Corresponding to the attribute of the monster that you are fighting, the attribute damage can increase or decrease.
+On the other hand, you can apply as many as three attributes to armor. However, you can't grant conflicting attributes to armor. If you apply an attribute to armor, it will gain the resistance to that attribute. The higher the monsters level is, there is a higher probability it will attack with an attribute. It'll be helpful to know the monsters � attribute so you can prepare accordingly.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-16.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-16.html new file mode 100644 index 0000000000..e53b54e874 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-16.html @@ -0,0 +1,6 @@ +Head Blacksmith Ferris:
+Regarding the attributes, go to the Attribute Master NPCs in the Town of Aden or Town of Rune. They release the attributes applied to weapons and armor and can also exchange the Attribute Stones. Of course, there is a fee. In addition, they also sell potions that can enhance the attribute for a short period.
+That's all for my attribute lesson. Anything else you need?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-dark.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-dark.html new file mode 100644 index 0000000000..a6c5fbf52c --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-dark.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Dark Stone! This practice is going to be on Dark!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-earth.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-earth.html new file mode 100644 index 0000000000..f65c1b0284 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-earth.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Earth Stone! This practice is going to be on Earth!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-fire.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-fire.html new file mode 100644 index 0000000000..71ec3e5141 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-fire.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Fire Stone! This practice is going to be on fire!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-holy.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-holy.html new file mode 100644 index 0000000000..d62c064735 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-holy.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Holy Stone! This practice is going to be on Holy!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-water.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-water.html new file mode 100644 index 0000000000..71e9030c9c --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-water.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Water Stone! This practice is going to be on Water!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-wind.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-wind.html new file mode 100644 index 0000000000..ad8742a164 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-wind.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Wind Stone! This practice is going to be on Wind!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/Q10579_ContainingTheAttributePower.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/Q10579_ContainingTheAttributePower.java new file mode 100644 index 0000000000..166af73dbd --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/Q10579_ContainingTheAttributePower.java @@ -0,0 +1,248 @@ +/* + * 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 . + */ +package quests.Q10579_ContainingTheAttributePower; + +import org.l2jmobius.gameserver.enums.QuestType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.events.Containers; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.impl.item.OnItemAttributeAdd; +import org.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; +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.network.serverpackets.ExTutorialShowId; + +import quests.Q10566_BestChoice.Q10566_BestChoice; + +/** + * Containing the Attribute Power (10579) + * @URL https://l2wiki.com/Containing_the_Attribute_Power + * @author Werum / NightBR + */ +public class Q10579_ContainingTheAttributePower extends Quest +{ + // NPC + private static final int FERRIS = 30847; + // Items + // TODO: Need to add some of the Stones that are not present in the current client + private static final int ATTRIBUTE_PRACTICE_LONG_SWORD = 48168; + private static final int ATTRIBUTE_PRACTICE_FIRE_STONE = 48169; + private static final int ATTRIBUTE_PRACTICE_WATER_STONE = 48169; // FIXME: Does not exist. + private static final int ATTRIBUTE_PRACTICE_EARTH_STONE = 48169; // FIXME: Does not exist. + private static final int ATTRIBUTE_PRACTICE_WIND_STONE = 48169; // FIXME: Does not exist. + private static final int ATTRIBUTE_PRACTICE_HOLY_STONE = 48169; // FIXME: Does not exist. + private static final int ATTRIBUTE_PRACTICE_DARK_STONE = 48169; // FIXME: Does not exist. + // Rewards + private static final int XP = 597699960; + private static final int SP = 597690; + private static final int CERTIFICATE_FROM_FERRIS = 48177; + // Misc + private static final int MIN_LEVEL = 95; + + public Q10579_ContainingTheAttributePower() + { + super(10579); + addStartNpc(FERRIS); + addTalkId(FERRIS); + addCondMinLevel(MIN_LEVEL, "noLevel.html"); + registerQuestItems(ATTRIBUTE_PRACTICE_LONG_SWORD, ATTRIBUTE_PRACTICE_FIRE_STONE, ATTRIBUTE_PRACTICE_WATER_STONE, ATTRIBUTE_PRACTICE_EARTH_STONE, ATTRIBUTE_PRACTICE_WIND_STONE, ATTRIBUTE_PRACTICE_HOLY_STONE, ATTRIBUTE_PRACTICE_DARK_STONE); + addCondStartedQuest(Q10566_BestChoice.class.getSimpleName(), "34138-99.html"); + Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_ITEM_ATTRIBUTE_ADD, (OnItemAttributeAdd event) -> OnItemAttributeAdd(event), this)); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return getNoQuestMsg(player); + } + String htmltext = null; + switch (event) + { + case "30847-02.htm": + case "30847-05.html": + case "30847-06.html": + case "30847-07.html": + case "30847-13.html": + case "30847-15.html": + { + htmltext = event; + break; + } + case "30847-03.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "30847-04.html": + { + // show Service/Help/Auction House page + player.sendPacket(new ExTutorialShowId(58)); + htmltext = event; + break; + } + case "30847-08.html": + { + qs.setCond(2, true); + htmltext = event; + break; + } + case "30847-12.html": + { + // show Service/Help/Auction House page + player.sendPacket(new ExTutorialShowId(58)); + htmltext = event; + break; + } + case "30847-16.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + htmltext = event; + break; + } + case "30847-fire.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_FIRE_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-water.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_WATER_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-earth.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_EARTH_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-wind.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_WIND_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-holy.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_HOLY_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-dark.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_DARK_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-10.html": + { + addExpAndSp(player, XP, SP); + giveItems(player, CERTIFICATE_FROM_FERRIS, 1); + qs.exitQuest(QuestType.ONE_TIME, true); + htmltext = event; + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "30847-01.htm"; + break; + } + case State.STARTED: + { + if (qs.isCond(1)) + { + htmltext = "30847-04.html"; + } + else if (qs.isCond(2)) + { + htmltext = "30847-08.html"; + } + else + { + htmltext = (qs.isCond(4)) ? "30847-09.html" : "30847-11.html"; + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + public void OnItemAttributeAdd(OnItemAttributeAdd event) + { + final PlayerInstance player = event.getPlayer(); + if ((player == null) || (event.getItem().getId() != ATTRIBUTE_PRACTICE_LONG_SWORD)) + { + return; + } + + final QuestState qs = getQuestState(player, false); + // Check weapon has elemental enchant to complete the quest + if ((qs != null) && qs.isCond(3) && (player.getInventory().getItemByItemId(ATTRIBUTE_PRACTICE_LONG_SWORD).hasAttributes())) + { + qs.setCond(4, true); + } + } +} diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/QuestMasterHandler.java index 3854ee9441..c7760a7478 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -310,6 +310,7 @@ import quests.Q10561_AcrossTheDeathLine.Q10561_AcrossTheDeathLine; import quests.Q10562_TakeUpArms.Q10562_TakeUpArms; import quests.Q10566_BestChoice.Q10566_BestChoice; import quests.Q10575_LetsGoFishing.Q10575_LetsGoFishing; +import quests.Q10579_ContainingTheAttributePower.Q10579_ContainingTheAttributePower; import quests.Q10658_MakkumInTheDimension.Q10658_MakkumInTheDimension; import quests.Q10701_TheRoadToDestruction.Q10701_TheRoadToDestruction; import quests.Q10702_TheRoadToInfinity.Q10702_TheRoadToInfinity; @@ -827,7 +828,7 @@ public class QuestMasterHandler Q10576_GlitteringWeapons.class, // TODO: Not done. Q10577_TemperARustingBlade.class, // TODO: Not done. Q10578_TheSoulOfASword.class, // TODO: Not done. - Q10579_ContainingTheAttributePower.class, // TODO: Not done. + Q10579_ContainingTheAttributePower.class, Q10580_SpecialMissionDefeatSpezion.class, // TODO: Not done. Q10594_FergasonsScheme.class, // TODO: Not done. Q10595_TheDimensionalWarpPart8.class, // TODO: Not done. diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/not_done/Q10579_ContainingTheAttributePower.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/not_done/Q10579_ContainingTheAttributePower.java deleted file mode 100644 index 2d1db69483..0000000000 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/not_done/Q10579_ContainingTheAttributePower.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package quests.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q10579_ContainingTheAttributePower extends Quest -{ - private static final int START_NPC = 30847; - - public Q10579_ContainingTheAttributePower() - { - super(10579); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/items/48100-48199.xml b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/items/48100-48199.xml index 6bf166f227..93b4cb32da 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/items/48100-48199.xml +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/items/48100-48199.xml @@ -894,16 +894,20 @@ + + + + 24 17 @@ -917,6 +921,8 @@ + + @@ -925,6 +931,11 @@ + + + + +
diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/Elementals.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/Elementals.java index c5654df9ba..68d61edf1f 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/Elementals.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/Elementals.java @@ -100,6 +100,8 @@ public final class Elementals public enum ElementalItems { + attributePracticeFireStone(FIRE, 48169, ElementalItemType.Stone, 0), + fireStone(FIRE, 9546, ElementalItemType.Stone, 0), waterStone(WATER, 9547, ElementalItemType.Stone, 0), windStone(WIND, 9549, ElementalItemType.Stone, 0), diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/EventType.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/EventType.java index 2514710fdf..b87a8f7bfb 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/EventType.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/EventType.java @@ -120,6 +120,7 @@ import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceDestroy; import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceEnter; import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceLeave; import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; +import org.l2jmobius.gameserver.model.events.impl.item.OnItemAttributeAdd; import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent; import org.l2jmobius.gameserver.model.events.impl.item.OnItemCreate; import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk; @@ -181,6 +182,7 @@ public enum EventType ON_ITEM_BYPASS_EVENT(OnItemBypassEvent.class, void.class), ON_ITEM_CREATE(OnItemCreate.class, void.class), ON_ITEM_TALK(OnItemTalk.class, void.class), + ON_ITEM_ATTRIBUTE_ADD(OnItemAttributeAdd.class, void.class), // NPC events ON_NPC_CAN_BE_SEEN(OnNpcCanBeSeen.class, void.class, TerminateReturn.class), diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/impl/item/OnItemAttributeAdd.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/impl/item/OnItemAttributeAdd.java new file mode 100644 index 0000000000..8a229f8f83 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/events/impl/item/OnItemAttributeAdd.java @@ -0,0 +1,53 @@ +/* + * 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 . + */ +package org.l2jmobius.gameserver.model.events.impl.item; + +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.impl.IBaseEvent; +import org.l2jmobius.gameserver.model.items.instance.ItemInstance; + +/** + * @author NightBR + */ +public class OnItemAttributeAdd implements IBaseEvent +{ + private final PlayerInstance _player; + private final ItemInstance _item; + + public OnItemAttributeAdd(PlayerInstance player, ItemInstance item) + { + _player = player; + _item = item; + } + + public PlayerInstance getPlayer() + { + return _player; + } + + public ItemInstance getItem() + { + return _item; + } + + @Override + public EventType getType() + { + return EventType.ON_ITEM_ATTRIBUTE_ADD; + } +} diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java index e64e0750c3..a5e2ab5ade 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java @@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.events.EventDispatcher; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerAugment; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemDrop; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPickup; +import org.l2jmobius.gameserver.model.events.impl.item.OnItemAttributeAdd; import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent; import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk; import org.l2jmobius.gameserver.model.instancezone.Instance; @@ -1215,6 +1216,9 @@ public final class ItemInstance extends WorldObject _elementals.put(holder.getType(), holder); } } + + // Notify to Scripts + EventDispatcher.getInstance().notifyEventAsync(new OnItemAttributeAdd(getActingPlayer(), this)); } /** diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java index 6d03548432..7595d68397 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java @@ -104,6 +104,14 @@ public class RequestExEnchantItemAttribute implements IClientIncomingPacket return; } + // Quest Q10579_ContainingTheAttributePower check. + if ((item.getItem().getId() == 48168) && (stone.getItem().getId() != 48169)) + { + player.removeRequest(request.getClass()); + client.sendPacket(SystemMessageId.ATTRIBUTE_ITEM_USAGE_HAS_BEEN_CANCELLED); + return; + } + if (!item.isElementable()) { client.sendPacket(SystemMessageId.ELEMENTAL_POWER_ENHANCER_USAGE_REQUIREMENT_IS_NOT_SUFFICIENT); diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/MissingQuests.txt index b932ba8e9c..36c41720d9 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/MissingQuests.txt @@ -204,7 +204,6 @@ 10576 Glittering Weapons 10577 Temper a Rusting Blade 10578 The Soul of a Sword -10579 Containing the Attribute Power 10580 Special Mission: Defeat Spezion 10588 Special Mission: Defeat Baylor 10594 Fergason's Scheme diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10566_BestChoice/Q10566_BestChoice.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10566_BestChoice/Q10566_BestChoice.java index 22d89850d9..62ae58660b 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10566_BestChoice/Q10566_BestChoice.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10566_BestChoice/Q10566_BestChoice.java @@ -26,7 +26,7 @@ import org.l2jmobius.gameserver.model.quest.State; /** * Best Choice (10566) * @URL https://l2wiki.com/Best_Choice - * @author Werum / Standardization by NightBR + * @author Werum / NightBR */ public class Q10566_BestChoice extends Quest { @@ -40,8 +40,9 @@ public class Q10566_BestChoice extends Quest private static final int CERTIFICATE_FLUTTER = 48175; private static final int CERTIFICATE_VINCENZ = 48176; private static final int CERTIFICATE_FERRIS = 48177; - private static final int HERPHAHS_SUPPORT_BOX = 48250; private static final int HERPHAHS_MISSION_LIST = 48172; + // Rewards + private static final int HERPHAHS_SUPPORT_BOX = 48250; public Q10566_BestChoice() { @@ -102,13 +103,16 @@ public class Q10566_BestChoice extends Quest { if (qs.isCond(1)) { - boolean hasItems = hasQuestItems(player, CERTIFICATE_SANTIAGO, CERTIFICATE_RUPIO, CERTIFICATE_FLUTTER, CERTIFICATE_VINCENZ, CERTIFICATE_FERRIS); - // Chck if player has the necessary quest items to complete the quest - if (hasItems) + // Check if player has the necessary quest items to complete the quest + if (hasQuestItems(player, CERTIFICATE_SANTIAGO, CERTIFICATE_RUPIO, CERTIFICATE_FLUTTER, CERTIFICATE_VINCENZ, CERTIFICATE_FERRIS)) { qs.setCond(2, true); + htmltext = "34362-06.html"; + } + else + { + htmltext = "34362-05.html"; } - htmltext = (hasItems) ? "34362-06.html" : "34362-05.html"; } break; } diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10575_LetsGoFishing/34138-99.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10575_LetsGoFishing/34138-99.html index 3d7c38ff25..3ed950f2c4 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10575_LetsGoFishing/34138-99.html +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10575_LetsGoFishing/34138-99.html @@ -1,4 +1,4 @@ Fishing Guild Leader Santiago:
Hey, let nature take its course. It's not good for us to go against it.
-(Only Premium characters who have the quest "Best Choice" in progress, can play this quest.) +(Only characters who have the quest "Best Choice" in progress, can play this quest.) \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java index 569048c491..98a635fb88 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java @@ -51,6 +51,10 @@ public class Q10575_LetsGoFishing extends Quest private static final int PRACTICE_BAIT = 46737; private static final int PRACTICE_FISH = 46736; private static final int PRACTICE_FISHING_ROD = 46738; + // Misc + private static final int MIN_LEVEL = 95; + private static final String COUNT_VAR = "FishWinCount"; + private static final int NPCSTRING_ID = NpcStringId.CATCH_PRACTICE_FISH.getId(); // Rewards private static final int XP = 597699960; private static final int SP = 597690; @@ -58,10 +62,6 @@ public class Q10575_LetsGoFishing extends Quest private static final int FISHING_SHOT = 38154; private static final int REWARD_FISHING_ROD_PACK = 46739; private static final int BAIT = 48537; - // Misc - private static final int MIN_LEVEL = 95; - private static final String COUNT_VAR = "FishWinCount"; - private static final int NPCSTRING_ID = NpcStringId.CATCH_PRACTICE_FISH.getId(); public Q10575_LetsGoFishing() { @@ -115,6 +115,7 @@ public class Q10575_LetsGoFishing extends Quest giveItems(player, FISHING_SHOT, 60); giveItems(player, REWARD_FISHING_ROD_PACK, 1); giveItems(player, BAIT, 60); + qs.unset(COUNT_VAR); qs.exitQuest(QuestType.ONE_TIME, true); htmltext = event; } @@ -134,7 +135,7 @@ public class Q10575_LetsGoFishing extends Quest { case State.CREATED: { - htmltext = (player.hasPremiumStatus()) ? "34138-01.htm" : "34138-99.html"; + htmltext = "34138-01.htm"; break; } case State.STARTED: diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-01.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-01.htm new file mode 100644 index 0000000000..380677baae --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-01.htm @@ -0,0 +1,4 @@ +Head Blacksmith Ferris:
+Could it be that you'd like to learn about attributes, but don't know where to start or don't have the necessary equipments? Boy, do I have a great opportunity for you.
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-02.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-02.htm new file mode 100644 index 0000000000..81f44c8a14 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-02.htm @@ -0,0 +1,4 @@ +Head Blacksmith Ferris:
+The opportunity that I can give you is quite simple. If you want, I can give you the items to grant an attribute. All you need to do is actually grant the attribute to a weapon. A good opportunity, don't you think? If you agree, I'll get started.
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-03.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-03.htm new file mode 100644 index 0000000000..2f85638778 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-03.htm @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+I'll assume that means you would like to experience granting an attribute. Let me explain the basic theory briefly first. You have to have an Attribute Stone or an Attribute Crystal.
+If you don't have these items, you'll have to get them first. There are many ways to obtain the items, but I recommend using the Auction House. Let me explain.
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-04.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-04.html new file mode 100644 index 0000000000..4e390c7aaf --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-04.html @@ -0,0 +1,7 @@ +Head Blacksmith Ferris:
+The Auction House allows you to sell or buy items through the Auction House NPCs. Therefore, if you use this function, you don't need to be logged into the game when you want to trade the items.
+To use this function, find the Auction House Manager in town. You can open the map to check the location, so it shouldn't be difficult.
+A brokerage fee will be deducted after a listed item has been sold.
+You can search for items but make sure that the quantity is correct, or you may accidentally buy more than you intended. Anyway, if you get the materials using this method, you'll be ready for leaming about granting attributes.
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-05.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-05.html new file mode 100644 index 0000000000..aafd320b60 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-05.html @@ -0,0 +1,4 @@ +Head Blacksmith Ferris:
+Now, we have all the necessary items, we can learn about what an attribute is. There are Elemental Attribute and Characteristic Attribute. Fire, Water, Earth, and Air are Elemental Attributes, and Holy Attacks and Dark Attacks are Characteristic Attributes.There are some,conflicting attributes,such as, Fire and Water, earth and Air, Holy and Dark. The key to understanding attributes is to understand conflicting attributes.
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-06.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-06.html new file mode 100644 index 0000000000..b2e0eaa9e9 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-06.html @@ -0,0 +1,6 @@ +Head Blacksmith Ferris:
+Now, let me tell you about how to grant attributes! First of all, remember that an attribute can only be applied to items with S-grade and above. The method is the same with Enchantment. Double-click the Attribute Crystal or Attribute Stone.
+Only one attribute can be applied to a Weapon and when you grant an attribute, additional attribute damage can be applied too. Corresponding to the attribute of the monster that you are fighting, the attribute damage can increase or decrease.
+On the other hand, you can apply as many as three attributes to armor. However, you can't grant conflicting attributes to armor. If you apply an attribute to armor, it will gain the resistance to that attribute. The higher the monsters level is, there is a higher probability it will attack with an attribute. It'll be helpful to know the monsters attribute so you can prepare accordingly.
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-07.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-07.html new file mode 100644 index 0000000000..bb46b4b1ae --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-07.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Regarding the attributes, go to the Attribute Master NPCs in the Town of Aden or Town of Rune. They release the attributes applied to weapons and armor and can also exchange the Attribute Stones. Of course, there is a fee. In addition, they also sell potions that can enhance the attribute for a short period.
+Now, let's practice. It won't be difficult. I'll give you a Attribute Practice Long Sword. So, using the Practice Attribute Stone, apply an attribute. Are you ready?
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-08.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-08.html new file mode 100644 index 0000000000..7995c17510 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-08.html @@ -0,0 +1,10 @@ +Head Blacksmith Ferris:
+Then, choose one. What attribute do you want to apply to the Attribute Practice Long Sword that I'll give you?
+Here, choose an Attribute Stone.
+ + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-09.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-09.html new file mode 100644 index 0000000000..b40fa77fb5 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-09.html @@ -0,0 +1,4 @@ +Head Blacksmith Ferris:
+It looks like you're finished.
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-10.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-10.html new file mode 100644 index 0000000000..5f8e5c6007 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-10.html @@ -0,0 +1,3 @@ +Head Blacksmith Ferris:
+Good,then the mission is done. I hope you'll utilize what you learned from me!
+ \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-11.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-11.html new file mode 100644 index 0000000000..c7e0032299 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-11.html @@ -0,0 +1,7 @@ +Head Blacksmith Ferris:
+You're not done with the attribution mission yet.
+What's up? Why are you here?
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-12.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-12.html new file mode 100644 index 0000000000..84246d5fe4 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-12.html @@ -0,0 +1,9 @@ +Head Blacksmith Ferris:
+The Auction House allows you to sell or buy items through the Auction House NPCs. Therefore, if you use this function, you don't need to be logged into the game when you want to trade the items.
+To use this function, find the Auction House Manager in town. You can open the map to check the location, so it shouldn't be difficult.
+A brokerage fee will be deducted after a listed item has been sold.
+You can search for items but make sure that the quantity is correct, or you may accidentally buy more than you intended. Anyway, if you get the materials using this method, you'll be ready for leaming about granting attributes.
+Is there anything else you need?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-13.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-13.html new file mode 100644 index 0000000000..e76cf1183a --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-13.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+You want to hear about attributes again? there are Elemental Attribute and Characteristic Attribute. Fire, Water, Earth, and Air are Elemental Attributes, and Holy Attacks and Dark Attacks are Characteristic Attributes. When there is no specific attribute, it is called Non-attribute.
+There are some conflicting attributes, such as, Fire and Water, Earth and Air, Holy and Dark. The key to understanding attributes is to understand conflicting attributes.
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-14.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-14.html new file mode 100644 index 0000000000..190e148e1c --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-14.html @@ -0,0 +1,3 @@ +Head Blacksmith Ferris:
+OK, do the attribute practice again. Use the Attribute Practice Fire Stone to grant an attribute to theAttribute Practice Long Sword.
+ \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-15.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-15.html new file mode 100644 index 0000000000..bc1d346a1f --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-15.html @@ -0,0 +1,6 @@ +Head Blacksmith Ferris:
+Now, for granting attributes! First of all, remember that an attribute can only be applied to items with S-grade and above. The method is the same with Enchantment Double-click the Attribute Stone or Attribute Crystal.
+Only one attribute can be applied to a Weapon and when you grant an attribute, additional attribute damage can be applied too. Corresponding to the attribute of the monster that you are fighting, the attribute damage can increase or decrease.
+On the other hand, you can apply as many as three attributes to armor. However, you can't grant conflicting attributes to armor. If you apply an attribute to armor, it will gain the resistance to that attribute. The higher the monsters level is, there is a higher probability it will attack with an attribute. It'll be helpful to know the monsters — attribute so you can prepare accordingly.
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-16.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-16.html new file mode 100644 index 0000000000..e53b54e874 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-16.html @@ -0,0 +1,6 @@ +Head Blacksmith Ferris:
+Regarding the attributes, go to the Attribute Master NPCs in the Town of Aden or Town of Rune. They release the attributes applied to weapons and armor and can also exchange the Attribute Stones. Of course, there is a fee. In addition, they also sell potions that can enhance the attribute for a short period.
+That's all for my attribute lesson. Anything else you need?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-dark.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-dark.html new file mode 100644 index 0000000000..a6c5fbf52c --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-dark.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Dark Stone! This practice is going to be on Dark!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-earth.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-earth.html new file mode 100644 index 0000000000..f65c1b0284 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-earth.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Earth Stone! This practice is going to be on Earth!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-fire.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-fire.html new file mode 100644 index 0000000000..71ec3e5141 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-fire.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Fire Stone! This practice is going to be on fire!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-holy.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-holy.html new file mode 100644 index 0000000000..d62c064735 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-holy.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Holy Stone! This practice is going to be on Holy!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-water.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-water.html new file mode 100644 index 0000000000..71e9030c9c --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-water.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Water Stone! This practice is going to be on Water!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-wind.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-wind.html new file mode 100644 index 0000000000..ad8742a164 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/30847-wind.html @@ -0,0 +1,5 @@ +Head Blacksmith Ferris:
+Oh, you selected a Wind Stone! This practice is going to be on Wind!
+Grant an attribute to the practice weapon that I gave you. I gave you spare ones to prepare in case of failure. If you're unlucky and fail even though you used all the Practice Attribute Stones, you'll have to buy Attribute Stones to complete the mission.
+You can use other Attribute Stones that you already had or you can grant the attribute to other equipment. As long as you experience the attribute, anything goes.
+ \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/Q10579_ContainingTheAttributePower.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/Q10579_ContainingTheAttributePower.java new file mode 100644 index 0000000000..166af73dbd --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10579_ContainingTheAttributePower/Q10579_ContainingTheAttributePower.java @@ -0,0 +1,248 @@ +/* + * 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 . + */ +package quests.Q10579_ContainingTheAttributePower; + +import org.l2jmobius.gameserver.enums.QuestType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.events.Containers; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.impl.item.OnItemAttributeAdd; +import org.l2jmobius.gameserver.model.events.listeners.ConsumerEventListener; +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.network.serverpackets.ExTutorialShowId; + +import quests.Q10566_BestChoice.Q10566_BestChoice; + +/** + * Containing the Attribute Power (10579) + * @URL https://l2wiki.com/Containing_the_Attribute_Power + * @author Werum / NightBR + */ +public class Q10579_ContainingTheAttributePower extends Quest +{ + // NPC + private static final int FERRIS = 30847; + // Items + // TODO: Need to add some of the Stones that are not present in the current client + private static final int ATTRIBUTE_PRACTICE_LONG_SWORD = 48168; + private static final int ATTRIBUTE_PRACTICE_FIRE_STONE = 48169; + private static final int ATTRIBUTE_PRACTICE_WATER_STONE = 48169; // FIXME: Does not exist. + private static final int ATTRIBUTE_PRACTICE_EARTH_STONE = 48169; // FIXME: Does not exist. + private static final int ATTRIBUTE_PRACTICE_WIND_STONE = 48169; // FIXME: Does not exist. + private static final int ATTRIBUTE_PRACTICE_HOLY_STONE = 48169; // FIXME: Does not exist. + private static final int ATTRIBUTE_PRACTICE_DARK_STONE = 48169; // FIXME: Does not exist. + // Rewards + private static final int XP = 597699960; + private static final int SP = 597690; + private static final int CERTIFICATE_FROM_FERRIS = 48177; + // Misc + private static final int MIN_LEVEL = 95; + + public Q10579_ContainingTheAttributePower() + { + super(10579); + addStartNpc(FERRIS); + addTalkId(FERRIS); + addCondMinLevel(MIN_LEVEL, "noLevel.html"); + registerQuestItems(ATTRIBUTE_PRACTICE_LONG_SWORD, ATTRIBUTE_PRACTICE_FIRE_STONE, ATTRIBUTE_PRACTICE_WATER_STONE, ATTRIBUTE_PRACTICE_EARTH_STONE, ATTRIBUTE_PRACTICE_WIND_STONE, ATTRIBUTE_PRACTICE_HOLY_STONE, ATTRIBUTE_PRACTICE_DARK_STONE); + addCondStartedQuest(Q10566_BestChoice.class.getSimpleName(), "34138-99.html"); + Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_ITEM_ATTRIBUTE_ADD, (OnItemAttributeAdd event) -> OnItemAttributeAdd(event), this)); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return getNoQuestMsg(player); + } + String htmltext = null; + switch (event) + { + case "30847-02.htm": + case "30847-05.html": + case "30847-06.html": + case "30847-07.html": + case "30847-13.html": + case "30847-15.html": + { + htmltext = event; + break; + } + case "30847-03.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "30847-04.html": + { + // show Service/Help/Auction House page + player.sendPacket(new ExTutorialShowId(58)); + htmltext = event; + break; + } + case "30847-08.html": + { + qs.setCond(2, true); + htmltext = event; + break; + } + case "30847-12.html": + { + // show Service/Help/Auction House page + player.sendPacket(new ExTutorialShowId(58)); + htmltext = event; + break; + } + case "30847-16.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + htmltext = event; + break; + } + case "30847-fire.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_FIRE_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-water.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_WATER_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-earth.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_EARTH_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-wind.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_WIND_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-holy.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_HOLY_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-dark.html": + { + // show Service/Help/Applying Elemental Attribute page + player.sendPacket(new ExTutorialShowId(41)); + giveItems(player, ATTRIBUTE_PRACTICE_LONG_SWORD, 1); + giveItems(player, ATTRIBUTE_PRACTICE_DARK_STONE, 3); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30847-10.html": + { + addExpAndSp(player, XP, SP); + giveItems(player, CERTIFICATE_FROM_FERRIS, 1); + qs.exitQuest(QuestType.ONE_TIME, true); + htmltext = event; + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "30847-01.htm"; + break; + } + case State.STARTED: + { + if (qs.isCond(1)) + { + htmltext = "30847-04.html"; + } + else if (qs.isCond(2)) + { + htmltext = "30847-08.html"; + } + else + { + htmltext = (qs.isCond(4)) ? "30847-09.html" : "30847-11.html"; + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + public void OnItemAttributeAdd(OnItemAttributeAdd event) + { + final PlayerInstance player = event.getPlayer(); + if ((player == null) || (event.getItem().getId() != ATTRIBUTE_PRACTICE_LONG_SWORD)) + { + return; + } + + final QuestState qs = getQuestState(player, false); + // Check weapon has elemental enchant to complete the quest + if ((qs != null) && qs.isCond(3) && (player.getInventory().getItemByItemId(ATTRIBUTE_PRACTICE_LONG_SWORD).hasAttributes())) + { + qs.setCond(4, true); + } + } +} diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/QuestMasterHandler.java index 183ee2df7f..f6846eb82c 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -308,6 +308,7 @@ import quests.Q10561_AcrossTheDeathLine.Q10561_AcrossTheDeathLine; import quests.Q10562_TakeUpArms.Q10562_TakeUpArms; import quests.Q10566_BestChoice.Q10566_BestChoice; import quests.Q10575_LetsGoFishing.Q10575_LetsGoFishing; +import quests.Q10579_ContainingTheAttributePower.Q10579_ContainingTheAttributePower; import quests.Q10658_MakkumInTheDimension.Q10658_MakkumInTheDimension; import quests.Q10701_TheRoadToDestruction.Q10701_TheRoadToDestruction; import quests.Q10702_TheRoadToInfinity.Q10702_TheRoadToInfinity; @@ -846,7 +847,7 @@ public class QuestMasterHandler Q10576_GlitteringWeapons.class, // TODO: Not done. Q10577_TemperARustingBlade.class, // TODO: Not done. Q10578_TheSoulOfASword.class, // TODO: Not done. - Q10579_ContainingTheAttributePower.class, // TODO: Not done. + Q10579_ContainingTheAttributePower.class, Q10580_SpecialMissionDefeatSpezion.class, // TODO: Not done. Q10588_SpecialMissionDefeatBaylor.class, // TODO: Not done. Q10594_FergasonsScheme.class, // TODO: Not done. diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10579_ContainingTheAttributePower.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10579_ContainingTheAttributePower.java deleted file mode 100644 index 2d1db69483..0000000000 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10579_ContainingTheAttributePower.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package quests.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q10579_ContainingTheAttributePower extends Quest -{ - private static final int START_NPC = 30847; - - public Q10579_ContainingTheAttributePower() - { - super(10579); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/items/48100-48199.xml b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/items/48100-48199.xml index 44332f2e4b..a61537f0dd 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/items/48100-48199.xml +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/items/48100-48199.xml @@ -894,16 +894,20 @@ + + + + 24 17 @@ -917,6 +921,8 @@ + + @@ -925,6 +931,11 @@ + + + + +
diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/Elementals.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/Elementals.java index c5654df9ba..68d61edf1f 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/Elementals.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/Elementals.java @@ -100,6 +100,8 @@ public final class Elementals public enum ElementalItems { + attributePracticeFireStone(FIRE, 48169, ElementalItemType.Stone, 0), + fireStone(FIRE, 9546, ElementalItemType.Stone, 0), waterStone(WATER, 9547, ElementalItemType.Stone, 0), windStone(WIND, 9549, ElementalItemType.Stone, 0), diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/events/EventType.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/events/EventType.java index 2514710fdf..b87a8f7bfb 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/events/EventType.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/events/EventType.java @@ -120,6 +120,7 @@ import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceDestroy; import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceEnter; import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceLeave; import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; +import org.l2jmobius.gameserver.model.events.impl.item.OnItemAttributeAdd; import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent; import org.l2jmobius.gameserver.model.events.impl.item.OnItemCreate; import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk; @@ -181,6 +182,7 @@ public enum EventType ON_ITEM_BYPASS_EVENT(OnItemBypassEvent.class, void.class), ON_ITEM_CREATE(OnItemCreate.class, void.class), ON_ITEM_TALK(OnItemTalk.class, void.class), + ON_ITEM_ATTRIBUTE_ADD(OnItemAttributeAdd.class, void.class), // NPC events ON_NPC_CAN_BE_SEEN(OnNpcCanBeSeen.class, void.class, TerminateReturn.class), diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/events/impl/item/OnItemAttributeAdd.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/events/impl/item/OnItemAttributeAdd.java new file mode 100644 index 0000000000..8a229f8f83 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/events/impl/item/OnItemAttributeAdd.java @@ -0,0 +1,53 @@ +/* + * 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 . + */ +package org.l2jmobius.gameserver.model.events.impl.item; + +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.impl.IBaseEvent; +import org.l2jmobius.gameserver.model.items.instance.ItemInstance; + +/** + * @author NightBR + */ +public class OnItemAttributeAdd implements IBaseEvent +{ + private final PlayerInstance _player; + private final ItemInstance _item; + + public OnItemAttributeAdd(PlayerInstance player, ItemInstance item) + { + _player = player; + _item = item; + } + + public PlayerInstance getPlayer() + { + return _player; + } + + public ItemInstance getItem() + { + return _item; + } + + @Override + public EventType getType() + { + return EventType.ON_ITEM_ATTRIBUTE_ADD; + } +} diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java index e64e0750c3..a5e2ab5ade 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/items/instance/ItemInstance.java @@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.events.EventDispatcher; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerAugment; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemDrop; import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemPickup; +import org.l2jmobius.gameserver.model.events.impl.item.OnItemAttributeAdd; import org.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent; import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk; import org.l2jmobius.gameserver.model.instancezone.Instance; @@ -1215,6 +1216,9 @@ public final class ItemInstance extends WorldObject _elementals.put(holder.getType(), holder); } } + + // Notify to Scripts + EventDispatcher.getInstance().notifyEventAsync(new OnItemAttributeAdd(getActingPlayer(), this)); } /** diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java index ce7d015f99..c5301bd51f 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java @@ -104,6 +104,14 @@ public class RequestExEnchantItemAttribute implements IClientIncomingPacket return; } + // Quest Q10579_ContainingTheAttributePower check. + if ((item.getItem().getId() == 48168) && (stone.getItem().getId() != 48169)) + { + player.removeRequest(request.getClass()); + client.sendPacket(SystemMessageId.ATTRIBUTE_ITEM_USAGE_HAS_BEEN_CANCELLED); + return; + } + if (!item.isElementable()) { client.sendPacket(SystemMessageId.ELEMENTAL_POWER_ENHANCER_USAGE_REQUIREMENT_IS_NOT_SUFFICIENT);