9
3

ilgar.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. dofile("SpawnScripts/Generic/ExpelNonCitizen.lua")
  10. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  11. function spawn(NPC)
  12. waypoints(NPC)
  13. ProvidesQuest(NPC,Fairies)
  14. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  15. end
  16. function InRange(NPC, Spawn)
  17. NonCitizen(NPC,Spawn)
  18. end
  19. function hailed(NPC, Spawn)
  20. if GetFactionAmount(Spawn,11) <0 then
  21. FaceTarget(NPC, Spawn)
  22. choice = math.random(1,2)
  23. if choice == 1 then
  24. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  25. elseif choice == 2 then
  26. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  27. end
  28. else
  29. FaceTarget(NPC,Spawn)
  30. PlayFlavor(NPC, "voiceover/english/knight-lieutenant_ilgar/qey_south/lieutenantilgar.mp3", "", "no", 1779980030, 2184277232, Spawn)
  31. local conversation = CreateConversation()
  32. if not HasQuest(Spawn,Fairies) and not HasCompletedQuest(Spawn, Fairies) then
  33. AddConversationOption(conversation, "Busy you say? I'm available to assist if you need.", "Busy")
  34. end
  35. if GetQuestStep(Spawn, Fairies)==2 then
  36. AddConversationOption(conversation, "I've reduced the fairy population in the Peat Bog as you asked.", "BusyFinished")
  37. end
  38. AddConversationOption(conversation, "Alright. As you were.")
  39. StartConversation(conversation, NPC, Spawn, "Move along citizen. I'm extremely busy.")
  40. end
  41. end
  42. function Busy(NPC,Spawn)
  43. FaceTarget(NPC, Spawn)
  44. PlayFlavor(NPC, "voiceover/english/lieutenant_ilgar/qey_south/lieutenantilgar000.mp3", "", "", 1212038397, 2389104068, Spawn)
  45. local conversation = CreateConversation()
  46. AddConversationOption(conversation, "Sounds fair enough. Would I be paid for my service?", "Busy2")
  47. AddConversationOption(conversation, "Err, I meant I'm 'not' available. Sorry.")
  48. 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.")
  49. end
  50. function Busy2(NPC,Spawn)
  51. FaceTarget(NPC, Spawn)
  52. PlayFlavor(NPC, "voiceover/english/knight-lieutenant_ilgar/qey_south/lieutenantilgar001.mp3", "", "agree", 3441933918, 932340693, Spawn)
  53. local conversation = CreateConversation()
  54. AddConversationOption(conversation, "Yes sir!", "Busy3")
  55. 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?")
  56. end
  57. function Busy3(NPC, Spawn)
  58. PlayFlavor(NPC, "", "", "salute",0 , 0, Spawn)
  59. FaceTarget(NPC, Spawn)
  60. OfferQuest(NPC, Spawn,Fairies)
  61. end
  62. function BusyFinished(NPC,Spawn)
  63. FaceTarget(NPC, Spawn)
  64. PlayFlavor(NPC, "voiceover/english/knight-lieutenant_ilgar/qey_south/lieutenantilgar002.mp3", "", "", 1911360769, 3372915409, Spawn)
  65. local conversation = CreateConversation()
  66. AddConversationOption(conversation, "Greatful I could be of assistance.", "QuestDone")
  67. 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.")
  68. end
  69. function QuestDone(NPC,Spawn)
  70. FaceTarget(NPC, Spawn)
  71. SetStepComplete(Spawn,Fairies, 2)
  72. PlayFlavor(NPC, "", "", "salute",0 , 0)
  73. PlayFlavor(Spawn, "", "", "salute",0 , 0)
  74. end
  75. function respawn(NPC)
  76. spawn(NPC)
  77. end
  78. function waypoints(NPC)
  79. MovementLoopAddLocation(NPC, 469.14, -20.96, 194.86, 2, 0)
  80. MovementLoopAddLocation(NPC, 406.76, -20.87, 145.25, 2, 8)
  81. MovementLoopAddLocation(NPC, 421.86, -20.93, 168.96, 2, 0)
  82. MovementLoopAddLocation(NPC, 436.36, -20.26, 209.37, 2, 0)
  83. MovementLoopAddLocation(NPC, 452.7, -21.95, 242.39, 2, 0)
  84. MovementLoopAddLocation(NPC, 455.55, -21.92, 244.74, 2, 6)
  85. MovementLoopAddLocation(NPC, 469.7, -21.06, 196.34, 2, 0)
  86. MovementLoopAddLocation(NPC, 455.55, -21.92, 244.74, 2, 0)
  87. MovementLoopAddLocation(NPC, 441.84, -21.92, 263.49, 2, 0)
  88. MovementLoopAddLocation(NPC, 452.7, -21.95, 242.39, 2, 0)
  89. MovementLoopAddLocation(NPC, 436.36, -20.26, 209.37, 2, 0)
  90. MovementLoopAddLocation(NPC, 421.86, -20.93, 168.96, 2, 0)
  91. MovementLoopAddLocation(NPC, 406.76, -20.87, 145.25, 2, 0)
  92. MovementLoopAddLocation(NPC, 469.14, -20.96, 194.86, 2, 0)
  93. end