This commit is contained in:
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30557-01.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30557-01.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Torai:<br>
|
||||
Oh my! This... is a priceless book. Sell it to me...! I'll give you a high price for it... Heh heh heh...</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-01.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-01.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
Since I learned herbal medicine when I was young and started to make magic potions 20 years ago, people say that I'm the very best in my field. But I think I've still got a long way to go. There are many mysterious potions passed down only through the ancient lore that I haven't made yet. But hey, just a short time ago I came to know by accident where the secret method for making one of the mysterious potions is stored. There is a clue written inside the book that I have. So it would be good if you would help me...<br>
|
||||
<a action="bypass -h Quest 334_TheWishingPotion 30738-02.htm">Ask what you can do to help.</a></body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-02.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-02.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
This alchemy textbook tells about the place where the book of problems is hidden. I'd like you to refer to this and find the secret book.<br>
|
||||
<a action="bypass -h Quest 334_TheWishingPotion 30738-03.htm">Say that you will find the secret book.</a></body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-03.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-03.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
Thank you. Ah, and take this book. Follow the clues written in this book and bring me the secret book of alchemy that is hidden. OK? Then I will definitely give you a surprising reward.</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-04.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-04.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
Is the work of finding the secret book progressing well? Haven't finished yet? Then hurry, please.</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-05.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-05.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
You brought the secret book! But...<br>
|
||||
Oh, I'm sorry. Actually, while you were away, somebody came with some precious ingredients and I spent my last adena purching them.<br>
|
||||
Hmm... What if I do this instead? The method for making wish potion is what's written in the secret book that you brought! I got most of the ingredients with this last purchase but there are still a few things I'm short of. If you'll just bring me those, I'll make wish potion for you that will grant you all of your wishes. How about that? Is that a good deal?<br>
|
||||
<a action="bypass -h Quest 334_TheWishingPotion 30738-06.htm">Say that you will bring the ingredients.</a></body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-06.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-06.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
Yahoo! Done deal! Thank you for putting up with my unreasonableness. OK, here is the ingredient list. Go get what's written here. Please!</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-07.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-07.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
I'm sorry to say this but... We're still short on ingredients. What should we do? I just really can't start the work until you've gotten all the ingredients.</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-08.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-08.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
Umm... You've collected all the ingredients. You've done a great job. OK, shall we start?<br>
|
||||
<a action="bypass -h Quest 334_TheWishingPotion 30738-09.htm">Ask to make wish potion.</a></body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-09.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-09.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
Then take this herbal sap and apply it gently here! Yeah, if you mix it in well... the color changes, no? OK, next add it to this bottle and mix it... Could you give me that red bottle over there now?<br>
|
||||
<a action="bypass -h Quest 334_TheWishingPotion 30738-10.htm">Hand over red bottle.</a></body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-10.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-10.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
Then carefully add wish scent... OK! It's done. Oh, but talk to me before using the wish potion. That's because there are some things to prepare before getting your wish.<br>
|
||||
And take this. It's my proof, but if you bring it I'll make you wish potion again. Of course, you'll have to gather together the ingredients then too. Alright, so this is gratitude enough, don't you think?</body></html>
|
||||
4
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-11.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-11.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
Ah, you there! Do you remember? You made a promise to me... What's the reason this time...? Are you wanting to take the wish potion? Or are you getting together the ingredients to make more wish potion?<br>
|
||||
<a action="bypass -h Quest 334_TheWishingPotion 30738-14.htm">Say that you will take the wish potion.</a><br>
|
||||
<a action="bypass -h Quest 334_TheWishingPotion 30738-06.htm">Say that you'll get the ingredients.</a></body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-12.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-12.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
OK, just like you did last time, please gather the ingredients written here. I don't need to give you a long explanation about it, do I?</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-13.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-13.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
Why do you want more Wish Potion when you haven't used what you already have? What a pig...!</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-14.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-14.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
Hey! You don't have any Wish Potion but yet you still want to make a wish...? How very disgraceful!</body></html>
|
||||
14
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-15.htm
vendored
Normal file
14
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-15.htm
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
You are allowed one wish after taking the potion. You will choose from one of the four wishes on this card.
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="icon.Quest_TarotCard_Knowledge_t00" width=64 height=112></td>
|
||||
<td><img src="icon.Quest_TarotCard_Love_t00" width=64 height=112></td>
|
||||
<td><img src="icon.Quest_TarotCard_Power_t00" width=64 height=112></td>
|
||||
<td><img src="icon.Quest_TarotCard_Wealth_t00" width=64 height=112></td>
|
||||
</tr>
|
||||
</table><br>
|
||||
<a action="bypass -h Quest 334_TheWishingPotion 30738-16.htm">"I wish to be a loving person."</a><br>
|
||||
<a action="bypass -h Quest 334_TheWishingPotion 30738-17.htm">"I wish for 100 million adena."</a><br>
|
||||
<a action="bypass -h Quest 334_TheWishingPotion 30738-18.htm">"I wish to be a king!"</a><br>
|
||||
<a action="bypass -h Quest 334_TheWishingPotion 30738-19.htm">"I wish to be the wisest person in the world."</a></body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-16.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-16.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
To begin the ceremony you must first apply the blood of crow to your forehead and then shake the wing of fairy three times...</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-17.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-17.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
To start the ceremony you must first apply the blood of crow to your forehead and then shake the leaf of timitran three times...</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-18.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-18.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
To start the ceremony you must first apply the blood of crow to your forehead and then put the crown of glory on your head...</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-19.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-19.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
To start the ceremony you must first apply the blood of crow to your forehead and then hit your head three times with a Sage's Staff...</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-20.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-20.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
You must wait, someone else is currently making a wish...</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-21.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30738-21.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Alchemist Matild:<br>
|
||||
Many people have their eyes on the secrets of alchemy. You don't look like you'd be strong enough to protect those secrets from bad folks. I'm sorry but I can't talk to you about alchemy.<br>
|
||||
(This is a quest that can only be performed by characters at level 30 and above.)</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30742-01.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30742-01.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Fairy of Love Rupina:<br>
|
||||
Ah, it's you! Do you seek your true love? I'm sorry, but I am very busy and cannot help you now. Instead, take this pendant. It will help you to find your soul mate.</body></html>
|
||||
4
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30742-02.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30742-02.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Fairy of Love Rupina:<br>
|
||||
Love is such a lovely thing.<br>
|
||||
Lovers love loving.<br>
|
||||
Love each other!</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30743-01.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30743-01.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Chest of Wisdom:<br>
|
||||
(A voice comes out of the chest.) They are magic scrolls that contain the wisdom of sages!</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30743-02.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30743-02.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Chest of Wisdom:<br>
|
||||
(A voice comes out of the chest.) I will give you a valuable piece of wisdom that will make you rich. If you find and take the forbidden love scroll and go see Torai, you can make yourself a huge amount of money.</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30743-03.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30743-03.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Chest of Wisdom:<br>
|
||||
(A voice comes out of the chest.) I will teach you a wise method to increase your wealth. Warehouse Keeper Sorint, Sorceress Page, Researcher Lorain, Warehouse Keeper Hagger, Guard Stan, Blacksmith Dunning, Magic Trader Ralph, Head Blacksmith Ferris, Warehouse Keeper Collob, and Grocer Pano... All these people are crazy about collecting weird coins!</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30743-04.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30743-04.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Chest of Wisdom:<br>
|
||||
(A voice comes out of the chest.) I will tell you about the method of using the Wish Potion wisely. If you make a wish to become a ruler, I heard that you will be able to meet the Devil himself...</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30743-05.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30743-05.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Chest of Wisdom:<br>
|
||||
(A voice comes out of the chest.) I will tell you about the method of using the Wish Potion wisely. If you make a wish to obtain love, a succubus that will take pleasure in seducing and then giving pain to a man will appear. But why, when it is a woman, will a succubus still show up?</body></html>
|
||||
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30743-06.htm
vendored
Normal file
2
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/30743-06.htm
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<html><body>Chest of Wisdom:<br>
|
||||
(A voice comes out of the chest.) You are the chosen one. I present to you the treasure of knowledge as a gift.</body></html>
|
||||
360
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/__init__.py
vendored
Normal file
360
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/__init__.py
vendored
Normal file
@@ -0,0 +1,360 @@
|
||||
#
|
||||
# Created by DraX on 2005.09.08
|
||||
# C4 Update by DrLecter
|
||||
#
|
||||
|
||||
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
|
||||
from com.l2jserver.gameserver.network.serverpackets import NpcSay
|
||||
|
||||
qn = "334_TheWishingPotion"
|
||||
|
||||
# General Rewards
|
||||
ADENA = 57
|
||||
NECKLACE_OF_GRACE = 931
|
||||
HEART_OF_PAAGRIO = 3943
|
||||
R1=[3081,3076,3075,3074,4917,3077,3080,3079,3078,4928,4931,4932,5013,3067,3064,3061,3062,3058,4206,3065,3060,3063,4208,3057,3059,3066,4911,4918,3092,3039,4922,3091,3093,3431]
|
||||
R2=[3430,3429,3073,3941,3071,3069,3072,4200,3068,3070,4912,3100,3101,3098,3094,3102,4913,3095,3096,3097,3099,3085,3086,3082,4907,3088,4207,3087,3084,3083,4929,4933,4919,3045]
|
||||
R3=[4923,4201,4914,3942,3090,4909,3089,4930,4934,4920,3041,4924,3114,3105,3110,3104,3113,3103,4204,3108,4926,3112,3107,4205,3109,3111,3106,4925,3117,3115,3118,3116,4927]
|
||||
R4=[1979,1980,2952,2953]
|
||||
#Quest ingredients and rewards
|
||||
WISH_POTION,ANCIENT_CROWN,CERTIFICATE_OF_ROYALTY = range(3467,3470)
|
||||
ALCHEMY_TEXT,SECRET_BOOK,POTION_RECIPE_1,POTION_RECIPE_2,MATILDS_ORB,FORBIDDEN_LOVE_SCROLL = range(3678,3684)
|
||||
AMBER_SCALE,WIND_SOULSTONE,GLASS_EYE,HORROR_ECTOPLASM,SILENOS_HORN,ANT_SOLDIER_APHID,TYRANTS_CHITIN,BUGBEAR_BLOOD = range(3684,3692)
|
||||
#NPCs
|
||||
GRIMA = 27135
|
||||
SUCCUBUS_OF_SEDUCTION = 27136
|
||||
GREAT_DEMON_KING = 27138
|
||||
SECRET_KEEPER_TREE = 27139
|
||||
SANCHES = 27153
|
||||
BONAPARTERIUS = 27154
|
||||
RAMSEBALIUS = 27155
|
||||
TORAI = 30557
|
||||
ALCHEMIST_MATILD = 30738
|
||||
RUPINA = 30742
|
||||
WISDOM_CHEST = 30743
|
||||
#MOBs
|
||||
WHISPERING_WIND = 20078
|
||||
ANT_RECRUIT = 20087
|
||||
ANT_WARRIOR_CAPTAIN = 20088
|
||||
SILENOS = 20168
|
||||
TYRANT = 20192
|
||||
TYRANT_KINGPIN = 20193
|
||||
AMBER_BASILISK = 20199
|
||||
HORROR_MIST_RIPPER = 20227
|
||||
TURAK_BUGBEAR = 20248
|
||||
TURAK_BUGBEAR_WARRIOR = 20249
|
||||
GLASS_JAGUAR = 20250
|
||||
#DROPLIST
|
||||
DROPLIST={AMBER_BASILISK:[AMBER_SCALE,15],WHISPERING_WIND:[WIND_SOULSTONE,20],GLASS_JAGUAR:[GLASS_EYE,35],HORROR_MIST_RIPPER:[HORROR_ECTOPLASM,15],
|
||||
SILENOS:[SILENOS_HORN,30],ANT_RECRUIT:[ANT_SOLDIER_APHID,40],ANT_WARRIOR_CAPTAIN:[ANT_SOLDIER_APHID,40],TYRANT:[TYRANTS_CHITIN,50],
|
||||
TYRANT_KINGPIN:[TYRANTS_CHITIN,50],TURAK_BUGBEAR:[BUGBEAR_BLOOD,25],TURAK_BUGBEAR_WARRIOR:[BUGBEAR_BLOOD,25]}
|
||||
|
||||
# set of random messages
|
||||
MESSAGES={SUCCUBUS_OF_SEDUCTION:["Do you wanna be loved?","Do you need love?","Let me love you...","Want to know what love is?","Are you in need of love?","Me love you long time"],
|
||||
GRIMA:["hey hum hum!","boom! boom!","...","Ki ab kya karein hum"],
|
||||
}
|
||||
|
||||
def check_ingredients(st,required) :
|
||||
if st.getQuestItemsCount(AMBER_SCALE) != required : return 0
|
||||
if st.getQuestItemsCount(WIND_SOULSTONE) != required : return 0
|
||||
if st.getQuestItemsCount(GLASS_EYE) != required : return 0
|
||||
if st.getQuestItemsCount(HORROR_ECTOPLASM) != required : return 0
|
||||
if st.getQuestItemsCount(SILENOS_HORN) != required : return 0
|
||||
if st.getQuestItemsCount(ANT_SOLDIER_APHID) != required : return 0
|
||||
if st.getQuestItemsCount(TYRANTS_CHITIN) != required : return 0
|
||||
if st.getQuestItemsCount(BUGBEAR_BLOOD) != required : return 0
|
||||
return 1
|
||||
|
||||
def autochat(npc,text) :
|
||||
if npc: npc.broadcastPacket(NpcSay(npc.getObjectId(),0,npc.getId(),text))
|
||||
return
|
||||
|
||||
class Quest (JQuest) :
|
||||
|
||||
def __init__(self,id,name,descr):
|
||||
JQuest.__init__(self,id,name,descr)
|
||||
self.questItemIds = range(3678,3683)+range(3684,3692)
|
||||
|
||||
def onAdvEvent (self,event,npc,player):
|
||||
st = self.getQuestState(player, False)
|
||||
if not st: return
|
||||
htmltext = event
|
||||
player=st.getPlayer()
|
||||
if event == "30738-03.htm":
|
||||
st.set("cond","1")
|
||||
st.setState(State.STARTED)
|
||||
st.playSound("ItemSound.quest_accept")
|
||||
if st.getQuestItemsCount(ALCHEMY_TEXT) >= 2: st.takeItems(ALCHEMY_TEXT,-1)
|
||||
if st.getQuestItemsCount(ALCHEMY_TEXT) == 0: st.giveItems(ALCHEMY_TEXT,1)
|
||||
htmltext = "30738-03.htm"
|
||||
if event == "30738-06.htm":
|
||||
if st.getQuestItemsCount(WISH_POTION) :
|
||||
htmltext = "30738-13.htm"
|
||||
else :
|
||||
st.playSound("ItemSound.quest_accept")
|
||||
st.set("cond","3")
|
||||
if st.getQuestItemsCount(ALCHEMY_TEXT) >= 1: st.takeItems(ALCHEMY_TEXT,-1)
|
||||
if st.getQuestItemsCount(SECRET_BOOK) >= 1: st.takeItems(SECRET_BOOK,-1)
|
||||
if st.getQuestItemsCount(POTION_RECIPE_1) >= 2: st.takeItems(POTION_RECIPE_1,-1)
|
||||
if st.getQuestItemsCount(POTION_RECIPE_1) == 0: st.giveItems(POTION_RECIPE_1,1)
|
||||
if st.getQuestItemsCount(POTION_RECIPE_2) >= 2: st.takeItems(POTION_RECIPE_2,-1)
|
||||
if st.getQuestItemsCount(POTION_RECIPE_2) == 0: st.giveItems(POTION_RECIPE_2,1)
|
||||
if st.getQuestItemsCount(MATILDS_ORB) : htmltext = "30738-12.htm"
|
||||
if event == "30738-10.htm":
|
||||
if check_ingredients(st,1) :
|
||||
st.playSound("ItemSound.quest_finish")
|
||||
st.takeItems(ALCHEMY_TEXT,-1)
|
||||
st.takeItems(SECRET_BOOK,-1)
|
||||
st.takeItems(POTION_RECIPE_1,-1)
|
||||
st.takeItems(POTION_RECIPE_2,-1)
|
||||
st.takeItems(AMBER_SCALE,-1)
|
||||
st.takeItems(WIND_SOULSTONE,-1)
|
||||
st.takeItems(GLASS_EYE,-1)
|
||||
st.takeItems(HORROR_ECTOPLASM,-1)
|
||||
st.takeItems(SILENOS_HORN,-1)
|
||||
st.takeItems(ANT_SOLDIER_APHID,-1)
|
||||
st.takeItems(TYRANTS_CHITIN,-1)
|
||||
st.takeItems(BUGBEAR_BLOOD,-1)
|
||||
if not st.getQuestItemsCount(MATILDS_ORB) : st.giveItems(MATILDS_ORB,1)
|
||||
st.giveItems(WISH_POTION,1)
|
||||
st.set("cond","5")
|
||||
else :
|
||||
htmltext="You don't have required items"
|
||||
elif event == "30738-14.htm":
|
||||
# if you dropped or destroyed your wish potion, you are not able to see the wish list
|
||||
if st.getQuestItemsCount(WISH_POTION) :
|
||||
htmltext = "30738-15.htm"
|
||||
#### WISH I : Please make me into a loving person.
|
||||
elif event == "30738-16.htm":
|
||||
if st.getQuestItemsCount(WISH_POTION) :
|
||||
st.set("wish","1")
|
||||
st.startQuestTimer("matild_timer1",3000,npc)
|
||||
st.takeItems(WISH_POTION,1)
|
||||
npc.setBusy(True)
|
||||
else:
|
||||
htmltext = "30738-14.htm"
|
||||
#### WISH II : I want to become an extremely rich person. How about 100 million adena?!
|
||||
elif event == "30738-17.htm":
|
||||
if st.getQuestItemsCount(WISH_POTION) :
|
||||
st.set("wish","2")
|
||||
st.startQuestTimer("matild_timer1",3000,npc)
|
||||
st.takeItems(WISH_POTION,1)
|
||||
npc.setBusy(True)
|
||||
else:
|
||||
htmltext = "30738-14.htm"
|
||||
#### WISH III : I want to be a king in this world.
|
||||
elif event == "30738-18.htm":
|
||||
if st.getQuestItemsCount(WISH_POTION) :
|
||||
st.set("wish","3")
|
||||
st.startQuestTimer("matild_timer1",3000,npc)
|
||||
st.takeItems(WISH_POTION,1)
|
||||
npc.setBusy(True)
|
||||
else:
|
||||
htmltext = "30738-14.htm"
|
||||
#### WISH IV : I'd like to become the wisest person in the world.
|
||||
elif event == "30738-19.htm":
|
||||
if st.getQuestItemsCount(WISH_POTION) >= 1:
|
||||
st.set("wish","4")
|
||||
st.startQuestTimer("matild_timer1",3000,npc)
|
||||
st.takeItems(WISH_POTION,1)
|
||||
npc.setBusy(True)
|
||||
else:
|
||||
htmltext = "30738-14.htm"
|
||||
elif event == "matild_timer1":
|
||||
autochat(npc,"OK, everybody pray fervently!")
|
||||
st.startQuestTimer("matild_timer2",4000,npc)
|
||||
return
|
||||
elif event == "matild_timer2":
|
||||
autochat(npc,"Both hands to heaven, everybody yell together!")
|
||||
st.startQuestTimer("matild_timer3",4000,npc)
|
||||
return
|
||||
elif event == "matild_timer3":
|
||||
autochat(npc,"One! Two! May your dreams come true!")
|
||||
wish = st.getInt("wish")
|
||||
WISH_CHANCE = self.getRandom(100)
|
||||
if wish == 1 :
|
||||
if WISH_CHANCE <= 50:
|
||||
autochat(st.addSpawn(SUCCUBUS_OF_SEDUCTION,200000),MESSAGES[SUCCUBUS_OF_SEDUCTION][self.getRandom(len(MESSAGES))])
|
||||
autochat(st.addSpawn(SUCCUBUS_OF_SEDUCTION,200000),MESSAGES[SUCCUBUS_OF_SEDUCTION][self.getRandom(len(MESSAGES))])
|
||||
autochat(st.addSpawn(SUCCUBUS_OF_SEDUCTION,200000),MESSAGES[SUCCUBUS_OF_SEDUCTION][self.getRandom(len(MESSAGES))])
|
||||
else:
|
||||
autochat(st.addSpawn(RUPINA,120000),"Your love... love!")
|
||||
elif wish == 2 :
|
||||
if WISH_CHANCE <= 33 :
|
||||
autochat(st.addSpawn(GRIMA,200000),MESSAGES[GRIMA][self.getRandom(len(MESSAGES))])
|
||||
autochat(st.addSpawn(GRIMA,200000),MESSAGES[GRIMA][self.getRandom(len(MESSAGES))])
|
||||
autochat(st.addSpawn(GRIMA,200000),MESSAGES[GRIMA][self.getRandom(len(MESSAGES))])
|
||||
else :
|
||||
st.giveItems(ADENA,10000)
|
||||
elif wish == 3 :
|
||||
if WISH_CHANCE <= 33 :
|
||||
st.giveItems(CERTIFICATE_OF_ROYALTY,1)
|
||||
elif WISH_CHANCE >= 66 :
|
||||
st.giveItems(ANCIENT_CROWN,1)
|
||||
else:
|
||||
spawnedNpc=st.addSpawn(SANCHES,player,True,0)
|
||||
autochat(spawnedNpc,"Who dares to call the dark Monarch?!")
|
||||
st.startQuestTimer("sanches_timer1",200000,spawnedNpc)
|
||||
elif wish == 4 :
|
||||
if WISH_CHANCE <= 33:
|
||||
st.giveItems(R1[self.getRandom(len(R1))],1)
|
||||
st.giveItems(R2[self.getRandom(len(R2))],1)
|
||||
st.giveItems(R3[self.getRandom(len(R3))],1)
|
||||
if not self.getRandom(3):
|
||||
st.giveItems(HEART_OF_PAAGRIO,1)
|
||||
else:
|
||||
autochat(st.addSpawn(WISDOM_CHEST,120000),"I contain the wisdom, I am the wisdom box!")
|
||||
npc.setBusy(False)
|
||||
return
|
||||
elif event == "sanches_timer1" :
|
||||
autochat(npc,"Hehehe, i'm just wasting my time here!")
|
||||
npc.deleteMe()
|
||||
return
|
||||
elif event == "bonaparterius_timer1" :
|
||||
autochat(npc,"A worth opponent would be a good thing")
|
||||
npc.deleteMe()
|
||||
elif event == "ramsebalius_timer1" :
|
||||
autochat(npc,"Your time is up!")
|
||||
npc.deleteMe()
|
||||
return
|
||||
elif event == "greatdemon_timer1" :
|
||||
autochat(npc,"Do not interrupt my eternal rest again!")
|
||||
npc.deleteMe()
|
||||
return
|
||||
return htmltext
|
||||
|
||||
def onTalk (self,npc,player):
|
||||
htmltext = Quest.getNoQuestMsg(player)
|
||||
st = self.getQuestState(player, True)
|
||||
if not st : return htmltext
|
||||
npcId = npc.getId()
|
||||
cond = st.getInt("cond")
|
||||
id = st.getState()
|
||||
if npcId != ALCHEMIST_MATILD and id == State.CREATED : return htmltext
|
||||
if npcId == TORAI and st.getQuestItemsCount(FORBIDDEN_LOVE_SCROLL) :
|
||||
st.takeItems(FORBIDDEN_LOVE_SCROLL,1)
|
||||
st.giveItems(ADENA,500000)
|
||||
htmltext = "30557-01.htm"
|
||||
elif npcId == WISDOM_CHEST :
|
||||
st.giveItems(R1[self.getRandom(len(R1))],1)
|
||||
st.giveItems(R2[self.getRandom(len(R2))],1)
|
||||
st.giveItems(R3[self.getRandom(len(R3))],1)
|
||||
if not self.getRandom(3):
|
||||
st.giveItems(HEART_OF_PAAGRIO,1)
|
||||
st.giveItems(4409,1)
|
||||
st.giveItems(4408,1)
|
||||
htmltext = "30743-0"+str(self.getRandom(6)+1)+".htm"
|
||||
npc.deleteMe()
|
||||
elif npcId == RUPINA:
|
||||
if self.getRandom(100) <= 4:
|
||||
st.giveItems(NECKLACE_OF_GRACE,1)
|
||||
htmltext = "30742-01.htm"
|
||||
else:
|
||||
st.giveItems(R4[self.getRandom(len(R4))],1)
|
||||
htmltext = "30742-02.htm"
|
||||
npc.decayMe()
|
||||
elif npcId == ALCHEMIST_MATILD:
|
||||
if npc.isBusy() :
|
||||
htmltext = "30738-20.htm"
|
||||
elif player.getLevel() <= 29 :
|
||||
htmltext = "30738-21.htm"
|
||||
st.exitQuest(1)
|
||||
elif cond == 5 and st.getQuestItemsCount(MATILDS_ORB) :
|
||||
htmltext = "30738-11.htm"
|
||||
elif cond == 4 and check_ingredients(st,1):
|
||||
htmltext = "30738-08.htm"
|
||||
elif cond == 3 and not check_ingredients(st,1):
|
||||
htmltext = "30738-07.htm"
|
||||
elif cond == 2 or (st.getQuestItemsCount(ALCHEMY_TEXT) and st.getQuestItemsCount(SECRET_BOOK)) :
|
||||
htmltext = "30738-05.htm"
|
||||
elif cond == 1 or (st.getQuestItemsCount(ALCHEMY_TEXT) and not st.getQuestItemsCount(SECRET_BOOK)) :
|
||||
htmltext = "30738-04.htm"
|
||||
else:
|
||||
htmltext = "30738-01.htm"
|
||||
return htmltext
|
||||
|
||||
def onKill(self,npc,player,isPet):
|
||||
st = self.getQuestState(player, False)
|
||||
if not st : return
|
||||
id = st.getState()
|
||||
if id == State.CREATED: return
|
||||
if id != State.STARTED: st.setState(State.STARTED)
|
||||
npcId = npc.getId()
|
||||
cond = st.getInt("cond")
|
||||
if npcId == SECRET_KEEPER_TREE and cond == 1 and not st.getQuestItemsCount(SECRET_BOOK):
|
||||
st.set("cond","2")
|
||||
st.giveItems(SECRET_BOOK,1)
|
||||
st.playSound("ItemSound.quest_itemget")
|
||||
elif npcId in DROPLIST.keys() and cond == 3 :
|
||||
item,chance=DROPLIST[npcId]
|
||||
if self.getRandom(100) <= chance and not st.getQuestItemsCount(item) :
|
||||
st.giveItems(item,1)
|
||||
if check_ingredients(st,1):
|
||||
st.playSound("ItemSound.quest_middle")
|
||||
st.set("cond","4")
|
||||
else: st.playSound("ItemSound.quest_itemget")
|
||||
else:
|
||||
if npcId == SUCCUBUS_OF_SEDUCTION:
|
||||
if self.getRandom(100) <= 3 :
|
||||
st.playSound("ItemSound.quest_itemget")
|
||||
st.giveItems(FORBIDDEN_LOVE_SCROLL,1)
|
||||
elif npcId == GRIMA:
|
||||
if self.getRandom(100) < 4 :
|
||||
st.playSound("ItemSound.quest_itemget")
|
||||
if self.getRandom(1000) == 0 :
|
||||
st.giveItems(ADENA,100000000)
|
||||
else:
|
||||
st.giveItems(ADENA,900000)
|
||||
elif npcId == SANCHES :
|
||||
try :
|
||||
if st.getQuestTimer("sanches_timer1") :
|
||||
st.getQuestTimer("sanches_timer1").cancel()
|
||||
if self.getRandom(100) <= 50 :
|
||||
autochat(npc,"It's time to come out my Remless... Bonaparterius!")
|
||||
spawnedNpc=st.addSpawn(BONAPARTERIUS,npc,True,0)
|
||||
autochat(spawnedNpc,"I am the Great Emperor's son!")
|
||||
st.startQuestTimer("bonaparterius_timer1",600000,spawnedNpc)
|
||||
else :
|
||||
st.giveItems(R4[self.getRandom(len(R4))],1)
|
||||
except : pass
|
||||
elif npcId == BONAPARTERIUS:
|
||||
try :
|
||||
if st.getQuestTimer("bonaparterius_timer1") :
|
||||
st.getQuestTimer("bonaparterius_timer1").cancel()
|
||||
autochat(npc,"Only Ramsebalius would be able to avenge me!")
|
||||
if self.getRandom(100) <= 50 :
|
||||
spawnedNpc=st.addSpawn(RAMSEBALIUS,npc,True,0)
|
||||
autochat(spawnedNpc,"Meet the absolute ruler!")
|
||||
st.startQuestTimer("ramsebalius_timer1",600000,spawnedNpc)
|
||||
else :
|
||||
st.giveItems(R4[self.getRandom(len(R4))],1)
|
||||
except : pass
|
||||
elif npcId == RAMSEBALIUS:
|
||||
try :
|
||||
if st.getQuestTimer("ramsebalius_timer1") :
|
||||
st.getQuestTimer("ramsebalius_timer1").cancel()
|
||||
autochat(npc,"You evil piece of...")
|
||||
if self.getRandom(100) <= 50 :
|
||||
spawnedNpc=st.addSpawn(GREAT_DEMON_KING,npc,True,0)
|
||||
autochat(spawnedNpc,"Who dares to kill my fiendly minion?!")
|
||||
st.startQuestTimer("greatdemon_timer1",600000,spawnedNpc)
|
||||
else :
|
||||
st.giveItems(R4[self.getRandom(len(R4))],1)
|
||||
except: pass
|
||||
elif npcId == GREAT_DEMON_KING:
|
||||
try :
|
||||
if st.getQuestTimer("greatdemon_timer1") :
|
||||
st.getQuestTimer("greatdemon_timer1").cancel()
|
||||
st.giveItems(ADENA,1412965)
|
||||
st.playSound("ItemSound.quest_itemget")
|
||||
except: pass
|
||||
return
|
||||
|
||||
QUEST = Quest(334, qn, "The Wishing Potion")
|
||||
QUEST.addStartNpc(ALCHEMIST_MATILD)
|
||||
QUEST.addTalkId([ALCHEMIST_MATILD, TORAI, RUPINA, WISDOM_CHEST])
|
||||
QUEST.addKillId(DROPLIST.keys())
|
||||
QUEST.addKillId([SECRET_KEEPER_TREE, SUCCUBUS_OF_SEDUCTION, GRIMA, SANCHES, RAMSEBALIUS, BONAPARTERIUS, GREAT_DEMON_KING])
|
||||
1
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/no_quest.htm
vendored
Normal file
1
trunk/dist/game/data/scripts/quests/334_TheWishingPotion/no_quest.htm
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<html><body>Conditions are not right to make this quest available.</body></html>
|
||||
Reference in New Issue
Block a user