Addition of quest Glittering Weapons (10576).

Contributed by NightBR.
This commit is contained in:
MobiusDevelopment
2019-05-01 02:26:27 +00:00
parent 9c9fc802de
commit de41d03599
72 changed files with 1125 additions and 115 deletions

View File

@@ -184,7 +184,6 @@
10571 Strategic Reconciliation
10572 To Expel the Embryo's Forces
10574 Special Mission: Fortuna
10576 Glittering Weapons
10580 Special Mission: Defeat Spezion
10594 Fergason's Scheme
10595 The Dimensional Warp, Part 8

View File

@@ -0,0 +1,4 @@
<html><body>Blacksmith Rupio:<br>
Do you want to know how to obtain a brilliant weapon? Then, listen. This will an awesome opportunity for Adventurers who need to grow quickly.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-02.htm">"Go on."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blacksmith Rupio:<br>
There are a lot of options to make an item stronger, but the best way is <font color="LEVEL">Enchantment</font>. It's not just easier, faster, and stronger, if you succeed in enchanting the weapon higher than a certain level, there will be a sparkling effect on the weapon. Isn't that great? <br>
It isn't that difficult. Why don't you give it a try?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-03.htm">"I'll do it."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blacksmith Rupio:<br>
Let me tell you. Frst of all, you need a weapon. And then, you need a <font color="LEVEL">Scroll: Enchant Weapon</font> appropriate for the grade of your weapon.<br>
You can get, or buy the Scroll: Enchant Weapon. It doesn't matter how you obtain the scroll, however, you need the scroll for Enchantment. So, if you want to try, you have to have the know-how to get it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-04.html">"I understand."</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
But, there is one way. You can <font color="LEVEL">Trade</font>. The thing you desperately need, may be not that useful to others. This goes the other way around too. One man's trash is another man's treasure.<br>
Therefore, if you utilize the network well, you can get what you want at a minimum cost. Does that make sense?<br>
But, check the item and the quantity when you are trading. Be wary of those who want to deceive you while trading!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-05.html">"Tell me about the next task."</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
It is now time for Enchantment. Most equipment can go through Enchantment. While early level Enchantment is always successful, after a certain level, there are possibilities of failure.<br>
When it fails, everything will come to nothing. You'll lose the weapon, and the Enchantment level will be gone, too.<br>
I think its the time for practice. Let's make the weapon sparkle!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-06.html">"Tell me about practice."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blacksmith Rupio:<br>
The practice mission is quite simple. Although I talked a lot about how to obtain the items necessary for Enchantment, for now, I'll supply you with the necessary supplies since it's a practice session.<br>
Here, take the <font color="LEVEL">Weapon Enhancing Practice Long Sword and the Practice Weapon Enchant Scroll</font>. Repeat the Enchantment so your Weapon's Enchantment level reaches +7. Use all of the Practice Weapon Enchant Scrolls to reach the level.<br>
Even if you fail, don't worry. Just come back to me, as I have a Plan B. Good luck to you, then!
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
Why did you come back?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-11.html">"Please,tell me how to get items again."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-13.html">"Please,tell me how to Enhance the Weapon."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-08.html">"I failed the Weapon Enhancement and it is broken now."</button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Blacksmith Rupio:<br>
Oh, you failed?! But you know, we can learn a lesson from our failures. Now you learned that Enchantment can be a double-edged sword. If you are not careful, you could lose your weapon.<br>
I'll give you the <font color="LEVEL">Enhancement Practice Long Sword and the Practice Weapon Enchant Scroll</font> again. This time, try raising the Enhancement level to +3.<br>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blacksmith Rupio:<br>
You were succesful this time! This amount of Enhancement wasn't difficult, so I knew that you would succeed! Consider this task complete!.<br>
Good job.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-10.html">"Thank you, your information was very helpful."</button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith Rupio:<br>
Any time! With adventurers like you around, Blacksmiths like me have more opportunities to make weapons! It was rewarding for me. Well, I'll see you around!<br>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
Do you want to know how to obtain the items needed for Enchantment? OK, I'll tell you again.<br>
You can <font color="LEVEL">Trade</font> to get the item needed. The thing you desperately need, may be not that useful to others. This goes the other way around too. One man's trash is another man's treasure. <br>
Therefore, if you utilize the network well, you can get what you want at a minimum cost.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-12.html">"I understand."</button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Blacksmith Rupio:<br>
But, check the item and the quantity when you are trading. Be there are those who want to deceive you while trading so be careful!<br>
This is the method that I mentioned before. I think you'll remember now.<br>
Any other questions?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-13.html">"I want to ask about Enchantment..."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-14.html">"No, I'm okay now.."</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
Now I'll talk about Enchantment Most equipment can go through Enchantment While early level Enchantment is always successful, after a certain level, there are possibilities of failure.<br>
If it fails, the Enhance level and the Weapon will be destroyed.<br>
Keep this in mind. You should have no problem with Enchantment with this knowledge at hand.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-14.html">"I understand."</button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith Rupio:<br>
Now, Enhance the <font color="LEVEL">Enhancement Practice Long Sword</font> using the Practice Enchant Scroll that I gave you! Good luck!<br>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith Rupio:<br>
Not successful yet?! Since this is your second time, you only need to raise the Enchantment level to +3. This isn't hard, so don't worry too much about it and go for it!<br>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith Rupio:<br>
Oh, you still have a sword? Then, you must not have failed! Don't worry and keep going!<br>
</body></html>

View File

