9
3

Jacques.lua 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. --[[
  2. Script Name : SpawnScripts/ThunderingSteppes/Jacques.lua
  3. Script Author : Jabantiz/edited geordie0511
  4. Script Date : 2014.07.05 10:07:45
  5. Script Purpose : Jacques
  6. --]]
  7. local WatchYourStepInTheTSPartI = 99
  8. local WatchYourStepInTheTSPartII = 100
  9. local WatchYourStepInTheTSPartIII = 101
  10. local WatchYourStepInTheTSPartIV = 102
  11. local Mail = 469
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, WatchYourStepInTheTSPartI)
  14. ProvidesQuest(NPC, WatchYourStepInTheTSPartII)
  15. ProvidesQuest(NPC, WatchYourStepInTheTSPartIII)
  16. ProvidesQuest(NPC, WatchYourStepInTheTSPartIV)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function hailed(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. conversation = CreateConversation()
  24. if GetQuestStep(Spawn, Mail) == 1 then
  25. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1054.mp3", "", "", 0, 0, Spawn)
  26. AddConversationOption(conversation, "Yes, I have a letter from Matsy.", "MailComplete")
  27. AddConversationOption(conversation, "No. I don't know what you're talking about.")
  28. StartConversation(conversation, NPC, Spawn, "Hello there! Are you here to drop off some mail?")
  29. elseif not HasQuest(Spawn, WatchYourStepInTheTSPartI) and not HasCompletedQuest(Spawn, WatchYourStepInTheTSPartI) then
  30. -- start quest 1
  31. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1054.mp3", "", "", 0, 0, Spawn)
  32. AddConversationOption(conversation, "And you survive all of this to deliver the mail?", "dlg_0_1")
  33. AddConversationOption(conversation, "I don't have any mail to send.")
  34. StartConversation(conversation, NPC, Spawn, "Do you need any mail delivered, friend? You can't trust just anyone with an important message. You need only the best. Me! Why, not many can survive the dangers of the Thundering Steppes. Many are devoured by bears, slaughtered by centaurs, robbed by gnolls, or flattened by giants!")
  35. elseif HasQuest(Spawn, WatchYourStepInTheTSPartI) and GetQuestStep(Spawn, WatchYourStepInTheTSPartI) == 3 then
  36. -- turn in Part I
  37. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1054.mp3", "", "", 0, 0, Spawn)
  38. AddConversationOption(conversation, "I have a reply from Blerton.", "dlg_1_1")
  39. AddConversationOption(conversation, "I will return when I am finished.")
  40. StartConversation(conversation, NPC, Spawn, "Welcome back. Have you completed your delivery yet?")
  41. elseif HasCompletedQuest(Spawn, WatchYourStepInTheTSPartI) and not HasCompletedQuest(Spawn, WatchYourStepInTheTSPartII) and not HasQuest(Spawn, WatchYourStepInTheTSPartII) then
  42. -- start quest 2
  43. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1054.mp3", "", "", 0, 0, Spawn)
  44. AddConversationOption(conversation, "Sure, what's next?", "dlg_2_1")
  45. AddConversationOption(conversation, "Not just yet. I will return later.")
  46. StartConversation(conversation, NPC, Spawn, "Hello there! Are you ready for your next visit to the exciting world of mail delivery?")
  47. elseif HasQuest(Spawn, WatchYourStepInTheTSPartII) and GetQuestStep(Spawn, WatchYourStepInTheTSPartII) == 3 then
  48. -- turn in Part II
  49. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1054.mp3", "", "", 0, 0, Spawn)
  50. AddConversationOption(conversation, "I have a reply from Tish.", "dlg_3_1")
  51. AddConversationOption(conversation, "I will return when I am finished.")
  52. StartConversation(conversation, NPC, Spawn, "Welcome back. Have you completed your delivery yet?")
  53. elseif HasCompletedQuest(Spawn, WatchYourStepInTheTSPartII) and not HasCompletedQuest(Spawn, WatchYourStepInTheTSPartIII) and not HasQuest(Spawn, WatchYourStepInTheTSPartIII) then
  54. -- start quest 3
  55. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1054.mp3", "", "", 0, 0, Spawn)
  56. AddConversationOption(conversation, "Of course!", "dlg_4_1")
  57. AddConversationOption(conversation, "Why don't you ever deliver the mail yourself? Are you just too scared?", "dlg4_2")
  58. AddConversationOption(conversation, "Not just yet.")
  59. StartConversation(conversation, NPC, Spawn, "Are you ready to deliver more mail?")
  60. elseif HasQuest(Spawn, WatchYourStepInTheTSPartIII) and GetQuestStep(Spawn, WatchYourStepInTheTSPartIII) == 3 then
  61. -- turn in Part III
  62. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1054.mp3", "", "", 0, 0, Spawn)
  63. AddConversationOption(conversation, "I have Brianna's receipt.", "dlg_5_1")
  64. AddConversationOption(conversation, "I will return when I am finished.")
  65. StartConversation(conversation, NPC, Spawn, "Welcome back. Have you completed your delivery yet? ")
  66. elseif HasCompletedQuest(Spawn, WatchYourStepInTheTSPartIII) and not HasCompletedQuest(Spawn, WatchYourStepInTheTSPartIV) and not HasQuest(Spawn, WatchYourStepInTheTSPartIV) then
  67. -- start quest 4
  68. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1054.mp3", "", "", 0, 0, Spawn)
  69. AddConversationOption(conversation, "Sure.", "dlg_6_1")
  70. AddConversationOption(conversation, "Not right now.")
  71. StartConversation(conversation, NPC, Spawn, "Great great, I have one final letter for you to deliver if you would.")
  72. elseif HasQuest(Spawn, WatchYourStepInTheTSPartI) or HasQuest(Spawn, WatchYourStepInTheTSPartII) or HasQuest(Spawn, WatchYourStepInTheTSPartIII) then
  73. -- Currently doing quest 1,2, or 3 but haven't finished it yet
  74. PlayFlavor(NPC, "", "Come back to me as soon as you've gotten the return letter.", "", 1689589577, 4560189, Spawn)
  75. else
  76. -- Currently on quest 4 or finished everything
  77. PlayFlavor(NPC, "", "Thank you for all of your help with the mail deliveries, friend. That's all we have for now. I'll let you know as soon as we have more work for you.", "", 1689589577, 4560189, Spawn)
  78. end
  79. end
  80. function MailComplete(NPC, Spawn)
  81. SetStepComplete(Spawn, Mail, 1)
  82. end
  83. function dlg_0_1(NPC, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. conversation = CreateConversation()
  86. AddConversationOption(conversation, "Well, I could use a job.", "dlg_0_2")
  87. AddConversationOption(conversation, "So you actually just want someone else to face the danger? I don't have time for cowards.")
  88. StartConversation(conversation, NPC, Spawn, "Indeed! Why, nothing could deter me from my duties here. I fear nothing! Though...I umm... have pressing business here at the moment and could use a new assistant to deliver a few things for me.")
  89. end
  90. function dlg_0_2(NPC, Spawn)
  91. FaceTarget(NPC, Spawn)
  92. conversation = CreateConversation()
  93. AddConversationOption(conversation, "Whatever, just as long as you pay me to face all the danger for you.", "dlg_0_3")
  94. AddConversationOption(conversation, "Angry dogs? MIGHT earn money? Nevermind.")
  95. StartConversation(conversation, NPC, Spawn, "Ahh, wonderful! You look like a good runner. Welcome to the exciting world of professional mail delivery! Danger! Excitement! Angry dogs! You might even earn some money. Not as much as me, of course, but we all have to start somewhere.")
  96. end
  97. function dlg_0_3(NPC, Spawn)
  98. OfferQuest(NPC, Spawn, WatchYourStepInTheTSPartI)
  99. end
  100. function dlg_1_1(NPC, Spawn)
  101. FaceTarget(NPC, Spawn)
  102. conversation = CreateConversation()
  103. SetStepComplete(Spawn, WatchYourStepInTheTSPartI, 3)
  104. AddConversationOption(conversation, "Okay.")
  105. StartConversation (conversation, NPC, Spawn, "Great! Well done on your first mail delivery. Come see me again when you're ready for your next assignment.")
  106. end
  107. function dlg_2_1(NPC, Spawn)
  108. OfferQuest(NPC, Spawn, WatchYourStepInTheTSPartII)
  109. end
  110. function dlg_3_1(NPC, Spawn)
  111. FaceTarget(NPC, Spawn)
  112. conversation = CreateConversation()
  113. SetStepComplete(Spawn, WatchYourStepInTheTSPartII, 3)
  114. AddConversationOption(conversation, "I will return as soon as I'm ready.")
  115. StartConversation(conversation, NPC, Spawn, "Wonderful! I'll deliver this on my next run into town. Go take a break and come see me when you're ready for more.")
  116. end
  117. function dlg_4_1(NPC, Spawn)
  118. OfferQuest(NPC, Player, WatchYourStepInTheTSPartIII)
  119. end
  120. function dlg_4_2(NPC, Spawn)
  121. FaceTarget(NPC, Spawn)
  122. conversation = CreateConversation()
  123. AddConversationOption(conversation, "Fine.", "dlg_4_1")
  124. AddConversationOption(conversation, "I think I'll pass for now.")
  125. StartConversation(conversation, NPC, Spawn, "Scared? Never! I'm...merely expecting a delivery soon and if I don't stay here I'll miss it! Now are you going to deliver this or do I have to find another assistant?")
  126. end
  127. function dlg_5_1(NPC, Spawn)
  128. FaceTarget(NPC, Spawn)
  129. conversation = CreateConversation()
  130. AddConversationOption(conversation, "Okay.")
  131. StartConversation(conversation, NPC, Spawn, "Ahh, there is Brianna's receipt. Thank you. Here is your payment for today's work.")
  132. end
  133. function dlg_6_1(NPC, Spawn)
  134. OfferQuest(NPC, Player, WatchYourStepInTheTSPartIV)
  135. end