9
3

GuardVraen.lua 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/GuardVraen.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.04 10:09:48
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. require "SpawnScripts/Generic/NPCModule"
  10. function spawn(NPC, Spawn)
  11. NPCModule(NPC, Spawn)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. end
  14. function InRange(NPC,Spawn)
  15. if GetClass(Spawn)==0 then
  16. FaceTarget(NPC, Spawn)
  17. PlayFlavor(NPC,"","","point",0,0, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. Dialog.New(NPC, Spawn)
  20. Dialog.AddDialog("Make sure to speak with Garven Tralk before you venture too far. Danger lies beyond these gates.")
  21. Dialog.AddVoiceover("voiceover/english/erudite_eco_good_1/ft/erudite/erudite_eco_good_1_notcitizen_gf_48350e59.mp3",3405287024, 2122169059)
  22. Dialog.AddOption("Alright.")
  23. Dialog.Start()
  24. end
  25. end
  26. function hailed(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. choice = MakeRandomInt(1,3)
  29. if choice == 1 then
  30. PlayFlavor(NPC, "voiceover/english/halfelf_eco_farsea_1/ft/service/guard/halfelf_guard_service_farsea_1_hail_gf_2b42c14f.mp3", "After twelve weeks at sea, bashing the head of a nosy landlubber sounds quite appealing!", "threaten", 1936614211, 2469553737, Spawn, 0)
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "voiceover/english/halfelf_eco_farsea_1/ft/service/guard/halfelf_guard_service_farsea_1_hail_gf_a837e4f4.mp3", "Once I am off duty, I will be heading straight to the tavern.", "nod", 3411176323, 4077972480, Spawn, 0)
  33. elseif choice == 3 then
  34. PlayFlavor(NPC, "voiceover/english/halfelf_eco_farsea_1/ft/service/guard/halfelf_guard_service_farsea_1_hail_gf_f9615d93.mp3", "This ain't a show, stranger. Buy your goods and shove-off!", "glare", 1941361840, 4269078583, Spawn, 0)
  35. end
  36. end
  37. function respawn(NPC)
  38. spawn(NPC)
  39. end