@@ -0,0 +1,222 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q10576_GlitteringWeapons;
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.OnItemEnchantAdd;
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;
/**
* Glittering Weapons (10576)
* @URL https://l2wiki.com/Glittering_Weapons
* @author NightBR
* @html by Werum
*/
public final class Q10576_GlitteringWeapons extends Quest
{
// NPCs
private static final int RUPIO = 30471;
// Item
private static final int ENHANCEMENT_PRACTICE_LONG_SWORD = 48170;
private static final int PRACTICE_WEAPON_ENCHANT_SCROLL = 48171;
// Rewards
private static final long XP = 597699960;
private static final int SP = 597690;
private static final int CERTIFICATE_FROM_RUPIO = 48174;
// Misc
private static final int MIN_LEVEL = 95;
public Q10576_GlitteringWeapons()
{
super(10576);
addStartNpc(RUPIO);
addTalkId(RUPIO);
addCondMinLevel(MIN_LEVEL, "noLevel.html");
registerQuestItems(ENHANCEMENT_PRACTICE_LONG_SWORD, PRACTICE_WEAPON_ENCHANT_SCROLL);
addCondStartedQuest(Q10566_BestChoice.class.getSimpleName(), "30471-99.html");
Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_ITEM_ENCHANT_ADD, (OnItemEnchantAdd event) -> OnItemEnchantAdd(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 "30471-02.htm":
case "30471-05.html":
case "30471-07.html":
case "30471-12.html":
case "30471-14.html":
{
htmltext = event;
break;
}
case "30471-03.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "30471-04.html":
{
// show Service/Help/Trade page
player.sendPacket(new ExTutorialShowId(56));
htmltext = event;
break;
}
case "30471-06.html":
{
// show Service/Help/Enchant page
player.sendPacket(new ExTutorialShowId(38));
giveItems(player, ENHANCEMENT_PRACTICE_LONG_SWORD, 1);
giveItems(player, PRACTICE_WEAPON_ENCHANT_SCROLL, 7);
qs.setCond(2, true);
htmltext = event;
break;
}
case "30471-10.html":
{
// Rewards
addExpAndSp(player, XP, SP);
giveItems(player, CERTIFICATE_FROM_RUPIO, 1);
qs.exitQuest(QuestType.ONE_TIME, true);
htmltext = event;
break;
}
case "30471-08.html":
{
// check if player already have quest items
if (hasQuestItems(player, ENHANCEMENT_PRACTICE_LONG_SWORD, PRACTICE_WEAPON_ENCHANT_SCROLL))
{
htmltext = "30471-16.html";
}
else
{
// To make sure player does not have them already
removeRegisteredQuestItems(player);
giveItems(player, ENHANCEMENT_PRACTICE_LONG_SWORD, 1);
giveItems(player, PRACTICE_WEAPON_ENCHANT_SCROLL, 3);
qs.setCond(3, true);
htmltext = event;
}
break;
}
case "30471-11.html":
{
// show Service/Help/Trade page
player.sendPacket(new ExTutorialShowId(56));
htmltext = event;
break;
}
case "30471-13.html":
{
// show Service/Help/Enchant page
player.sendPacket(new ExTutorialShowId(38));
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 = "30471-01.htm";
break;
}
case State.STARTED:
{
if (qs.isCond(1))
{
htmltext = "30471-03.html";
}
else if (qs.isCond(2))
{
htmltext = "30471-07.html";
}
else if (qs.isCond(3))
{
htmltext = "30471-15.html";
}
else
{
htmltext = "30471-09.html";
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
public void OnItemEnchantAdd(OnItemEnchantAdd event)
{
final PlayerInstance player = event.getPlayer();
if ((player == null) || (event.getItem().getId() != ENHANCEMENT_PRACTICE_LONG_SWORD))
{
return;
}
final QuestState qs = getQuestState(player, false);
// Check if weapon has been augmented to complete the quest
if ((qs != null) && qs.isCond(2))
{
// Check if Item has been destroyed during enchantment process
if (!hasQuestItems(player, ENHANCEMENT_PRACTICE_LONG_SWORD))
{
return;
}
if (player.getInventory().getItemByItemId(ENHANCEMENT_PRACTICE_LONG_SWORD).getEnchantLevel() == 7)
{
qs.setCond(4, true);
}
}
else if ((qs != null) && qs.isCond(3) && (player.getInventory().getItemByItemId(ENHANCEMENT_PRACTICE_LONG_SWORD).getEnchantLevel() == 3))
{
qs.setCond(4, true);
}
}
}

View File

@@ -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.Q10576_GlitteringWeapons.Q10576_GlitteringWeapons;
import quests.Q10577_TemperARustingBlade.Q10577_TemperARustingBlade;
import quests.Q10578_TheSoulOfASword.Q10578_TheSoulOfASword;
import quests.Q10579_ContainingTheAttributePower.Q10579_ContainingTheAttributePower;
@@ -914,7 +915,7 @@ public class QuestMasterHandler
Q10572_ToExpelTheEmbryosForces.class, // TODO: Not done.
Q10574_SpecialMissionFortuna.class, // TODO: Not done.
Q10575_LetsGoFishing.class,
Q10576_GlitteringWeapons.class, // TODO: Not done.
Q10576_GlitteringWeapons.class,
Q10577_TemperARustingBlade.class,
Q10578_TheSoulOfASword.class,
Q10579_ContainingTheAttributePower.class,

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
package quests.not_done;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.quest.Quest;
/**
* @author Mobius
*/
public class Q10576_GlitteringWeapons extends Quest
{
private static final int START_NPC = 30471;
public Q10576_GlitteringWeapons()
{
super(10576);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
}
}

View File

@@ -902,6 +902,7 @@
<set name="weight" val="1420" />
<set name="enchant_enabled" val="1" />
<set name="element_enabled" val="true" />
<set name="is_questitem" val="true" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_destroyable" val="false" />
@@ -918,13 +919,14 @@
</stats>
</item>
<item id="48169" name="Attribute Practice Fire Stone" type="EtcItem">
<!-- Fire elemental attack attribute increases by 5 when bestowed on a weapon. Water elemental defense attribute increases by 6 when bestowed on an armor. Attribute Stones can be used up to attribute level 3. Additionally, a maximum of three types of elemental defense attribute can be bestowed, and one type of elemental attack attribute. Opposite attributes cannot be bestowed together. -->
<!-- Fire elemental attack attribute increases by 5 when bestowed on a weapon. Water Attribute Resistance attribute increases by 6 when bestowed on an armor. Attribute Stones can be used up to attribute level 3. Additionally, a maximum of three types of elemental defense attribute can be bestowed, and one type of elemental attack attribute. Opposite attributes cannot be bestowed together. -->
<set name="icon" val="icon.etc_fire_stone_i00" />
<set name="default_action" val="SKILL_REDUCE" />
<set name="etcitem_type" val="ENCHT_ATTR" />
<set name="immediate_effect" val="true" />
<set name="material" val="PAPER" />
<set name="weight" val="1" />
<set name="is_questitem" val="true" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_destroyable" val="false" />
@@ -941,16 +943,20 @@
<!-- A training sword you received from Blacksmith Rupio to practice weapon enchanting. It is worthless as a weapon. Take it to Rupio after enchanting it to the enchantment level he asked for. -->
<set name="icon" val="icon.weapon_long_sword_i00" />
<set name="default_action" val="EQUIP" />
<set name="bodypart" val="rhand" />
<set name="weapon_type" val="SWORD" />
<set name="immediate_effect" val="true" />
<set name="crystal_type" val="R" />
<set name="material" val="FINE_STEEL" />
<set name="weight" val="1420" />
<set name="enchant_enabled" val="1" />
<set name="element_enabled" val="true" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_destroyable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="commissionItemType" val="TWO_HAND_SWORD" />
<stats>
<stat type="pAtk">24</stat>
<stat type="mAtk">17</stat>
@@ -972,6 +978,14 @@
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
<set name="is_oly_restricted" val="true" />
<set name="etcitem_type" val="ENCHT_WP" />
<set name="handler" val="EnchantScrolls" />
<set name="immediate_effect" val="true" />
<set name="commissionItemType" val="SCROLL_ENCHANT_WEAPON" />
<skills>
<skill id="9185" level="1" /> <!-- Scroll: Enchant Weapon (R-grade) -->
</skills>
</item>
<item id="48172" name="Herphah's Mission List" type="EtcItem">
<!-- A list of missions that Herphah instructed you to complete. "Complete missions for the following people and return with the certificates they give you.- Fishing Guild Leader Santiago in Heine, Blacksmith Rupio in the Town of Giran, Head Blacksmith Flutter in the Town of Oren, Blacksmith Vincenz in the Town of Rune, Head Blacksmith Ferris in the Town of Aden" -->

View File

@@ -123,6 +123,7 @@ import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChang
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.OnItemEnchantAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemSoulCrystalAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
import org.l2jmobius.gameserver.model.events.impl.olympiad.OnOlympiadMatchResult;
@@ -185,6 +186,7 @@ public enum EventType
ON_ITEM_TALK(OnItemTalk.class, void.class),
ON_ITEM_ATTRIBUTE_ADD(OnItemAttributeAdd.class, void.class),
ON_ITEM_SOUL_CRYSTAL_ADD(OnItemSoulCrystalAdd.class, void.class),
ON_ITEM_ENCHANT_ADD(OnItemEnchantAdd.class, void.class),
// NPC events
ON_NPC_CAN_BE_SEEN(OnNpcCanBeSeen.class, void.class, TerminateReturn.class),

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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 OnItemEnchantAdd implements IBaseEvent
{
private final PlayerInstance _player;
private final ItemInstance _item;
public OnItemEnchantAdd(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_ENCHANT_ADD;
}
}

View File

@@ -69,6 +69,7 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemDr
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.OnItemEnchantAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemSoulCrystalAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
import org.l2jmobius.gameserver.model.instancezone.Instance;
@@ -943,6 +944,9 @@ public final class ItemInstance extends WorldObject
_enchantLevel = enchantLevel;
applyEnchantStats();
_storedInDb = false;
// Notify to Scripts
EventDispatcher.getInstance().notifyEventAsync(new OnItemEnchantAdd(getActingPlayer(), this));
}
/**

View File

@@ -196,7 +196,6 @@
10571 Strategic Reconciliation
10572 To Expel the Embryo's Forces
10574 Special Mission: Fortuna
10576 Glittering Weapons
10580 Special Mission: Defeat Spezion
10594 Fergason's Scheme
10595 The Dimensional Warp, Part 8

View File

@@ -0,0 +1,4 @@
<html><body>Blacksmith Rupio:<br>
Do you want to know how to obtain a brilliant weapon? Then, listen. This will an awesome opportunity for Adventurers who need to grow quickly.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-02.htm">"Go on."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blacksmith Rupio:<br>
There are a lot of options to make an item stronger, but the best way is <font color="LEVEL">Enchantment</font>. It's not just easier, faster, and stronger, if you succeed in enchanting the weapon higher than a certain level, there will be a sparkling effect on the weapon. Isn't that great? <br>
It isn't that difficult. Why don't you give it a try?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-03.htm">"I'll do it."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blacksmith Rupio:<br>
Let me tell you. Frst of all, you need a weapon. And then, you need a <font color="LEVEL">Scroll: Enchant Weapon</font> appropriate for the grade of your weapon.<br>
You can get, or buy the Scroll: Enchant Weapon. It doesn't matter how you obtain the scroll, however, you need the scroll for Enchantment. So, if you want to try, you have to have the know-how to get it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-04.html">"I understand."</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
But, there is one way. You can <font color="LEVEL">Trade</font>. The thing you desperately need, may be not that useful to others. This goes the other way around too. One man's trash is another man's treasure.<br>
Therefore, if you utilize the network well, you can get what you want at a minimum cost. Does that make sense?<br>
But, check the item and the quantity when you are trading. Be wary of those who want to deceive you while trading!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-05.html">"Tell me about the next task."</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
It is now time for Enchantment. Most equipment can go through Enchantment. While early level Enchantment is always successful, after a certain level, there are possibilities of failure.<br>
When it fails, everything will come to nothing. You'll lose the weapon, and the Enchantment level will be gone, too.<br>
I think its the time for practice. Let's make the weapon sparkle!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-06.html">"Tell me about practice."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blacksmith Rupio:<br>
The practice mission is quite simple. Although I talked a lot about how to obtain the items necessary for Enchantment, for now, I'll supply you with the necessary supplies since it's a practice session.<br>
Here, take the <font color="LEVEL">Weapon Enhancing Practice Long Sword and the Practice Weapon Enchant Scroll</font>. Repeat the Enchantment so your Weapon's Enchantment level reaches +7. Use all of the Practice Weapon Enchant Scrolls to reach the level.<br>
Even if you fail, don't worry. Just come back to me, as I have a Plan B. Good luck to you, then!
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
Why did you come back?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-11.html">"Please,tell me how to get items again."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-13.html">"Please,tell me how to Enhance the Weapon."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-08.html">"I failed the Weapon Enhancement and it is broken now."</button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Blacksmith Rupio:<br>
Oh, you failed?! But you know, we can learn a lesson from our failures. Now you learned that Enchantment can be a double-edged sword. If you are not careful, you could lose your weapon.<br>
I'll give you the <font color="LEVEL">Enhancement Practice Long Sword and the Practice Weapon Enchant Scroll</font> again. This time, try raising the Enhancement level to +3.<br>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blacksmith Rupio:<br>
You were succesful this time! This amount of Enhancement wasn't difficult, so I knew that you would succeed! Consider this task complete!.<br>
Good job.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-10.html">"Thank you, your information was very helpful."</button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith Rupio:<br>
Any time! With adventurers like you around, Blacksmiths like me have more opportunities to make weapons! It was rewarding for me. Well, I'll see you around!<br>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
Do you want to know how to obtain the items needed for Enchantment? OK, I'll tell you again.<br>
You can <font color="LEVEL">Trade</font> to get the item needed. The thing you desperately need, may be not that useful to others. This goes the other way around too. One man's trash is another man's treasure. <br>
Therefore, if you utilize the network well, you can get what you want at a minimum cost.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-12.html">"I understand."</button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Blacksmith Rupio:<br>
But, check the item and the quantity when you are trading. Be there are those who want to deceive you while trading so be careful!<br>
This is the method that I mentioned before. I think you'll remember now.<br>
Any other questions?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-13.html">"I want to ask about Enchantment..."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-14.html">"No, I'm okay now.."</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
Now I'll talk about Enchantment Most equipment can go through Enchantment While early level Enchantment is always successful, after a certain level, there are possibilities of failure.<br>
If it fails, the Enhance level and the Weapon will be destroyed.<br>
Keep this in mind. You should have no problem with Enchantment with this knowledge at hand.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-14.html">"I understand."</button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith Rupio:<br>
Now, Enhance the <font color="LEVEL">Enhancement Practice Long Sword</font> using the Practice Enchant Scroll that I gave you! Good luck!<br>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith Rupio:<br>
Not successful yet?! Since this is your second time, you only need to raise the Enchantment level to +3. This isn't hard, so don't worry too much about it and go for it!<br>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith Rupio:<br>
Oh, you still have a sword? Then, you must not have failed! Don't worry and keep going!<br>
</body></html>

View File

@@ -0,0 +1,222 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q10576_GlitteringWeapons;
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.OnItemEnchantAdd;
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;
/**
* Glittering Weapons (10576)
* @URL https://l2wiki.com/Glittering_Weapons
* @author NightBR
* @html by Werum
*/
public final class Q10576_GlitteringWeapons extends Quest
{
// NPCs
private static final int RUPIO = 30471;
// Item
private static final int ENHANCEMENT_PRACTICE_LONG_SWORD = 48170;
private static final int PRACTICE_WEAPON_ENCHANT_SCROLL = 48171;
// Rewards
private static final long XP = 597699960;
private static final int SP = 597690;
private static final int CERTIFICATE_FROM_RUPIO = 48174;
// Misc
private static final int MIN_LEVEL = 95;
public Q10576_GlitteringWeapons()
{
super(10576);
addStartNpc(RUPIO);
addTalkId(RUPIO);
addCondMinLevel(MIN_LEVEL, "noLevel.html");
registerQuestItems(ENHANCEMENT_PRACTICE_LONG_SWORD, PRACTICE_WEAPON_ENCHANT_SCROLL);
addCondStartedQuest(Q10566_BestChoice.class.getSimpleName(), "30471-99.html");
Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_ITEM_ENCHANT_ADD, (OnItemEnchantAdd event) -> OnItemEnchantAdd(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 "30471-02.htm":
case "30471-05.html":
case "30471-07.html":
case "30471-12.html":
case "30471-14.html":
{
htmltext = event;
break;
}
case "30471-03.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "30471-04.html":
{
// show Service/Help/Trade page
player.sendPacket(new ExTutorialShowId(56));
htmltext = event;
break;
}
case "30471-06.html":
{
// show Service/Help/Enchant page
player.sendPacket(new ExTutorialShowId(38));
giveItems(player, ENHANCEMENT_PRACTICE_LONG_SWORD, 1);
giveItems(player, PRACTICE_WEAPON_ENCHANT_SCROLL, 7);
qs.setCond(2, true);
htmltext = event;
break;
}
case "30471-10.html":
{
// Rewards
addExpAndSp(player, XP, SP);
giveItems(player, CERTIFICATE_FROM_RUPIO, 1);
qs.exitQuest(QuestType.ONE_TIME, true);
htmltext = event;
break;
}
case "30471-08.html":
{
// check if player already have quest items
if (hasQuestItems(player, ENHANCEMENT_PRACTICE_LONG_SWORD, PRACTICE_WEAPON_ENCHANT_SCROLL))
{
htmltext = "30471-16.html";
}
else
{
// To make sure player does not have them already
removeRegisteredQuestItems(player);
giveItems(player, ENHANCEMENT_PRACTICE_LONG_SWORD, 1);
giveItems(player, PRACTICE_WEAPON_ENCHANT_SCROLL, 3);
qs.setCond(3, true);
htmltext = event;
}
break;
}
case "30471-11.html":
{
// show Service/Help/Trade page
player.sendPacket(new ExTutorialShowId(56));
htmltext = event;
break;
}
case "30471-13.html":
{
// show Service/Help/Enchant page
player.sendPacket(new ExTutorialShowId(38));
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 = "30471-01.htm";
break;
}
case State.STARTED:
{
if (qs.isCond(1))
{
htmltext = "30471-03.html";
}
else if (qs.isCond(2))
{
htmltext = "30471-07.html";
}
else if (qs.isCond(3))
{
htmltext = "30471-15.html";
}
else
{
htmltext = "30471-09.html";
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
public void OnItemEnchantAdd(OnItemEnchantAdd event)
{
final PlayerInstance player = event.getPlayer();
if ((player == null) || (event.getItem().getId() != ENHANCEMENT_PRACTICE_LONG_SWORD))
{
return;
}
final QuestState qs = getQuestState(player, false);
// Check if weapon has been augmented to complete the quest
if ((qs != null) && qs.isCond(2))
{
// Check if Item has been destroyed during enchantment process
if (!hasQuestItems(player, ENHANCEMENT_PRACTICE_LONG_SWORD))
{
return;
}
if (player.getInventory().getItemByItemId(ENHANCEMENT_PRACTICE_LONG_SWORD).getEnchantLevel() == 7)
{
qs.setCond(4, true);
}
}
else if ((qs != null) && qs.isCond(3) && (player.getInventory().getItemByItemId(ENHANCEMENT_PRACTICE_LONG_SWORD).getEnchantLevel() == 3))
{
qs.setCond(4, true);
}
}
}

View File

@@ -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.Q10576_GlitteringWeapons.Q10576_GlitteringWeapons;
import quests.Q10577_TemperARustingBlade.Q10577_TemperARustingBlade;
import quests.Q10578_TheSoulOfASword.Q10578_TheSoulOfASword;
import quests.Q10579_ContainingTheAttributePower.Q10579_ContainingTheAttributePower;
@@ -827,7 +828,7 @@ public class QuestMasterHandler
Q10572_ToExpelTheEmbryosForces.class, // TODO: Not done.
Q10574_SpecialMissionFortuna.class, // TODO: Not done.
Q10575_LetsGoFishing.class,
Q10576_GlitteringWeapons.class, // TODO: Not done.
Q10576_GlitteringWeapons.class,
Q10577_TemperARustingBlade.class,
Q10578_TheSoulOfASword.class,
Q10579_ContainingTheAttributePower.class,

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
package quests.not_done;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.quest.Quest;
/**
* @author Mobius
*/
public class Q10576_GlitteringWeapons extends Quest
{
private static final int START_NPC = 30471;
public Q10576_GlitteringWeapons()
{
super(10576);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
}
}

View File

@@ -902,6 +902,7 @@
<set name="weight" val="1420" />
<set name="enchant_enabled" val="1" />
<set name="element_enabled" val="true" />
<set name="is_questitem" val="true" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_destroyable" val="false" />
@@ -925,6 +926,7 @@
<set name="immediate_effect" val="true" />
<set name="material" val="PAPER" />
<set name="weight" val="1" />
<set name="is_questitem" val="true" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_destroyable" val="false" />
@@ -941,16 +943,20 @@
<!-- A training sword you received from Blacksmith Rupio to practice weapon enchanting. It is worthless as a weapon. Take it to Rupio after enchanting it to the enchantment level he asked for. -->
<set name="icon" val="icon.weapon_long_sword_i00" />
<set name="default_action" val="EQUIP" />
<set name="bodypart" val="rhand" />
<set name="weapon_type" val="SWORD" />
<set name="immediate_effect" val="true" />
<set name="crystal_type" val="R" />
<set name="material" val="FINE_STEEL" />
<set name="weight" val="1420" />
<set name="enchant_enabled" val="1" />
<set name="element_enabled" val="true" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_destroyable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="commissionItemType" val="TWO_HAND_SWORD" />
<stats>
<stat type="pAtk">24</stat>
<stat type="mAtk">17</stat>
@@ -972,6 +978,14 @@
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
<set name="is_oly_restricted" val="true" />
<set name="etcitem_type" val="ENCHT_WP" />
<set name="handler" val="EnchantScrolls" />
<set name="immediate_effect" val="true" />
<set name="commissionItemType" val="SCROLL_ENCHANT_WEAPON" />
<skills>
<skill id="9185" level="1" /> <!-- Scroll: Enchant Weapon (R-grade) -->
</skills>
</item>
<item id="48172" name="Herphah's Mission List" type="EtcItem">
<!-- A list of missions that Herphah instructed you to complete. "Complete missions for the following people and return with the certificates they give you. - Fishing Guild Leader Santiago in Heine, Blacksmith Rupio in the Town of Giran, Head Blacksmith Flutter in the Town of Oren, Blacksmith Vincenz in the Town of Rune, Head Blacksmith Ferris in the Town of Aden" -->

View File

@@ -123,6 +123,7 @@ import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChang
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.OnItemEnchantAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemSoulCrystalAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
import org.l2jmobius.gameserver.model.events.impl.olympiad.OnOlympiadMatchResult;
@@ -185,6 +186,7 @@ public enum EventType
ON_ITEM_TALK(OnItemTalk.class, void.class),
ON_ITEM_ATTRIBUTE_ADD(OnItemAttributeAdd.class, void.class),
ON_ITEM_SOUL_CRYSTAL_ADD(OnItemSoulCrystalAdd.class, void.class),
ON_ITEM_ENCHANT_ADD(OnItemEnchantAdd.class, void.class),
// NPC events
ON_NPC_CAN_BE_SEEN(OnNpcCanBeSeen.class, void.class, TerminateReturn.class),

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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 OnItemEnchantAdd implements IBaseEvent
{
private final PlayerInstance _player;
private final ItemInstance _item;
public OnItemEnchantAdd(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_ENCHANT_ADD;
}
}

View File

@@ -69,6 +69,7 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemDr
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.OnItemEnchantAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemSoulCrystalAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
import org.l2jmobius.gameserver.model.instancezone.Instance;
@@ -943,6 +944,9 @@ public final class ItemInstance extends WorldObject
_enchantLevel = enchantLevel;
applyEnchantStats();
_storedInDb = false;
// Notify to Scripts
EventDispatcher.getInstance().notifyEventAsync(new OnItemEnchantAdd(getActingPlayer(), this));
}
/**

View File

@@ -201,7 +201,8 @@
10570 Hurrah for Kamael's Independence
10571 Strategic Reconciliation
10572 To Expel the Embryo's Forces
10576 Glittering Weapons
10577 Temper a Rusting Blade
10578 The Soul of a Sword
10580 Special Mission: Defeat Spezion
10588 Special Mission: Defeat Baylor
10594 Fergason's Scheme

View File

@@ -0,0 +1,4 @@
<html><body>Blacksmith Rupio:<br>
Do you want to know how to obtain a brilliant weapon? Then, listen. This will an awesome opportunity for Adventurers who need to grow quickly.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-02.htm">"Go on."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blacksmith Rupio:<br>
There are a lot of options to make an item stronger, but the best way is <font color="LEVEL">Enchantment</font>. It's not just easier, faster, and stronger, if you succeed in enchanting the weapon higher than a certain level, there will be a sparkling effect on the weapon. Isn't that great? <br>
It isn't that difficult. Why don't you give it a try?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-03.htm">"I'll do it."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blacksmith Rupio:<br>
Let me tell you. Frst of all, you need a weapon. And then, you need a <font color="LEVEL">Scroll: Enchant Weapon</font> appropriate for the grade of your weapon.<br>
You can get, or buy the Scroll: Enchant Weapon. It doesn't matter how you obtain the scroll, however, you need the scroll for Enchantment. So, if you want to try, you have to have the know-how to get it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-04.html">"I understand."</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
But, there is one way. You can <font color="LEVEL">Trade</font>. The thing you desperately need, may be not that useful to others. This goes the other way around too. One man's trash is another man's treasure.<br>
Therefore, if you utilize the network well, you can get what you want at a minimum cost. Does that make sense?<br>
But, check the item and the quantity when you are trading. Be wary of those who want to deceive you while trading!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-05.html">"Tell me about the next task."</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
It is now time for Enchantment. Most equipment can go through Enchantment. While early level Enchantment is always successful, after a certain level, there are possibilities of failure.<br>
When it fails, everything will come to nothing. You'll lose the weapon, and the Enchantment level will be gone, too.<br>
I think its the time for practice. Let's make the weapon sparkle!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-06.html">"Tell me about practice."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blacksmith Rupio:<br>
The practice mission is quite simple. Although I talked a lot about how to obtain the items necessary for Enchantment, for now, I'll supply you with the necessary supplies since it's a practice session.<br>
Here, take the <font color="LEVEL">Weapon Enhancing Practice Long Sword and the Practice Weapon Enchant Scroll</font>. Repeat the Enchantment so your Weapon's Enchantment level reaches +7. Use all of the Practice Weapon Enchant Scrolls to reach the level.<br>
Even if you fail, don't worry. Just come back to me, as I have a Plan B. Good luck to you, then!
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
Why did you come back?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-11.html">"Please,tell me how to get items again."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-13.html">"Please,tell me how to Enhance the Weapon."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-08.html">"I failed the Weapon Enhancement and it is broken now."</button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Blacksmith Rupio:<br>
Oh, you failed?! But you know, we can learn a lesson from our failures. Now you learned that Enchantment can be a double-edged sword. If you are not careful, you could lose your weapon.<br>
I'll give you the <font color="LEVEL">Enhancement Practice Long Sword and the Practice Weapon Enchant Scroll</font> again. This time, try raising the Enhancement level to +3.<br>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blacksmith Rupio:<br>
You were succesful this time! This amount of Enhancement wasn't difficult, so I knew that you would succeed! Consider this task complete!.<br>
Good job.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-10.html">"Thank you, your information was very helpful."</button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith Rupio:<br>
Any time! With adventurers like you around, Blacksmiths like me have more opportunities to make weapons! It was rewarding for me. Well, I'll see you around!<br>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
Do you want to know how to obtain the items needed for Enchantment? OK, I'll tell you again.<br>
You can <font color="LEVEL">Trade</font> to get the item needed. The thing you desperately need, may be not that useful to others. This goes the other way around too. One man's trash is another man's treasure. <br>
Therefore, if you utilize the network well, you can get what you want at a minimum cost.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-12.html">"I understand."</button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Blacksmith Rupio:<br>
But, check the item and the quantity when you are trading. Be there are those who want to deceive you while trading so be careful!<br>
This is the method that I mentioned before. I think you'll remember now.<br>
Any other questions?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-13.html">"I want to ask about Enchantment..."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-14.html">"No, I'm okay now.."</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith Rupio:<br>
Now I'll talk about Enchantment Most equipment can go through Enchantment While early level Enchantment is always successful, after a certain level, there are possibilities of failure.<br>
If it fails, the Enhance level and the Weapon will be destroyed.<br>
Keep this in mind. You should have no problem with Enchantment with this knowledge at hand.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10576_GlitteringWeapons 30471-14.html">"I understand."</button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith Rupio:<br>
Now, Enhance the <font color="LEVEL">Enhancement Practice Long Sword</font> using the Practice Enchant Scroll that I gave you! Good luck!<br>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith Rupio:<br>
Not successful yet?! Since this is your second time, you only need to raise the Enchantment level to +3. This isn't hard, so don't worry too much about it and go for it!<br>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith Rupio:<br>
Oh, you still have a sword? Then, you must not have failed! Don't worry and keep going!<br>
</body></html>

View File

@@ -0,0 +1,222 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q10576_GlitteringWeapons;
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.OnItemEnchantAdd;
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;
/**
* Glittering Weapons (10576)
* @URL https://l2wiki.com/Glittering_Weapons
* @author NightBR
* @html by Werum
*/
public final class Q10576_GlitteringWeapons extends Quest
{
// NPCs
private static final int RUPIO = 30471;
// Item
private static final int ENHANCEMENT_PRACTICE_LONG_SWORD = 48170;
private static final int PRACTICE_WEAPON_ENCHANT_SCROLL = 48171;
// Rewards
private static final long XP = 597699960;
private static final int SP = 597690;
private static final int CERTIFICATE_FROM_RUPIO = 48174;
// Misc
private static final int MIN_LEVEL = 95;
public Q10576_GlitteringWeapons()
{
super(10576);
addStartNpc(RUPIO);
addTalkId(RUPIO);
addCondMinLevel(MIN_LEVEL, "noLevel.html");
registerQuestItems(ENHANCEMENT_PRACTICE_LONG_SWORD, PRACTICE_WEAPON_ENCHANT_SCROLL);
addCondStartedQuest(Q10566_BestChoice.class.getSimpleName(), "30471-99.html");
Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_ITEM_ENCHANT_ADD, (OnItemEnchantAdd event) -> OnItemEnchantAdd(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 "30471-02.htm":
case "30471-05.html":
case "30471-07.html":
case "30471-12.html":
case "30471-14.html":
{
htmltext = event;
break;
}
case "30471-03.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "30471-04.html":
{
// show Service/Help/Trade page
player.sendPacket(new ExTutorialShowId(56));
htmltext = event;
break;
}
case "30471-06.html":
{
// show Service/Help/Enchant page
player.sendPacket(new ExTutorialShowId(38));
giveItems(player, ENHANCEMENT_PRACTICE_LONG_SWORD, 1);
giveItems(player, PRACTICE_WEAPON_ENCHANT_SCROLL, 7);
qs.setCond(2, true);
htmltext = event;
break;
}
case "30471-10.html":
{
// Rewards
addExpAndSp(player, XP, SP);
giveItems(player, CERTIFICATE_FROM_RUPIO, 1);
qs.exitQuest(QuestType.ONE_TIME, true);
htmltext = event;
break;
}
case "30471-08.html":
{
// check if player already have quest items
if (hasQuestItems(player, ENHANCEMENT_PRACTICE_LONG_SWORD, PRACTICE_WEAPON_ENCHANT_SCROLL))
{
htmltext = "30471-16.html";
}
else
{
// To make sure player does not have them already
removeRegisteredQuestItems(player);
giveItems(player, ENHANCEMENT_PRACTICE_LONG_SWORD, 1);
giveItems(player, PRACTICE_WEAPON_ENCHANT_SCROLL, 3);
qs.setCond(3, true);
htmltext = event;
}
break;
}
case "30471-11.html":
{
// show Service/Help/Trade page
player.sendPacket(new ExTutorialShowId(56));
htmltext = event;
break;
}
case "30471-13.html":
{
// show Service/Help/Enchant page
player.sendPacket(new ExTutorialShowId(38));
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 = "30471-01.htm";
break;
}
case State.STARTED:
{
if (qs.isCond(1))
{
htmltext = "30471-03.html";
}
else if (qs.isCond(2))
{
htmltext = "30471-07.html";
}
else if (qs.isCond(3))
{
htmltext = "30471-15.html";
}
else
{
htmltext = "30471-09.html";
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
public void OnItemEnchantAdd(OnItemEnchantAdd event)
{
final PlayerInstance player = event.getPlayer();
if ((player == null) || (event.getItem().getId() != ENHANCEMENT_PRACTICE_LONG_SWORD))
{
return;
}
final QuestState qs = getQuestState(player, false);
// Check if weapon has been augmented to complete the quest
if ((qs != null) && qs.isCond(2))
{
// Check if Item has been destroyed during enchantment process
if (!hasQuestItems(player, ENHANCEMENT_PRACTICE_LONG_SWORD))
{
return;
}
if (player.getInventory().getItemByItemId(ENHANCEMENT_PRACTICE_LONG_SWORD).getEnchantLevel() == 7)
{
qs.setCond(4, true);
}
}
else if ((qs != null) && qs.isCond(3) && (player.getInventory().getItemByItemId(ENHANCEMENT_PRACTICE_LONG_SWORD).getEnchantLevel() == 3))
{
qs.setCond(4, true);
}
}
}

View File

@@ -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.Q10576_GlitteringWeapons.Q10576_GlitteringWeapons;
import quests.Q10577_TemperARustingBlade.Q10577_TemperARustingBlade;
import quests.Q10578_TheSoulOfASword.Q10578_TheSoulOfASword;
import quests.Q10579_ContainingTheAttributePower.Q10579_ContainingTheAttributePower;
@@ -846,7 +847,7 @@ public class QuestMasterHandler
Q10571_StrategicReconciliation.class, // TODO: Not done.
Q10572_ToExpelTheEmbryosForces.class, // TODO: Not done.
Q10575_LetsGoFishing.class,
Q10576_GlitteringWeapons.class, // TODO: Not done.
Q10576_GlitteringWeapons.class,
Q10577_TemperARustingBlade.class,
Q10578_TheSoulOfASword.class,
Q10579_ContainingTheAttributePower.class,

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
package quests.not_done;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.quest.Quest;
/**
* @author Mobius
*/
public class Q10576_GlitteringWeapons extends Quest
{
private static final int START_NPC = 30471;
public Q10576_GlitteringWeapons()
{
super(10576);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
}
}

View File

@@ -902,6 +902,7 @@
<set name="weight" val="1420" />
<set name="enchant_enabled" val="1" />
<set name="element_enabled" val="true" />
<set name="is_questitem" val="true" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_destroyable" val="false" />
@@ -925,6 +926,7 @@
<set name="immediate_effect" val="true" />
<set name="material" val="PAPER" />
<set name="weight" val="1" />
<set name="is_questitem" val="true" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_destroyable" val="false" />
@@ -941,16 +943,20 @@
<!-- A training sword you received from Blacksmith Rupio to practice weapon enchanting. It is worthless as a weapon. Take it to Rupio after enchanting it to the enchantment level he asked for. -->
<set name="icon" val="icon.weapon_long_sword_i00" />
<set name="default_action" val="EQUIP" />
<set name="bodypart" val="rhand" />
<set name="weapon_type" val="SWORD" />
<set name="immediate_effect" val="true" />
<set name="crystal_type" val="R" />
<set name="material" val="FINE_STEEL" />
<set name="weight" val="1420" />
<set name="enchant_enabled" val="1" />
<set name="element_enabled" val="true" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_destroyable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="commissionItemType" val="TWO_HAND_SWORD" />
<stats>
<stat type="pAtk">24</stat>
<stat type="mAtk">17</stat>
@@ -972,6 +978,14 @@
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
<set name="is_oly_restricted" val="true" />
<set name="etcitem_type" val="ENCHT_WP" />
<set name="handler" val="EnchantScrolls" />
<set name="immediate_effect" val="true" />
<set name="commissionItemType" val="SCROLL_ENCHANT_WEAPON" />
<skills>
<skill id="9185" level="1" /> <!-- Scroll: Enchant Weapon (R-grade) -->
</skills>
</item>
<item id="48172" name="Herphah's Mission List" type="EtcItem">
<!-- A list of missions that Herphah instructed you to complete. "Complete missions for the following people and return with the certificates they give you. - Fishing Guild Leader Santiago in Heine, Blacksmith Rupio in the Town of Giran, Head Blacksmith Flutter in the Town of Oren, Blacksmith Vincenz in the Town of Rune, Head Blacksmith Ferris in the Town of Aden" -->

View File

@@ -123,6 +123,7 @@ import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChang
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.OnItemEnchantAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemSoulCrystalAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
import org.l2jmobius.gameserver.model.events.impl.olympiad.OnOlympiadMatchResult;
@@ -185,6 +186,7 @@ public enum EventType
ON_ITEM_TALK(OnItemTalk.class, void.class),
ON_ITEM_ATTRIBUTE_ADD(OnItemAttributeAdd.class, void.class),
ON_ITEM_SOUL_CRYSTAL_ADD(OnItemSoulCrystalAdd.class, void.class),
ON_ITEM_ENCHANT_ADD(OnItemEnchantAdd.class, void.class),
// NPC events
ON_NPC_CAN_BE_SEEN(OnNpcCanBeSeen.class, void.class, TerminateReturn.class),

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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 OnItemEnchantAdd implements IBaseEvent
{
private final PlayerInstance _player;
private final ItemInstance _item;
public OnItemEnchantAdd(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_ENCHANT_ADD;
}
}

View File

@@ -69,6 +69,7 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemDr
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.OnItemEnchantAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemSoulCrystalAdd;
import org.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
import org.l2jmobius.gameserver.model.instancezone.Instance;
@@ -943,6 +944,9 @@ public final class ItemInstance extends WorldObject
_enchantLevel = enchantLevel;
applyEnchantStats();
_storedInDb = false;
// Notify to Scripts
EventDispatcher.getInstance().notifyEventAsync(new OnItemEnchantAdd(getActingPlayer(), this));
}
/**