9
3

StewardTredo.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. --[[
  2. Script Name : SpawnScripts/Oakmyst/StewardTredo.lua
  3. Script Purpose : Steward Tredo
  4. Script Author : scatman
  5. Script Date : 2009.05.08
  6. Edited by : ememjr
  7. edit date : 2017.05.05
  8. edit note : updated quest numbers
  9. Script Notes : Auto-Generated Conversation from PacketParser Data
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. local QUEST_1 = 232
  13. function spawn(NPC)
  14. SetPlayerProximityFunction(NPC, 14, "InRange", "LeaveRange")
  15. ProvidesQuest(NPC, QUEST_1)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function InRange(NPC,Spawn)
  21. if GetFactionAmount(Spawn,11)>0 then
  22. if not HasCompletedQuest(Spawn, QUEST_1) and not HasQuest(Spawn, QUEST_1) then
  23. 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)
  24. end
  25. end
  26. end
  27. function hailed(NPC, Spawn)
  28. FaceTarget(NPC, Spawn)
  29. if GetFactionAmount(Spawn,11)>0 then
  30. Dialog1(NPC, Spawn)
  31. else
  32. PlayFlavor(NPC,"","","shakefist",0,0,Spawn)
  33. end
  34. end
  35. ---------------------------------------------------------------------------------------------------------------
  36. -- QUEST 1
  37. ---------------------------------------------------------------------------------------------------------------
  38. function Dialog1(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. Dialog.New(NPC, Spawn)
  41. 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!")
  42. Dialog.AddVoiceover("voiceover/english/optional1/steward_tredo/qey_adv01_oakmyst/stewardtredo000.mp3", 2443855119, 308651193)
  43. if not HasCompletedQuest(Spawn, QUEST_1) and not HasQuest(Spawn, QUEST_1) then
  44. Dialog.AddOption("Poachers? What can I do to help?", "OfferQuest1")
  45. end
  46. Dialog.AddOption("I wish you luck in avoiding poachers. Farewell.")
  47. Dialog.Start()
  48. end
  49. function OfferQuest1(NPC, Spawn)
  50. FaceTarget(NPC, Spawn)
  51. OfferQuest(NPC, Spawn, QUEST_1)
  52. end