ilgar.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. --[[
  2. Script Name : ilgar.lua
  3. Script Purpose : Waypoint Path for ilgar.lua
  4. Script Author : Devn00b - Pathing. Dorbin - Dialogue/Quest
  5. Script Date : 04/11/2020 02:45:39 PM / 05.16.2022
  6. Script Notes : Locations collected from Live
  7. --]]
  8. local Fairies = 5558
  9. function spawn(NPC)
  10. waypoints(NPC)
  11. ProvidesQuest(NPC,Fairies)
  12. end
  13. function hailed(NPC, Spawn)
  14. if GetFactionAmount(Spawn,11) <0 then
  15. FaceTarget(NPC, Spawn)
  16. choice = math.random(1,2)
  17. if choice == 1 then
  18. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  19. elseif choice == 2 then
  20. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  21. end
  22. else
  23. FaceTarget(NPC,Spawn)
  24. PlayFlavor(NPC, "voiceover/english/knight-lieutenant_ilgar/qey_south/lieutenantilgar.mp3", "", "no", 1779980030, 2184277232, Spawn)
  25. local conversation = CreateConversation()
  26. if not HasQuest(Spawn,Fairies) and not HasCompletedQuest(Spawn, Fairies) then
  27. AddConversationOption(conversation, "Busy you say? I'm available to assist if you need.", "Busy")
  28. end
  29. if GetQuestStep(Spawn, Fairies)==2 then
  30. AddConversationOption(conversation, "I've reduced the fairy population in the Peat Bog as you asked.", "BusyFinished")
  31. end
  32. AddConversationOption(conversation, "Alright. As you were.")
  33. StartConversation(conversation, NPC, Spawn, "Move along citizen. I'm extremely busy.")
  34. end
  35. end
  36. function Busy(NPC,Spawn)
  37. FaceTarget(NPC, Spawn)
  38. PlayFlavor(NPC, "voiceover/english/lieutenant_ilgar/qey_south/lieutenantilgar000.mp3", "", "", 1212038397, 2389104068, Spawn)
  39. local conversation = CreateConversation()
  40. AddConversationOption(conversation, "Sounds fair enough. Would I be paid for my service?", "Busy2")
  41. AddConversationOption(conversation, "Err, I meant I'm 'not' available. Sorry.")
  42. StartConversation(conversation, NPC, Spawn, "It would be a great help if you can. I need someone to head to the nearby Peat Bog and put a sizable dent in the fairy population. It seems they have been sneaking into Nettleville and Starcrest and playing pranks on the good folks of the villages.")
  43. end
  44. function Busy2(NPC,Spawn)
  45. FaceTarget(NPC, Spawn)
  46. PlayFlavor(NPC, "voiceover/english/knight-lieutenant_ilgar/qey_south/lieutenantilgar001.mp3", "", "agree", 3441933918, 932340693, Spawn)
  47. local conversation = CreateConversation()
  48. AddConversationOption(conversation, "Yes sir!", "Busy3")
  49. StartConversation(conversation, NPC, Spawn, "There's always payment for services rendered to the city. You needn't worry about that! We encourage citizens to perform kind acts of their own will, but everyone needs to eat. Teach those unrly fairies a lesson and keep them away from the locals. Understand?")
  50. end
  51. function Busy3(NPC, Spawn)
  52. PlayFlavor(NPC, "", "", "salute",0 , 0, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. OfferQuest(NPC, Spawn,Fairies)
  55. end
  56. function BusyFinished(NPC,Spawn)
  57. FaceTarget(NPC, Spawn)
  58. PlayFlavor(NPC, "voiceover/english/knight-lieutenant_ilgar/qey_south/lieutenantilgar002.mp3", "", "", 1911360769, 3372915409, Spawn)
  59. local conversation = CreateConversation()
  60. AddConversationOption(conversation, "Greatful I could be of assistance.", "QuestDone")
  61. StartConversation(conversation, NPC, Spawn, "Hmm, yes it looks like you did your job. Reports of the mischeivious fayfolk interfering in the villages have lessened considerably. Here is your payment for a job well done.")
  62. end
  63. function QuestDone(NPC,Spawn)
  64. FaceTarget(NPC, Spawn)
  65. SetStepComplete(Spawn,Fairies, 2)
  66. PlayFlavor(NPC, "", "", "salute",0 , 0)
  67. PlayFlavor(Spawn, "", "", "salute",0 , 0)
  68. end
  69. function respawn(NPC)
  70. spawn(NPC)
  71. end
  72. function waypoints(NPC)
  73. MovementLoopAddLocation(NPC, 469.14, -20.96, 194.86, 2, 0)
  74. MovementLoopAddLocation(NPC, 406.76, -20.87, 145.25, 2, 0)
  75. MovementLoopAddLocation(NPC, 421.86, -20.93, 168.96, 2, 0)
  76. MovementLoopAddLocation(NPC, 436.36, -20.26, 209.37, 2, 0)
  77. MovementLoopAddLocation(NPC, 452.7, -21.95, 242.39, 2, 0)
  78. MovementLoopAddLocation(NPC, 455.55, -21.92, 244.74, 2, 6)
  79. MovementLoopAddLocation(NPC, 469.7, -21.06, 196.34, 2, 0)
  80. MovementLoopAddLocation(NPC, 455.55, -21.92, 244.74, 2, 0)
  81. MovementLoopAddLocation(NPC, 441.84, -21.92, 263.49, 2, 0)
  82. MovementLoopAddLocation(NPC, 452.7, -21.95, 242.39, 2, 0)
  83. MovementLoopAddLocation(NPC, 436.36, -20.26, 209.37, 2, 0)
  84. MovementLoopAddLocation(NPC, 421.86, -20.93, 168.96, 2, 0)
  85. MovementLoopAddLocation(NPC, 406.76, -20.87, 145.25, 2, 0)
  86. MovementLoopAddLocation(NPC, 469.14, -20.96, 194.86, 2, 0)
  87. end