diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00103_SpiritOfCraftsman/30307-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00103_SpiritOfCraftsman/30307-03.htm index b512280b7eaa35f1af7c0aeb893d176763b9ba2b..ae2ffb5ef6d46b7fd68f41298a75002c8f350541 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00103_SpiritOfCraftsman/30307-03.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00103_SpiritOfCraftsman/30307-03.htm @@ -1,4 +1,4 @@ <html><body>Blacksmith Karrod:<br> Recently I ordered a large amount of <font color="LEVEL">Oriharukon Ore</font> from the Dwarven Blacksmiths of Giran. Tetrarch Thifiell has commissioned me to make Oriharukon blades. But I am having difficulties, since I am not skilled in working with this material. This precious metal is particularly difficult in all steps of manufacturing, even from its Augmentation stage. If only <font color="LEVEL">Steelbender</font> were here now, I would be able to ask him ...<br> -<a action="bypass -h Quest Q00103_SpiritOfCraftsman 30523-04.htm">Ask about Steelbender</a> +<a action="bypass -h Quest Q00103_SpiritOfCraftsman 30307-04.htm">Ask about Steelbender</a> </body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00103_SpiritOfCraftsman/30307-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00103_SpiritOfCraftsman/30307-04.htm index b0debdf7c096251d3e9425b97c363aa23c19d2ad..f975b0eb48fe0fa61fce5b56fe4f0aa41d4e9842 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00103_SpiritOfCraftsman/30307-04.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00103_SpiritOfCraftsman/30307-04.htm @@ -2,5 +2,5 @@ Roberto Steelbender ... He was a Dwarven Warsmith that was enslaved by we Dark Elves for nearly a century. Warsmith is a Dwarven title given to the most elite Dwarven Blacksmiths. I learned my skills from that slave Blacksmith.<br> For decades, I worked hard under his direction, but there was always a limit to what I could do. No matter how closely I followed his instructions, the weapons and shields I made were always missing something, and always a bit dull. Then I found out that Steelbender had only taught me basic knowledge and hidden the most important skills from me -- he said that those skills were only passed on to the Dwarves and that he couldn't teach me ... I put him on a torture device and extracted those skills from him after 15 days of torture. Sadly, he couldn't stand the pain and died, but not before I found out the methods for manipulating Mithril, adamantite and Damascus metals.<br> This time around, I plan to call upon the <font color="LEVEL">spirit of Steelbender</font> and ask him about the Augmentation process of Oriharukon. To do that, I am going to have to ask the Abyssal Celebrants of Shilen for exorcism rituals and prepare various materials. Do you think you can help?<br> -<a action="bypass -h Quest Q00103_SpiritOfCraftsman 30523-05.htm">Say you will help</a> +<a action="bypass -h Quest Q00103_SpiritOfCraftsman 30307-05.htm">Say you will help</a> </body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00103_SpiritOfCraftsman/Q00103_SpiritOfCraftsman.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00103_SpiritOfCraftsman/Q00103_SpiritOfCraftsman.java index 85f8962ed908beace9235b58f36b4c797ce862a2..8b54ec349f936f652efd24e1df05bb9e0f7a3a5a 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00103_SpiritOfCraftsman/Q00103_SpiritOfCraftsman.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00103_SpiritOfCraftsman/Q00103_SpiritOfCraftsman.java @@ -26,7 +26,6 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.holders.ItemHolder; import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.model.quest.QuestState; -import com.l2jserver.gameserver.model.quest.State; import com.l2jserver.gameserver.network.serverpackets.SocialAction; import com.l2jserver.gameserver.util.Util; @@ -36,14 +35,14 @@ import com.l2jserver.gameserver.util.Util; */ public final class Q00103_SpiritOfCraftsman extends Quest { - // NPC + // NPCs private static final int BLACKSMITH_KAROYD = 30307; private static final int CECON = 30132; private static final int HARNE = 30144; // Items private static final int KAROYDS_LETTER = 968; - private static final int CECKTINONS_VOUCHER_1 = 969; - private static final int CECKTINONS_VOUCHER_2 = 970; + private static final int CECKTINONS_VOUCHER1 = 969; + private static final int CECKTINONS_VOUCHER2 = 970; private static final int SOUL_CATCHER = 971; private static final int PRESERVE_OIL = 972; private static final int ZOMBIE_HEAD = 973; @@ -74,7 +73,7 @@ public final class Q00103_SpiritOfCraftsman extends Quest addStartNpc(BLACKSMITH_KAROYD); addTalkId(BLACKSMITH_KAROYD, CECON, HARNE); addKillId(MARSH_ZOMBIE, DOOM_SOLDIER, SKELETON_HUNTER, SKELETON_HUNTER_ARCHER); - registerQuestItems(KAROYDS_LETTER, CECKTINONS_VOUCHER_1, CECKTINONS_VOUCHER_2, SOUL_CATCHER, PRESERVE_OIL, ZOMBIE_HEAD, STEELBENDERS_HEAD, BONE_FRAGMENT); + registerQuestItems(KAROYDS_LETTER, CECKTINONS_VOUCHER1, CECKTINONS_VOUCHER2, SOUL_CATCHER, PRESERVE_OIL, ZOMBIE_HEAD, STEELBENDERS_HEAD, BONE_FRAGMENT); } @Override @@ -116,136 +115,84 @@ public final class Q00103_SpiritOfCraftsman extends Quest { case BLACKSMITH_KAROYD: { - switch (qs.getState()) + if (qs.isCreated()) { - case State.CREATED: + if (talker.getRace() != PcRace.DARK_ELF) { - if (talker.getRace() != PcRace.DARK_ELF) - { - htmltext = "30307-01.htm"; - } - else if (talker.getLevel() < MIN_LVL) - { - htmltext = "30307-02.htm"; - } - else - { - htmltext = "30307-03.htm"; - } - break; + htmltext = "30307-01.htm"; } - case State.STARTED: + else if (talker.getLevel() < MIN_LVL) { - switch (qs.getCond()) - { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - { - if (hasAtLeastOneQuestItem(talker, KAROYDS_LETTER, CECKTINONS_VOUCHER_1, CECKTINONS_VOUCHER_2)) - { - htmltext = "30307-06.html"; - } - break; - } - case 8: - { - if (hasQuestItems(talker, STEELBENDERS_HEAD)) - { - Q00281_HeadForTheHills.giveNewbieReward(talker); - addExpAndSp(talker, 46663, 3999); - giveAdena(talker, 19799, true); - for (ItemHolder reward : REWARDS) - { - giveItems(talker, reward); - } - giveItems(talker, BLOODSABER, 1); - qs.exitQuest(false, true); - talker.sendPacket(new SocialAction(talker.getObjectId(), 3)); - htmltext = "30307-07.html"; - } - break; - } - } - break; + htmltext = "30307-02.htm"; } - case State.COMPLETED: + else { - htmltext = getAlreadyCompletedMsg(talker); - break; + htmltext = "30307-03.htm"; } } - break; + else if (qs.isStarted()) + { + if (hasAtLeastOneQuestItem(talker, KAROYDS_LETTER, CECKTINONS_VOUCHER1, CECKTINONS_VOUCHER2)) + { + htmltext = "30307-06.html"; + } + else if (hasQuestItems(talker, STEELBENDERS_HEAD)) + { + Q00281_HeadForTheHills.giveNewbieReward(talker); + addExpAndSp(talker, 46663, 3999); + giveAdena(talker, 19799, true); + for (ItemHolder reward : REWARDS) + { + rewardItems(talker, reward); + } + rewardItems(talker, BLOODSABER, 1); + qs.exitQuest(false, true); + talker.sendPacket(new SocialAction(talker.getObjectId(), 3)); + htmltext = "30307-07.html"; + } + } + else if (qs.isCompleted()) + { + htmltext = getAlreadyCompletedMsg(talker); + break; + } } case CECON: { if (qs.isStarted()) { - switch (qs.getCond()) + if (hasQuestItems(talker, KAROYDS_LETTER)) { - case 1: - { - if (hasQuestItems(talker, KAROYDS_LETTER)) - { - qs.setCond(2, true); - takeItems(talker, KAROYDS_LETTER, 1); - giveItems(talker, CECKTINONS_VOUCHER_1, 1); - htmltext = "30132-01.html"; - } - break; - } - case 2: - case 3: - case 4: - { - if (hasAtLeastOneQuestItem(talker, CECKTINONS_VOUCHER_1, CECKTINONS_VOUCHER_2)) - { - htmltext = "30132-02.html"; - } - break; - } - case 5: - { - if (hasQuestItems(talker, SOUL_CATCHER)) - { - qs.setCond(6, true); - takeItems(talker, SOUL_CATCHER, 1); - giveItems(talker, PRESERVE_OIL, 1); - htmltext = "30132-03.html"; - } - break; - } - case 6: - { - if (hasQuestItems(talker, PRESERVE_OIL)) - { - htmltext = "30132-04.html"; - } - break; - } - case 7: - { - if (hasQuestItems(talker, ZOMBIE_HEAD)) - { - qs.setCond(8, true); - takeItems(talker, ZOMBIE_HEAD, 1); - giveItems(talker, STEELBENDERS_HEAD, 1); - htmltext = "30132-05.html"; - } - break; - } - case 8: - { - if (hasQuestItems(talker, STEELBENDERS_HEAD)) - { - htmltext = "30132-06.html"; - } - break; - } + qs.setCond(2, true); + takeItems(talker, KAROYDS_LETTER, 1); + giveItems(talker, CECKTINONS_VOUCHER1, 1); + htmltext = "30132-01.html"; + } + else if (hasAtLeastOneQuestItem(talker, CECKTINONS_VOUCHER1, CECKTINONS_VOUCHER2)) + { + htmltext = "30132-02.html"; + } + else if (hasQuestItems(talker, SOUL_CATCHER)) + { + qs.setCond(6, true); + takeItems(talker, SOUL_CATCHER, 1); + giveItems(talker, PRESERVE_OIL, 1); + htmltext = "30132-03.html"; + } + else if (hasQuestItems(talker, PRESERVE_OIL) && !hasQuestItems(talker, ZOMBIE_HEAD, STEELBENDERS_HEAD)) + { + htmltext = "30132-04.html"; + } + else if (hasQuestItems(talker, ZOMBIE_HEAD)) + { + qs.setCond(8, true); + takeItems(talker, ZOMBIE_HEAD, 1); + giveItems(talker, STEELBENDERS_HEAD, 1); + htmltext = "30132-05.html"; + } + else if (hasQuestItems(talker, STEELBENDERS_HEAD)) + { + htmltext = "30132-06.html"; } } break; @@ -254,44 +201,32 @@ public final class Q00103_SpiritOfCraftsman extends Quest { if (qs.isStarted()) { - switch (qs.getCond()) + if (hasQuestItems(talker, CECKTINONS_VOUCHER1)) { - case 3: - { - if (hasQuestItems(talker, CECKTINONS_VOUCHER_1)) - { - qs.setCond(3, true); - takeItems(talker, CECKTINONS_VOUCHER_1, 1); - giveItems(talker, CECKTINONS_VOUCHER_2, 1); - htmltext = "30144-01.html"; - } - break; - } - case 4: + qs.setCond(3, true); + takeItems(talker, CECKTINONS_VOUCHER1, 1); + giveItems(talker, CECKTINONS_VOUCHER2, 1); + htmltext = "30144-01.html"; + } + else if (hasQuestItems(talker, CECKTINONS_VOUCHER2)) + { + if (getQuestItemsCount(talker, BONE_FRAGMENT) >= 10) { - if (hasQuestItems(talker, CECKTINONS_VOUCHER_2) && (getQuestItemsCount(talker, BONE_FRAGMENT) >= 10)) - { - qs.setCond(5, true); - takeItems(talker, CECKTINONS_VOUCHER_2, 1); - takeItems(talker, BONE_FRAGMENT, 10); - giveItems(talker, SOUL_CATCHER, 1); - htmltext = "30144-03.html"; - } - else - { - htmltext = "30144-02.html"; - } - break; + qs.setCond(5, true); + takeItems(talker, CECKTINONS_VOUCHER2, 1); + takeItems(talker, BONE_FRAGMENT, 10); + giveItems(talker, SOUL_CATCHER, 1); + htmltext = "30144-03.html"; } - case 5: + else { - if (hasQuestItems(talker, SOUL_CATCHER)) - { - htmltext = "30144-04.html"; - } - break; + htmltext = "30144-02.html"; } } + else if (hasQuestItems(talker, SOUL_CATCHER)) + { + htmltext = "30144-04.html"; + } } break; } @@ -302,21 +237,21 @@ public final class Q00103_SpiritOfCraftsman extends Quest @Override public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) { + final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc); + if (qs == null) + { + return super.onKill(npc, killer, isSummon); + } + switch (npc.getId()) { case MARSH_ZOMBIE: { - final QuestState qs = getQuestState(killer, false); - if ((qs != null) && qs.isCond(6) && Util.checkIfInRange(1500, npc, killer, true)) + if (hasQuestItems(killer, PRESERVE_OIL) && (getRandom(10) < 5) && Util.checkIfInRange(1500, npc, killer, true)) { - if (hasQuestItems(killer, PRESERVE_OIL)) - { - if (giveItemRandomly(killer, npc, ZOMBIE_HEAD, 1, 1, 0.5, true)) - { - takeItems(killer, PRESERVE_OIL, -1); - qs.setCond(7); - } - } + giveItems(killer, ZOMBIE_HEAD, 1); + takeItems(killer, PRESERVE_OIL, -1); + qs.setCond(7, true); } break; } @@ -324,20 +259,13 @@ public final class Q00103_SpiritOfCraftsman extends Quest case SKELETON_HUNTER: case SKELETON_HUNTER_ARCHER: { - final QuestState qs = getRandomPartyMemberState(killer, 3, 3, npc); - if ((qs != null) && giveItemRandomly(qs.getPlayer(), npc, BONE_FRAGMENT, 1, 10, 1.0, true)) + if (hasQuestItems(killer, CECKTINONS_VOUCHER2) && giveItemRandomly(qs.getPlayer(), npc, BONE_FRAGMENT, 1, 10, 1.0, true)) { - qs.setCond(4); + qs.setCond(4, true); } break; } } return super.onKill(npc, killer, isSummon); } - - @Override - public boolean checkPartyMember(QuestState qs, L2Npc npc) - { - return hasQuestItems(qs.getPlayer(), CECKTINONS_VOUCHER_2) && (getQuestItemsCount(qs.getPlayer(), BONE_FRAGMENT) < 10); - } } \ No newline at end of file