9
3

Knight-LieutenantAlesso.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. --[[
  2. Script Name : SpawnScripts/Antonica/Knight-LieutenantAlesso.lua
  3. Script Purpose : Knight-Lieutenant Alesso
  4. Script Author : geordie0511
  5. Script Date : 2019.03.13
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local Qeynos1 = 459
  9. local Qeynos2 = 460
  10. local Qeynos3 = 461
  11. local Qeynos4 = 462
  12. local Qeynos5 = 463
  13. function spawn(NPC)
  14. ProvidesQuest(NPC, Qeynos1)
  15. ProvidesQuest(NPC, Qeynos2)
  16. ProvidesQuest(NPC, Qeynos3)
  17. ProvidesQuest(NPC, Qeynos4)
  18. ProvidesQuest(NPC, Qeynos5)
  19. end
  20. function respawn(NPC)
  21. spawn(NPC)
  22. end
  23. function InRange(NPC, Spawn)
  24. end
  25. function LeaveRange(NPC, Spawn)
  26. end
  27. function hailed(NPC, Spawn)
  28. FaceTarget(NPC, Spawn)
  29. conversation = CreateConversation()
  30. if GetQuestStep(Spawn, Qeynos1) == 4 or GetQuestStep(Spawn, Qeynos2) == 4 or GetQuestStep(Spawn, Qeynos3) == 4 or GetQuestStep(Spawn, Qeynos4) == 4 or GetQuestStep(Spawn, Qeynos5) == 4 then
  31. if GetQuestStep(Spawn, Qeynos1) == 4 then
  32. SetStepComplete(Spawn, Qeynos1, 4)
  33. end
  34. if GetQuestStep(Spawn, Qeynos2) == 4 then
  35. SetStepComplete(Spawn, Qeynos2, 4)
  36. end
  37. if GetQuestStep(Spawn, Qeynos3) == 4 then
  38. SetStepComplete(Spawn, Qeynos3, 4)
  39. end
  40. if GetQuestStep(Spawn, Qeynos4) == 4 then
  41. SetStepComplete(Spawn, Qeynos4, 4)
  42. end
  43. if GetQuestStep(Spawn, Qeynos5) == 4 then
  44. SetStepComplete(Spawn, Qeynos5, 4)
  45. end
  46. PlayFlavor(NPC, "voiceover/english/sir_alesso/qey_north/sir_alesso003.mp3", "", "", 4137826818, 1228273355, Spawn)
  47. AddConversationOption(conversation, "Thanks.")
  48. StartConversation(conversation, NPC, Spawn, "You served Qeynos well and shall be rewarded.")
  49. else
  50. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1012.mp3", "", "", 0, 0, Spawn)
  51. AddConversationOption(conversation, "Yes, but where?", "dlg_1_1")
  52. AddConversationOption(conversation, "I'll be on my way.")
  53. StartConversation(conversation, NPC, Spawn, "Hello! As you journey into the city, keep in mind that you may not enter the citadel within North Qeynos at this time. You'll find better adventuring elsewhere.")
  54. end
  55. end
  56. function dlg_1_1(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. conversation = CreateConversation()
  59. PlayFlavor(NPC, "voiceover/english/sir_alesso/qey_north/sir_alesso001.mp3", "", "", 446291068, 907364683, Spawn)
  60. AddConversationOption(conversation, "Okay, but what exactly should I do?", "dlg_2_2")
  61. StartConversation(conversation, NPC, Spawn, "Outside the gates of Qeynos, Antonica is riddled with vermin. Serve Qeynos by destroying these infectious beasts.")
  62. end
  63. function dlg_2_2(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. PlayFlavor(NPC, "voiceover/english/sir_alesso/qey_north/sir_alesso002.mp3", "", "", 2041064542, 2502837283, Spawn)
  67. if HasCompletedQuest(Spawn, Qeynos1) == false and HasQuest(Spawn, Qeynos1) == false then
  68. AddConversationOption(conversation, "I'll do it for Qeynos.", "Quest1")
  69. elseif HasCompletedQuest(Spawn, Qeynos2) == false and HasQuest(Spawn, Qeynos2) == false and HasCompletedQuest(Spawn, Qeynos1) then
  70. AddConversationOption(conversation, "I'll do it for Qeynos.", "Quest2")
  71. elseif HasCompletedQuest(Spawn, Qeynos3) == false and HasQuest(Spawn, Qeynos3) == false and HasCompletedQuest(Spawn, Qeynos2) then
  72. AddConversationOption(conversation, "I'll do it for Qeynos.", "Quest3")
  73. elseif HasCompletedQuest(Spawn, Qeynos4) == false and HasQuest(Spawn, Qeynos4) == false and HasCompletedQuest(Spawn, Qeynos3) then
  74. AddConversationOption(conversation, "I'll do it for Qeynos.", "Quest4")
  75. elseif HasCompletedQuest(Spawn, Qeynos5) == false and HasQuest(Spawn, Qeynos5) == false and HasCompletedQuest(Spawn, Qeynos4) then
  76. AddConversationOption(conversation, "I'll do it for Qeynos.", "Quest5")
  77. end
  78. StartConversation(conversation, NPC, Spawn, "Rid Antonica of the rats, snakes and beetles that plague Qeynos. Dispatch of no less than ten of each and we shall reward your service.")
  79. end
  80. function Quest1(NPC, Spawn)
  81. OfferQuest(NPC, Spawn, Qeynos1)
  82. end
  83. function Quest2(NPC, Spawn)
  84. OfferQuest(NPC, Spawn, Qeynos2)
  85. end
  86. function Quest3(NPC, Spawn)
  87. OfferQuest(NPC, Spawn, Qeynos3)
  88. end
  89. function Quest4(NPC, Spawn)
  90. OfferQuest(NPC, Spawn, Qeynos4)
  91. end
  92. function Quest5(NPC, Spawn)
  93. OfferQuest(NPC, Spawn, Qeynos5)
  94. end