Skip to content
Snippets Groups Projects
Commit b466511f authored by malyelfik's avatar malyelfik
Browse files

BETA: '''Sword of Solidarity''' (101) in Java

Patch by: xban1x
Reviewed by: jurchiks, malyelfik
parent d9db56db
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 188 deletions
......@@ -363,7 +363,7 @@ quests/63_PathoftheWarder/__init__.py
quests/64_CertifiedBerserker/__init__.py
quests/65_CertifiedSoulBreaker/__init__.py
quests/66_CertifiedArbalester/__init__.py
quests/101_SwordOfSolidarity/__init__.py
quests/Q00101_SwordOfSolidarity/Q00101_SwordOfSolidarity.java
quests/Q00102_SeaOfSporesFever/Q00102_SeaOfSporesFever.java
quests/103_SpiritOfCraftsman/__init__.py
quests/104_SpiritOfMirrors/__init__.py
......
<html><body>Grand Master Roien:<br>
I hear you are helping Altran. He says that you will bring back the broken blade from the<font color="LEVEL"> Elven Ruins</font>. Good luck!
</body></html>
\ No newline at end of file
<html><body>Grand Master Roien:<br>
So you've found all the pieces of the broken blade! Take them to Altran immediately!
</body></html>
\ No newline at end of file
<html><body>Blacksmith Altran:<br>
Ah! Roien's letter! Thank you!<br>
So they say that the craftsman in the legends that created the 'Sword of Solidarity' was a Dwarf, like me? A sword created by my ancestors a thousand years ago ... I'm curious to see what it looks like. If only we could find the missing broken blades, I would be able to return the Sword of Solidarity to its original state ... I hope you can recover the blade fragments. Is that too difficult of a task to ask?<br>
<a action="bypass -h Quest 101_SwordOfSolidarity 30283-02.htm">Say that you will search for the broken blade portions</a>
</body></html>
\ No newline at end of file
<html><body>Blacksmith Altran:<br>
According to Roien's research, the blade was broken into two parts, and they are probably somewhere in the Elven Ruins. They may even be in the dirty hands of the<font color="LEVEL"> Orcs that live in the ruins</font> ... But those Orcs don't know how to deal with steel, and probably don't have the skills to reassemble the pieces. They're probably using it to skin rabbits or something.<br>
Go to the<font color="LEVEL"> Elven Ruins</font> and search for the<font color="LEVEL"> two pieces of the broken blade</font>. I'm sure you don't know the way, so I will write down the directions on this note. Be careful! They say that the ruins are not only full of Orcs, but other savage beasts as well.
</body></html>
\ No newline at end of file
<html><body>Blacksmith Altran:<br>
If you can't find the Elven Ruins even with the directions I've given, ask the Village Guard Kenyos. When you find the two pieces of the blade, bring them to me.
</body></html>
\ No newline at end of file
<html><body>Blacksmith Altran:<br>
So you've managed to find it! Hmm ... I will have to attach the two halves of the blade together, but the task is going to take some time. Meanwhile, go and see Roien. I will write a note asking for the sword handle, and you will please deliver the note to<font color="LEVEL"> Roien</font>.
</body></html>
\ No newline at end of file
# Made by Mr. Have fun! - Version 0.3 by DrLecter
import sys
from com.l2jserver import Config
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 = "101_SwordOfSolidarity"
ROIENS_LETTER = 796
HOWTOGO_RUINS = 937
BROKEN_SWORD_HANDLE = 739
BROKEN_BLADE_BOTTOM = 740
BROKEN_BLADE_TOP = 741
ALLTRANS_NOTE = 742
SWORD_OF_SOLIDARITY = 738
#Newbie/one time rewards section
#Any quest should rely on a unique bit, but
#it could be shared among quest that were mutually
#exclusive or race restricted.
#Bit #1 isn't used for backwards compatibility.
NEWBIE_REWARD = 8
SOULSHOT_FOR_BEGINNERS = 5789
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = [ALLTRANS_NOTE, HOWTOGO_RUINS, BROKEN_BLADE_TOP, BROKEN_BLADE_BOTTOM, ROIENS_LETTER, BROKEN_SWORD_HANDLE]
def onAdvEvent (self,event,npc, player) :
htmltext = event
st = player.getQuestState(qn)
if not st : return
if event == "30008-04.htm" :
st.set("cond","1")
st.setState(State.STARTED)
st.playSound("ItemSound.quest_accept")
st.giveItems(ROIENS_LETTER,1)
elif event == "30283-02.htm" :
st.set("cond","2")
st.playSound("ItemSound.quest_middle")
st.takeItems(ROIENS_LETTER,st.getQuestItemsCount(ROIENS_LETTER))
st.giveItems(HOWTOGO_RUINS,1)
elif event == "30283-07.htm" :
st.giveItems(57,10981)
st.takeItems(BROKEN_SWORD_HANDLE,-1)
st.giveItems(SWORD_OF_SOLIDARITY,1)
st.rewardItems(1060,100) # Lesser Healing Potions
for item in range(4412,4417) :
st.rewardItems(item,10) # Echo crystals
st.addExpAndSp(25747,2171)
st.unset("cond")
st.exitQuest(False)
st.playSound("ItemSound.quest_finish")
# check the player state against this quest newbie rewarding mark.
player = st.getPlayer()
newbie = player.getNewbie()
if newbie | NEWBIE_REWARD != newbie :
player.setNewbie(newbie|NEWBIE_REWARD)
if not player.getClassId().isMage() :
st.giveItems(SOULSHOT_FOR_BEGINNERS,7000)
st.playTutorialVoice("tutorial_voice_026")
return htmltext
def onTalk (self,npc,player) :
npcId = npc.getNpcId()
htmltext = Quest.getNoQuestMsg(player)
st = player.getQuestState(qn)
if not st: return htmltext
id = st.getState()
if id == State.COMPLETED :
htmltext = Quest.getAlreadyCompletedMsg(player)
elif npcId == 30008 and id == State.CREATED :
if player.getRace().ordinal() != 0 :
htmltext = "30008-00.htm"
elif player.getLevel() >= 9 :
htmltext = "30008-02.htm"
return htmltext
else:
htmltext = "30008-08.htm"
st.exitQuest(1)
elif id == State.STARTED:
if npcId == 30008 and st.getInt("cond")==1 and (st.getQuestItemsCount(ROIENS_LETTER)==1) :
htmltext = "30008-05.htm"
elif npcId == 30008 and st.getInt("cond")>=2 and st.getQuestItemsCount(ROIENS_LETTER)==0 and st.getQuestItemsCount(ALLTRANS_NOTE)==0 :
if st.getQuestItemsCount(BROKEN_BLADE_TOP) and st.getQuestItemsCount(BROKEN_BLADE_BOTTOM) :
htmltext = "30008-12.htm"
if (st.getQuestItemsCount(BROKEN_BLADE_TOP) + st.getQuestItemsCount(BROKEN_BLADE_BOTTOM)) <= 1 :
htmltext = "30008-11.htm"
if st.getQuestItemsCount(BROKEN_SWORD_HANDLE) > 0 :
htmltext = "30008-07.htm"
if st.getQuestItemsCount(HOWTOGO_RUINS) == 1 :
htmltext = "30008-10.htm"
elif npcId == 30008 and st.getInt("cond")==4 and st.getQuestItemsCount(ROIENS_LETTER)==0 and st.getQuestItemsCount(ALLTRANS_NOTE) :
htmltext = "30008-06.htm"
st.set("cond","5")
st.playSound("ItemSound.quest_middle")
st.takeItems(ALLTRANS_NOTE,st.getQuestItemsCount(ALLTRANS_NOTE))
st.giveItems(BROKEN_SWORD_HANDLE,1)
elif npcId == 30283 and st.getInt("cond")==1 and st.getQuestItemsCount(ROIENS_LETTER)>0 :
htmltext = "30283-01.htm"
elif npcId == 30283 and st.getInt("cond")>=2 and st.getQuestItemsCount(ROIENS_LETTER)==0 and st.getQuestItemsCount(HOWTOGO_RUINS)>0 :
if (st.getQuestItemsCount(BROKEN_BLADE_TOP) + st.getQuestItemsCount(BROKEN_BLADE_BOTTOM)) == 1 :
htmltext = "30283-08.htm"
if (st.getQuestItemsCount(BROKEN_BLADE_TOP) + st.getQuestItemsCount(BROKEN_BLADE_BOTTOM)) == 0 :
htmltext = "30283-03.htm"
if st.getQuestItemsCount(BROKEN_BLADE_TOP) and st.getQuestItemsCount(BROKEN_BLADE_BOTTOM) :
htmltext = "30283-04.htm"
st.set("cond","4")
st.playSound("ItemSound.quest_middle")
st.takeItems(HOWTOGO_RUINS,st.getQuestItemsCount(HOWTOGO_RUINS))
st.takeItems(BROKEN_BLADE_TOP,st.getQuestItemsCount(BROKEN_BLADE_TOP))
st.takeItems(BROKEN_BLADE_BOTTOM,st.getQuestItemsCount(BROKEN_BLADE_BOTTOM))
st.giveItems(ALLTRANS_NOTE,1)
elif npcId == 30283 and st.getInt("cond")==4 and st.getQuestItemsCount(ALLTRANS_NOTE) :
htmltext = "30283-05.htm"
elif npcId == 30283 and st.getInt("cond")==5 and st.getQuestItemsCount(BROKEN_SWORD_HANDLE) :
htmltext = "30283-06.htm"
return htmltext
def onKill(self,npc,player,isPet):
st = player.getQuestState(qn)
if not st: return
if st.getState() == State.STARTED :
npcId = npc.getNpcId()
if npcId in [20361,20362] :
if st.getQuestItemsCount(HOWTOGO_RUINS) :
if st.getQuestItemsCount(BROKEN_BLADE_TOP) == 0 :
if self.getRandom(5) == 0 :
st.giveItems(BROKEN_BLADE_TOP,1)
elif st.getQuestItemsCount(BROKEN_BLADE_BOTTOM) == 0 :
if self.getRandom(5) == 0 :
st.giveItems(BROKEN_BLADE_BOTTOM,1)
if st.getQuestItemsCount(BROKEN_BLADE_TOP) and st.getQuestItemsCount(BROKEN_BLADE_BOTTOM) :
st.set("cond","3")
st.playSound("ItemSound.quest_middle")
else :
st.playSound("ItemSound.quest_itemget")
return
QUEST = Quest(101,qn,"Sword Of Solidarity")
QUEST.addStartNpc(30008)
QUEST.addTalkId(30008)
QUEST.addTalkId(30283)
QUEST.addKillId(20361)
QUEST.addKillId(20362)
<html><body>Grand Master Roien:<br>
You have travelled quite far from your homeland, young stranger of a foreign race. I'm sorry, but I have no work for you.<br>
(Quest for Human characters.)
(Quest for Human characters level 9 and above.)
</body></html>
\ No newline at end of file
<html><body>Grand Master Roien:<br>
In the past, this island was where the Elves taught us Humans their magic. In the year marking the hundredth anniversary of the Humans coming to this remote island to learn the magic of the Elves, Human magicians commissioned a Dwarven craftsman to create a beautiful sword that was presented to the Elves. It was a sign of thanks for their teaching the Humans magic, and a symbol of the pledge to strengthen the unity between the two Human and Elf races. The Elves named this present the<font color="LEVEL"> Sword of Solidarity</font>.<br>
<a action="bypass -h Quest 101_SwordOfSolidarity 30008-03.htm">Ask about the Sword of Solidarity</a>
</body></html>
\ No newline at end of file
In the past, this island was where the Elves taught us Humans their magic. In the year marking the hundredth anniversary of the Humans coming to this remote island to learn the magic of the Elves, Human magicians commissioned a Dwarven craftsman to create a beautiful sword that was presented to the Elves. It was a sign of thanks for their teaching the Humans magic, and a symbol of the pledge to strengthen the unity between the two Human and Elf races. The Elves named this present the <font color="LEVEL">Sword of Solidarity</font>.<br>
<a action="bypass -h Quest Q00101_SwordOfSolidarity 30008-03.html">Ask about the Sword of Solidarity</a>
</body></html>
<html><body>Grand Master Roien:<br>
A thousand years ago, war arose between the Humans and the Elves, and the Elves were eventually defeated. The Elves of Talking Island said that the present they had received was not a Sword of Solidarity but a sword of betrayal, and broke the blade in half before leaving the island. Thereafter, the Elves never returned to this island, and the building where they had taught magic was abandoned and became the present Elven Ruins.<br>
I read about the sword in a history book, and came to believe that it is hidden somewhere on this island. A few weeks ago, one of my pupils discovered an old sword handle during his exploration of the ruins. Upon close examination of the engravings on the handle, it exactly matched a text recorded in the Elven historical books that speak of the Sword of Solidarity. I am certain that the handle is a part of the Sword of Solidarity.<br>
It is my opinion that if the<font color="LEVEL"> rest of the blade</font> can be found, we can recreate the Sword of Solidarity that has only existed in history books until now.<br>
<a action="bypass -h Quest 101_SwordOfSolidarity 30008-09.htm">Ask about the remaining portions</a>
It is my opinion that if the <font color="LEVEL">rest of the blade</font> can be found, we can recreate the Sword of Solidarity that has only existed in history books until now.<br>
<a action="bypass -h Quest Q00101_SwordOfSolidarity 30008-09.html">Ask about the remaining portions</a>
</body></html>
\ No newline at end of file
<html><body>Grand Master Roien:<br>
First, go and show this letter to<font color="LEVEL"> Blacksmith Altran</font>. In the letter, I have organized information that I've discovered regarding the Sword of Solidarity during my research of ancient scrolls at Einhovant's School of Magic. Altran says that his ancestors created the blade and asked me to research information about the sword.<br>
First, go and show this letter to <font color="LEVEL">Blacksmith Altran</font>. In the letter, I have organized information that I've discovered regarding the Sword of Solidarity during my research of Ancient Scrolls at Einhovant's School of Magic. Altran says that his ancestors created the blade and asked me to research information about the sword.<br>
You can meet Altran by going to the village forge. Thank you.
</body></html>
\ No newline at end of file
<html><body>Grand Master Roien:<br>
Please deliver my letter to<font color="LEVEL"> Blacksmith Altran</font>. You can find him at the village forge.
Please deliver my letter to <font color="LEVEL">Blacksmith Altran</font>. You can find him at the village forge.
</body></html>
\ No newline at end of file
<html><body>Grand Master Roien:<br>
You've found all the pieces of the broken blade?! What wonderful news! Now Altran can restore the Sword of Solidarity. But in order to do so, he's going to need the sword handle.<br>
Now, take this to<font color="LEVEL"> Altran</font>. Please tell him that it is given to him in thanks for all the help he has given us with the reconstruction of the training hall.
Now, take this to <font color="LEVEL">Altran</font>. Please tell him that it is given to him in thanks for all the help he has given us with the reconstruction of the training hall.
</body></html>
\ No newline at end of file
<html><body>Grand Master Roien:<br>
Perhaps you have heard of the<font color="LEVEL"> Sword of Solidarity?</font> They say it is a fine blade treasured by the Elves that resided on this island long ago. These days, whenever I have the time I visit the libraries within Einhovant's School of Magic, to look through books and read stories related to the sword. Seeing that it is recorded not only in Human history books but also in those of the Elves, it seems certain that this sword really existed...<br>
Perhaps you have heard of the <font color="LEVEL">Sword of Solidarity?</font> They say it is a fine blade treasured by the Elves that resided on this island long ago. These days, whenever I have the time I visit the libraries within Einhovant's School of Magic, to look through books and read stories related to the sword. Seeing that it is recorded not only in Human history books but also in those of the Elves, it seems certain that this sword really existed...<br>
If this Sword of Solidarity really existed, wouldn't it be hidden somewhere on the island? Such a precious and magnificent blade as that would not be easily destroyed or abandoned... I plan to search the island for the sword some day. If you are interested, won't you come along?<br>
(Quest for Human characters level 9 and above.)
</body></html>
\ No newline at end of file
<html><body>Grand Master Roien:<br>
A few days ago, I mentioned the sword handle to Blacksmith Altran over a couple of drinks, and he showed avid interest in it. He says that if only he had the<font color="LEVEL"> blade portion</font>, he could resurrect the sword to its original state, and suggested that since it is probably somewhere in the ruins, we should send someone to go and find it.<br>
A few days ago, I mentioned the sword handle to Blacksmith Altran over a couple of drinks, and he showed avid interest in it. He says that if only he had the <font color="LEVEL">blade portion</font>, he could resurrect the sword to its original state, and suggested that since it is probably somewhere in the ruins, we should send someone to go and find it.<br>
Regretfully, I am occupied with the construction that is going on for the outer walls of the training hall, which was destroyed during a storm, and cannot perform the task myself. But I think you would be able to help Altran ... What do you think? Will you give it a try?<br>
<a action="bypass -h Quest 101_SwordOfSolidarity 30008-04.htm">Say you will perform the task</a>
<a action="bypass -h Quest Q00101_SwordOfSolidarity 30008-04.htm">Say you will perform the task</a>
</body></html>
\ No newline at end of file
<html><body>Grand Master Roien:<br>
I heard that you are helping Altran. They say you are going to find the broken sword blade in the <font color="LEVEL">Elven Ruins.</font> I wish you good luck!
</body></html>
\ No newline at end of file
<html><body>Blacksmith Altran:<br>
Is this from the blade of the Sword of Solidarity? If only we could find the other half!
</body></html>
\ No newline at end of file
</body></html>
<html><body>Blacksmith Altran:<br>
You've found the broken sword blades! Quickly, bring them to Altran!
</body></html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment