Skip to content
Snippets Groups Projects
Commit 03d9a106 authored by ivantotov's avatar ivantotov
Browse files

Retail-like quest Repent Your Sins (422).

Reviewed by: @Zoey76
parent 3704cbb7
No related branches found
No related tags found
No related merge requests found
Showing
with 10 additions and 371 deletions
......@@ -196,7 +196,6 @@ quests/372_LegacyOfInsolence/__init__.py
quests/384_WarehouseKeepersPastime/__init__.py
quests/386_StolenDignity/__init__.py
quests/419_GetAPet/__init__.py
quests/422_RepentYourSins/__init__.py
quests/503_PursuitClanAmbition/__init__.py
quests/604_DaimontheWhiteEyedPart2/__init__.py
quests/620_FourGoblets/__init__.py
......
<html><body>Sage Casian:<br>
Ah, the heart of a tyrant kingpin! Thank you!
This will advance my research greatly. Now I must confess... In the past I was a
terrible criminal. I undertook this project seeking redemption, but now I find that
I am required to commit crimes to further my research! The importance of what I am doing,
the big picture, is all that keeps me going...
</body></html>
\ No newline at end of file
<html><body>Katari:<br>
At last! You have come for me! Oh, pardon me... I had a very vivid dream last night,
and I've been waiting for someone like you to come for me. Just in case you were the one in my dreams,
I wanted you to know. Well... then, I may as well ask you.<br>
I and some religious ol mahums are being threatened by <font color="LEVEL">scavenger wererats</font>.
They seem to be unaware of the teachings of the god of light. Everyone knows, even after a conversion,
ol mahums are not to be trifled with. The same can be said of the Dark Elves.
Our god of light is no coward, and I'm ready to teach them a thing or two.<br>
Please, would you go kill these creatures? Bring back 10
<font color="LEVEL">skulls of scavenger wererats</font>.
They can be found in the <font color="LEVEL">Neutral Zone</font>.
Put a good scare into them, something to let them know they shouldn't pick on missionaries.
</body></html>
\ No newline at end of file
<html><body>Katari:<br>
If I had my way, I would kill every last one of them. But even the most wicked have the chance of redemption.
Perhaps one day they will come to the god of light... Anyway, now we must spill some blood. Go to the
<font color="LEVEL">Neutral Zone</font> and hunt <font color="LEVEL">scavenger wererats</font>.
Bring back 10 of their skulls.
</body></html>
\ No newline at end of file
<html><body>Katari:<br>
That should teach them a lesson. I was dreading having to send the ol mahums to do the killing,
I hate to get them started. And then, from the mist, you appeared. My savior! And you gave them what for,
didn't you! Einhasad is truly watching over me.<br>Thank you, my friend... I wish you all the best.
</body></html>
<html><body>Black Judge:<br>Don't say a word. I can tell that you have completed your
task. Take this to <font color="LEVEL">Blacksmith Pushkin in Giran Castle
Town</font>. He will make an item for you. When he finishes it, bring it back to
us. </body></html>
\ No newline at end of file
<html><body>Black Judge:<br>There is no hurry. The path of penance will endlessly
unfold in front of you. Go to <font color="LEVEL">Blacksmith Pushkin of Giran
Castle Town</font>. He will make an item for you. Bring this item to us.
</body></html>
\ No newline at end of file
<html><body>Black Judge:<br>
Have you brought back the <font color="LEVEL">manacles of penitence</font>?
You must bring them to me. You shall wear them until you have finished your penitence.<br>
<a action="bypass -h Quest 422_RepentYourSins 1">Give him the manacles.</a>
</body></html>
\ No newline at end of file
<html><body>Black Judge:<br>
Your sins have been absolved and you are free to go your separate ways. The
<font color="LEVEL">Sin Eater</font> will return from whence he came. There, his sin
is changed to virtue, and virtue to nothing.<br><font color="LEVEL">
(Note: If you click the link below, the manacle of penitent disappears. At this
time, all the items contained in the inventory of the Sin Eater disappears as well,
so please check if you put any items in the inventory.)</font><br>
<a action="bypass -h Quest 422_RepentYourSins 3">"What about my remaining sins?"</a>
</body></html>
\ No newline at end of file
<html><body>Black Judge:<br>
Ah, yes, there are more sins, aren't there... Are you willing to continue to carry out
your task to atone for your sins?<br>
<a action="bypass -h Quest 422_RepentYourSins 4">"I wish to atone for my remaining sins."</a><br>
<a action="bypass -h Quest 422_RepentYourSins Quit">Quit</a>
</body></html>
\ No newline at end of file
<html><body>Black Judge:<br>
All of your transgressions have not yet been redeemed. You must begin your penitence once again.
Would you be in need of a <font color="LEVEL">sin eater</font>?<br>
<a action="bypass -h Quest 422_RepentYourSins 4">"I wish to atone for my sins."</a><br>
<a action="bypass -h Quest 422_RepentYourSins Quit">Quit</a>
</body></html>
\ No newline at end of file
#Fixed by Cromir, expanded upon by Emperorc
#Quest: Repent Your Sins
import sys
from com.l2jserver.gameserver.model.quest import State
from com.l2jserver.gameserver.model.quest import QuestState
from com.l2jserver.gameserver.model.quest import Quest as JQuest
qn = "422_RepentYourSins"
#Items
SCAVENGER_WERERAT_SKULL = 4326
TUREK_WARHOUND_TAIL = 4327
TYRANT_KINGPIN_HEART = 4328
TRISALIM_TARANTULAS_VENOM_SAC = 4329
MANUAL_OF_MANACLES = 4331
PENITENTS_MANACLES = 4425
PENITENTS_MANACLES1 = 4330
PENITENTS_MANACLES2 = 4426
SILVER_NUGGET = 1873
ADAMANTINE_NUGGET = 1877
BLACKSMITHS_FRAME = 1892
COKES = 1879
STEEL = 1880
#Mobs
SCAVENGER_WERERAT = 20039
TUREK_WARHOUND = 20494
TYRANT_KINGPIN = 20193
TRISALIM_TARANTULA = 20561
def findPetLvl (player, itemid) :
pet = player.getSummon()
if pet:
if pet.getId() == 12564 :
level = pet.getStat().getLevel()
else :
item = player.getInventory().getItemByItemId(itemid)
level = item.getEnchantLevel()
else :
item = player.getInventory().getItemByItemId(itemid)
level = item.getEnchantLevel()
return level
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = [SCAVENGER_WERERAT_SKULL, TUREK_WARHOUND_TAIL, TYRANT_KINGPIN_HEART, TRISALIM_TARANTULAS_VENOM_SAC, MANUAL_OF_MANACLES,
PENITENTS_MANACLES, PENITENTS_MANACLES1]
def onAdvEvent (self,event,npc,player) :
htmltext = event
st = self.getQuestState(player, False)
if not st: return
if event == "Start" :
st.playSound("ItemSound.quest_accept")
st.setState(State.STARTED)
if player.getLevel() <= 20 :
htmltext = "30981-03.htm"
st.set("cond","1")
st.set("cond","2")
elif player.getLevel() <= 30 :
htmltext = "30981-04.htm"
st.set("cond","3")
elif player.getLevel() <= 40 :
htmltext = "30981-05.htm"
st.set("cond","4")
else :
htmltext = "30981-06.htm"
st.set("cond","5")
elif event == "1" :
if st.getQuestItemsCount(PENITENTS_MANACLES1) >= 1:
st.takeItems(PENITENTS_MANACLES1,-1)
if st.getQuestItemsCount(PENITENTS_MANACLES2) >= 1:
st.takeItems(PENITENTS_MANACLES2,-1)
if st.getQuestItemsCount(PENITENTS_MANACLES) >= 1:
st.takeItems(PENITENTS_MANACLES,-1)
htmltext = "30981-11.htm"
st.set("cond","16")
st.set("level",str(player.getLevel()))
st.giveItems(PENITENTS_MANACLES,1)
elif event == "2" :
htmltext = "30981-14.htm"
elif event == "3" :
plevel = findPetLvl(player,PENITENTS_MANACLES)
level = player.getLevel()
olevel = st.getInt("level")
pet = player.getSummon()
if pet:
if pet.getId() == 12564 :
htmltext = "30981-16.htm"
else :
if level > olevel :
Pk_remove = plevel - level
else :
Pk_remove = plevel - olevel
if Pk_remove < 0 :
Pk_remove = 0
Pk_remove = self.getRandom(10 + Pk_remove) + 1
if player.getPkKills() <= Pk_remove :
st.giveItems(PENITENTS_MANACLES2,1)
st.takeItems(PENITENTS_MANACLES,1)
htmltext = "30981-15.htm"
player.setPkKills(0)
st.playSound("ItemSound.quest_finish")
st.exitQuest(1)
else :
st.giveItems(PENITENTS_MANACLES2,1)
st.takeItems(PENITENTS_MANACLES,1)
htmltext = "30981-17.htm"
Pk_new = player.getPkKills() - Pk_remove
player.setPkKills(Pk_new)
st.set("level","0")
elif event == "4" :
htmltext = "30981-19.htm"
elif event == "Quit" :
htmltext = "30981-20.htm"
st.playSound("ItemSound.quest_finish")
st.takeItems(SCAVENGER_WERERAT_SKULL,-1)
st.takeItems(TUREK_WARHOUND_TAIL,-1)
st.takeItems(TYRANT_KINGPIN_HEART,-1)
st.takeItems(TRISALIM_TARANTULAS_VENOM_SAC,-1)
st.takeItems(PENITENTS_MANACLES1,-1)
st.takeItems(MANUAL_OF_MANACLES,-1)
st.takeItems(PENITENTS_MANACLES,-1)
st.exitQuest(1)
return htmltext
def onTalk (self,npc,player):
htmltext = Quest.getNoQuestMsg(player)
st = self.getQuestState(player, True)
if not st : return htmltext
condition = st.getInt("cond")
npcId = npc.getId()
id = st.getState()
if npcId == 30981 : #Black Judge
if id == State.CREATED :
if player.getPkKills() >= 1:
htmltext = "30981-02.htm"
else:
htmltext = "30981-01.htm"
st.exitQuest(1)
elif condition <= 9 :
htmltext = "30981-07.htm"
elif condition == 13 and st.getQuestItemsCount(PENITENTS_MANACLES2) :
htmltext = "30981-10.htm"
elif condition <= 13 and condition > 9 and st.getQuestItemsCount(MANUAL_OF_MANACLES) == 0 :
htmltext = "30981-08.htm"
st.set("cond","14")
st.giveItems(MANUAL_OF_MANACLES,1)
elif condition == 14 and st.getQuestItemsCount(MANUAL_OF_MANACLES) > 0 :
htmltext = "30981-09.htm"
elif condition == 15 and st.getQuestItemsCount(PENITENTS_MANACLES1) > 0 :
htmltext = "30981-10.htm"
elif condition >= 16 :
if st.getQuestItemsCount(PENITENTS_MANACLES) > 0 :
plevel = findPetLvl(player,PENITENTS_MANACLES)
level = player.getLevel()
if st.getInt("level") > level :
level = st.getInt("level")
if plevel :
if plevel > level:
htmltext = "30981-13.htm"
else :
htmltext = "30981-12.htm"
else :
htmltext = "30981-12.htm"
else :
htmltext = "30981-18.htm"
elif npcId == 30668 : # Katari
if condition == 2 :
st.set("cond","6")
htmltext = "30668-01.htm"
elif condition == 6 :
if st.getQuestItemsCount(SCAVENGER_WERERAT_SKULL) < 10 :
htmltext = "30668-02.htm"
else :
st.set("cond","10")
htmltext = "30668-03.htm"
st.takeItems(SCAVENGER_WERERAT_SKULL,-1)
elif condition == 10 :
htmltext = "30668-04.htm"
elif npcId == 30597 : # Piotur
if condition == 3 :
st.set("cond","7")
htmltext = "30597-01.htm"
elif condition == 7 :
if st.getQuestItemsCount(TUREK_WARHOUND_TAIL) < 10 :
htmltext = "30597-02.htm"
else :
st.set("cond","11")
htmltext = "30597-03.htm"
st.takeItems(TUREK_WARHOUND_TAIL,-1)
elif condition == 11 :
htmltext = "30597-04.htm"
elif npcId == 30612 : # Casian
if condition == 4 :
st.set("cond","8")
htmltext = "30612-01.htm"
elif condition == 8 :
if st.getQuestItemsCount(TYRANT_KINGPIN_HEART) < 1 :
htmltext = "30612-02.htm"
else :
st.set("cond","12")
htmltext = "30612-03.htm"
st.takeItems(TYRANT_KINGPIN_HEART,-1)
elif condition == 12 :
htmltext = "30612-04.htm"
elif npcId == 30718 : # Joan
if condition == 5 :
st.set("cond","9")
htmltext = "30718-01.htm"
elif condition == 9 :
if st.getQuestItemsCount(TRISALIM_TARANTULAS_VENOM_SAC) < 3 :
htmltext = "30718-02.htm"
elif st.getQuestItemsCount(TRISALIM_TARANTULAS_VENOM_SAC) >= 3 :
st.set("cond","13")
htmltext = "30718-03.htm"
st.takeItems(TRISALIM_TARANTULAS_VENOM_SAC,-1)
elif condition == 13 :
htmltext = "30718-04.htm"
elif npcId == 30300: #Pushkin
if condition >= 14 :
if st.getQuestItemsCount(MANUAL_OF_MANACLES) == 1 :
if st.getQuestItemsCount(SILVER_NUGGET) < 10 or st.getQuestItemsCount(STEEL) < 5 or st.getQuestItemsCount(ADAMANTINE_NUGGET) < 2 \
or st.getQuestItemsCount(COKES) < 10 or st.getQuestItemsCount(BLACKSMITHS_FRAME) < 1 :
htmltext = "30300-02.htm"
elif st.getQuestItemsCount(SILVER_NUGGET) >= 10 and st.getQuestItemsCount(STEEL) >= 5 and st.getQuestItemsCount(ADAMANTINE_NUGGET) >= 2 \
and st.getQuestItemsCount(COKES) >= 10 and st.getQuestItemsCount(BLACKSMITHS_FRAME) >= 1 :
htmltext = "30300-02.htm"
st.set("cond","15")
st.takeItems(MANUAL_OF_MANACLES,1)
st.takeItems(SILVER_NUGGET,10)
st.takeItems(ADAMANTINE_NUGGET,2)
st.takeItems(COKES,10)
st.takeItems(STEEL,5)
st.takeItems(BLACKSMITHS_FRAME,1)
st.giveItems(PENITENTS_MANACLES1,1)
st.playSound("ItemSound.quest_middle")
elif st.getQuestItemsCount(PENITENTS_MANACLES1) or st.getQuestItemsCount(PENITENTS_MANACLES) or st.getQuestItemsCount(PENITENTS_MANACLES2) :
htmltext = "30300-03.htm"
return htmltext
def onKill(self,npc,player,isPet) :
st = self.getQuestState(player, False)
if not st : return
if st.getState() != State.STARTED : return
condition = st.getInt("cond")
npcId = npc.getId()
skulls = st.getQuestItemsCount(SCAVENGER_WERERAT_SKULL)
tails = st.getQuestItemsCount(TUREK_WARHOUND_TAIL)
heart = st.getQuestItemsCount(TYRANT_KINGPIN_HEART)
sacs = st.getQuestItemsCount(TRISALIM_TARANTULAS_VENOM_SAC)
if npcId == SCAVENGER_WERERAT :
if condition == 6 :
if skulls < 10 :
st.giveItems(SCAVENGER_WERERAT_SKULL,1)
if st.getQuestItemsCount(SCAVENGER_WERERAT_SKULL) == 10 :
st.playSound("ItemSound.quest_middle")
else :
st.playSound("ItemSound.quest_itemget")
elif npcId == TUREK_WARHOUND :
if condition == 7 :
if tails < 10 :
st.giveItems(TUREK_WARHOUND_TAIL,1)
if st.getQuestItemsCount(TUREK_WARHOUND_TAIL) == 10 :
st.playSound("ItemSound.quest_middle")
else :
st.playSound("ItemSound.quest_itemget")
elif npcId == TYRANT_KINGPIN :
if condition == 8 :
if heart < 1 :
st.giveItems(TYRANT_KINGPIN_HEART,1)
st.playSound("ItemSound.quest_middle")
elif npcId == TRISALIM_TARANTULA :
if condition == 9 :
if sacs < 3 :
st.giveItems(TRISALIM_TARANTULAS_VENOM_SAC,1)
if st.getQuestItemsCount(TRISALIM_TARANTULAS_VENOM_SAC) == 3 :
st.playSound("ItemSound.quest_middle")
else :
st.playSound("ItemSound.quest_itemget")
return
QUEST = Quest(422,qn,"Repent your Sins")
QUEST.addStartNpc(30981)
QUEST.addTalkId(30981)
QUEST.addTalkId(30668)
QUEST.addTalkId(30597)
QUEST.addTalkId(30612)
QUEST.addTalkId(30718)
QUEST.addTalkId(30300)
QUEST.addKillId(SCAVENGER_WERERAT)
QUEST.addKillId(TUREK_WARHOUND)
QUEST.addKillId(TYRANT_KINGPIN)
QUEST.addKillId(TRISALIM_TARANTULA)
\ No newline at end of file
<html><body>Blacksmith Pushkin:<br>
Manacles of a Penitent...? Ah yes. A strange item, but I can make them. Funny thing, too... I've been getting a lot of orders for these lately. They must be getting popular... <br>
Manacles of a Penitent...? Ah yes. A strange item, but I can make them. Funny thing, too... I've been getting a lot of orders for these lately. They must be getting popular...<BR>
I've memorized the ingredients: I'll need some Steel, an Adamantite Nugget... some silver...<br>
Here, take this list. Verify that this is what you want to order. These are serious manacles and cannot be handled carelessly!
Be certain this is what you want.
These are serious manacles and cannot be handled carelessly!
</body></html>
\ No newline at end of file
<html><body>Blacksmith Pushkin:<br>
Manacles of a Penitent...? Ah yes. A strange item, but I can make them. Funny thing, too... I've been getting a lot of orders for these lately. They must be getting popular... In fact, so popular that I've run out of the ingredients I need to make them!<br>
Would you mind going and getting the ingredients listed on this recipe? I will make the manacles for you if you do this.
Go collect the items on this list, and I'll make the manacles for you.
</body></html>
\ No newline at end of file
<html><body>Piotur:<br>
Are you here to hunt the <font color="LEVEL">Turek war hounds</font>? A while back a black-clad sage appeared and told me that someone like you was coming and I should ask for help with my needs.<br> When the war was over I returned to find my farm devastated by the filthy orcs! I hired mercenaries and managed to drive them off my land, but their cursed stray war hounds remain and are rampaging and killing my cattle. Recently they have even been threatening the farmers. <br>If you are here to help, please kill the <font color="LEVEL">Turek war hounds</font>. Please kill at least 10 of them! Of course they can be found near the <font color="LEVEL">Orc Barracks</font>!
Are you here to hunt the <font color="LEVEL">Turek war hounds</font>? A while back a black-clad sage appeared and told me that someone like you was coming and I should ask for help with my needs.<br>
When the war was over I returned to find my farm devastated by the filthy orcs! I hired mercenaries and managed to drive them off my land, but their cursed stray war hounds remain and are rampaging and killing my cattle. Recently they have even been threatening the farmers.<br>
If you are here to help, please kill the <font color="LEVEL">Turek war hounds</font>. Please kill at least 10 of them! Of course they can be found near the <font color="LEVEL">Orc Barracks</font>!
</body></html>
\ No newline at end of file
<html><body>Sage Casian:<br>
Why would you want to help me? Someone up there must like me. Things keep happening that give me the impression that my penance is being watched over. <br>
Why would you want to help me?Someone up there must like me. Things keep happening that give me the impression that my penance is being watched over.<br>
So, will you do me a favor? I am researching different ways that this polluted Wasteland can be restored to its previous, verdant state. The most promising method is a potion I've been working on. To make this potion I must secure the heart of a <font color="LEVEL">tyrant kingpin</font>. This could very well be above your abilities, but if you bring me the <font color="LEVEL">heart of a tyrant kingpin</font> my research can continue. You will find the beasts in the <font color="LEVEL">western part of the Wasteland</font>.
</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