TacklemasterMoyna.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. --[[
  2. Script Name : SpawnScripts/Graystone/TacklemasterMoyna.lua
  3. Script Purpose : Tacklemaster Moyna
  4. Script Author : Scatman
  5. Script Date : 2008.09.19
  6. Script Notes : Added fishingpole quest -2022.03.09 Dorbin
  7. --]]
  8. local QUEST_1 = 293
  9. local FishingPole = 5505
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, QUEST_1)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. end
  14. function InRange(NPC, Spawn) --Quest Callout
  15. if math.random(1, 100) <= 75 then
  16. if not HasCompletedQuest (Spawn, QUEST_1) and not HasQuest (Spawn, QUEST_1) then
  17. choice = math.random(1,2)
  18. if choice ==1 then
  19. FaceTarget(NPC, Spawn)
  20. PlayFlavor(NPC, "voiceover/english/tacklemaster_moyna/qey_village03/100_tacklemaster_barbarian_female_moyna_callout_5f36d1ce.mp3", "Drat... almost out of bait. You there! Can you fetch me some more bait?", "point", 1502130237, 2117204021, Spawn)
  21. else
  22. FaceTarget(NPC, Spawn)
  23. PlayFlavor(NPC, "voiceover/english/tacklemaster_moyna/qey_village03/100_tacklemaster_barbarian_female_moyna_multhail1_58a69dc2.mp3", "Oh, I thought you were someone else! On your way now.", "doubletake", 2978375268, 150991096, Spawn)
  24. end
  25. elseif HasQuest(Spawn, QUEST_1) then
  26. FaceTarget(NPC, Spawn)
  27. PlayFlavor(NPC, "voiceover/english/tacklemaster_moyna/qey_village03/100_tacklemaster_barbarian_female_moyna_multhail3_629de1e4.mp3", "What's taking you so long, friend? I don't have all day! Fetch me my centipedes", "tap", 1963777615, 3216865707, Spawn)
  28. else
  29. choice = math.random(1,2)
  30. if choice ==1 then
  31. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  32. else
  33. PlayFlavor(NPC, "", "", "tap", 0, 0, Spawn)
  34. end
  35. end
  36. end
  37. end
  38. function hailed(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. conversation = CreateConversation()
  41. if HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 2 then
  42. AddConversationOption(conversation, "I've returned with the bait you requested.", "ReturnedWithBait")
  43. elseif not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  44. AddConversationOption(conversation, "I'm interested in finding a little work around here.", "FindingWork")
  45. end
  46. if GetQuestStep(Spawn,FishingPole)==1 then
  47. AddConversationOption(conversation, "I'm here to pick up a new fishing pole for Bryce.", "GetPole")
  48. end
  49. PlayFlavor(NPC, "voiceover/english/tacklemaster_moyna/qey_village03/tacklemastermoyna.mp3", "", "", 2910658366, 1466320622, Spawn)
  50. AddConversationOption(conversation, "No thanks, not today.")
  51. StartConversation(conversation, NPC, Spawn, "Welcome to Graystone! With our Kerran population, the fish supply is never enough. If you're looking to fill that supply, you'll need some of my goods. Care to have a look?")
  52. end
  53. function respawn(NPC)
  54. spawn(NPC)
  55. end
  56. --[[
  57. function RandomVoice(NPC, Spawn)
  58. local choice = math.random(1, 3)
  59. if choice == 1 then
  60. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1001.mp3", "", "", 0, 0, Spawn)
  61. elseif choice == 2 then
  62. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1001.mp3", "", "", 0, 0, Spawn)
  63. else
  64. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1001.mp3", "", "", 0, 0, Spawn)
  65. end
  66. end
  67. ]]--
  68. -----------------------------------------------------------------------------------------------------
  69. -- QUEST 1
  70. -----------------------------------------------------------------------------------------------------
  71. function FindingWork(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. conversation = CreateConversation()
  74. PlayFlavor(NPC, "voiceover/english/tacklemaster_moyna/qey_village03/tacklemastermoyna001.mp3", "", "", 530187050, 1736772086, Spawn)
  75. AddConversationOption(conversation, "Provided the job actually pays, I'll do it.", "ProvidedItPays")
  76. AddConversationOption(conversation, "No thanks, sounds icky.")
  77. StartConversation(conversation, NPC, Spawn, "You're in luck. I need more bait. If you're interested, you could fetch me some centipede meat. Ubani and Brice catch all the fish from the pier, and I always need more bait.")
  78. end
  79. function ProvidedItPays(NPC, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. conversation = CreateConversation()
  82. PlayFlavor(NPC, "voiceover/english/tacklemaster_moyna/qey_village03/tacklemastermoyna002.mp3", "", "", 3085757696, 757857128, Spawn)
  83. AddConversationOption(conversation, "I'll be back when I've got what you need.", "OfferQuest1")
  84. StartConversation(conversation, NPC, Spawn, "It'll pay but not too well. The bait business is decent next to the pier, but the stuff isn't exactly worth its weight in platinum, if you know what I mean. I need you to gather some centipede meat for me from the Forest Ruins.")
  85. end
  86. function OfferQuest1(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. OfferQuest(NPC, Spawn, QUEST_1)
  89. end
  90. function ReturnedWithBait(NPC, Spawn)
  91. SetStepComplete(Spawn, QUEST_1, 2)
  92. FaceTarget(NPC, Spawn)
  93. conversation = CreateConversation()
  94. AddConversationOption(conversation, "Thank you Moyna!")
  95. StartConversation(conversation, NPC, Spawn, "Thank you! With this supply, I can keep my bait buckets filled for at least another day or two. Well done. Here's your reward as promised.")
  96. end
  97. function GetPole(NPC, Spawn)
  98. FaceTarget(NPC, Spawn)
  99. conversation = CreateConversation()
  100. PlayFlavor(NPC, "voiceover/english/tacklemaster_moyna/qey_village03/tacklemastermoyna000.mp3", "", "ponder", 1055547501, 1408950171, Spawn)
  101. AddConversationOption(conversation, "I'll get this to him. Thanks.", "Pickup")
  102. StartConversation(conversation, NPC, Spawn, "Let me see how much coin Bryce has to spend... Hmmm, well I've got this pole. It should suit his needs. He's not got enough coin to do any better, but this should do nicely.")
  103. end
  104. function Pickup(NPC,Spawn)
  105. SetStepComplete(Spawn, FishingPole, 1)
  106. end