9
3

SneedGalliway.lua 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/SneedGalliway.lua
  3. Script Purpose : Sneed Galliway <General Goods>
  4. Script Author : Dorbin
  5. Script Date : 2022.01.11
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local Sneed = 5548
  9. local Delivery = 5541
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC,Sneed)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. end
  19. function LeaveRange(NPC, Spawn)
  20. end
  21. function hailed(NPC, Spawn)
  22. if GetFactionAmount(Spawn,11) <0 then
  23. FaceTarget(NPC, Spawn)
  24. choice = math.random(1,2)
  25. if choice == 1 then
  26. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  27. elseif choice == 2 then
  28. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  29. end
  30. else
  31. if HasCompletedQuest(Spawn,Sneed) and HasCompletedQuest(Spawn,Delivery) then
  32. FaceTarget(NPC, Spawn)
  33. local choice = math.random(1,4)
  34. if choice == 1 then
  35. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/housing/human_housing_service_good_1_aoi_gm_1fa85d79.mp3", "Go on, take a look at the stock. You'll never beat this price in the city. I guarantee it!", "wave", 903813734, 2512856176, Spawn)
  36. elseif choice == 2 then
  37. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1052.mp3", "Step right up! I've got all the adventuring garb you'll ever be needing outside the city gates! The outside world is a dangerous place; make sure you're equipped to deal with the challenge!", "", 0, 0, Spawn)
  38. elseif choice == 3 then
  39. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/merchant/human_merchant_service_good_1_hail_gm_45d92a75.mp3", "Welcome! What can I help you with?", "bow", 892528408, 239693863, Spawn)
  40. elseif choice == 4 then
  41. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/merchant/human_merchant_service_good_1_hail_gm_24322c5d.mp3", "Greetings, friend traveler! We have the finest supplies to fill your adventuring needs.", "smile", 2541554579, 2951095822, Spawn)
  42. end
  43. else
  44. local conversation = CreateConversation()
  45. FaceTarget(NPC,Spawn)
  46. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1052.mp3", "", "beckon", 0, 0, Spawn, 0)
  47. if not HasQuest(Spawn,Sneed) and not HasCompletedQuest(Spawn, Sneed)then
  48. AddConversationOption(conversation, "I was wondering if you need any work done in the city.","QuestStart")
  49. end
  50. if GetQuestStep(Spawn, Delivery) ==1 then
  51. AddConversationOption(conversation, "So, you're Sneed Galliway. I've got a delivery for you from Thardrin Steeleye.","Delivered2")
  52. end
  53. if GetQuestStep(Spawn, Sneed) ==2 then
  54. AddConversationOption(conversation, "Here are your supplies from Hegrenn.","Delivered")
  55. end
  56. AddConversationOption(conversation, "Hope it's working out well for you. Goodbye")
  57. StartConversation(conversation, NPC, Spawn, "Step right up! I've got all the adventuring garb you'll ever be needing outside the city gates! The outside world is a dangerous place; make sure you're equipped to deal with the challenge!")
  58. end
  59. end
  60. end
  61. function Delivered2(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  64. local conversation = CreateConversation()
  65. AddConversationOption(conversation, "Thanks. Well, I guess some tip is better than no tip... no matter how small..", "FinishQuest")
  66. StartConversation(conversation, NPC, Spawn, "Finally! After all the delays, it's good to at least have it brought over from the warehouse so quickly. Let me see what I can do about getting together a tip for your speedy delivery... Ahh, here we are")
  67. end
  68. function FinishQuest(NPC,Spawn)
  69. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. SetStepComplete(Spawn,Delivery, 1)
  72. end
  73. function QuestStart(NPC,Spawn)
  74. FaceTarget(NPC, Spawn)
  75. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn)
  76. local conversation = CreateConversation()
  77. AddConversationOption(conversation, "I'll be back in no time!", "Delivery2")
  78. AddConversationOption(conversation, "Err, actually I think I hear someone calling me outside. Bye.","Act")
  79. StartConversation(conversation, NPC, Spawn, "You are just in time! I am running low on some of my best selling product. I need you to get to blacksmith Hegrenn and return with the supplies I've ordered from her. It's dangerous out there and many adventurers depend on me for their equipment. Find Hegrenn in south Qeynos and come back with all of the supplies that I've ordered.")
  80. end
  81. function Act(NPC,Spawn)
  82. PlayFlavor(NPC, "", "", "shrug", 0, 0, Spawn)
  83. end
  84. function Delivery2(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. OfferQuest(NPC, Spawn,Sneed)
  87. end
  88. function Delivered(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  91. local conversation = CreateConversation()
  92. AddConversationOption(conversation, "I'm just glad that I was able to help out.", "FinishQuest2")
  93. StartConversation(conversation, NPC, Spawn, "Now that's a job well done. I thank you kindly for helping me. Take some of this coin. You've really saved me a lot of time and effort.")
  94. end
  95. function FinishQuest2(NPC,Spawn)
  96. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. SetStepComplete(Spawn,Sneed, 2)
  99. end