KnightCaptainSantis.lua 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. --[[
  2. Script Name : SpawnScripts/StarcrestCommune/KnightCaptainSantis.lua
  3. Script Purpose : Knight-Captain Santis
  4. Script Author : Ememjr
  5. Script Date : 2017.10.28
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  10. ProvidesQuest(NPC, 240)
  11. end
  12. function hailed(NPC, Spawn)
  13. FaceTarget(NPC, Spawn)
  14. local conversation = CreateConversation()
  15. if not HasQuest(Spawn, 240) and not QuestIsComplete(Spawn , 240) then
  16. AddConversationOption(conversation, "What kind of trouble is out in the bog?", "Option4")
  17. end
  18. if HasQuest(Spawn, 300) then
  19. AddConversationOption(conversation, "I bring you an urgent message from the Nettleville Garrison.", "Option5")
  20. end
  21. if HasQuest(Spawn,240) then
  22. if not QuestIsComplete(Spawn , 240) then
  23. if QuestStepIsComplete(Spawn, 240, 1) then
  24. AddConversationOption(conversation, "I am happy to report that I have eliminated several Bog Sludges at your request.", "Killed")
  25. end
  26. end
  27. end
  28. StartConversation(conversation, NPC, Spawn, "Good day to you. I've been hearing reports that the Peat Bog isn't safe right now. I hope you didn't have any trouble if you came in that way.")
  29. end
  30. function InRange(NPC,Spawn)
  31. PlayFlavor(NPC, "", "Have you a moment? We guards could use your assistance!", "beckon", 0, 0, Spawn)
  32. end
  33. function Killed(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. local conversation = CreateConversation()
  36. AddConversationOption(conversation, "It feels good to make the area a little bit safer.","GetReward")
  37. StartConversation(conversation, NPC, Spawn, "You are truly valuable to Qeynos. I'm already receiving optimistic reports that the Bog Sludge are finally under control. Please accept this reward for a job well done.")
  38. end
  39. function GetReward(NPC, Spawn)
  40. SetStepComplete(Spawn, 240, 2)
  41. end
  42. function Option4(NPC, Spawn)
  43. FaceTarget(NPC, Spawn)
  44. local conversation = CreateConversation()
  45. AddConversationOption(conversation, "A few sludges shouldn't be a problem for me.", "Option6")
  46. StartConversation(conversation, NPC, Spawn, "The Bog Sludges have swelled in number, spreading like pestilence. This vermin has become a serious menace to the refugees in that region. The Sludges must be exterminated for the safety of the people. I hope you're not too squeamish for such a job. ")
  47. end
  48. function Option6(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. local conversation = CreateConversation()
  51. AddConversationOption(conversation, "Sounds good. I'll get right on it.", "Offer")
  52. StartConversation(conversation, NPC, Spawn, "Excellent! Go to the Peat Bog, slay several sludges and report back to me. I will reward you for your service to Qeynos. ")
  53. end
  54. function Option5(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. local conversation = CreateConversation()
  57. AddConversationOption(conversation, "Phalanx match! I will tell him you accept.")
  58. StartConversation(conversation, NPC, Spawn, "Let me read that... Ha! Captain Hastings and his team wish to challenge the Starcrest Garrison to a Phalanx match? We shall squash them. Tell him I accept.")
  59. end
  60. function Offer(NPC,Spawn)
  61. OfferQuest(NPC, Spawn, 240)
  62. end