GregorEarthstride.lua 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. --[[
  2. Script Name : SpawnScripts/ElddarGrove/GregorEarthstride.lua
  3. Script Purpose : Gregor Earthstride
  4. Script Author : Dorbin
  5. Script Date : 2022.5.4
  6. Script Notes :
  7. --]]
  8. local Hawks = 5517
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, Hawks)
  11. AddTimer(NPC, 5000, "EmoteLoop")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. if GetFactionAmount(Spawn,11) <0 then
  19. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  20. else
  21. FaceTarget(NPC, Spawn)
  22. conversation = CreateConversation()
  23. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1004.mp3", "", "confused", 0, 0, Spawn)
  24. if not HasQuest(Spawn,Hawks) and not HasCompletedQuest (Spawn,Hawks) then
  25. AddConversationOption(conversation, "Why would you need to buy arrows? You seem to look capable of making your own.","Feathers1")
  26. end
  27. if GetQuestStep(Spawn,Hawks)==2 then
  28. AddConversationOption(conversation, "I've returned with the feathers you needed, though they're still on the birds.","FeathersDone1")
  29. end
  30. AddConversationOption(conversation, "I wish you luck with finding them.")
  31. StartConversation(conversation, NPC, Spawn, "I can't ever seem to find the arrows I need! Nightbow's shop here is good, but it's a bit pricey.")
  32. end
  33. end
  34. function Feathers1(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. conversation = CreateConversation()
  37. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  38. AddConversationOption(conversation, "I think I could get the feathers you need.","Feathers2")
  39. AddConversationOption(conversation, "I wish you luck with finding them.")
  40. StartConversation(conversation, NPC, Spawn, "I hate to admit it, but I've not been having the best of luck with the feathers. It seems there's been some furious competition for the hawks in the forest ruins, as their feathers are not only very useful for fletching, but also for use as quills.")
  41. end
  42. function Feathers2(NPC, Spawn)
  43. FaceTarget(NPC, Spawn)
  44. conversation = CreateConversation()
  45. PlayFlavor(NPC, "", "", "whome", 0, 0, Spawn)
  46. AddConversationOption(conversation, "I'll be back with the birds as soon as I manage to kill them!","Feathers3")
  47. AddConversationOption(conversation, "I wish you luck with finding them.")
  48. StartConversation(conversation, NPC, Spawn, "You would do that for a stranger? I couldn't let such a task go unrewarded of course. I am but a simple hunter, but I would find something to grant you in return for the feathers. I can't make enough arrows without the feathers from at least five hawks.")
  49. end
  50. function Feathers3(NPC, Spawn)
  51. OfferQuest(NPC,Spawn, Hawks)
  52. FaceTarget(NPC, Spawn)
  53. end
  54. function FeathersDone1(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. conversation = CreateConversation()
  57. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  58. AddConversationOption(conversation, "Thank you, and safe journeys to you.","FeathersDone2")
  59. StartConversation(conversation, NPC, Spawn, "That's wonderful! I'll be happy to pull the feathers off myself, that's not a problem! You've saved me quite a bit of coin! Speaking of coin, here's some for your effort.")
  60. end
  61. function FeathersDone2(NPC, Spawn)
  62. SetStepComplete(Spawn,Hawks,2)
  63. FaceTarget(NPC, Spawn)
  64. end
  65. function EmoteLoop(NPC)
  66. local emoteChoice = MakeRandomInt(1,3)
  67. if emoteChoice == 1 then
  68. -- ponder
  69. PlayAnimation(NPC, 12030)
  70. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  71. elseif emoteChoice == 2 then
  72. -- sniff
  73. PlayAnimation(NPC, 12329)
  74. AddTimer(NPC, MakeRandomInt(6000,9000), "EmoteLoop")
  75. else
  76. -- tapfoot
  77. PlayAnimation(NPC, 13056)
  78. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  79. end
  80. end