9
3

Tanaira.lua 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/Tanaira.lua
  3. Script Purpose : Tanaira <Provisioner>
  4. Script Author : Dorbin
  5. Script Date : 06.282022
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local FAR_SEAS_DR_PBG0162_QUEST_ID = 515
  10. local FAR_SEAS_DR_PBG0295_QUEST_ID = 516
  11. local HailCheck = false
  12. function spawn(NPC)
  13. ProvidesQuest(NPC,5605)
  14. AddTimer(NPC, 5000, "EmoteLoop")
  15. SetInfoStructString(NPC, "action_state", "ponder")
  16. end
  17. function hailed(NPC, Spawn)
  18. if GetFactionAmount(Spawn,11)<0 then
  19. PlayFlavor(NPC,"","","noway",0,0,Spawn)
  20. else
  21. HailCheck = true
  22. AddTimer(NPC,32000,"HailReset")
  23. SetTarget(NPC,Spawn)
  24. Dialog1(NPC, Spawn)
  25. end
  26. end
  27. function HailReset(NPC)
  28. HailCheck = false
  29. end
  30. function Dialog1(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. Dialog.New(NPC, Spawn)
  33. Dialog.AddDialog("Oh, hello! Sorry, I didn't see you. My eyes tend to wander towards Grekin over there.")
  34. PlayFlavor(NPC,"","","hello",0,0,Spawn)
  35. Dialog.AddVoiceover("voiceover/english/merchant_tanaira/qey_village02/merchanttanaira.mp3", 2005566825, 1356521608)
  36. if HasQuest(Spawn, FAR_SEAS_DR_PBG0162_QUEST_ID) and GetQuestStep(Spawn, FAR_SEAS_DR_PBG0162_QUEST_ID) == 2 or HasQuest(Spawn, FAR_SEAS_DR_PBG0295_QUEST_ID) and GetQuestStep(Spawn, FAR_SEAS_DR_PBG0295_QUEST_ID) == 3 then
  37. Dialog.AddOption("I have Far Seas Trading Requisition order PBG0162. ", "Dialog2")
  38. end
  39. if not HasQuest(Spawn, 5605)and not HasCompletedQuest(Spawn,5605) then
  40. Dialog.AddOption("He does seem fairly preoccupied. Have you gone to talk to him?","Dialog3")
  41. end
  42. if GetQuestStep(Spawn, 5605) == 2 then
  43. Dialog.AddOption("I've completed the map to the picnic spot. Just past the Clearwater Pond you follow the stream. You'll find the waterfall near the cliff surrounded by frogs.","Delivered")
  44. end
  45. Dialog.AddOption("I am just browsing. I'll let you get back to daydreaming. ")
  46. Dialog.Start()
  47. end
  48. function Dialog2(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. SetTarget(NPC,Spawn)
  51. Dialog.New(NPC, Spawn)
  52. if HasQuest(Spawn, FAR_SEAS_DR_PBG0162_QUEST_ID) and GetQuestStep(Spawn, FAR_SEAS_DR_PBG0162_QUEST_ID) == 2 then
  53. SetStepComplete(Spawn, FAR_SEAS_DR_PBG0162_QUEST_ID, 2)
  54. end
  55. if HasQuest(Spawn, FAR_SEAS_DR_PBG0295_QUEST_ID) and GetQuestStep(Spawn, FAR_SEAS_DR_PBG0295_QUEST_ID) == 3 then
  56. SetStepComplete(Spawn, FAR_SEAS_DR_PBG0295_QUEST_ID, 3)
  57. end
  58. PlayFlavor(NPC,"","","boggle",0,0,Spawn)
  59. Dialog.AddDialog("Oh! Grekin has occupied so much of my thoughts that I forgot about this requisition I placed weeks ago. I may have forgotten but I am glad you did not.")
  60. Dialog.AddVoiceover("voiceover/english/merchant_tanaira/qey_village02/merchanttanaira003.mp3", 1432585003, 855405461)
  61. Dialog.AddOption("Just doing my job. ")
  62. Dialog.Start()
  63. end
  64. function Dialog3(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. Dialog.New(NPC, Spawn)
  67. PlayFlavor(NPC, "", "", "sigh", 0, 0, Spawn)
  68. Dialog.AddDialog("I know. He's always so busy selling he doesn't get any time to relax. I would like to take him on a picnic but I don't know of any good spots. I heard Oakmyst Forest has a very good spot but I haven't been able to see the area for myself. Would you do me a favor and find this spot for me?")
  69. Dialog.AddVoiceover("voiceover/english/merchant_tanaira/qey_village02/merchanttanaira000.mp3", 3232265570, 2678677300)
  70. Dialog.AddOption("I could head that way and check out scenic spots for a picnic.", "QuestBegin")
  71. Dialog.AddOption("Trapsing through the forest doesn't sound ideal to me. I'd rather not.")
  72. Dialog.Start()
  73. end
  74. function QuestBegin (NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. OfferQuest(NPC, Spawn, 5605)
  77. end
  78. function Delivered(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. SetTarget(NPC,Spawn)
  81. Dialog.New(NPC, Spawn)
  82. SetStepComplete(Spawn, 5605, 2)
  83. PlayFlavor(NPC, "", "", "thank", 0, 0, Spawn)
  84. Dialog.AddDialog("Thank you so much! This map looks great. Now, I just need to ask Grekin about that picnic.")
  85. Dialog.AddVoiceover("voiceover/english/merchant_tanaira/qey_village02/merchanttanaira002.mp3", 702642153, 3039622281)
  86. Dialog.AddOption("Best of luck to you both.")
  87. Dialog.Start()
  88. end
  89. function EmoteLoop(NPC)
  90. if HailCheck == true then
  91. local Grekin = GetSpawn(NPC, 2340037) -- Get Grekin
  92. if Grekin ~= nil then
  93. SetTarget(NPC,Grekin)
  94. end
  95. AddTimer(NPC,26100,"EmoteLoop")
  96. else
  97. local emoteChoice = MakeRandomInt(1,6)
  98. if emoteChoice == 1 then
  99. -- doubletake
  100. PlayAnimation(NPC, 11415)
  101. AddTimer(NPC, MakeRandomInt(11000,12000), "EmoteLoop")
  102. elseif emoteChoice == 2 then
  103. -- smirk
  104. PlayAnimation(NPC, 12286)
  105. AddTimer(NPC, MakeRandomInt(6000,8000), "EmoteLoop")
  106. elseif emoteChoice == 3 then
  107. -- peer
  108. PlayAnimation(NPC, 11976)
  109. AddTimer(NPC, MakeRandomInt(12000,14000), "EmoteLoop")
  110. elseif emoteChoice == 4 then
  111. -- sigh
  112. PlayAnimation(NPC, 12246)
  113. AddTimer(NPC, MakeRandomInt(8000,9000), "EmoteLoop")
  114. elseif emoteChoice == 5 then
  115. -- ponder
  116. PlayAnimation(NPC, 12030)
  117. AddTimer(NPC, MakeRandomInt(12000,13500), "EmoteLoop")
  118. elseif emoteChoice == 6 then
  119. -- peer x2
  120. PlayAnimation(NPC, 11976)
  121. AddTimer(NPC, MakeRandomInt(12000,14000), "EmoteLoop")
  122. end
  123. end
  124. end