This commit is contained in:
mobius
2015-01-01 20:02:50 +00:00
parent eeae660458
commit a6a3718849
17894 changed files with 2818932 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
<html><body>Wilbert:<br>
Come to play again if you wish! Hope you enjoyed well, traveler.
</body></html>

View File

@@ -0,0 +1,10 @@
<html><body>Wilbert:<br>
To play you need 50 <font color="LEVEL">Spirit Beads</font>.
Each round you pull a card, and I'll tell you if you win or lost. It's very simple!
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_WhatIsASpiritBead.htm">What is a Spirit Bead?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_WhatPrizes.htm">What do you get for winning the game?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_IWantToPractice.htm">I want to practice. (Need 1 Spirit Bead)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_LetsPlay.htm">Let's play! (Need 50 Spirit Beads)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,22 @@
<html><body>Wilbert:<br>
All right! If that's what you want, I'll let you join in.<br>
<br>
You can't be ready for the game already, can you? You're
not thinking of joining in without bringing anything to the
table, are you? You have to go get one item if you want
to enjoy a game with us. It's not so hard to find, but we
need to have <font color="LEVEL">Spirit Beads</font> to make weapons. I'll give you
the details another time, but for now, go to <font color="LEVEL">Aden
Cemetery, the Ancient Battleground</font> and the <font color="LEVEL">Fields of
Massacre</font> and get some <font color="LEVEL">Spirit Beads</font> from the undead and
the demons.<br>
<br>
Did I explain enough?
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_WhatIsASpiritBead.htm">What is a Spirit Bead?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_HowDouYouPlayTheGame.htm">How do you play the game called War between the Sun and the Moon?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_WhatPrizes.htm">What do you get for winning the game?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_IWantToPractice.htm">I want to practice. (Need 1 Spirit Bead)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_LetsPlay.htm">Let's play! (Need 50 Spirit Beads)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Wilbert:<br>
Now you can test your luck. You must have 1 <font color="LEVEL">Spirit Bead</font> for that.<br>
Will you try?<br>
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_Practice.htm">Try luck!</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_QuestInProgress.htm">Return.</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_LetsPlay.htm">Let's play! (Need 50 Spirit Beads)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Wilbert:<br>
Sorry, you're not lucky today. Bring me more
<font color="LEVEL">50 Spirit Beads</font> and you can try again.<br>
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_QuestInProgress.htm">Return.</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_LetsPlay.htm">Let's play again! (Need 50 Spirit Beads)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Wilbert:<br>
Now you can test your luck in real game. You must have
50 <font color="LEVEL">Spirit Beads</font> for that.<br>
Will you try your luck and pull your first card?<br>
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_PullCard.htm">Pull 1st card!</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_QuestInProgress.htm">Return.</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Cancel quest.</a>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Wilbert:<br>
You won round NROUND!<br>
You can stop game now and take your prize:<br>
<font color="LEVEL">MYPRIZE</font><br>
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_PullCard.htm">Pull next card!</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_TakePrize.htm">No, enough for me, end game and take my prize.</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Wilbert:<br>
Congratulations! You won round 8!<br>
Game ends now and you get your prize:<br>
<font color="LEVEL">2,384,000 adena, 1 A-grade Enchant Weapon Scroll, 2 A-grade Enchat Armor Scrolls</font><br>
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_QuestInProgress.htm">Return.</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Wilbert:<br>
Sorry, you're not lucky today. Will you try again?<br>
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_Practice.htm">Try luck again!</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_QuestInProgress.htm">Return.</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_LetsPlay.htm">Let's play! (Need 50 Spirit Beads)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Wilbert:<br>
Good luck! You won!!! Will you try again?<br>
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_Practice.htm">Try luck again!</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_QuestInProgress.htm">Return.</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_LetsPlay.htm">Let's play! (Need 50 Spirit Beads)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Wilbert:<br>
You have not enough <font color="LEVEL">Spirit Beads</font> to do that!
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_QuestInProgress.htm">Return.</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,12 @@
<html><body>Wilbert:<br>
Take your prize, lucker!
<br>
Do you want to play again?
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_WhatIsASpiritBead.htm">What is a Spirit Bead?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_HowDouYouPlayTheGame.htm">How do you play the game called War between the Sun and the Moon?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_WhatPrizes.htm">What do you get for winning the game?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_IWantToPractice.htm">I want to practice. (Need 1 Spirit Bead)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_LetsPlay.htm">Let's play! (Need 50 Spirit Beads)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,15 @@
<html><body>Wilbert:<br>
Did you bring me some <font color="LEVEL">Spirit Beads</font>?
You may get them by hunting undead monsters and demons in <font color="LEVEL">Aden
Cemetery, the Ancient Battleground</font> and the <font color="LEVEL">Fields of
Massacre</font>.
<br>
Did I explain enough?
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_WhatIsASpiritBead.htm">What is a Spirit Bead?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_HowDouYouPlayTheGame.htm">How do you play the game called War between the Sun and the Moon?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_WhatPrizes.htm">What do you get for winning the game?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_IWantToPractice.htm">I want to practice. (Need 1 Spirit Bead)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_LetsPlay.htm">Let's play! (Need 50 Spirit Beads)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,32 @@
<html><body>Wilbert:<br>
When a being's thought or spirit energy comes together
into the shape of a bead, we call that a Spirit Bead.
Artisans like me need them to make good weapons. That's
why we gamble with them -- as they're worth a lot to us.
In this area, the say that you can easily get Spirit Beads
if you go to <font color="LEVEL">Aden Cemetery, The Ancient Battlegrounds</font>
and <font color="LEVEL">the Fields of Massacre</font>.<br>
<br>
First, at <font color="LEVEL">The Cemetery</font>, you can obtain <font color="LEVEL">Spirit Beads</font>
from undead creatures known as the <font color="LEVEL">Spiteful Ghost of Ruins, Soldier of Grief,
Cruel Punisher, Roving Soul, Tortured Undead</font> and <font color="LEVEL">Wasted Soul</font>.<br>
<br>
Second, at <font color="LEVEL">the Ancient Battlegrounds</font>, you can obtain <font color="LEVEL">Spirit Beads</font>
from undead creatures known as <font color="LEVEL">Past Knight,
Ghostly Warrior, Hungered Corpse, the Dark Guard,
Death Agent</font> and <font color="LEVEL">Nihil Invader</font> and form the demons
known as <font color="LEVEL">Bloody Lord, Bloody Priest, Bloody Knight</font> and
<font color="LEVEL">Bloody Ghost</font>.<br>
Lastly, at the <font color="LEVEL">Fileds of Massacre</font>, you can obtain <font color="LEVEL">Spirit Beads</font>
from undead creatures known as <font color="LEVEL">Doom Scout, Doom Servant, Doom Guard,
Doom Archer, Doom Trooper, Doom Warrior, Doom Knight, Wretched Archer,
Spiteful Soul Leader, Spiteful Soul Wizard</font> and <font color="LEVEL">Spiteful Soul Fighter</font>.<br>
<br>
I think that's enough information for you to get started. Is there anything else you'd like to know?<br>
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_HowDouYouPlayTheGame.htm">How do you play the game called War between the Sun and the Moon?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_WhatPrizes.htm">What do you get for winning the game?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_IWantToPractice.htm">I want to practice. (Need 1 Spirit Bead)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_LetsPlay.htm">Let's play!. (Need 50 Spirit Beads)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,28 @@
<html><body>Wilbert:<br>
If you win the game, the master running it owes you the
appropriate amount. The higher the round, the bigger the
payout. That's why the game anly allows you to win up to
8 round in a row. If -- and that's a big if -- you manage
to win 8 straight times, the game will end.<br>
<br>
Keep in mind that <font color="LEVEL">if you lose any of the rounds,
you get nothing</font>. That's fair warning, my friend. Here's how the
prize system works:<br>
<br>
1 winning round: 40,000 adena<br>
2 winning rounds: 80,000 adena<br>
3 winning rounds: 110,000 adena, D-grade Enchant Weapon Scroll<br>
4 winning rounds: 199,000 adena, C-grade Enchant Weapon Scroll<br>
5 winning rounds: 388,000 adena, 1 recipe for a B-grade weapon<br>
6 winning rounds: 675,000 adena, 1 essential ingredient for a B-grade weapon<br>
7 winning rounds: 1,284,000 adena, 2 B-grade Enchant Weapon Scrolls, 2 B-grade Enchat Armor Scrolls<br>
8 winning rounds: 2,384,000 adena, 1 A-grade Enchant Weapon Scroll, 2 A-grade Enchat Armor Scrolls<br>
<br>
My advice is to identify what you'd like to win and then to play for that prize. Any questions?<br>
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_WhatIsASpiritBead.htm">What is a Spirit Bead?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_HowDouYouPlayTheGame.htm">How do you play the game called War between the Sun and the Moon?</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_IWantToPractice.htm">I want to practice. (Need 1 Spirit Bead)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_LetsPlay.htm">Let's play! (Need 50 Spirit Beads)</a><br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_ExitQuest.htm">Exit quest.</a>
</body></html>

