9
3

SpiritofGurbLandle.lua 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. --[[
  2. Script Name : SpawnScripts/TheRuins_Classic/SpiritofGurbLandle.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.07.06 04:07:25
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. AddTimer(NPC,MakeRandomInt(10000,300000),"FairyCheck")
  11. end
  12. function FairyCheck(NPC)
  13. local zone = GetZone(NPC)
  14. if GetSpawnByLocationID(zone, 133785613)==nil then --WELE
  15. SpawnByLocationID(zone,133785613)
  16. end
  17. if GetSpawnByLocationID(zone, 133785612)==nil then --XEL
  18. SpawnByLocationID(zone,133785612)
  19. end
  20. end
  21. function respawn(NPC)
  22. spawn(NPC)
  23. end
  24. function RandomGreeting(NPC, Spawn)
  25. local choice = MakeRandomInt(1,3)
  26. if choice == 1 then
  27. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1020.mp3", 0, 0, Spawn)
  28. elseif choice == 2 then
  29. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1020.mp3", 0, 0, Spawn)
  30. elseif choice == 3 then
  31. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1020.mp3", 0, 0, Spawn)
  32. end
  33. end
  34. function hailed(NPC, Spawn)
  35. RandomGreeting(NPC, Spawn)
  36. Dialog1(NPC, Spawn)
  37. end
  38. function Dialog1(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. Dialog.New(NPC, Spawn)
  41. Dialog.AddDialog("The fairies, there here! They're looking for me.")
  42. PlayFlavor(NPC,"","","cringe",0,0,Spawn)
  43. Dialog.AddOption("What fairies, and why are they looking for you? ", "Dialog2")
  44. Dialog.AddOption("Looks like someone found you already. Be gone!")
  45. Dialog.Start()
  46. end
  47. function Dialog2(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. Dialog.New(NPC, Spawn)
  50. Dialog.AddDialog("A long time ago, I stole something from the fairies of Faydwer. I made away with a golden anvil, and with it I could make golden weapons. I became one of the wealthiest halflings in all of Freeport.")
  51. Dialog.AddOption("What happened to you?", "Dialog3")
  52. Dialog.Start()
  53. end
  54. function Dialog3(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. Dialog.New(NPC, Spawn)
  57. Dialog.AddDialog("Using the anvil in life was slowly scarring my soul for what I had done. The fairies had placed a curse on the anvil to work against those who would use it for personal gain. With each strike of my hammer, a piece of my soul would absorb into it.")
  58. PlayFlavor(NPC,"","","sigh",0,0,Spawn)
  59. Dialog.AddOption("But how did you get... like this?", "Dialog4")
  60. Dialog.Start()
  61. end
  62. function Dialog4(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. Dialog.New(NPC, Spawn)
  65. Dialog.AddDialog("I was murdered in my sleep by a band of thieves who had learned of my golden weapons. They stole the anvil from me and along with it, a portion of my soul. I am now cursed to walk these ruins until the anvil is returned to the fairies, and they release my soul from it.")
  66. PlayFlavor(NPC,"","","grumble",0,0,Spawn)
  67. Dialog.AddOption("That is aweful, but I need to go.")
  68. Dialog.Start()
  69. end