Gabz.gd 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. extends NpcScript
  2. # Requirements
  3. var tributeItemID : int = DB.GetCellHash("Apple")
  4. const tributeItemCount : int = 5
  5. const playerLevelRequirement : int = 1
  6. #
  7. func OnStart():
  8. if IsTriggering():
  9. Chat("Focus on your mission!")
  10. else:
  11. Mes("Ah, another challenger! This cave is a proving ground, where the waves of corrupted creatures test your endurance. Think you're ready for what's inside?")
  12. QuestionStart()
  13. func QuestionStart():
  14. Choice("I'm ready. Bring on the waves.", StartFight)
  15. Choice("I need to go. This feels wrong.", Farewell)
  16. Choice("What's this place? It feels strange.", ExplainCave)
  17. Choice("Waves of monsters? Why are they coming?", ExplainWaves)
  18. func ExplainCave():
  19. Mes("Ah, this cave? It's... Alive, in a way. You feel it too, don't you?")
  20. Mes("It breathes Kaore, the corrupted Mana. Everything here was once... More alive. But now it's just hungry, like me.")
  21. QuestionsCave()
  22. func QuestionsCave():
  23. Choice("No more questions.", QuestionStart)
  24. Choice("Who are you? You seem off.", ExplainNpc)
  25. Choice("What exactly happened to you?", ExplainNpcCorruption)
  26. Choice("Why is the cave like this?", ExplainCaveOrigin)
  27. func ExplainWaves():
  28. Mes("Waves... Yes, waves of those lost to Kaore. They are drawn here, hungry for more of the decaying Mana.")
  29. Mes("You will fight them, over and over. But beware... With each wave, the cave itself grows more restless. You might not make it to the end.")
  30. QuestionsWaves()
  31. func QuestionsWaves():
  32. Choice("No more questions.", QuestionStart)
  33. Choice("What happens if I fail?", ExplainFailure)
  34. Choice("Is there no way to cleanse the corruption?", ExplainCorruption)
  35. Choice("Why does Kaore make things this way?", ExplainKaore)
  36. func ExplainNpc():
  37. Mes("Me? Oh, just a fellow survivor... Or maybe a guide? I can't tell anymore.")
  38. Mes("I've spent too long near the Kaore. It's in my blood, in my thoughts... But it's okay. I think?")
  39. Mes("But never mind me. You're here to fight, aren't you?")
  40. QuestionsCave()
  41. func ExplainNpcCorruption():
  42. Mes("Oh, it started small... Whispers in the back of my mind, a strange craving for... Something.")
  43. Mes("But now? I don't remember what I was before. Maybe it's better this way.")
  44. Mes("You don't want this. But here we are.")
  45. QuestionsCave()
  46. func ExplainCaveOrigin():
  47. Mes("This cave was once a Mana wellspring, a place of life and power.")
  48. Mes("But after the Aethyra War, the Mana decayed into Kaore. Now it’s nothing more than a trap for those who wander too close.")
  49. Mes("But don't worry. You'll either win... Or join the rest of us.")
  50. QuestionsCave()
  51. func ExplainFailure():
  52. Mes("Even if you fall in battle, you need not fear. The Zielite Amulet you carry is more powerful than you may know.")
  53. Mes("When you perish, your Zielite Amulet will pull your soul to the nearest Soul Menhir. It’s the only reason I allow people like you to risk their lives here.")
  54. QuestionsWaves()
  55. func ExplainCorruption():
  56. Mes("Ah, the corruption... Kaore, it's what Mana becomes when it’s left to decay.")
  57. Mes("Mana flows through all living things. When it's pure, it nurtures life. But here... It's been stagnant for far too long.")
  58. Mes("Once the Mana Trees was lost, the balance was broken. Now Kaore festers in places like this.")
  59. Mes("It seeps into everything: creatures, the land, even people. And once you're touched by it, there's no going back.")
  60. QuestionsWaves()
  61. func ExplainKaore():
  62. Mes("Kaore... It's the decayed Mana. It festers where life was once vibrant. Here, in this cave, it thrives.")
  63. Mes("It changes things... Makes them hostile, makes them... Desperate.")
  64. Mes("You'll feel it too if you stay long enough.")
  65. QuestionsWaves()
  66. func StartFight():
  67. var alivePlayerCount : int = AlivePlayerCount()
  68. if IsTriggering():
  69. if alivePlayerCount == 0:
  70. CallGlobal("OnCancel")
  71. else:
  72. Mes("The fight has already begun. You can't start another one now.")
  73. elif alivePlayerCount > 0:
  74. if not HasItem(tributeItemID, tributeItemCount):
  75. Mes("You'll need to bring me 5 apples as a tribute before we begin.")
  76. elif own.stat.level < playerLevelRequirement:
  77. Mes("You're not strong enough for this fight. Come back when you've reached level %d." % playerLevelRequirement)
  78. elif RemoveItem(tributeItemID, tributeItemCount):
  79. Chat("Ah, you're ready for this! The fight begins in 10 seconds, brace yourself!")
  80. Trigger()