Waulon.lua 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. require "SpawnScripts/Generic/DialogModule"
  2. function spawn(NPC)
  3. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  4. end
  5. function InRange (NPC,player)
  6. step = GetQuestStep(player, 524)
  7. if step == 2 or step ==3 then
  8. PlayFlavor(NPC, "voiceover/english/waulon/boat_06p_tutorial02/walon_0_004.mp3", "Where's me hat? Needs me lucky hat!", "confused", 2688932325, 103225044, player, 0)
  9. end
  10. end
  11. function hailed(NPC, player)
  12. FaceTarget(NPC, player)
  13. if HasQuest(player, 524) == false or HasCompletedQuest(player, 524) == true then
  14. PlayFlavor(NPC, "voiceover/english/waulon/boat_06p_tutorial02/walon_0_008.mp3", "What? Can't ye see? Busy, away with ye!", "", 1608066875, 70639594)
  15. else
  16. step = GetQuestStep(player, 524)
  17. if step == 1 then
  18. -- InstructionWindowGoal(player,0)
  19. InstructionWindowClose(player)
  20. Dialog.New(NPC, player)
  21. Dialog.AddDialog("Wot? Oh, hey there, ye' startled me.")
  22. Dialog.AddVoiceover("voiceover/english/waulon/boat_06p_tutorial02/walon_0_001.mp3", 814960513, 2301562586)
  23. Dialog.AddOption("Sorry about that.", "startled_me")
  24. Dialog.Start()
  25. elseif step == 2 then
  26. PlayFlavor(NPC, "", "", "frustrated", 2688932325, 103225044, player, 0)
  27. elseif step == 3 then
  28. Dialog.New(NPC, player)
  29. Dialog.AddDialog("Ah, me hat! Was worried. See, dis' hat gives me the luck.")
  30. Dialog.AddVoiceover("voiceover/english/waulon/boat_06p_tutorial02/walon_0_005.mp3", 4097259098, 893296183)
  31. Dialog.AddOption("Glad to help!", "returned_hat")
  32. Dialog.Start()
  33. SetEquipment(NPC, 2, 1083, 255, 255, 255, 255, 255, 255) --Gives Waulon his hat back visually
  34. -- InstructionWindowGoal(player, 0)
  35. end
  36. end
  37. end
  38. function returned_hat(NPC, player)
  39. Dialog.New(NPC, player)
  40. Dialog.AddDialog("Now me is safe, thanks ta' ye. Here, take this charm. Ya' may find a use for it.")
  41. Dialog.AddVoiceover("voiceover/english/waulon/boat_06p_tutorial02/walon_0_006.mp3", 316186630, 2628530085)
  42. Dialog.AddOption("Thanks, Waulon.", "received_charm")
  43. Dialog.Start()
  44. end
  45. function received_charm(NPC, player)
  46. finished_step_three(NPC, player)
  47. Dialog.New(NPC, player)
  48. Dialog.AddDialog("Well now, Ingrid o'er there, can show ya' the rest of the ship. Me needs ta' plot the course ta' the isles now.")
  49. Dialog.AddVoiceover("voiceover/english/waulon/boat_06p_tutorial02/walon_0_007.mp3", 1973137904, 2648127610)
  50. Dialog.AddOption("Ok.")
  51. Dialog.Start()
  52. end
  53. function finished_step_three(NPC, player)
  54. SetStepComplete(player, 524, 3)
  55. end
  56. function startled_me(NPC, player)
  57. Dialog.New(NPC, player)
  58. Dialog.AddDialog("Can't seem ta' find me hat.")
  59. Dialog.AddVoiceover("voiceover/english/waulon/boat_06p_tutorial02/walon_0_002.mp3", 1759807851, 3940656870)
  60. Dialog.AddOption("Do you need some help?", "help_find_hat")
  61. Dialog.Start()
  62. end
  63. function help_find_hat(NPC, player)
  64. chest = GetRandomSpawnByID(NPC, 270010)
  65. FaceTarget(NPC, chest)
  66. Dialog.New(NPC, player)
  67. Dialog.AddDialog("Sure! Me needs ya' ta' go lookie in them there boxes and if ye' find it, lets me know.")
  68. Dialog.AddVoiceover("voiceover/english/waulon/boat_06p_tutorial02/walon_0_003.mp3", 2072797774, 185252141)
  69. Dialog.AddOption("Ok.", "finished_step_one")
  70. Dialog.Start()
  71. end
  72. function finished_step_one(NPC, player)
  73. InstructionWindowGoal(player, 0)
  74. InstructionWindowClose(player)
  75. SetStepComplete(player, 524, 1)
  76. end
  77. function respawn(NPC)
  78. end