9
3

Ingrid.lua 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --[[
  2. Script Name : SpawnScripts/FarJourneyFreeport/Ingrid.lua
  3. Script Author : Cynnar
  4. Script Date : 2019.10.18 06:10:27
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local ShardOfLucin = 12565
  10. function spawn(NPC)
  11. end
  12. function hailed(NPC, player)
  13. FaceTarget(NPC, player)
  14. if HasQuest(player, 524) == false or HasCompletedQuest(player, 524) == true then
  15. choice = math.random(1, 3)
  16. if choice == 1 then
  17. PlayFlavor(NPC, "voiceover/english/ingrid/boat_06p_tutorial02_fvo_008.mp3", "Don't you just love the sea?", "", 541733813, 1294072887)
  18. elseif choice == 2 then
  19. PlayFlavor(NPC, "voiceover/english/ingrid/boat_06p_tutorial02_fvo_007.mp3", "Yo ho ho and a bottle of rum!", "", 964088856, 3568852318)
  20. else
  21. PlayFlavor(NPC, "voiceover/english/ingrid/boat_06p_tutorial02_fvo_009.mp3", "I hate rats, every time we dock they get on board and eat our supplies.", "", 3636322414, 1973183674)
  22. end
  23. else
  24. step = GetQuestStep(player, 524)
  25. if step == 4 then
  26. SendStateCommand(NPC, 0)
  27. Dialog.New(NPC, player)
  28. Dialog.AddDialog("Hello, how are you?")
  29. Dialog.AddVoiceover("voiceover/english/ingrid/boat_06p_tutorial02/ingrid_0_001.mp3", 1960704460, 917558592)
  30. Dialog.AddOption("Good, thanks. How about you?", "small_talk")
  31. Dialog.Start()
  32. elseif step == 5 then
  33. PlayFlavor(NPC, "voiceover/english/ingrid/boat_06p_tutorial02_fvo_005.mp3", "Is Vim not going to sell it to you? That is just my luck... well I guess I will have to finish this work then.", "", 4181806501, 3186272404)
  34. elseif step == 6 then
  35. SetTutorialStep(player, 31)
  36. AddCoin(player, 10)
  37. DisplayText(player, 34, "You receive 10 Copper.")
  38. Dialog.New(NPC, player)
  39. Dialog.AddDialog("Ah! You got the shard. Great! Now I can stop doing this work and enjoy the rest of this trip. Here is some coin for your help.")
  40. Dialog.AddVoiceover("voiceover/english/ingrid/boat_06p_tutorial02/ingrid_0_006.mp3", 502975024, 483052250)
  41. Dialog.AddOption("Thanks.", "thanks_for_getting_shard")
  42. Dialog.Start()
  43. end
  44. end
  45. end
  46. function thanks_for_getting_shard(NPC, player)
  47. SetStepComplete(player, 524, 6)
  48. RemoveItem(player, ShardOfLucin)
  49. end
  50. function small_talk(NPC, player)
  51. Dialog.New(NPC, player)
  52. Dialog.AddDialog("I am fine, just... after the last pickup I have been working extra hard, since Vim said she would give me the piece of Luclin she found.")
  53. Dialog.AddVoiceover("voiceover/english/ingrid/boat_06p_tutorial02/ingrid_0_002.mp3", 3891218598, 1657063801)
  54. Dialog.AddOption("Vim?", "vim_who")
  55. Dialog.Start()
  56. end
  57. function vim_who(NPC, player)
  58. Dialog.New(NPC, player)
  59. Dialog.AddDialog("Yes, yes, Vim. The merchant over there. She found a small piece of the moon and is having me work for it. Maybe you can go buy it from her for me?")
  60. Dialog.AddVoiceover("voiceover/english/ingrid/boat_06p_tutorial02/ingrid_0_003.mp3", 3050752668, 1437910974)
  61. Dialog.AddOption("Sure, but I have no money.", "no_money")
  62. Dialog.Start()
  63. vim = GetRandomSpawnByID(NPC, 270007)
  64. FaceTarget(NPC, vim)
  65. AddTimer(NPC, 3000, "turn_towards_player", 1, player)
  66. end
  67. function turn_towards_player(NPC, player)
  68. FaceTarget(NPC, player)
  69. end
  70. function no_money(NPC, player)
  71. Dialog.New(NPC, player)
  72. Dialog.AddDialog("Maybe you have something she will buy. Why don't you go talk to her.")
  73. Dialog.AddVoiceover("voiceover/english/ingrid/boat_06p_tutorial02/ingrid_0_004.mp3", 3978048706, 2537762235)
  74. Dialog.AddOption("Sure.", "finished_step_four")
  75. Dialog.Start()
  76. end
  77. function finished_step_four(NPC, player)
  78. SetTutorialStep(player, 22)
  79. SetStepComplete(player, 524, 4)
  80. end
  81. function respawn(NPC)
  82. end