Brianna.lua 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. --[[
  2. Script Name : SpawnScripts/ThunderingSteppes/Brianna.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.07.11 02:07:39
  5. Script Purpose : Brianna (2490170)
  6. :
  7. --]]
  8. local WatchYourStepinTheTSPartIII = 101
  9. local SuppliesForBrianna = 108
  10. local HidesForBrianna = 109
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, HidesForBrianna)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. conversation = CreateConversation()
  20. local choice = math.random(1,3)
  21. if choice == 1 then
  22. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1009.mp3", "", "", 0, 0, Spawn)
  23. elseif choice == 2 then
  24. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1009.mp3", "", "", 0, 0, Spawn)
  25. else
  26. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1009.mp3", "", "", 0, 0, Spawn)
  27. end
  28. if HasQuest(Spawn, SuppliesForBrianna) and GetQuestStep(Spawn, SuppliesForBrianna) == 2 then
  29. -- turn in SuppliesForBrianna
  30. AddConversationOption(conversation, "Yes right here.", "dlg_1_1")
  31. AddConversationOption(conversation, "Um, I have some but not for you.")
  32. StartConversation(conversation, NPC, Spawn, "Well, do you have the supplies?")
  33. elseif HasQuest(Spawn, WatchYourStepinTheTSPartIII) and GetQuestStep(Spawn, WatchYourStepinTheTSPartIII) == 2 then
  34. -- start SuppliesForBrianna
  35. AddConversationOption(conversation, "No, I'm here to deliver a package to you.", "dlg_0_1")
  36. AddConversationOption(conversation, "Oh okay. Thanks anyways.")
  37. StartConversation(conversation, NPC, Spawn, "Har har, what kind of work do you think you can do with little arms like those? If you are here for the apprenticeship, it has been filled.")
  38. elseif (HasQuest(Spawn, SuppliesForBrianna) and GetQuestStep(Spawn, SuppliesForBrianna) < 2) or (HasQuest(Spawn, HidesForBrianna) and GetQuestStep(Spawn, HidesForBrianna) < 2) then
  39. -- on SuppliesForBrianna or HidesForBrianna but not ready for turn in
  40. AddConversationOption(conversation, "No but I have my best people working on it.")
  41. StartConversation(conversation, NPC, Spawn, "Well, did you bring the supplies yet?")
  42. elseif HasCompletedQuest(Spawn, SuppliesForBrianna) and not HasQuest(Spawn, HidesForBrianna) and not HasCompletedQuest(Spawn, HidesForBrianna) then
  43. -- start HidesForBrianna
  44. AddConversationOption(conversation, "Yes I am.", "dlg_2_1")
  45. AddConversationOption(conversation, "Not at this time.")
  46. StartConversation(conversation, NPC, Spawn, "Har har, what kind of work do you think you can do with little arms like those? Are you here for the apprenticeship? ")
  47. elseif HasQuest(Spawn, HidesForBrianna) and GetQuestStep(Spawn, HidesForBrianna) == 2 then
  48. -- turn in HidesForBrianna
  49. AddConversationOption(conversation, "Yes, right here.", "dlg_3_1")
  50. AddConversationOption(conversation, "Not yet.")
  51. StartConversation(conversation, NPC, Spawn, "Well, do you have the supplies?")
  52. elseif HasCompletedQuest(Spawn, SuppliesForBrianna) and HasCompletedQuest(Spawn, HidesForBrianna) then
  53. -- finished both SuppliesForBrianna and HidesForBrianna
  54. PlayFlavor(NPC, "", "Thanks for your help, I really do appreciate it. Adventurers like you are really good to have around!", "hello", 1689589577, 4560189, Spawn)
  55. end
  56. end
  57. function dlg_0_1(NPC, Spawn)
  58. FaceTarget(NPC, Spawn)
  59. conversation = CreateConversation()
  60. AddConversationOption(conversation, "No, I was chased by some dogs and accidentally dropped it.", "dlg_0_2")
  61. StartConversation(conversation, NPC, Spawn, "Sure, let's see it... my it looks damaged, what happened here? Did you open it up?")
  62. end
  63. function dlg_0_2(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. AddConversationOption(conversation, "Um, okay.", "dlg_0_3")
  67. AddConversationOption(conversation, "I am not going to do that.")
  68. StartConversation(conversation, NPC, Spawn, "Ok, these things happen. However, it says right here on top that it was insured by you and your delivery service, so I am going to need you to replace these items.")
  69. end
  70. function dlg_0_3(NPC, Spawn)
  71. OfferQuest(NPC, Spawn, SuppliesForBrianna)
  72. end
  73. function dlg_1_1(NPC, Spawn)
  74. FaceTarget(NPC, Spawn)
  75. conversation = CreateConversation()
  76. SetStepComplete(Spawn, SuppliesForBrianna, 2)
  77. SetStepComplete(Spawn, WatchYourStepinTheTSPartIII, 3)
  78. AddConversationOption(conversation, "Thanks.")
  79. StartConversation(conversation, NPC, Spawn, "Good they look like they will do, here is your receipt.")
  80. end
  81. function dlg_2_1(NPC, Spawn)
  82. FaceTarget(NPC, Spawn)
  83. conversation = CreateConversation()
  84. AddConversationOption(conversation, "Sure thing.", "dlg_2_2")
  85. AddConversationOption(conversation, "Not today.")
  86. StartConversation(conversation, NPC, Spawn, "The job is mostly odd-jobs. It's what I do; fix things for people, patch up armor, repair broken fences, and occasionally help with party decorations. Do you think you could assist me with some odd jobs?")
  87. end
  88. function dlg_2_2(NPC, Spawn)
  89. OfferQuest(NPC, Spawn, HidesForBrianna)
  90. end
  91. function dlg_3_1(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. conversation = CreateConversation()
  94. SetStepComplete(Spawn, HidesForBrianna, 2)
  95. AddConversationOption(conversation, "Thanks.")
  96. StartConversation(conversation, NPC, Spawn, "Great, these look like it's the first time they have ever seen the sun. Thanks for your help. I don't have anything else for you today, but check back again.")
  97. end