PeonaToughins.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/PeonaToughins.lua
  3. Script Purpose : Peona Toughins <Tailor>
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Script Notes : Added dialog/HalfPint Quest - 2022.01.23 Dorbin
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. dofile("SpawnScripts/Generic/GenericArmorsmithVoiceOvers.lua")
  10. local HalfPint = 5448
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. if MakeRandomInt(0, 100) <= 22 then
  19. FaceTarget(NPC, Spawn)
  20. local choice = math.random(1, 3)
  21. if choice == 1 then
  22. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/service/merchant/halfling_merchant_service_good_1_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", 2106259105, 3779666567, Spawn)
  23. elseif choice == 2 then
  24. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/service/armorsmith/halfling_armorsmith_service_good_1_hail_gf_bb02310.mp3", "Coin is no object when gaining protection from your enemies. What price can be put on your safety? ", "no", 2117849076, 1311257210, Spawn)
  25. else
  26. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/service/armorsmith/halfling_armorsmith_service_good_1_hail_gf_58a92b79.mp3", "You can never be too careful when it comes to protection. Here, try on one of these.", "beckon", 1344167789, 3405057634, Spawn)
  27. end
  28. end
  29. end
  30. function LeaveRange(NPC, Spawn)
  31. end
  32. function hailed(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. Dialog.New(NPC, Spawn)
  35. Dialog.AddDialog("Dare I say, it's a fine day for shopping. How can I help you?")
  36. Dialog.AddVoiceover("voiceover/english/armorer_peona_toughins/qey_village06/quests/armorer_peona_toughins/armorer_peona_toughins001.mp3", 3593368605, 1432200573)
  37. if GetQuestStep(Spawn, HalfPint) ==7 then
  38. Dialog.AddOption("I'm here about Dibble.", "Dialog3")
  39. end
  40. Dialog.AddOption("Just taking a look at your wares.")
  41. Dialog.AddOption("Maybe some other time.")
  42. Dialog.Start()
  43. end
  44. function Dialog3(NPC, Spawn)
  45. FaceTarget(NPC, Spawn)
  46. Dialog.New(NPC, Spawn)
  47. Dialog.AddDialog("You know Dibble? That little sneak buggered off with my research papers! Haven't seen him since.")
  48. Dialog.AddVoiceover("voiceover/english/armorsmith_peona_toughins/qey_village06/quests/armorer_peona_toughins/armorer_peona_toughins002.mp3", 3565724797, 2126898466)
  49. Dialog.AddOption("How long ago was that?", "Dialog6")
  50. Dialog.Start()
  51. end
  52. function Dialog6(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. Dialog.New(NPC, Spawn)
  55. Dialog.AddDialog("He's been gone for nearly ten days. You know, I kind of miss him fawning over me.")
  56. PlayFlavor(NPC, "", "", "sad", 0, 0, Spawn)
  57. Dialog.AddVoiceover("voiceover/english/armorer_peona_toughins/qey_village06/quests/armorer_peona_toughins/armorer_peona_toughins003.mp3", 3515475449, 2740606233)
  58. Dialog.AddOption("He asked me to give you all of this.", "Dialog1")
  59. Dialog.AddOption("[Lie] Well, he's dead.","Dead")
  60. Dialog.Start()
  61. end
  62. function Dialog1(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. Dialog.New(NPC, Spawn)
  65. Dialog.AddDialog("This is everything that was outlined in my research papers! That impetuous imp! Anything to get on my good side ... How sweet.")
  66. PlayFlavor(NPC, "", "", "boggle", 0, 0, Spawn)
  67. Dialog.AddVoiceover("voiceover/english/armorer_peona_toughins/qey_village06/quests/armorer_peona_toughins/armorer_peona_toughins004.mp3", 22045046, 3777578970)
  68. Dialog.AddOption("The impetuous imp is languishing in Varsoon.", "Dialog2")
  69. Dialog.Start()
  70. end
  71. function Dialog2(NPC, Spawn)
  72. SetStepComplete(Spawn, HalfPint, 7)
  73. FaceTarget(NPC, Spawn)
  74. Dialog.New(NPC, Spawn)
  75. Dialog.AddDialog("We must organize a rescue party. I'll speak with Marshal Surefoot at once. Oh, thank you for letting me know what happened to Dibble. It's not much, but please take this for all you've done. ")
  76. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  77. Dialog.AddVoiceover("voiceover/english/armorer_peona_toughins/qey_village06/quests/armorer_peona_toughins/armorer_peona_toughins005.mp3", 3079387264, 1176091439)
  78. Dialog.AddOption("Thanks.")
  79. Dialog.Start()
  80. end
  81. function Dead(NPC, Spawn)
  82. FaceTarget(NPC, Spawn)
  83. conversation = CreateConversation()
  84. PlayFlavor(NPC, "", "", "cry", 0, 0, Spawn)
  85. AddConversationOption(conversation, "... I mispoke. He is not dead, yet.","NotDead")
  86. StartConversation(conversation, NPC, Spawn, "WHAT?! ... How could... He can't be dead!")
  87. end
  88. function NotDead(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. conversation = CreateConversation()
  91. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  92. AddConversationOption(conversation, "He is held up in the Ruins of Varsoon. Here is his stuff he wanted to give you.","Dialog1")
  93. StartConversation(conversation, NPC, Spawn, "Rude! How dare you play with my emotions! ... Dibble. Where is he? Is he safe?")
  94. end