9
3

ThardrinSteeleye.lua 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/ThardrinSteeleye.lua
  3. Script Purpose : Thardrin Steeleye
  4. Script Author : Dorbin
  5. Script Date : 2022.01.11
  6. Script Notes :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. local Delivery = 5541
  10. function spawn(NPC)
  11. AddTimer(NPC, 5000, "EmoteLoop")
  12. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  13. ProvidesQuest(NPC,Delivery)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC,Spawn)
  19. if GetFactionAmount(Spawn,11) <0 then
  20. FactionCheckingCallout(NPC, Spawn, faction)
  21. else
  22. end
  23. end
  24. function hailed(NPC, Spawn)
  25. FaceTarget(NPC,Spawn)
  26. if GetFactionAmount(Spawn,11) <0 then
  27. FaceTarget(NPC, Spawn)
  28. choice = math.random(1,2)
  29. if choice == 1 then
  30. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  33. end
  34. else
  35. local conversation = CreateConversation()
  36. FaceTarget(NPC,Spawn)
  37. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1060.mp3", "", "glare", 0, 0, Spawn, 0)
  38. if not HasQuest(Spawn,Delivery) and not HasCompletedQuest(Spawn, Delivery)then
  39. AddConversationOption(conversation, "Pester!? I'm just looking around!","Delivery1")
  40. end
  41. AddConversationOption(conversation, "Yeesh. I'll just be going then.")
  42. StartConversation(conversation, NPC, Spawn, "Harrumph. Can't ye see I'm busy? Go pester someone else!")
  43. end
  44. end
  45. function Delivery1(NPC,Spawn)
  46. FaceTarget(NPC, Spawn)
  47. PlayFlavor(NPC, "", "", "frustrated", 0, 0, Spawn)
  48. local conversation = CreateConversation()
  49. AddConversationOption(conversation, "Well, I suppose I could. Is there something in it for me?", "Delivery2")
  50. AddConversationOption(conversation, "Yeesh. I'll just be going then.")
  51. StartConversation(conversation, NPC, Spawn, "Just who do you think you are? You've wasted enough of my time. Why don't you make yourself useful!")
  52. end
  53. function Delivery2(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. OfferQuest(NPC, Spawn,Delivery)
  56. end
  57. function EmoteLoop(NPC)
  58. local emoteChoice = MakeRandomInt(1,3)
  59. if emoteChoice == 1 then
  60. -- ponder
  61. PlayAnimation(NPC, 12030)
  62. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  63. elseif emoteChoice == 2 then
  64. -- sniff
  65. PlayAnimation(NPC, 12329)
  66. AddTimer(NPC, MakeRandomInt(6000,9000), "EmoteLoop")
  67. else
  68. -- tapfoot
  69. PlayAnimation(NPC, 13056)
  70. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  71. end
  72. end