9
3

GregorEarthstride.lua 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. AddConversationOption(conversation, "I think I could get the feathers you need.","Feathersoffer")
  38. AddConversationOption(conversation, "I wish you luck with finding them.")
  39. 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.")
  40. end
  41. function Feathersoffer(NPC, Spawn)
  42. OfferQuest(NPC,Spawn, Hawks)
  43. FaceTarget(NPC, Spawn)
  44. end
  45. function FeathersDone1(NPC, Spawn)
  46. SetStepComplete(Spawn,Hawks,2)
  47. FaceTarget(NPC, Spawn)
  48. conversation = CreateConversation()
  49. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  50. AddConversationOption(conversation, "Thank you, and safe journeys to you.")
  51. 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.")
  52. end
  53. function EmoteLoop(NPC)
  54. local emoteChoice = MakeRandomInt(1,3)
  55. if emoteChoice == 1 then
  56. -- ponder
  57. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  58. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  59. elseif emoteChoice == 2 then
  60. -- sniff
  61. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  62. AddTimer(NPC, MakeRandomInt(6000,9000), "EmoteLoop")
  63. else
  64. -- tapfoot
  65. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn)
  66. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  67. end
  68. end