9
3

YanariCyellann.lua 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. --[[
  2. Script Name : SpawnScripts/Castleview/YanariCyellann.lua
  3. Script Purpose : Yanari Cyellann
  4. Script Author : Dorbin
  5. Script Date : 2022.01.28
  6. Script Notes :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. local Badgers = 5465
  10. local Slime = 5466
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  13. ProvidesQuest(NPC, Badgers)
  14. ProvidesQuest(NPC, Slime)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. --[[ CLASS(?) Quest material not currently used
  20. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan007.mp3", "If Nixa sent you, then that's another story! I've done well with his teachings. What do you want to know about sorcery?", "ponder", 1398879355, 1149892616, Spawn)
  21. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan008.mp3", "I draw from unstable ether and turn it into different types of fire. Ignitizing a brazier with a simple incantation is easier than rubbing two sticks together.", "ponder", 3056968266, 3365736320, Spawn)
  22. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan009.mp3", "Ah, of course! Back in the day I was quite the fire-magi. Firestorms here, explosions there, that kind of thing. I retired from the battlefield before it was too late. You know what they say about playing with fire and all. I hope this helps you.", "ponder", 1034698890, 3446841302, Spawn)
  23. ]]--
  24. function InRange(NPC, Spawn) --Quest Callout
  25. if GetFactionAmount(Spawn,11) <0 then
  26. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/100_researcher_yanari_multhail1_ba125732.mp3", "I'm very busy and don't want you getting hurt. Please leave me to my work.", "shakefist", 2153034813, 3927600348, Spawn)
  27. else
  28. if math.random(1, 100) <= 70 then
  29. if not HasCompletedQuest (Spawn, Badgers) and not HasCompletedQuest (Spawn, Slime) then
  30. choice = math.random(1,3)
  31. FaceTarget(NPC, Spawn)
  32. if choice ==1 then
  33. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/100_researcher_yanari_multhail1_ba125732.mp3", "I'm very busy and don't want you getting hurt. Please leave me to my work.", "no", 2153034813, 3927600348, Spawn)
  34. elseif choice ==2 then
  35. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/100_researcher_yanari_callout2_3cf87337.mp3", "Let's see... Two vials of gunk extract mixed with... Oh, dear! I'm out of extract! You, adventurer, interested in making some coin?", "confused", 812719323, 2645014610, Spawn)
  36. else
  37. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/100_researcher_yanari_callout1_306f718b.mp3", "Hmmm... All out of badger claws. This will never do!", "ponder", 1224876034, 2351112322, Spawn)
  38. end
  39. end
  40. elseif HasCompletedQuest (Spawn, Badgers) and HasCompletedQuest (Spawn, Slime) then
  41. choice = math.random(1,3)
  42. if choice ==1 then
  43. FaceTarget(NPC, Spawn)
  44. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/100_researcher_yanari_multhail1_ba125732.mp3", "I'm very busy and don't want you getting hurt. Please leave me to my work.", "no", 2153034813, 3927600348, Spawn)
  45. elseif choice ==2 then
  46. FaceTarget(NPC, Spawn)
  47. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/100_researcher_yanari_multhail5_d4faf799.mp3", "Don't touch anything! You could turn yourself into a goo or destroy the entire building! I'm very busy and don't want you getting hurt. On your way, now!", "frustrated", 3857840792, 1030063822, Spawn)
  48. else
  49. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  50. end
  51. end
  52. end
  53. end
  54. function hailed(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. if GetFactionAmount(Spawn,11) <0 then
  57. FactionChecking(NPC, Spawn, faction)
  58. else
  59. if not HasCompletedQuest (Spawn, Badgers) and not HasCompletedQuest (Spawn, Slime) then
  60. FaceTarget(NPC, Spawn)
  61. conversation = CreateConversation()
  62. if not HasQuest(Spawn, Badgers) then
  63. AddConversationOption(conversation, "What are you doing?", "BadgerStart")
  64. end
  65. if not HasQuest(Spawn, Slime) then
  66. AddConversationOption(conversation, "I don't mean to bother you, but I overheard you needed something?", "SlimeStart")
  67. end
  68. if GetQuestStep(Spawn, Badgers)==2 then
  69. AddConversationOption(conversation, "I brought the claws that you asked for.", "DoneBadger")
  70. end
  71. if GetQuestStep(Spawn, Slime)==2 then
  72. AddConversationOption(conversation, "I've returned with your bag of daggers.", "DoneSlime")
  73. end
  74. AddConversationOption(conversation, "You seem to be a bit busy at the moment. I'll leave you alone.")
  75. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan.mp3", "", "", 3613336528, 1736617695, Spawn)
  76. StartConversation(conversation, NPC, Spawn, "Do not touch anything! You could turn yourself into a goo or destroy the entire building. What do you need?")
  77. end
  78. end
  79. end
  80. function BadgerStart(NPC, Spawn)
  81. conversation = CreateConversation()
  82. AddConversationOption(conversation, "I can gather those for you.", "BadgerBegin2")
  83. AddConversationOption(conversation, "I wouldn't even touch a regular badger, let alone a vicious one!")
  84. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan000.mp3","","ponder",913747199,2909702718,Spawn)
  85. StartConversation(conversation, NPC, Spawn, "Interested, are you? Well, I am trying to make my spells and items more potent. Unfortunately I ran out of volatility components. Would you do me a favor and collect some vicious badger claws?")
  86. end
  87. function BadgerBegin2(NPC, Spawn)
  88. conversation = CreateConversation()
  89. AddConversationOption(conversation, "I'll bring them back once I gather them.", "BadgerStarting")
  90. AddConversationOption(conversation, "On second thought, I better not.")
  91. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan001.mp3","","thank",1380358614,4188270121,Spawn)
  92. StartConversation(conversation, NPC, Spawn, "Splended! You'll find the badgers in the Oakmyst Forest. Please be swift! Badger claws lose their inate furiocity rather quickly!")
  93. end
  94. function DoneBadger(NPC, Spawn)
  95. conversation = CreateConversation()
  96. AddConversationOption(conversation, "I'll just be under this very thick table.","BadgerFinish")
  97. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan002.mp3", "", "happy", 3385634498, 2633500192)
  98. StartConversation(conversation, NPC, Spawn, "Marvelous! I shall use one of the claws to imbue a wand for you. Um ... just take a few steps back, safety and all.")end
  99. function BadgerFinish(NPC, Spawn)
  100. conversation = CreateConversation()
  101. AddConversationOption(conversation, "I plan to be very careful with it.", "RewardBadgers")
  102. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan003.mp3", "", "boggle", 3490869984, 2394433819, Spawn)
  103. StartConversation(conversation, NPC, Spawn, "It worked! I mean ... here is a wand for you. Use it well.")end
  104. function SlimeStart(NPC, Spawn)
  105. conversation = CreateConversation()
  106. AddConversationOption(conversation, "What do you need?", "SlimeNeed")
  107. AddConversationOption(conversation, "...I must be going!")
  108. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan004.mp3","","no",2138601896,740497069,Spawn)
  109. StartConversation(conversation, NPC, Spawn, "Then keep your hands away from my experiments! Since you've wasted my precious time with your insistent babbling, I believe you owe me a bit of your own time. I need your help with a task.")
  110. end
  111. function SlimeNeed(NPC, Spawn)
  112. conversation = CreateConversation()
  113. AddConversationOption(conversation, "I will return with some crypt gunk.", "QuestBegin2")
  114. AddConversationOption(conversation, "Crypt gunk? I think I'll pass. Sorry")
  115. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan005.mp3","","tap",3750763447,1479813412,Spawn)
  116. StartConversation(conversation, NPC, Spawn, "Go to the Down Below in the catacombs. In the Down Below, you must slay several gunks and fill my vials with their extract. Leave immediately! I need these ingredients to complete my research.")
  117. end
  118. function DoneBugs(NPC, Spawn)
  119. conversation = CreateConversation()
  120. AddConversationOption(conversation, "Thank you.", "RewardSlime")
  121. AddConversationOption(conversation, "Yeesh, okay. I'm going now.", "RewardSlime")
  122. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan006.mp3","","tap",3747403661,785681662,Spawn)
  123. StartConversation(conversation, NPC, Spawn, "Its about time! I almost sent Bleemeb up to go get my extract. I thought the gunks made a meal out of you. Take this pay for your task and leave me with my research.")
  124. end
  125. function BadgerStarting (NPC, Spawn)
  126. FaceTarget(NPC, Spawn)
  127. OfferQuest(NPC, Spawn, Badgers)
  128. end
  129. function QuestBegin2 (NPC, Spawn)
  130. FaceTarget(NPC, Spawn)
  131. OfferQuest(NPC, Spawn, Slime)
  132. end
  133. function RewardBadgers(NPC, Spawn)
  134. SetStepComplete(Spawn, Badgers, 2)
  135. end
  136. function RewardSlime(NPC, Spawn)
  137. SetStepComplete(Spawn, Slime, 2)
  138. end