最终整理版
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
extends NpcScript
|
||||
|
||||
#
|
||||
func OnStart():
|
||||
match GetQuest(ProgressCommons.Quest.SPLATYNA_OFFERING):
|
||||
ProgressCommons.SPLATYNA_OFFERING.INACTIVE: Inactive()
|
||||
ProgressCommons.SPLATYNA_OFFERING.STARTED: OnRecap()
|
||||
_: OnFinish()
|
||||
|
||||
func Inactive():
|
||||
Mes("Praise Splatyna, the mighty slime goddess!")
|
||||
Mes("You, traveler! Do you come to offer gold to our great lady?")
|
||||
InfoChoice()
|
||||
|
||||
func InfoChoice(previousText : int = -1):
|
||||
var questState : int = GetQuest(ProgressCommons.Quest.SPLATYNA_OFFERING)
|
||||
if previousText != 0:
|
||||
if questState == ProgressCommons.SPLATYNA_OFFERING.INACTIVE:
|
||||
Choice("Sure, I'll bring her the offering.", OnAcceptQuest)
|
||||
else:
|
||||
Choice("What should I do?", OnRecap)
|
||||
if previousText != 1:
|
||||
Choice("This is nonsense, I’m leaving.", OnDecline)
|
||||
if previousText != 2:
|
||||
Choice("Who is Splatyna?", OnAskAboutSplatyna)
|
||||
if previousText != 3:
|
||||
Choice("What is this place?", OnAskAboutPlace)
|
||||
|
||||
func OnRecap():
|
||||
Mes("You still haven’t offered the gold to Splatyna?")
|
||||
Mes("Go into her cave, find her followers, and give her the gold! The three loyal ones hold the keys, remember that!")
|
||||
InfoChoice(0)
|
||||
|
||||
func OnFinish():
|
||||
Mes("Wait... I heard something. A scream!")
|
||||
Mes("Did something happen to Splatyna?! What have you done?")
|
||||
|
||||
Choice("Nothing! Everything’s fine...", OnDeny)
|
||||
Choice("She’s... Gone.", OnAdmit)
|
||||
|
||||
func OnDeny():
|
||||
Mes("Good, good! As long as Splatyna still watches over us.")
|
||||
|
||||
func OnAdmit():
|
||||
Mes("Gone?! No, no! You’re lying! Splatyna can’t die!")
|
||||
Mes("Just... Go, before I lose my mind!")
|
||||
|
||||
func OnAskAboutSplatyna():
|
||||
Mes("Oh, Splatyna... She's not like the other slimes, no no. She's powerful! She's been blessed by Kaore!")
|
||||
Mes("She doesn't need food or water like the rest of us. Kaore keeps her alive! She’s stronger and wiser than us poor souls!")
|
||||
Mes("And the gold! Yes, she loves it. She says it keeps her safe, makes her strong! We give her gold, and she protects us, keeps the decay away!")
|
||||
Mes("But don't anger her, no! She can make you crazy with just a look! Her magic... It's powerful, twisted by Kaore. She's... perfect.")
|
||||
InfoChoice(2)
|
||||
|
||||
func OnAskAboutPlace():
|
||||
Mes("This is Splatyna's sacred cave! Only those who respect her can enter, yes, yes!")
|
||||
Mes("The slimes here, they're not normal. They're loyal to Splatyna, her closest followers. They guard her treasures, her power!")
|
||||
Mes("Three of them are special, real loyal ones. They have the keys to her chamber, but they won't just hand them over, no no! You'll have to earn them!")
|
||||
Mes("But don't worry. If you bring enough gold, maybe Splatyna will let you through...")
|
||||
InfoChoice(3)
|
||||
|
||||
func OnAcceptQuest():
|
||||
Mes("Very well, take this gold and offer it to Splatyna. She will judge your worth.")
|
||||
SetQuest(ProgressCommons.Quest.SPLATYNA_OFFERING, ProgressCommons.SPLATYNA_OFFERING.STARTED)
|
||||
Farewell()
|
||||
|
||||
func OnDecline():
|
||||
Chat("Blasphemy! You dare refuse Splatyna’s offering?!")
|
||||
@@ -0,0 +1,35 @@
|
||||
extends NpcScript
|
||||
|
||||
# Reward items
|
||||
var appleID : int = DB.GetCellHash("Apple")
|
||||
|
||||
# Required items
|
||||
var dorianKeyID : int = DB.GetCellHash("Dorian's Key")
|
||||
var gabrielKeyID : int = DB.GetCellHash("Gabriel's Key")
|
||||
var marvinKeyID : int = DB.GetCellHash("Marvin's Key")
|
||||
|
||||
#
|
||||
func OnStart():
|
||||
match GetQuest(ProgressCommons.Quest.SPLATYNA_OFFERING):
|
||||
ProgressCommons.SPLATYNA_OFFERING.INACTIVE: Inactive()
|
||||
ProgressCommons.SPLATYNA_OFFERING.STARTED: TryOpen()
|
||||
_: Empty()
|
||||
|
||||
func Inactive():
|
||||
Chat("This chest seems to be sealed.")
|
||||
|
||||
func TryOpen():
|
||||
if IsMonsterAlive("Splatyna"):
|
||||
Chat("A dark presence is still around.")
|
||||
else:
|
||||
# Chest is not open, try to open it
|
||||
if not IsTriggering():
|
||||
Trigger()
|
||||
|
||||
# Chest is opened, you can withdraw your reward
|
||||
if HasSpace(1):
|
||||
SetQuest(ProgressCommons.Quest.SPLATYNA_OFFERING, ProgressCommons.SPLATYNA_OFFERING.REWARDS_WITHDREW)
|
||||
AddItem(appleID, 5)
|
||||
|
||||
func Empty():
|
||||
Chat("This chest is empty.")
|
||||
@@ -0,0 +1,38 @@
|
||||
extends NpcScript
|
||||
|
||||
# Required items
|
||||
var dorianKeyID : int = DB.GetCellHash("Dorian's Key")
|
||||
var gabrielKeyID : int = DB.GetCellHash("Gabriel's Key")
|
||||
var marvinKeyID : int = DB.GetCellHash("Marvin's Key")
|
||||
|
||||
var mapID : int = "Splatyna's Chamber".hash()
|
||||
const mapPosition : Vector2 = Vector2(1500, 2190)
|
||||
|
||||
#
|
||||
func OnStart():
|
||||
match GetQuest(ProgressCommons.Quest.SPLATYNA_OFFERING):
|
||||
ProgressCommons.SPLATYNA_OFFERING.INACTIVE: Inactive()
|
||||
_: AskChoice()
|
||||
|
||||
func AskChoice():
|
||||
if HasItem(dorianKeyID) and HasItem(gabrielKeyID) and HasItem(marvinKeyID):
|
||||
Mes("You notice three different key locks, what would you like to do?")
|
||||
Choice("Open them", TryOpen)
|
||||
Choice("Leave")
|
||||
else:
|
||||
Chat("You need three different keys to unlock this passage.")
|
||||
|
||||
func TryOpen():
|
||||
# Check and remove items to open the chest
|
||||
if GetQuest(ProgressCommons.Quest.SPLATYNA_OFFERING) != ProgressCommons.SPLATYNA_OFFERING.INACTIVE:
|
||||
if HasItem(dorianKeyID) and HasItem(gabrielKeyID) and HasItem(marvinKeyID):
|
||||
RemoveItem(dorianKeyID)
|
||||
RemoveItem(gabrielKeyID)
|
||||
RemoveItem(marvinKeyID)
|
||||
Warp(mapID, mapPosition)
|
||||
Close()
|
||||
else:
|
||||
Chat("You need three different keys to unlock this passage.")
|
||||
|
||||
func Inactive():
|
||||
Chat("Three locks are blocking this passage.")
|
||||
Reference in New Issue
Block a user