CaltorsisClericPage14.lua 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --[[
  2. Script Name : ItemScripts/CaltorsisClericPage14.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.18 02:05:28
  5. Script Purpose :
  6. :
  7. --]]
  8. local Quest = 5839
  9. function examined(Item, Player)
  10. if not HasCompletedQuest(Player,Quest) then
  11. Dialog1(Item,Player)
  12. else
  13. conversation = CreateConversation()
  14. if CanReceiveQuest(Player,Quest) then
  15. AddConversationOption(conversation, "These undead should have learned their lesson!", "Offer")
  16. end
  17. AddConversationOption(conversation, "[Roll up the page and put it away.]")
  18. AddConversationOption(conversation, "[Get rid of it. You've already learned what you can.]", "QuestFinish")
  19. StartDialogConversation(conversation, 2, Item, Player, "This old page appears to be part of a journal that has long since been torn away.")
  20. end
  21. end
  22. function Dialog1(Item,Player)
  23. conversation = CreateConversation()
  24. if CanReceiveQuest(Player,Quest) then
  25. AddConversationOption(conversation, "[Try to read the page]", "Dialog2")
  26. end
  27. AddConversationOption(conversation, "[Put the page away.]", "CloseItemConversation")
  28. StartDialogConversation(conversation, 2, Item, Player, "This old page appears to be part of a journal that has long since been torn away.")
  29. end
  30. function Dialog2(Item,Player)
  31. conversation = CreateConversation()
  32. if CanReceiveQuest(Player,Quest) then
  33. AddConversationOption(conversation, "The Caltorsis clerics will not be around much longer.", "Offer")
  34. end
  35. AddConversationOption(conversation, "[Put the page away.]", "CloseItemConversation")
  36. StartDialogConversation(conversation, 2, Item, Player, "I have the journal entry of a Paladin named Grentithius. It reads: \"I'm concerned about the undead population in this area. Left unchecked, they may prove to be the end of our great city. I should destroy the more powerful undead to cull their numbers.\"")
  37. end
  38. function Offer(Item,Player)
  39. if CanReceiveQuest(Player,Quest) then
  40. OfferQuest(nil,Player,Quest)
  41. end
  42. CloseItemConversation(Item,Player)
  43. end
  44. function QuestFinish(Item,Player)
  45. CloseItemConversation(Item,Player)
  46. if HasItem(Player,1001094) then
  47. RemoveItem(Player,1001094,1)
  48. end
  49. end