ArmsdealerFroptub.lua 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. --[[
  2. Script Name : SpawnScripts/Castleview/ArmsdealerFroptub.lua
  3. Script Purpose : Armsdealer Froptub <Weaponsmith>
  4. Script Author : Dorbin
  5. Script Date : 2022.01.26
  6. Script Notes :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericWeaponsmithVoiceOvers.lua")
  9. local SwordPickup = 5455
  10. local EtchingTool = 5457
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  13. ProvidesQuest(NPC, EtchingTool)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn)
  19. if not HasCompletedQuest (Spawn, EtchingTool) and not HasQuest (Spawn, EtchingTool) then
  20. if math.random(1, 100) <= 70 then
  21. local choice = math.random(1,2)
  22. if choice == 1 then
  23. FaceTarget(NPC,Spawn)
  24. PlayFlavor(NPC, "voiceover/english/armsdealer_froptub/qey_village04/100_armsdealer_froptub_multhail1_14614e12.mp3", "Graciously accept my pardon for I am a quite the bit busy. Mayhaps I couldst speak with thee anon?", "beckon", 1509622466, 1792291092, Spawn)
  25. elseif choice == 2 then
  26. FaceTarget(NPC,Spawn)
  27. PlayFlavor(NPC, "voiceover/english/armsdealer_froptub/qey_village04/100_armsdealer_froptub_callout_4ecd2c86.mp3","Wherefore art that apprentice of mine?", "frustrated", 4063074411, 1155187226, Spawn)
  28. end
  29. end
  30. else
  31. if math.random(1, 100) <= 70 then
  32. GenericWeaponsmithHail(NPC, Spawn, "good")
  33. end
  34. end
  35. end
  36. --[[
  37. function hailed(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. PlayFlavor(NPC, "voiceover/english/armsdealer_froptub/qey_village04/100_armsdealer_froptub_multhail1_14614e12.mp3", "Graciously accept my pardon for I am a quite the bit busy. Mayhaps I couldst speak with thee anon?", "", 1509622466, 1792291092, Spawn)
  40. end
  41. ]]--
  42. function hailed(NPC, Spawn)
  43. FaceTarget(NPC, Spawn)
  44. conversation = CreateConversation()
  45. if GetQuestStep(Spawn, SwordPickup) == 1 then
  46. AddConversationOption(conversation, "I am here to see after Aadalian's sword", "OrderUp")
  47. end
  48. if not HasCompletedQuest (Spawn, EtchingTool) and not HasQuest (Spawn, EtchingTool) then
  49. AddConversationOption(conversation, "You seem frustrated. Do you need anything?", "Frustrated")
  50. end
  51. if GetQuestStep (Spawn, EtchingTool)==2 then
  52. AddConversationOption(conversation, "Here is your new etching tool, but Boggi is 'indisposed'.", "Delivery3")
  53. end
  54. PlayFlavor(NPC, "voiceover/english/armsdealer_froptub/qey_village04/armsdealerfroptub.mp3", "", "happy", 293364037, 660411644, Spawn)
  55. AddConversationOption(conversation, "I'm just browsing. Thank you.")
  56. StartConversation(conversation, NPC, Spawn, "Welcome to my shop adventurer! My orders seem to be backing up, but I can help you out if you are looking to make a quick purchase!")
  57. end
  58. function OrderUp(NPC, Spawn)
  59. FaceTarget(NPC, Spawn)
  60. conversation = CreateConversation()
  61. PlayFlavor(NPC, "voiceover/english/armsdealer_froptub/qey_village04/armsdealerfroptub004.mp3", "", "thank", 1054889156, 2742619000, Spawn)
  62. AddConversationOption(conversation, "Is it available to give to him?", "Delivery")
  63. StartConversation(conversation, NPC, Spawn, "FROOAK! Yes! I etched the mark he wished into the blade! I'm not much for ornimental marks, I prefer to leave the weapons I make in their pure form. One that calls to mind is that the weapon is an extension of the wielder's ability.")
  64. end
  65. function Delivery(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. conversation = CreateConversation()
  68. PlayFlavor(NPC, "voiceover/english/armsdealer_froptub/qey_village04/armsdealerfroptub005.mp3", "", "shrug", 2831616586, 2870409180, Spawn)
  69. AddConversationOption(conversation, "I'll take it to him right away", "Delivery2")
  70. StartConversation(conversation, NPC, Spawn, "I don't see why not. Here it is! I hope he is pleased with the work. Though, I understand the elven smiths are surpassed by none in this craft. He did come to me! I could only assume he wanted my craftsmanship.")
  71. end
  72. function Frustrated(NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. conversation = CreateConversation()
  75. PlayFlavor(NPC, "voiceover/english/armsdealer_froptub/qey_village04/armsdealerfroptub000.mp3", "", "pout", 3893983417, 1741346046, Spawn)
  76. AddConversationOption(conversation, "I can search for your apprentice, Boggi", "Boggi")
  77. AddConversationOption(conversation, "You'll need to find him on your own time. Sorry.")
  78. StartConversation(conversation, NPC, Spawn, "Alack! The high elves all wish special symbols etched into their blades! The problem is I broke'th my etching tool from overuse, and my lazy apprentice, Boggi, has not returned with my new tool! If thou hath time, could'st thou find'th him and tell him to get back here right away?")
  79. end
  80. function Delivery3(NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. conversation = CreateConversation()
  83. PlayFlavor(NPC, "voiceover/english/armsdealer_froptub/qey_village04/armsdealerfroptub002.mp3", "", "clap", 3509055396, 574937181, Spawn)
  84. AddConversationOption(conversation, "Thank you.", "Completed")
  85. StartConversation(conversation, NPC, Spawn, "Great! Now I can'st complete these orders. Privy, accept these meger coins in payment for thyn effort.")
  86. end
  87. function Boggi(NPC, Spawn, Quest)
  88. FaceTarget(NPC, Spawn)
  89. OfferQuest(NPC, Spawn, EtchingTool)
  90. end
  91. function Delivery2(NPC, Spawn)
  92. SetStepComplete(Spawn, SwordPickup, 1)
  93. end
  94. function Completed(NPC, Spawn)
  95. SetStepComplete(Spawn,EtchingTool , 2)
  96. PlayFlavor(NPC, "voiceover/english/armsdealer_froptub/qey_village04/armsdealerfroptub003.mp3", "Tis good having people such as thou in Qeynos. Thou help'th make this city great.", "thank", 3747286321, 1439596688, Spawn)
  97. end