NiaJaja.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/NiaJaja.lua
  3. Script Purpose : Nia Jaja
  4. Script Author : Dorbin
  5. Script Date : 06.25.2022
  6. Script Notes : Has Kerran Language check
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC,5598)
  13. SetInfoStructString(NPC, "action_state", "mood_angry")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC,Spawn)
  19. if not HasQuest(Spawn, 5598) and not HasCompletedQuest(Spawn,5598)then
  20. if math.random(1,100)<=85 then
  21. if not HasLanguage(Spawn,13)then
  22. FaceTarget(NPC, Spawn)
  23. Garbled(NPC,Spawn)
  24. else
  25. PlayFlavor(NPC, "voiceover/english/nia_jaja/qey_village01/qey_village01_nia_jaja_callout1_87e08206.mp3", "... and then she has the gall to say my coat rrreminders her of a common hyena! I can't stand that woman! I can't face her again! Oh, I need someone to help me.", "", 1998825354, 2680772618, Spawn,13)
  26. end
  27. end
  28. end
  29. end
  30. function hailed(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. if GetFactionAmount(Spawn,11)<0 then
  33. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  34. else
  35. if HasCompletedQuest(Spawn,5598)then
  36. PlayFlavor(NPC, "voiceover/english/nia_jaja/qey_village01/qey_village01_nia_jaja_multhail1_ab7bd6d4.mp3", "I simply can't face her! Can't you see I'm angry; I've no time to chat with you!", "", 1436884292, 4259898399, Spawn,13)
  37. else
  38. if not HasLanguage(Spawn,13)then
  39. Garbled(NPC,Spawn)
  40. PlayFlavor(NPC,"","","noway",0,0,Spawn)
  41. else
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC, Spawn)
  44. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  45. Dialog.AddDialog("... and then she has the gall to say my coat rrremindered her of a common hyena!")
  46. Dialog.AddVoiceover("voiceover/english/nia_jaja/qey_village01/niajaja000.mp3", 2194298502, 3471338727)
  47. Dialog.AddLanguage(13)
  48. if not HasCompletedQuest (Spawn, 5598) and not HasQuest (Spawn, 5598) then
  49. Dialog.AddOption("Excuse me, but who said that?", "Helping")
  50. end
  51. if GetQuestStep (Spawn, 5598)==2 then
  52. Dialog.AddOption("Marjani is still hanging around the scribe shop.","Delivered")
  53. end
  54. Dialog.AddOption("Sorry, I'm just passing through.")
  55. Dialog.Start()
  56. end
  57. end
  58. end
  59. end
  60. function Helping(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. Dialog.New(NPC, Spawn)
  63. PlayFlavor(NPC, "", "", "frustrated", 0, 0, Spawn)
  64. Dialog.AddDialog("Oh, it was that minx Marrrjani Kenan! First she insults my knowledge of magic and then my gorgeous coat! Would you help me? I need to know if Marjani is still in the scrrribe shop. I don't want to return to work until that SHREW is gone!")
  65. Dialog.AddVoiceover("voiceover/english/nia_jaja/qey_village01/niajaja001.mp3", 3841131398, 2599787330)
  66. Dialog.AddLanguage(13)
  67. Dialog.AddOption("I can go check for you.", "QuestBegin")
  68. Dialog.AddOption("That is unfortunate. Sorry, but I'm busy.")
  69. Dialog.Start()
  70. end
  71. function QuestBegin (NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. OfferQuest(NPC, Spawn, 5598)
  74. end
  75. function Delivered(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. Dialog.New(NPC, Spawn)
  78. PlayFlavor(NPC, "", "", "stare", 0, 0, Spawn)
  79. Dialog.AddDialog("She was still there?! I guess I won't be going back today. I want to claw- her- eyes- out!")
  80. Dialog.AddVoiceover("voiceover/english/nia_jaja/qey_village01/niajaja003.mp3", 473886489, 3909124821)
  81. Dialog.AddLanguage(13)
  82. Dialog.AddOption("Sorry to be the barer of bad news!", "QuestDone")
  83. Dialog.AddOption("...I'll just be... over there...", "QuestDone")
  84. Dialog.Start()
  85. end
  86. function QuestDone(NPC, Spawn)
  87. SetStepComplete(Spawn, 5598, 2)
  88. end