From 8485e6edfa20f78c364a0574e825ff43b074de77 Mon Sep 17 00:00:00 2001 From: Adry_85 <Adrya85@hotmail.it> Date: Mon, 25 Mar 2013 21:44:07 +0000 Subject: [PATCH] BETA: '''Shards of Golem''' in Java. Patch by: xban1x Reviewed by: Adry_85 --- L2J_DataPack_BETA/dist/game/data/scripts.cfg | 2 +- .../quests/152_ShardsOfGolem/30035-04.htm | 3 - .../quests/152_ShardsOfGolem/30283-01.htm | 5 - .../quests/152_ShardsOfGolem/30283-02.htm | 4 - .../quests/152_ShardsOfGolem/30283-03.htm | 4 - .../quests/152_ShardsOfGolem/30283-04.htm | 5 - .../quests/152_ShardsOfGolem/__init__.py | 109 --------- .../30035-01.htm} | 2 +- .../30035-02.htm} | 4 +- .../quests/Q00152_ShardsOfGolem/30035-03.htm | 3 + .../30035-04.html} | 2 +- .../Q00152_ShardsOfGolem/30035-04a.html | 3 + .../30035-05.html} | 0 .../quests/Q00152_ShardsOfGolem/30283-01.html | 5 + .../quests/Q00152_ShardsOfGolem/30283-02.html | 4 + .../quests/Q00152_ShardsOfGolem/30283-03.html | 4 + .../quests/Q00152_ShardsOfGolem/30283-04.html | 5 + .../30283-05.html} | 2 +- .../Q00152_ShardsOfGolem.java | 222 ++++++++++++++++++ .../dist/sql/game/updates/20130325update.sql | 3 +- 20 files changed, 254 insertions(+), 137 deletions(-) delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-04.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-01.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-02.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-03.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-04.htm delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/__init__.py rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{152_ShardsOfGolem/30035-02.htm => Q00152_ShardsOfGolem/30035-01.htm} (75%) rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{152_ShardsOfGolem/30035-03.htm => Q00152_ShardsOfGolem/30035-02.htm} (58%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-03.htm rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{152_ShardsOfGolem/30035-05.htm => Q00152_ShardsOfGolem/30035-04.html} (83%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-04a.html rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{152_ShardsOfGolem/30035-06.htm => Q00152_ShardsOfGolem/30035-05.html} (100%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-01.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-02.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-03.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-04.html rename L2J_DataPack_BETA/dist/game/data/scripts/quests/{152_ShardsOfGolem/30283-05.htm => Q00152_ShardsOfGolem/30283-05.html} (51%) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/Q00152_ShardsOfGolem.java diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg index 7d50410967..ec0209b8e9 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg +++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg @@ -404,7 +404,7 @@ quests/Q00146_TheZeroHour/Q00146_TheZeroHour.java quests/Q00147_PathtoBecominganEliteMercenary/Q00147_PathtoBecominganEliteMercenary.java quests/Q00148_PathtoBecominganExaltedMercenary/Q00148_PathtoBecominganExaltedMercenary.java quests/Q00151_CureForFever/Q00151_CureForFever.java -quests/152_ShardsOfGolem/__init__.py +quests/Q00152_ShardsOfGolem/Q00152_ShardsOfGolem.java quests/Q00153_DeliverGoods/Q00153_DeliverGoods.java quests/154_SacrificeToSea/__init__.py quests/Q00155_FindSirWindawood/Q00155_FindSirWindawood.java diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-04.htm deleted file mode 100644 index fec79eea86..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-04.htm +++ /dev/null @@ -1,3 +0,0 @@ -<html><body>Magister Harrys:<br> -Thank you. Take this<font color="LEVEL"> receipt</font>. Go to the village Blacksmith and show<font color="LEVEL"> Altran</font> this receipt, and come back here with the tools. We are planning to do repairs this afternoon, so I hope I can receive them before then. -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-01.htm deleted file mode 100644 index 1a4829b758..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-01.htm +++ /dev/null @@ -1,5 +0,0 @@ -<html><body>Blacksmith Altran:<br> -So, Sorcerer Harris sent you. He asked me to make strong tools that would not rust. Even if I could make saws and nails from damascus metal, hammers must be made from a lighter, harder material.<br> -I'm thinking of taking this opportunity to make a new tool that I've only been thinking of. To make that, I need a slightly<font color="LEVEL"> exotic material</font>. Could you help me in finding it?<br> -<a action="bypass -h Quest 152_ShardsOfGolem 30283-02.htm">Say you will help</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-02.htm deleted file mode 100644 index 3c483c0295..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-02.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Blacksmith Altran:<br> -This time, when I'm making the hammer, I plan to use stone instead of metals like steel or damascus. Stone hammers, you ask? No, we haven't gone back to primitive times The stone I am talking about is not the everyday rock you can find anywhere, but the shards that fall from a golem's body.<br> -<font color="LEVEL">Rock golems</font> live in the woods in the northern region of the island, where people seldom stray. They say that golems are magic creatures that were created by Elves that lived on this island long ago. I don't know about magic, but the shards of the golems can be used as a strong, lightweight material. Gather five of these<font color="LEVEL"> shards</font> and bring them to me. -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-03.htm deleted file mode 100644 index 75e88709ed..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-03.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Blacksmith Altran:<br> -When you have gathered<font color="LEVEL"> five golem shards</font>, bring them to me. Then I can make the hammer needed for Sorcerer Harris' repair work.<br> -According to the guards, they say that there are many stone golems on the northern shores of the island. -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-04.htm deleted file mode 100644 index 95b624a66f..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-04.htm +++ /dev/null @@ -1,5 +0,0 @@ -<html><body>Blacksmith Altran:<br> -So this is the golem shard ... Similar to diamond, but more dense and thus very hard. It will take some time to polish and carve this shard, so would you wait a moment?<br> -All I have to do is polish this golem shard a bit with a mithril hammer and fix it firmly to this wooden handle that I've already made. Wonderful! Finished! It may look a bit coarse, but no other tool can compare to this. Try it! Quite heavy, eh?<br> -Here, this is a toolbox that contains the tools that Sorcerer Harris has asked for. It includes the hammer that I just made from the golem shard, as well as nails, a saw, and various other equipment. Go and deliver them to<font color="LEVEL"> him</font>. -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/__init__.py deleted file mode 100644 index 57f1bf7c6c..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/__init__.py +++ /dev/null @@ -1,109 +0,0 @@ -# Made by Mr. - Version 0.2 -import sys -from com.l2jserver.gameserver.model.quest import State -from com.l2jserver.gameserver.model.quest import QuestState -from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest - -qn = "152_ShardsOfGolem" - -HARRYS_RECEIPT1_ID = 1008 -HARRYS_RECEIPT2_ID = 1009 -GOLEM_SHARD_ID = 1010 -TOOL_BOX_ID = 1011 -WOODEN_BP_ID = 23 -#NPC -HARRIS=30035 -ALTRAN=30283 -class Quest (JQuest) : - - def __init__(self,id,name,descr): - JQuest.__init__(self,id,name,descr) - self.questItemIds = range(1008,1012) - - def onAdvEvent (self,event,npc, player) : - htmltext = event - st = player.getQuestState(qn) - if not st : return - id = st.getState() - cond = st.getInt("cond") - if id != State.COMPLETED : - if event == "30035-04.htm" and cond == 0 : - st.set("cond","1") - st.setState(State.STARTED) - st.playSound("ItemSound.quest_accept") - st.giveItems(HARRYS_RECEIPT1_ID,1) - elif event == "30283-02.htm" and cond == 1 and st.getQuestItemsCount(HARRYS_RECEIPT1_ID) : - st.takeItems(HARRYS_RECEIPT1_ID,-1) - st.giveItems(HARRYS_RECEIPT2_ID,1) - st.set("cond","2") - return htmltext - - def onTalk (self,npc,player): - htmltext = Quest.getNoQuestMsg(player) - st = player.getQuestState(qn) - if not st : return htmltext - - npcId = npc.getNpcId() - id = st.getState() - cond = st.getInt("cond") - receipt1 = st.getQuestItemsCount(HARRYS_RECEIPT1_ID) - receipt2 = st.getQuestItemsCount(HARRYS_RECEIPT2_ID) - toolbox = st.getQuestItemsCount(TOOL_BOX_ID) - shards = st.getQuestItemsCount(GOLEM_SHARD_ID) - if id == State.COMPLETED : - htmltext = Quest.getAlreadyCompletedMsg(player) - elif npcId == HARRIS : - if cond == 0 : - if player.getLevel() >= 10 : - htmltext = "30035-03.htm" - else: - htmltext = "30035-02.htm" - st.exitQuest(1) - elif cond == 1 and receipt1 and not toolbox : - htmltext = "30035-05.htm" - elif cond == 3 and toolbox : - st.takeItems(TOOL_BOX_ID,-1) - st.takeItems(HARRYS_RECEIPT2_ID,-1) - st.unset("cond") - st.exitQuest(False) - st.playSound("ItemSound.quest_finish") - st.giveItems(WOODEN_BP_ID,1) - st.addExpAndSp(5000,0) - htmltext = "30035-06.htm" - elif npcId == ALTRAN and id == State.STARTED: - if cond == 1 and receipt1 : - htmltext = "30283-01.htm" - elif cond == 2 and receipt2 and shards < 5 and not toolbox : - htmltext = "30283-03.htm" - elif cond == 3 and receipt2 and shards >= 5 and not toolbox : - st.takeItems(GOLEM_SHARD_ID,-1) - st.giveItems(TOOL_BOX_ID,1) - htmltext = "30283-04.htm" - elif cond == 3 and receipt2 and toolbox : - htmltext = "30283-05.htm" - return htmltext - - def onKill(self,npc,player,isPet): - st = player.getQuestState(qn) - if not st : return - if st.getState() != State.STARTED : return - - count=st.getQuestItemsCount(GOLEM_SHARD_ID) - if st.getInt("cond")==2 and self.getRandom(100) < 30 and count < 5 : - st.giveItems(GOLEM_SHARD_ID,1) - if count == 4 : - st.playSound("ItemSound.quest_middle") - st.set("cond","3") - else : - st.playSound("ItemSound.quest_itemget") - return - -QUEST = Quest(152,qn,"Shards Of Golem") - -QUEST.addStartNpc(HARRIS) - -QUEST.addTalkId(HARRIS) - -QUEST.addTalkId(ALTRAN) - -QUEST.addKillId(20016) \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-01.htm similarity index 75% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-02.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-01.htm index c14a0d9687..ca94346e18 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-02.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-01.htm @@ -1,4 +1,4 @@ <html><body>Magister Harrys:<br> -Recently the severe storms damaged the roof of the temple in several places. We will be starting<font color="LEVEL"> repairs</font> soon, and I hope you can help us at that time.<br> +Recently the severe storms damaged the roof of the temple in several places. We will be starting <font color="LEVEL">repairs</font> soon, and I hope you can help us at that time.<br> (Quest for characters level 10 and above.) </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-02.htm similarity index 58% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-03.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-02.htm index 6354a2ed9d..bafa348409 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-03.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-02.htm @@ -1,5 +1,5 @@ <html><body>Magister Harrys:<br> Recently, the severe storms damaged the roof of the temple in several places. We are in the middle of repairing the roof right now, but it is harder than we thought. Plus, all our tools are old and dull, making this an even slower task. The high priest has personally asked us to hurry with the repairs, and I am worried that progress is too slow.<br> -A few days ago I went to the village Blacksmith and asked<font color="LEVEL"> Altran</font> to create new tools for us. I cannot leave the temple right now, as I have to prepare for the services, but could you go to the village and bring the<font color="LEVEL"> tools</font> back to me?<br> -<a action="bypass -h Quest 152_ShardsOfGolem 30035-04.htm">Say you will do the favor</a> +A few days ago I went to the village Blacksmith and asked <font color="LEVEL">Altran</font> to create new tools for us. I cannot leave the temple right now, as I have to prepare for the services, but could you go to the village and bring the <font color="LEVEL">tools</font> back to me?<br> +<a action="bypass -h Quest Q00152_ShardsOfGolem 30035-03.htm">Say you will do the favor</a> </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-03.htm new file mode 100644 index 0000000000..6f85fd0c38 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-03.htm @@ -0,0 +1,3 @@ +<html><<body>Magister Harrys:<br> +Thank you. Take this <font color="LEVEL">receipt</font>. Go to the village Blacksmith and show <font color="LEVEL">Altran</font> this receipt, and come back here with the tools. We are planning to do repairs this afternoon, so I hope I can receive them before then. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-04.html similarity index 83% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-05.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-04.html index 7188f0190f..4420918662 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-05.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-04.html @@ -1,3 +1,3 @@ -<html><body>Magister Harrys:<br> +<html>><body>Magister Harrys:<br> Go and fetch the tools that I have ordered from Blacksmith Altran. I'd like to receive them before this afternoon, as we plan on making repairs then. Please hurry. </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-04a.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-04a.html new file mode 100644 index 0000000000..6edb7db650 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-04a.html @@ -0,0 +1,3 @@ +<html><body>Magister Harrys:<br> +You haven't met with Blacksmith Altran yet, have you? Go and see him right away at the blacksmith shop in the village. We're planning to start some maintenance this afternoon. Hurry and get your new tool before we start work! +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-05.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30035-06.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30035-05.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-01.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-01.html new file mode 100644 index 0000000000..bcc6d33d18 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-01.html @@ -0,0 +1,5 @@ +<html><body>Blacksmith Altran:<br> +So, Magister Harrys sent you. He asked me to make strong tools that would not rust. Even if I could make saws and nails from Damascus metal, hammers must be made from a lighter, harder material.<br> +I'm thinking of taking this opportunity to make a new tool that I've only been thinking of. To make that, I need a slightly <font color="LEVEL">exotic material</font>. Could you help me in finding it?<br> +<a action="bypass -h Quest Q00152_ShardsOfGolem 30283-02.html">Say you will help</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-02.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-02.html new file mode 100644 index 0000000000..a5da56a318 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-02.html @@ -0,0 +1,4 @@ +<html><body>Blacksmith Altran:<br> +This time, I'm thinking of making the hammer head with stone instead of steel or a hardener like damascus. Why a stone axe, you ask, as if we were craven barbarians? The stone I'm talking about comes from the fragmented bodies of golems.<br> +There are <font color="LEVEL">stone golems</font> in the woods to the northern area of this island where there are very few people. They are magical creatures that were created by the elves who lived on this land a long time ago. I don't know much about magic, but those golem fragments are very strong yet also lightweight. Please bring me five <font color="LEVEL">stone golem fragments.</font> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-03.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-03.html new file mode 100644 index 0000000000..9a802f0d62 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-03.html @@ -0,0 +1,4 @@ +<html><body>Blacksmith Altran:<br> +Please bring me <font color="LEVEL">five stone golem fragments</font>. Then I can make a hammer for Magister Harrys to be used in the temple maintenance work.<br> +According to the guards, there are many stone golems along the northern seashore of the island. +</body></html> diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-04.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-04.html new file mode 100644 index 0000000000..6cf50011e8 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-04.html @@ -0,0 +1,5 @@ +<html><body>Blacksmith Altran:<br> +So this is the Golem Shard ... Similar to diamond, but more dense and thus very hard. It will take some time to polish and carve this shard, so would you wait a moment?<br> +All I have to do is polish this Golem Shard a bit with a Mithril hammer and fix it firmly to this wooden handle that I've already made. Wonderful! Finished! It may look a bit coarse, but no other tool can compare to this. Try it! Quite heavy, eh?<br> +Here, this is a toolbox that contains the tools that Magister Harrys has asked for. It includes the hammer that I just made from the Golem Shard, as well as nails, a saw, and various other equipment. Go and deliver them to <font color="LEVEL">him</font>. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-05.html similarity index 51% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-05.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-05.html index a2333482d1..5d410793e5 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/152_ShardsOfGolem/30283-05.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/30283-05.html @@ -1,3 +1,3 @@ <html><body>Blacksmith Altran:<br> -What are you doing, lazing around like that? Go to the temple immediately and deliver the toolbox that I have given you to<font color="LEVEL"> Sorcerer Harris</font>. +What are you doing, lazing around like that? Go to the temple immediately and deliver the toolbox that I have given you to <font color="LEVEL">Magister Harrys</font>. </body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/Q00152_ShardsOfGolem.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/Q00152_ShardsOfGolem.java new file mode 100644 index 0000000000..42c103d3e7 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00152_ShardsOfGolem/Q00152_ShardsOfGolem.java @@ -0,0 +1,222 @@ +/* + * Copyright (C) 2004-2013 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack 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. + * + * L2J DataPack 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.Q00152_ShardsOfGolem; + +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.quest.Quest; +import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; + +/** + * Shards of Golem (152) + * @author xban1x + */ +public class Q00152_ShardsOfGolem extends Quest +{ + // NPCs + private static final int HARRYS = 30035; + private static final int ALTRAN = 30283; + // Monster + private static final int STONE_GOLEM = 20016; + // Items + private static final int WOODEN_BREASTPLATE = 23; + private static final int HARRYS_1ST_RECIEPT = 1008; + private static final int HARRYS_2ND_RECIEPT = 1009; + private static final int GOLEM_SHARD = 1010; + private static final int TOOL_BOX = 1011; + // Misc + private static final int MIN_LVL = 10; + + public Q00152_ShardsOfGolem(int questId, String name, String descr) + { + super(questId, name, descr); + addStartNpc(HARRYS); + addTalkId(HARRYS, ALTRAN); + addKillId(STONE_GOLEM); + registerQuestItems(HARRYS_1ST_RECIEPT, HARRYS_2ND_RECIEPT, GOLEM_SHARD, TOOL_BOX); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState st = player.getQuestState(getName()); + String htmltext = null; + if (st != null) + { + switch (event) + { + case "30035-03.htm": + { + st.startQuest(); + st.giveItems(HARRYS_1ST_RECIEPT, 1); + htmltext = event; + break; + } + case "30283-02.html": + { + if (st.isCond(1) && st.hasQuestItems(HARRYS_1ST_RECIEPT)) + { + st.takeItems(HARRYS_1ST_RECIEPT, -1); + st.giveItems(HARRYS_2ND_RECIEPT, 1); + st.setCond(2, true); + htmltext = event; + } + break; + } + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + final QuestState st = killer.getQuestState(getName()); + if ((st != null) && st.isCond(2) && (getRandom(100) < 30) && (st.getQuestItemsCount(GOLEM_SHARD) < 5)) + { + st.giveItems(GOLEM_SHARD, 1); + if (st.getQuestItemsCount(GOLEM_SHARD) >= 5) + { + st.setCond(3, true); + } + else + { + st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState st = player.getQuestState(getName()); + String htmltext = getNoQuestMsg(player); + if (st != null) + { + switch (npc.getNpcId()) + { + case HARRYS: + { + switch (st.getState()) + { + case State.CREATED: + { + htmltext = player.getLevel() >= MIN_LVL ? "30035-02.htm" : "30035-01.htm"; + break; + } + case State.STARTED: + { + switch (st.getCond()) + { + case 1: + { + if (st.hasQuestItems(HARRYS_1ST_RECIEPT)) + { + htmltext = "30035-04a.html"; + } + break; + } + case 2: + case 3: + { + if (st.hasQuestItems(HARRYS_2ND_RECIEPT)) + { + htmltext = "30035-04.html"; + } + break; + } + case 4: + { + if (st.hasQuestItems(HARRYS_2ND_RECIEPT, TOOL_BOX)) + { + st.giveItems(WOODEN_BREASTPLATE, 1); + st.addExpAndSp(5000, 0); + st.exitQuest(false, true); + htmltext = "30035-05.html"; + } + break; + } + } + break; + } + case State.COMPLETED: + { + if (npc.getNpcId() == HARRYS) + { + htmltext = getAlreadyCompletedMsg(player); + } + break; + } + } + break; + } + case ALTRAN: + { + switch (st.getCond()) + { + case 1: + { + if (st.hasQuestItems(HARRYS_1ST_RECIEPT)) + { + htmltext = "30283-01.html"; + } + break; + } + case 2: + { + if (st.hasQuestItems(HARRYS_2ND_RECIEPT) && (st.getQuestItemsCount(GOLEM_SHARD) < 5)) + { + htmltext = "30283-03.html"; + } + break; + } + case 3: + { + if (st.hasQuestItems(HARRYS_2ND_RECIEPT) && (st.getQuestItemsCount(GOLEM_SHARD) >= 5)) + { + st.takeItems(GOLEM_SHARD, -1); + st.giveItems(TOOL_BOX, 1); + st.setCond(4, true); + htmltext = "30283-04.html"; + } + break; + } + case 4: + { + if (st.hasQuestItems(HARRYS_2ND_RECIEPT, TOOL_BOX)) + { + htmltext = "30283-05.html"; + } + break; + } + } + break; + } + } + } + return htmltext; + } + + public static void main(String[] args) + { + new Q00152_ShardsOfGolem(152, Q00152_ShardsOfGolem.class.getSimpleName(), "Shards of Golem"); + } +} diff --git a/L2J_DataPack_BETA/dist/sql/game/updates/20130325update.sql b/L2J_DataPack_BETA/dist/sql/game/updates/20130325update.sql index 9d5df00a40..5ea441e7e3 100644 --- a/L2J_DataPack_BETA/dist/sql/game/updates/20130325update.sql +++ b/L2J_DataPack_BETA/dist/sql/game/updates/20130325update.sql @@ -1 +1,2 @@ -UPDATE character_quests SET name='Q00115_TheOtherSideOfTruth' WHERE name='115_TheOtherSideOfTruth'; \ No newline at end of file +UPDATE character_quests SET name='Q00115_TheOtherSideOfTruth' WHERE name='115_TheOtherSideOfTruth'; +UPDATE character_quests SET name='Q00152_ShardsOfGolem' WHERE name='152_ShardsOfGolem'; \ No newline at end of file -- GitLab