Hegrenn.lua 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. --[[
  2. Script Name : SpawnScripts/SouthQeynos/Hegrenn.lua
  3. Script Purpose : Hegrenn <Bowyer>
  4. Script Author : Cynnar
  5. Script Date : 2020.04.12
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local Sneed = 5548
  9. local Stones = 5549
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC,Stones)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. if GetFactionAmount(Spawn,11) <0 then
  19. FaceTarget(NPC, Spawn)
  20. choice = math.random(1,2)
  21. if choice == 1 then
  22. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  23. elseif choice == 2 then
  24. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  25. end
  26. else
  27. FaceTarget(NPC, Spawn)
  28. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  29. end
  30. end
  31. function LeaveRange(NPC, Spawn)
  32. end
  33. function hailed(NPC, Spawn)
  34. if GetFactionAmount(Spawn,11) <0 then
  35. FaceTarget(NPC, Spawn)
  36. choice = math.random(1,2)
  37. if choice == 1 then
  38. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  39. elseif choice == 2 then
  40. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  41. end
  42. else
  43. local conversation = CreateConversation()
  44. FaceTarget(NPC,Spawn)
  45. PlayFlavor(NPC, "voiceover/english/blacksmith_hegrenn/qey_south/blacksmithhegrenn000.mp3", "", "bye", 3860553311, 50224137, Spawn, 0)
  46. if not HasQuest(Spawn,Stones) and not HasCompletedQuest(Spawn, Stones)then
  47. AddConversationOption(conversation, "I'm actually looking for work. Have anything that needs doing?","Offer")
  48. end
  49. if GetQuestStep(Spawn, Stones) ==2 then
  50. AddConversationOption(conversation, "Seems the rumors were true. Here are three samples of the mineral you were looking for.","Delivered2")
  51. end
  52. if GetQuestStep(Spawn, Sneed) ==1 then
  53. AddConversationOption(conversation, "I am here to pick up the supplies that Sneed Galliway has ordered from you.","Delivered")
  54. end
  55. AddConversationOption(conversation, "I'm not looking for anything at this time.")
  56. StartConversation(conversation, NPC, Spawn, "What are ya need'n? If its made of iron you'll find it here. I'm the best and only blacksmith in this part of town. Are ya going to stand there, or browse my wares?")
  57. end
  58. end
  59. function Delivered(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. PlayFlavor(NPC, "voiceover/english/blacksmith_hegrenn/qey_south/blacksmithhegrenn001.mp3", "", "happy", 1598192026, 512466525, Spawn)
  62. local conversation = CreateConversation()
  63. AddConversationOption(conversation, "I will. Thank you.", "FinishQuest")
  64. StartConversation(conversation, NPC, Spawn, "Ah, good ol' Sneed. He's always selling so much stuff! I can barely keep up with his orders! Here, take his supplies back to him.")
  65. end
  66. function FinishQuest(NPC,Spawn)
  67. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. SetStepComplete(Spawn,Sneed, 1)
  70. end
  71. function QuestStart(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. PlayFlavor(NPC, "voiceover/english/blacksmith_hegrenn/qey_south/blacksmithhegrenn002.mp3", "", "ponder", 986701836, 3811375684, Spawn)
  74. local conversation = CreateConversation()
  75. AddConversationOption(conversation, "I'm up for the challenge. I'll be back once I verify this rumor.", "Offer")
  76. AddConversationOption(conversation, "I prefer my rocks a little less animated. Sorry.")
  77. StartConversation(conversation, NPC, Spawn, "Ahh, work. You don't say. I heard a bit of gossip over at the tavern. There's a rare stone mineral. The Oakmyst royal defenders out in the forest have it, and I need several pieces. Will you commit to this daring task, adventurer? Remember, I need several pieces!")
  78. end
  79. function Offer(NPC, Spawn)
  80. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. OfferQuest(NPC, Spawn,Stones)
  83. end
  84. function Delivered2(NPC, Spawn) --NOT ACCURATE DIALOG
  85. FaceTarget(NPC, Spawn)
  86. PlayFlavor(NPC, "voiceover/english/blacksmith_hegrenn/qey_south/blacksmithhegrenn003.mp3", "", "boggle", 1598192026, 512466525, Spawn)
  87. local conversation = CreateConversation()
  88. AddConversationOption(conversation, "Just between us. Got it. Thank you!", "FinishQuest2")
  89. StartConversation(conversation, NPC, Spawn, "Praise Brell! These are quite the find!... but I must be ask'n ya to keep this little secret between us. We wouldn't want the dryads of the forest come'n back for some revenge, now would we? Haha. Please take one of these weapons I've been working on! I insist.")
  90. end
  91. function FinishQuest2(NPC,Spawn)
  92. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. SetStepComplete(Spawn,Stones, 2)
  95. end