9
3

ThardrinSteeleye.lua 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. SetInfoStructString(NPC, "action_state", "tapfoot")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function InRange(NPC,Spawn)
  20. if GetFactionAmount(Spawn,11) <0 then
  21. FactionCheckingCallout(NPC, Spawn, faction)
  22. else
  23. end
  24. end
  25. function hailed(NPC, Spawn)
  26. FaceTarget(NPC,Spawn)
  27. if GetFactionAmount(Spawn,11) <0 then
  28. FaceTarget(NPC, Spawn)
  29. choice = math.random(1,2)
  30. if choice == 1 then
  31. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  32. elseif choice == 2 then
  33. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  34. end
  35. else
  36. local conversation = CreateConversation()
  37. FaceTarget(NPC,Spawn)
  38. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1060.mp3", "", "glare", 0, 0, Spawn, 0)
  39. if not HasQuest(Spawn,Delivery) and not HasCompletedQuest(Spawn, Delivery)then
  40. AddConversationOption(conversation, "Pester!? I'm just looking around!","Delivery1")
  41. end
  42. AddConversationOption(conversation, "Yeesh. I'll just be going then.")
  43. StartConversation(conversation, NPC, Spawn, "Harrumph. Can't ye see I'm busy? Go pester someone else!")
  44. end
  45. end
  46. function Delivery1(NPC,Spawn)
  47. FaceTarget(NPC, Spawn)
  48. PlayFlavor(NPC, "", "", "frustrated", 0, 0, Spawn)
  49. local conversation = CreateConversation()
  50. AddConversationOption(conversation, "Well, I suppose I could. Is there something in it for me?", "Delivery2")
  51. AddConversationOption(conversation, "Yeesh. I'll just be going then.")
  52. 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!")
  53. end
  54. function Delivery2(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. OfferQuest(NPC, Spawn,Delivery)
  57. end
  58. function EmoteLoop(NPC)
  59. local emoteChoice = MakeRandomInt(1,3)
  60. if emoteChoice == 1 then
  61. -- ponder
  62. PlayAnimation(NPC, 12030)
  63. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  64. elseif emoteChoice == 2 then
  65. -- sniff
  66. PlayAnimation(NPC, 12329)
  67. AddTimer(NPC, MakeRandomInt(6000,9000), "EmoteLoop")
  68. else
  69. -- tapfoot
  70. PlayAnimation(NPC, 13056)
  71. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  72. end
  73. end