StewardTredo.lua 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --[[
  2. Script Name : SpawnScripts/Oakmyst_Classic/StewardTredo.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.19 12:10:07
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local QUEST_1 = 232
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 14, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC, QUEST_1)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC,Spawn)
  18. if GetFactionAmount(Spawn,11)>0 then
  19. if not HasCompletedQuest(Spawn, QUEST_1) and not HasQuest(Spawn, QUEST_1) then
  20. PlayFlavor(NPC, "voiceover/english/optional5/steward_tredo/st_aoi_edit_64.mp3", "Oh no! Poacher! Poacher! I can tell! I can tell!", "point", 3082625326, 519116783, Spawn, 0)
  21. end
  22. end
  23. end
  24. function hailed(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. if GetFactionAmount(Spawn,11)>0 then
  27. Dialog1(NPC, Spawn)
  28. else
  29. PlayFlavor(NPC,"","","shakefist",0,0,Spawn)
  30. end
  31. end
  32. ---------------------------------------------------------------------------------------------------------------
  33. -- QUEST 1
  34. ---------------------------------------------------------------------------------------------------------------
  35. function Dialog1(NPC, Spawn)
  36. FaceTarget(NPC, Spawn)
  37. Dialog.New(NPC, Spawn)
  38. Dialog.AddDialog("Not a poacher, I see. Thank the misty winds! Sorry for thinking otherwise. With all the babble of poachers lurking Oakmyst, I thought for sure your strange face would be the last sight I'd see!")
  39. Dialog.AddVoiceover("voiceover/english/optional1/steward_tredo/qey_adv01_oakmyst/stewardtredo000.mp3", 2443855119, 308651193)
  40. PlayFlavor(NPC,"","","sigh",0,0,Spawn)
  41. if not HasCompletedQuest(Spawn, QUEST_1) and not HasQuest(Spawn, QUEST_1) then
  42. Dialog.AddOption("Poachers? What can I do to help?", "OfferQuest1")
  43. end
  44. Dialog.AddOption("I wish you luck in avoiding poachers. Farewell.")
  45. Dialog.Start()
  46. end
  47. function OfferQuest1(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. OfferQuest(NPC, Spawn, QUEST_1)
  50. end