DawsonMagnificent.lua 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/DawsonMagnificent.lua
  3. Script Purpose : Dawson Magnificent
  4. Script Author : Dorbin
  5. Script Date : 2022.04.22
  6. Script Notes :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. local Message = 5546
  10. function spawn(NPC)
  11. ProvidesQuest(NPC,Message)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC,Spawn)
  17. if GetFactionAmount(Spawn,11) <0 then
  18. FactionCheckingCallout(NPC, Spawn, faction)
  19. else
  20. if math.random(1, 100) <= 70 then
  21. FaceTarget(NPC,Spawn)
  22. choice = math.random(1,2)
  23. if choice == 1 then
  24. PlayFlavor(NPC, "", "", "bow", 0, 0, Spawn)
  25. elseif choice == 2 then
  26. PlayFlavor(NPC, "", "", "bye", 0, 0, Spawn)
  27. end
  28. end
  29. end
  30. end
  31. function hailed(NPC, Spawn)
  32. FaceTarget(NPC,Spawn)
  33. if GetFactionAmount(Spawn,11) <0 then
  34. FaceTarget(NPC, Spawn)
  35. choice = math.random(1,2)
  36. if choice == 1 then
  37. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  38. elseif choice == 2 then
  39. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  40. end
  41. else
  42. local conversation = CreateConversation()
  43. FaceTarget(NPC,Spawn)
  44. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1052.mp3", "", "bye", 0, 0, Spawn, 0)
  45. if not HasQuest(Spawn,Message) and not HasCompletedQuest(Spawn, Message)then
  46. AddConversationOption(conversation, "You seem torn about something, Dawson.","QuestStart")
  47. end
  48. if GetQuestStep(Spawn, Message) ==2 then
  49. AddConversationOption(conversation, "I let Galsway know you would be late tonight.","Delivered")
  50. end
  51. AddConversationOption(conversation, "Hope it's working out well for you. Goodbye.")
  52. StartConversation(conversation, NPC, Spawn, "Hello! I'm Dawson Magnificent, the renowned street performer! I'm known throughout the land for my troupe. My brother Gray is to my left, and to my right is our lovely assistant Andrea!")
  53. end
  54. end
  55. function QuestStart(NPC,Spawn)
  56. FaceTarget(NPC, Spawn)
  57. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  58. local conversation = CreateConversation()
  59. AddConversationOption(conversation, "Sure, I'll help you. It's the least I can do.", "Delivery2")
  60. AddConversationOption(conversation, "Hey, you're the performer. How do I know this isn't just an act?","Act")
  61. StartConversation(conversation, NPC, Spawn, "You're very observant, traveler. You see, we're going to be late for our performance over at the Fish Alehouse and Inn in the harbor, and I'd like to let old Galsway know. Would you mind helping out?")
  62. end
  63. function Act(NPC,Spawn)
  64. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  65. end
  66. function Delivery2(NPC, Spawn)
  67. FaceTarget(NPC, Spawn)
  68. OfferQuest(NPC, Spawn,Message)
  69. end
  70. function Delivered(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. PlayFlavor(NPC, "", "", "bow", 0, 0, Spawn)
  73. local conversation = CreateConversation()
  74. AddConversationOption(conversation, "Thanks. Break a leg!", "FinishQuest")
  75. StartConversation(conversation, NPC, Spawn, "Wonderful! I hate to keep anyone waiting for me! Here's the coin I promised.")
  76. end
  77. function FinishQuest(NPC,Spawn)
  78. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. SetStepComplete(Spawn,Message, 2)
  81. end