Snowboot.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. --[[
  2. Script Name : SpawnScripts/Graystone/Snowboot.lua
  3. Script Purpose : Snowboot <Armorsmith>
  4. Script Author : Dorbin
  5. Script Date : 2022.03.07
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Pickup = 5501
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. if math.random(1, 100) <= 80 then
  18. choice = math.random(1,3)
  19. if choice ==1 then
  20. PlayFlavor(NPC, "", "", "square", 0, 0, Spawn)
  21. elseif choice ==2 then
  22. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  23. else
  24. PlayFlavor(NPC, "", "", "woo", 0, 0, Spawn)
  25. end
  26. end
  27. end
  28. function hailed(NPC, Spawn)
  29. if GetFactionAmount(Spawn,11) <0 then
  30. FaceTarget(NPC, Spawn)
  31. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  32. else
  33. Dialog1(NPC, Spawn)
  34. end
  35. end
  36. function Dialog1(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. Dialog.New(NPC, Spawn)
  39. Dialog.AddDialog("Aye, what is it? I've got to be fitting this elven lass, and I haven't got all day! Come on, out with it!")
  40. Dialog.AddVoiceover("voiceover/english/armorsmith_snowboot/qey_village03/armorsmithsnowboot.mp3", 3584987348, 1438770677)
  41. if GetQuestStep(Spawn,Pickup)==1 then
  42. Dialog.AddOption("I'm here to pick up Watchman Fiercecry's suit of armor.","Armor")
  43. end
  44. Dialog.AddOption("Sorry to disturb you!")
  45. Dialog.Start()
  46. end
  47. function Armor(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. Dialog.New(NPC, Spawn)
  50. Dialog.AddDialog("Oh, you are, are you? And why should I believe you? I can't let every last soul run off with a full suit of armor just because they say they're here to pick it up for someone! Go on, give me a reason! Why should I give it to you? Come on! Out with it already! Why?")
  51. Dialog.AddVoiceover("voiceover/english/armorsmith_snowboot/qey_village03/armorsmithsnowboot000.mp3", 2002270290, 3759394726)
  52. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  53. Dialog.AddOption("Fiercecry is a part of the Graystone Watch. Don't you want him protected?","Armor2")
  54. Dialog.AddOption("Please? I am just trying to do a job.","Armor2")
  55. Dialog.AddOption("I'm sure 'Old Snowboot' helps those who helps others.","Armor2")
  56. Dialog.Start()
  57. end
  58. function Armor2(NPC, Spawn)
  59. FaceTarget(NPC, Spawn)
  60. Dialog.New(NPC, Spawn)
  61. Dialog.AddDialog("Blast my good nature! All right, just a moment while I get it for you. Now, don't let me hear about this suit going missing!")
  62. Dialog.AddVoiceover("voiceover/english/armorsmith_snowboot/qey_village03/armorsmithsnowboot001.mp3", 3372293691, 3262827310)
  63. PlayFlavor(NPC, "", "", "grumble", 0, 0, Spawn)
  64. Dialog.AddOption("I'll deliver it right away.","ArmorDone")
  65. Dialog.Start()
  66. end
  67. function ArmorDone(NPC,Spawn)
  68. FaceTarget(NPC, Spawn)
  69. SetStepComplete(Spawn, Pickup, 1)
  70. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  71. end