9
3

PelleShinkicker.lua 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. --[[
  2. Script Name : SpawnScripts/ElddarGrove/PelleShinkicker.lua
  3. Script Purpose : Pelle Shinkicker
  4. Script Author : Dorbin
  5. Script Date : 5.2.2022
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local BookDelivery = 5514
  10. function spawn(NPC)
  11. ProvidesQuest(NPC,BookDelivery)
  12. SetPlayerProximityFunction(NPC, 9, "InRange", "LeaveRange")
  13. end
  14. function InRange(NPC, Spawn)
  15. if not HasCompletedQuest (Spawn, 5514) and not HasQuest (Spawn, 5514) then
  16. if math.random(1, 100) <= 80 then
  17. PlayFlavor(NPC, "voiceover/english/pelle_shinkicker/qey_elddar/100_quest_pelle_shinkicker_hail_f015f9a0.mp3", "Shoo shoo! I am much too busy to speak with you now.", "frustrated", 1998455291, 633133163, Spawn)
  18. end
  19. end
  20. end
  21. function hailed(NPC, Spawn)
  22. if GetFactionAmount(Spawn, 11) <0 then
  23. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  24. FaceTarget(NPC, Spawn)
  25. else
  26. FaceTarget(NPC, Spawn)
  27. Dialog.New(NPC, Spawn)
  28. Dialog.AddDialog("Oh, what is it now? Bristlebane's no doubt playing tricks on me again, causing all this interruption! Is there something meaningful I can help you with, or are you just going to gawk?")
  29. Dialog.AddVoiceover("voiceover/english/pelle_shinkicker/qey_elddar/pelleshinkicker000.mp3", 4147340962, 3983315910)
  30. if not HasQuest(Spawn,BookDelivery) and not HasCompletedQuest(Spawn, BookDelivery) then
  31. Dialog.AddOption("You seem busy. Need any help?", "Option1")
  32. end
  33. if GetQuestStep(Spawn,BookDelivery)==3 then
  34. Dialog.AddOption("I've delivered your book.", "Delivered")
  35. end
  36. if HasCompletedQuest(Spawn,BookDelivery) then
  37. Dialog.AddOption("You MUST be busy! I've helped you already once before. Take care.")
  38. end
  39. Dialog.AddOption("Oh, sorry. I'll leave you alone.")
  40. Dialog.Start()
  41. end
  42. end
  43. function Option1(NPC, Spawn)
  44. FaceTarget(NPC, Spawn)
  45. Dialog.New(NPC, Spawn)
  46. Dialog.AddDialog("I could in fact! I've been slightly worried that you've come to me with another story to write, or some other such thing. I already write my stiff fingers closer to their doom, and don't need more work to keep me away from my tavern in the Buabbleshire!")
  47. Dialog.AddVoiceover("voiceover/english/pelle_shinkicker/qey_elddar/pelleshinkicker001.mp3",2510348441, 2397724897)
  48. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  49. Dialog.AddOption("On with it. What do you need?", "Option2")
  50. Dialog.AddOption("Sounds like you should have stayed at the tavern. Farewell.")
  51. Dialog.Start()
  52. end
  53. function Option2(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. Dialog.New(NPC, Spawn)
  56. Dialog.AddDialog("Calm yourself sir! I'll have you know I'm just as respected around here for my exploits as an adventurer as my skill with a quill, Heh! Are you going to take my friend this book or not? I can't sit around here chatting all day about whether you'll do it or not.")
  57. Dialog.AddVoiceover("voiceover/english/pelle_shinkicker/qey_elddar/pelleshinkicker002.mp3", 1275889861, 2180981417)
  58. PlayFlavor(NPC, "", "", "scold", 0, 0, Spawn)
  59. Dialog.AddOption("Sorry. I'll deliver your book.", "StartQuest")
  60. Dialog.AddOption("Well now I've changed my mind. Good day.")
  61. Dialog.Start()
  62. end
  63. function StartQuest(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. OfferQuest(NPC, Spawn,BookDelivery)
  66. end
  67. function Delivered(NPC, Spawn)
  68. SetStepComplete(Spawn,BookDelivery, 3)
  69. FaceTarget(NPC, Spawn)
  70. Dialog.New(NPC, Spawn)
  71. Dialog.AddDialog("Splendid indeed! How was old Rune anyway? Getting along well I hope! I keep inviting him over to the tavern for an ale, but he always has his head buried in a musty old book. And not the exciting type I write either, Heh! Well, I wish you luck on your adventures! Perhaps this will help. I picked it up on one of mine!")
  72. Dialog.AddVoiceover("voiceover/english/pelle_shinkicker/qey_elddar/pelleshinkicker004.mp3", 1303257616, 1299740157)
  73. PlayFlavor(NPC, "", "", "heelclick", 0, 0, Spawn)
  74. Dialog.AddOption("Glad to have helped. Thanks.")
  75. Dialog.AddOption("To new adventures!")
  76. Dialog.Start()
  77. end