9
3

PeonaToughins.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. SetInfoStructString(NPC, "action_state", "tailoring_idle")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn)
  19. if MakeRandomInt(0, 100) <= 22 then
  20. FaceTarget(NPC, Spawn)
  21. local choice = math.random(1, 3)
  22. if choice == 1 then
  23. 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)
  24. elseif choice == 2 then
  25. 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)
  26. else
  27. 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)
  28. end
  29. end
  30. end
  31. function LeaveRange(NPC, Spawn)
  32. end
  33. function hailed(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. Dialog.New(NPC, Spawn)
  36. Dialog.AddDialog("Dare I say, it's a fine day for shopping. How can I help you?")
  37. Dialog.AddVoiceover("voiceover/english/armorer_peona_toughins/qey_village06/quests/armorer_peona_toughins/armorer_peona_toughins001.mp3", 3593368605, 1432200573)
  38. if GetQuestStep(Spawn, HalfPint) ==7 then
  39. Dialog.AddOption("I'm here about Dibble.", "Dialog3")
  40. end
  41. Dialog.AddOption("Just taking a look at your wares.")
  42. Dialog.AddOption("Maybe some other time.")
  43. Dialog.Start()
  44. end
  45. function Dialog3(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. Dialog.New(NPC, Spawn)
  48. Dialog.AddDialog("You know Dibble? That little sneak buggered off with my research papers! Haven't seen him since.")
  49. Dialog.AddVoiceover("voiceover/english/armorsmith_peona_toughins/qey_village06/quests/armorer_peona_toughins/armorer_peona_toughins002.mp3", 3565724797, 2126898466)
  50. Dialog.AddOption("How long ago was that?", "Dialog6")
  51. Dialog.Start()
  52. end
  53. function Dialog6(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. Dialog.New(NPC, Spawn)
  56. Dialog.AddDialog("He's been gone for nearly ten days. You know, I kind of miss him fawning over me.")
  57. PlayFlavor(NPC, "", "", "sad", 0, 0, Spawn)
  58. Dialog.AddVoiceover("voiceover/english/armorer_peona_toughins/qey_village06/quests/armorer_peona_toughins/armorer_peona_toughins003.mp3", 3515475449, 2740606233)
  59. Dialog.AddOption("He asked me to give you all of this.", "Dialog1")
  60. Dialog.AddOption("[Lie] Well, he's dead.","Dead")
  61. Dialog.Start()
  62. end
  63. function Dialog1(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. Dialog.New(NPC, Spawn)
  66. Dialog.AddDialog("This is everything that was outlined in my research papers! That impetuous imp! Anything to get on my good side ... How sweet.")
  67. PlayFlavor(NPC, "", "", "boggle", 0, 0, Spawn)
  68. Dialog.AddVoiceover("voiceover/english/armorer_peona_toughins/qey_village06/quests/armorer_peona_toughins/armorer_peona_toughins004.mp3", 22045046, 3777578970)
  69. Dialog.AddOption("The impetuous imp is languishing in Varsoon.", "Dialog2")
  70. Dialog.Start()
  71. end
  72. function Dialog2(NPC, Spawn)
  73. SetStepComplete(Spawn, HalfPint, 7)
  74. FaceTarget(NPC, Spawn)
  75. Dialog.New(NPC, Spawn)
  76. 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. ")
  77. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  78. Dialog.AddVoiceover("voiceover/english/armorer_peona_toughins/qey_village06/quests/armorer_peona_toughins/armorer_peona_toughins005.mp3", 3079387264, 1176091439)
  79. Dialog.AddOption("Thanks.")
  80. Dialog.Start()
  81. end
  82. function Dead(NPC, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. conversation = CreateConversation()
  85. PlayFlavor(NPC, "", "", "cry", 0, 0, Spawn)
  86. AddConversationOption(conversation, "... I mispoke. He is not dead, yet.","NotDead")
  87. StartConversation(conversation, NPC, Spawn, "WHAT?! ... How could... He can't be dead!")
  88. end
  89. function NotDead(NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. conversation = CreateConversation()
  92. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  93. AddConversationOption(conversation, "He is held up in the Ruins of Varsoon. Here is his stuff he wanted to give you.","Dialog1")
  94. StartConversation(conversation, NPC, Spawn, "Rude! How dare you play with my emotions! ... Dibble. Where is he? Is he safe?")
  95. end