RachaelClothspinner.lua 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/RachaelClothspinner.lua
  3. Script Purpose : Rachael Clothspinner
  4. Script Author : Dorbin
  5. Script Date : 2022.04.23
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local Bears = 5537
  9. function spawn(NPC)
  10. ProvidesQuest(NPC,Bears)
  11. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  12. end
  13. function InRange(NPC, Spawn)
  14. if GetFactionAmount(Spawn,11) <0 then
  15. FaceTarget(NPC, Spawn)
  16. choice = math.random(1,2)
  17. if choice == 1 then
  18. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  19. elseif choice == 2 then
  20. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  21. end
  22. else
  23. if math.random(1,100) <=70 then
  24. if not HasCompletedQuest(Spawn,Bears) and not HasQuest(Spawn,Bears) then
  25. PlayFlavor(NPC, "voiceover/english/rachael_clothspinner/qey_north/100_merchant_rachael_clothspinner_g4_callout1_7d8b50df.mp3", "Huh? Oh hello. Hmmm, I know that needle is around here somewhere, but just in case, watch your step!", "", 3754593898, 2394634278, Spawn, 0)
  26. end
  27. end
  28. end
  29. end
  30. function respawn(NPC)
  31. spawn(NPC)
  32. end
  33. function hailed(NPC, Spawn)
  34. FaceTarget(NPC,Spawn)
  35. if GetFactionAmount(Spawn,11) <0 then
  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. elseif not HasCompletedQuest(Spawn,Bears)then
  43. Dialog1(NPC,Spawn)
  44. else
  45. RandomGreeting(NPC, Spawn)
  46. end
  47. end
  48. function RandomGreeting(NPC, Spawn)
  49. local choice = MakeRandomInt(1,4)
  50. if choice == 1 then
  51. PlayFlavor(NPC, "voiceover/english/optional2/human_eco_good_2/ft/service/merchant/human_merchant_service_good_2_hail_gf_ae84abf9.mp3", "Go on, take a look at the stock. You'll never beat this price in the city. I guarantee it!", "wink", 4082049284, 258435992, Spawn, 0)
  52. elseif choice == 2 then
  53. PlayFlavor(NPC, "voiceover/english/rachael_clothspinner/qey_north/100_merchant_rachael_clothspinner_g4_callout1_7d8b50df.mp3", "Huh? Oh hello. Hmmm, I know that needle is around here somewhere, but just in case, watch your step!", "", 3754593898, 2394634278, Spawn, 0)
  54. elseif choice == 3 then
  55. PlayFlavor(NPC, "voiceover/english/optional2/human_eco_good_2/ft/service/merchant/human_merchant_service_good_2_hail_gf_24322c5d.mp3", "Greetings, friend traveler! We have the finest supplies to fill your adventuring needs.", "smile", 2230459021, 1376449266, Spawn, 0)
  56. elseif choice == 4 then
  57. PlayFlavor(NPC, "voiceover/english/optional2/human_eco_good_2/ft/service/merchant/human_merchant_service_good_2_hail_gf_45d92a75.mp3", "Welcome! What can I help you with?", "bow", 218555884, 644636009, Spawn, 0)
  58. end
  59. end
  60. function Dialog1(NPC,Spawn)
  61. local conversation = CreateConversation()
  62. FaceTarget(NPC,Spawn)
  63. PlayFlavor(NPC, "voiceover/english/rachael_clothspinner/qey_north/rachelclothspinner000.mp3", "", "doubletake", 1785499202, 3703080604, Spawn, 0)
  64. if not HasQuest(Spawn,Bears) and not HasCompletedQuest(Spawn, Bears)then
  65. AddConversationOption(conversation, "You seem preoccupied. I'm happy to help if I can.","QuestStart")
  66. end
  67. if GetQuestStep(Spawn, Bears) ==2 then
  68. AddConversationOption(conversation, "Here are the pelts you asked for. I hope they work for you.","Delivered")
  69. end
  70. AddConversationOption(conversation, "Err. Thanks for the warning.")
  71. StartConversation(conversation, NPC, Spawn, "Huh? Oh hello. Hmmm, I know that needle is around here somewhere, but just in case, watch your step!")
  72. end
  73. function QuestStart(NPC,Spawn)
  74. FaceTarget(NPC, Spawn)
  75. PlayFlavor(NPC, "voiceover/english/rachael_clothspinner/qey_north/rachelclothspinner001.mp3", "", "agree", 1828375917, 2467295658, Spawn)
  76. local conversation = CreateConversation()
  77. AddConversationOption(conversation, "Gladly. I'll return with your pelts.", "Delivery2")
  78. AddConversationOption(conversation, "I'm not much for handling bears. Sorry.")
  79. StartConversation(conversation, NPC, Spawn, "Really? Marvelious! I placed an order with the Far Seas Trading Company for four fine Oakmyst great bear pelts and I've still not received my order! I'm concerend I won't get these items in a timely manner. If you fill the order for me, I'll gladly pay you what I would have paid them!")
  80. end
  81. function Delivery2(NPC, Spawn)
  82. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. OfferQuest(NPC, Spawn,Bears)
  85. end
  86. function Delivered(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. PlayFlavor(NPC, "voiceover/english/rachael_clothspinner/qey_north/rachelclothspinner002.mp3", "", "bow", 3015059264, 2600919408, Spawn)
  89. local conversation = CreateConversation()
  90. AddConversationOption(conversation, "You may be right. Thank you!", "FinishQuest")
  91. StartConversation(conversation, NPC, Spawn, "Oh my! You're a life saver! I've still not heard any word on my order with the Far Seas Trading Company. You could do quite well for yourself fulfilling their unfulfilled orders! And as promised, here's your payment.")
  92. end
  93. function FinishQuest(NPC,Spawn)
  94. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. SetStepComplete(Spawn,Bears, 2)
  97. end