9
3

HelanniFirewyng.lua 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --[[
  2. Script Name : SpawnScripts/ElddarGrove/HelanniFirewyng.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.10 03:05:08
  5. Script Purpose :
  6. :
  7. --]]
  8. local Arrow = 5526
  9. function spawn(NPC)
  10. AddTimer(NPC, 5000, "EmoteLoop")
  11. ProvidesQuest(NPC, Arrow)
  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_1007.mp3", "", "hello", 0, 0, Spawn)
  24. if not HasQuest(Spawn,Arrow) and not HasCompletedQuest (Spawn,Arrow) then
  25. AddConversationOption(conversation, "I'm just poking around, looking for things to do.","Arrow1")
  26. end
  27. if HasCompletedQuest (Spawn,Arrow) then
  28. AddConversationOption(conversation, "I'm sure you and your Golden Arrow trophy could show me a thing or two.","Thanks")
  29. end
  30. AddConversationOption(conversation, "I just might go see. Thanks.")
  31. StartConversation(conversation, NPC, Spawn, "Hello! If you're interested, it looks like some archery practice is going on behind the shop.")
  32. end
  33. end
  34. function Arrow1(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. conversation = CreateConversation()
  37. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  38. AddConversationOption(conversation, "It would be my pleasure.","Arrow2")
  39. AddConversationOption(conversation, "I'm not heading that way. Sorry.")
  40. StartConversation(conversation, NPC, Spawn, "If you are seeking work, I am looking for help. My dearest friend, Leona Ward, lives in southern Qeynos. Unfortunately, we do not see each other as often as we'd like. I told Leona one day I would call myself an expert archer, and I've finally fulfilled my dream. At my last tournament, I received the highest reward in archery - The Golden Engraved Arrow. I want Leona to have my prized trophy.")
  41. end
  42. function Arrow2(NPC, Spawn)
  43. OfferQuest(NPC,Spawn, Arrow)
  44. FaceTarget(NPC, Spawn)
  45. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  46. end
  47. function Thanks(NPC, Spawn)
  48. local choice = math.random(1,2)
  49. if choice == 1 then
  50. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  51. elseif choice == 2 then
  52. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  53. end
  54. end
  55. function EmoteLoop(NPC)
  56. local emoteChoice = MakeRandomInt(1,3)
  57. if emoteChoice == 1 then
  58. -- ponder
  59. PlayAnimation(NPC, 12030)
  60. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  61. elseif emoteChoice == 2 then
  62. -- sniff
  63. PlayAnimation(NPC, 12329)
  64. AddTimer(NPC, MakeRandomInt(6000,9000), "EmoteLoop")
  65. else
  66. -- tapfoot
  67. PlayAnimation(NPC, 13056)
  68. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  69. end
  70. end