9
3

KahlaUlno.lua 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. --[[
  2. Script Name : SpawnScripts/Caves/KahlaUlno.lua
  3. Script Purpose : Kahla Ulno
  4. Script Author : Scatman
  5. Script Date : 2009.09.04
  6. Script Notes :
  7. --]]
  8. local QUEST_1 = 228
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, QUEST_1)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. RandomVoice(NPC, Spawn)
  18. conversation = CreateConversation()
  19. if HasCompletedQuest(Spawn, QUEST_1) then
  20. PlayFlavor(NPC, "", "Still no conclusions.", "", 1689589577, 4560189, Spawn)
  21. elseif HasQuest(Spawn, QUEST_1) then
  22. OnQuest1(NPC, Spawn, conversation)
  23. else
  24. Greetings(NPC, Spawn, conversation)
  25. end
  26. end
  27. function RandomVoice(NPC, Spawn)
  28. local choice = math.random(1, 3)
  29. if choice == 1 then
  30. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1035.mp3", "", "", 0, 0, Spawn)
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1035.mp3", "", "", 0, 0, Spawn)
  33. elseif choice == 3 then
  34. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1035.mp3", "", "", 0, 0, Spawn)
  35. end
  36. end
  37. -------------------------------------------------------------------------------------------------------------------------
  38. -- QUEST 1
  39. -------------------------------------------------------------------------------------------------------------------------
  40. function Greetings(NPC, Spawn, conversation)
  41. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1035.mp3", "", "", 0, 0)
  42. AddConversationOption(conversation, "Help how?", "dlg_1_1")
  43. AddConversationOption(conversation, "Nope, sorry.")
  44. StartConversation(conversation, NPC, Spawn, "Greetings! I don't suppose you have some time to help an information-hungry kerra like myself, do you?")
  45. end
  46. function dlg_1_1(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. conversation = CreateConversation()
  49. AddConversationOption(conversation, "What's that?", "dlg_1_2")
  50. StartConversation(conversation, NPC, Spawn, "Well, I'm very interested in the creatures that inhabit these caves. I am trying to catalog these creatures so I can better compare them with their cousins found elsewhere. But I've run into a problem.")
  51. end
  52. function dlg_1_2(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. conversation = CreateConversation()
  55. AddConversationOption(conversation, "I can get them for you.", "dlg_2_3")
  56. AddConversationOption(conversation, "I'm not interested.")
  57. StartConversation(conversation, NPC, Spawn, "The amount of information I can get from living specimens is minimal. I tried to kill some, but I am no fighter. If I could get a number of dead specimens it would be a huge boon to my work.")
  58. end
  59. function dlg_2_3(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. conversation = CreateConversation()
  62. AddConversationOption(conversation, "I can do that.", "OfferQuest1")
  63. StartConversation(conversation, NPC, Spawn, "You can? That would be great. I think four of the spiders, four of the bats, and four of the flying serpents would be enough for me to get most of my research done.")
  64. end
  65. function OfferQuest1(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. OfferQuest(NPC, Spawn, QUEST_1)
  68. end
  69. function OnQuest1(NPC, Spawn, conversation)
  70. if GetQuestStep(Spawn, QUEST_1) == 4 then
  71. AddConversationOption(conversation, "Yes I got them.", "dlg_13_1")
  72. else
  73. AddConversationOption(conversation, "No, not yet.")
  74. end
  75. StartConversation(conversation, NPC, Spawn, "Did you get the creatures?")
  76. end
  77. function dlg_13_1(NPC, Spawn)
  78. SetStepComplete(Spawn, QUEST_1, 4)
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. AddConversationOption(conversation, "Glad to hear it.")
  82. StartConversation(conversation, NPC, Spawn, "Perfect! Thank you so much! This will help me a great deal.")
  83. end