View File

@@ -0,0 +1,10 @@
<html><body>Wilbert:<br>
From time to time, we enjoy a duel game called
<font color="LEVEL">The Battle of Sun and Moon</font>. It's pretty popular in
these parts, in case you haven't heard of it. I've found it a great way to pass
the time when you're between jobs. Just say the word and I'll teach you everything
you need to know.<br>
What do you say?<br>
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_IWantToPlay.htm">I'd like to play.</a>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Wilbert:<br>
Hey, you, traveler! Come over here, my friend.<br>
You look a little bored. Not sure how what to do with yourself?<br>
How about we play a little game that's pretty popular in these parts? I think you'll enjoy it.<br>
<br>
<a action="bypass -h Quest 663_SeductiveWhispers Wilbert_game_desc.htm">What's the game?</a>
</body></html>

View File

@@ -0,0 +1,192 @@
# by minlexx
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 import Quest as JQuest
qn = "663_SeductiveWhispers"
# Npc
WILBERT = 30846
MOBS = [20674, 20678, 20954, 20955, 20956, 20957, 20958, 20959, 20960, 20961, 20962, 20974, 20975, 20976, 20996, 20997, 20998, 20999, 21001, 21002, 21006, 21007, 21008, 21009, 21010]
# Quest Item
SPIRIT_BEAD = 8766
# Drop chance, win chance need check for correct values
DROP_CHANCE = 80
WIN_ROUND_CHANCE = 66
# Reward items
ADENA = 57
EWA = 729 # Scroll: Enchant Weapon A
EAA = 730 # Scroll: Enchant Armor A
EWB = 947 # Scroll: Enchant Weapon B
EAB = 948 # Scroll: Enchant Armor B
EWC = 951 # Scroll: Enchant Weapon C
EWD = 955 # Scroll: Enchant Weapon D
# ====== Rewards - B grade 60% weapon recipes & keymats =========
# These are just most popular B weapons, need retail check here
# Blunts: Art of Battle Axe, Staff of Evil Spirits (2)
# Bows: Bow of Peril (1)
# Daggers: Demon Dagger, Kris (2)
# Fists: Bellion Cestus (1)
# Polearms: Lance (1)
# Swords: Great Sword, Keshanberk, Sword of Valhalla (3)
# ====== Total: 10; In that order they come in a set below: ======
B_RECIPES = [4963, 4966, 4967, 4968, 5001, 5003, 5004, 5005, 5006, 5007]
B_KEYMATS = [4101, 4107, 4108, 4109, 4115, 4117, 4118, 4119, 4120, 4121]
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = []
def onEvent (self,event,st) :
htmltext = event
if event == "Wilbert_IWantToPlay.htm": # quest accepted
st.setState(State.STARTED)
st.playSound("ItemSound.quest_accept")
st.set("cond","1")
st.set("round","0")
elif event == "Wilbert_ExitQuest.htm": # quest finished
st.playSound("ItemSound.quest_finish")
st.exitQuest(1)
elif event == "Wilbert_IWantToPractice.htm": # practice start dialog
beads=st.getQuestItemsCount(SPIRIT_BEAD)
if beads<1:
htmltext = "Wilbert_Practice_NotEnoughBeads.htm"
elif event == "Wilbert_Practice.htm": # "try luck" pressed (Practice)
beads=st.getQuestItemsCount(SPIRIT_BEAD) # get beads count, it must be > 1
if beads<1:
htmltext = "Wilbert_Practice_NotEnoughBeads.htm"
else:
st.takeItems(SPIRIT_BEAD,1) # take one bead as payment for luck test
random=self.getRandom(100)
if random<WIN_ROUND_CHANCE: # random value is in range [0..WIN_ROUND_CHANCE]
htmltext = "Wilbert_PracticeWon.htm"
else: # lose practice :(
htmltext = "Wilbert_PracticeLost.htm"
elif event == "Wilbert_LetsPlay.htm": # "Let's play" pressed
beads=st.getQuestItemsCount(SPIRIT_BEAD)
if beads<50:
htmltext = "Wilbert_Practice_NotEnoughBeads.htm"
else:
htmltext = "Wilbert_PlayRound1.htm"
st.set("round","0")
elif event == "Wilbert_PullCard.htm": # "Pull first or next card" pressed
round=st.getInt("round")
beads=st.getQuestItemsCount(SPIRIT_BEAD)
if beads<50 and round == 0: # check for 50 beads when game just starts only (round=0)
htmltext = "Wilbert_Practice_NotEnoughBeads.htm"
else:
if round == 0: # take 50 beads when game just starts only (round=0)
st.takeItems(SPIRIT_BEAD,50)
random=self.getRandom(100)
if random>WIN_ROUND_CHANCE: # random value is in range [WIN_ROUND_CHANCE..100]
htmltext = "Wilbert_PlayLose.htm"
st.set("round","0") # restart game
else: # next round won
round = round + 1
htmltext = st.showHtmlFile("Wilbert_PlayWin.htm").replace("NROUND", str(round))
if round == 1:
htmltext = htmltext.replace("MYPRIZE","40,000 adena")
if round == 2:
htmltext = htmltext.replace("MYPRIZE","80,000 adena")
if round == 3:
htmltext = htmltext.replace("MYPRIZE","110,000 adena, D-grade Enchant Weapon Scroll")
if round == 4:
htmltext = htmltext.replace("MYPRIZE","199,000 adena, C-grade Enchant Weapon Scroll")
if round == 5:
htmltext = htmltext.replace("MYPRIZE","388,000 adena, 1 recipe for a B-grade weapon")
if round == 6:
htmltext = htmltext.replace("MYPRIZE","675,000 adena, 1 essential ingredient for a B-grade weapon")
if round == 7:
htmltext = htmltext.replace("MYPRIZE","1,284,000 adena, 2 B-grade Enchant Weapon Scrolls, 2 B-grade Enchat Armor Scrolls")
if round == 8: # reached round 8; give prizes and restart game
round = 0
st.giveItems(ADENA,2384000)
st.giveItems(EWA,1) # Scroll: Enchant Weapon A
st.giveItems(EAA,2) # Scroll: Enchant Armor A
htmltext = "Wilbert_PlayWonRound8.htm"
st.set("round",str(round))
elif event == "Wilbert_TakePrize.htm": # player won round and wants to stop game and take prize
round=st.getInt("round")
if round == 0: # player did not win any round but wants to take prize? O_o
htmltext = "<html><body>You did not win any round! No prizes.</body></html>"
return htmltext
if round > 8: # some bug or hack?
st.set("round","0")
htmltext = "<html><body>Round cannot be > 8 !!!</body></html>"
return htmltext
st.set("round","0") # first set round to 0 - game ended.
htmltext = "Wilbert_PrizeTaken.htm"
# give prize depending on current round won
if round == 1:
st.giveItems(ADENA,40000)
elif round == 2:
st.giveItems(ADENA,80000)
elif round == 3:
st.giveItems(ADENA,110000)
st.giveItems(EWD,1) # Scroll: Enchant Weapon D
elif round == 4:
st.giveItems(ADENA,199000)
st.giveItems(EWC,1) # Scroll: Enchant Weapon C
elif round == 5:
st.giveItems(ADENA,388000)
# 60% B-weap. rec number is random
st.giveItems(B_RECIPES[self.getRandom(len(B_RECIPES))], 1)
elif round == 6:
st.giveItems(ADENA,675000)
# B-weap. key number is random
st.giveItems(B_KEYMATS[self.getRandom(len(B_KEYMATS))], 1)
elif round == 7:
st.giveItems(ADENA,1284000)
st.giveItems(EWB,2) # Scroll: Enchant Weapon B
st.giveItems(EAB,2) # Scroll: Enchant Armor B
# for round 8 prize is automatically when player wins 8 round
return htmltext
def onTalk (self,npc,player):
st = self.getQuestState(player, True)
htmltext = Quest.getNoQuestMsg(player)
if not st : return htmltext
npcId = npc.getId()
id = st.getState()
# first talk to Wilbert
if npcId == WILBERT and id == State.CREATED:
if player.getLevel() >= 50 : # check player level
htmltext = "Wilbert_start.htm"
else:
htmltext = "<html><body>This quest is for characters above level 50 only.</body></html>"
st.exitQuest(1)
# talk to Wilbert when quest already in progress
elif npcId == WILBERT and id == State.STARTED :
htmltext = "Wilbert_QuestInProgress.htm"
return htmltext
def onKill(self,npc,player,isPet):
st = self.getQuestState(player, False)
if not st : return
if st.getState() != State.STARTED : return
npcId = npc.getId()
if npcId in MOBS:
numItems, chance = divmod(DROP_CHANCE*Config.RATE_QUEST_DROP,100)
if self.getRandom(100) < chance :
numItems += 1
if numItems:
st.giveItems(SPIRIT_BEAD,int(numItems))
st.playSound("ItemSound.quest_itemget")
return
QUEST = Quest(663,qn,"Seductive Whispers")
QUEST.addStartNpc(WILBERT)
QUEST.addTalkId(WILBERT)
for mobId in MOBS:
QUEST.addKillId(mobId)