9
3

PelleShinkicker.lua 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. SetInfoStructString(NPC, "action_state", "fishing_fight")
  14. end
  15. function InRange(NPC, Spawn)
  16. if not HasCompletedQuest (Spawn, 5514) and not HasQuest (Spawn, 5514) then
  17. if math.random(1, 100) <= 80 then
  18. 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)
  19. end
  20. end
  21. end
  22. function hailed(NPC, Spawn)
  23. if GetFactionAmount(Spawn, 11) <0 then
  24. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. else
  27. FaceTarget(NPC, Spawn)
  28. Dialog.New(NPC, Spawn)
  29. 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?")
  30. Dialog.AddVoiceover("voiceover/english/pelle_shinkicker/qey_elddar/pelleshinkicker000.mp3", 4147340962, 3983315910)
  31. if not HasQuest(Spawn,BookDelivery) and not HasCompletedQuest(Spawn, BookDelivery) then
  32. Dialog.AddOption("You seem busy. Need any help?", "Option1")
  33. end
  34. if GetQuestStep(Spawn,BookDelivery)==3 then
  35. Dialog.AddOption("I've delivered your book.", "Delivered")
  36. end
  37. if HasCompletedQuest(Spawn,BookDelivery) then
  38. Dialog.AddOption("You MUST be busy! I've helped you already once before. Take care.")
  39. end
  40. Dialog.AddOption("Oh, sorry. I'll leave you alone.")
  41. Dialog.Start()
  42. end
  43. end
  44. function Option1(NPC, Spawn)
  45. FaceTarget(NPC, Spawn)
  46. Dialog.New(NPC, Spawn)
  47. Dialog.AddDialog("I could in fact! I had been slightly worried that you'd come to me with another story to write, or some other such thing! I already write my poor stiff fingers ever closer to their doom, and don't need more work to keep me away from my tavern in the Baubbleshire!")
  48. Dialog.AddVoiceover("voiceover/english/pelle_shinkicker/qey_elddar/pelleshinkicker001.mp3",2510348441, 2397724897)
  49. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  50. Dialog.AddOption("On with it. What do you need?", "Option2")
  51. Dialog.AddOption("Sounds like you should have stayed at the tavern. Farewell.")
  52. Dialog.Start()
  53. end
  54. function Option2(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. Dialog.New(NPC, Spawn)
  57. Dialog.AddDialog("Calm yourself! I'll have you know I'm just as respected around here for my exploits as an adventurer as my skill with the quill! Now, are you going to take my friend this book, or not? I can't very well sit around chatting with you all day about whether you'll do it or not!")
  58. Dialog.AddVoiceover("voiceover/english/pelle_shinkicker/qey_elddar/pelleshinkicker002.mp3", 1275889861, 2180981417)
  59. PlayFlavor(NPC, "", "", "scold", 0, 0, Spawn)
  60. Dialog.AddOption("Sorry. I'll deliver your book.", "StartQuest")
  61. Dialog.AddOption("Well now I've changed my mind. Good day.")
  62. Dialog.Start()
  63. end
  64. function StartQuest(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. OfferQuest(NPC, Spawn,BookDelivery)
  67. end
  68. function Delivered(NPC, Spawn)
  69. SetStepComplete(Spawn,BookDelivery, 3)
  70. FaceTarget(NPC, Spawn)
  71. Dialog.New(NPC, Spawn)
  72. 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!")
  73. Dialog.AddVoiceover("voiceover/english/pelle_shinkicker/qey_elddar/pelleshinkicker004.mp3", 1303257616, 1299740157)
  74. PlayFlavor(NPC, "", "", "heelclick", 0, 0, Spawn)
  75. Dialog.AddOption("Glad to have helped. Thanks.")
  76. Dialog.AddOption("To new adventures!")
  77. Dialog.Start()
  78. end