questRevengeoftheKodiaks.lua 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --[[
  2. Script Name : SpawnScripts/Antonica/questRevengeoftheKodiaks.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.17 07:05:57
  5. Script Purpose :
  6. :
  7. --]]
  8. local Quest = 5833
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 20, "InRange", Spawn)
  11. end
  12. function casted_on(NPC, Spawn, SpellName)
  13. if SpellName == 'Search reeds' then
  14. local con = CreateConversation()
  15. if CanReceiveQuest(Spawn,Quest) then
  16. Dialog1(NPC,Spawn)
  17. elseif HasCompletedQuest(Spawn, Quest) then
  18. AddConversationOption(con, "[Leave the banner alone]")
  19. StartDialogConversation(con, 1, NPC, Spawn, "The banner on the memorial still reads, \"The final resting place of Guyc Swampleg. A great friend, but not a great runner. The young kodiaks got him while he was fishing.\"")
  20. elseif HasQuest(Spawn, Quest) and not HasCompletedQuest(Spawn, Quest) then
  21. AddConversationOption(con, "I still need to thing young kodiaks from Antonica.")
  22. StartDialogConversation(con, 1, NPC, Spawn, "The banner reads, \n\n \"The final resting place of Guyc Swampleg. A great friend, but not a great runner. The young kodiaks got him while he was fishing.\"")
  23. end
  24. end
  25. end
  26. function Dialog1(NPC,Spawn)
  27. local con = CreateConversation()
  28. AddConversationOption(con, "[Read the banner]", "Dialog2")
  29. AddConversationOption(con, "[Leave the banner alone]")
  30. StartDialogConversation(con, 1, NPC, Spawn, "There appeares to be some sort of memorial within the reeds. A small banner waves silently as a gust blows through the Archer Woods.")
  31. end
  32. function Dialog2(NPC,Spawn)
  33. local con = CreateConversation()
  34. AddConversationOption(con, "I need to remove young kodiaks!", "offer")
  35. AddConversationOption(con, "[Leave the banner alone]")
  36. StartDialogConversation(con, 1, NPC, Spawn, "The banner reads:\n\n \"The final resting place of Guyc Swampleg. A great friend, but not a great runner. The young kodiaks got him while he was fishing.\"")
  37. end
  38. function offer(NPC, Spawn)
  39. CloseConversation(NPC,Spawn)
  40. OfferQuest(NPC, Spawn, Quest)
  41. end