ParchmentScrap.lua 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. --[[
  2. Script Name : ItemScripts/ParchmentScrap.lua
  3. Script Purpose : Handles the quest item "Parchment Scrap (right-click this item to Examine it)" (10317)
  4. Script Author : Jabantiz
  5. Script Date : 9/8/2016
  6. Script Notes : Updated May 9th 2020. Parchment Scrap 10313 was duplicating due to lack of HasItem check (when continuously examining)
  7. --]]
  8. local Tainted = 183
  9. function examined(Item, Player)
  10. local con = CreateConversation()
  11. if HasQuest(Player, Tainted) then
  12. if GetQuestStep(Player, Tainted) == 2 then
  13. AddConversationOption(con, "Examine the parchment.", "Examine")
  14. elseif GetQuestStep(Player, Tainted) == 4 then
  15. if HasItem(Player, 10313, 0) == false then
  16. SummonItem(Player, 10313, 0)
  17. end
  18. AddConversationOption(con, "Put together the parchment pieces.", "PutTogether")
  19. elseif GetQuestStep(Player, Tainted) == 7 then
  20. AddConversationOption(con, "Piece together the parchment.", "PieceTogether")
  21. end
  22. end
  23. AddConversationOption(con, "Put the parchment away.", "CloseItemConversation")
  24. StartDialogConversation(con, 2, Item, Player, "The edges of the parchment are torn and jagged as though ripped from a much larger document.")
  25. end
  26. function Examine(Item, Player)
  27. SetStepComplete(Player, Tainted, 2)
  28. local con = CreateConversation();
  29. AddConversationOption(con, "Put the parchment away.", "CloseItemConversation")
  30. StartDialogConversation(con, 2, Item, Player, 'You can barely make out some writing on this scrap: "The toxic crawlers will be useful to cover our ... the totem ..." The reference to a totem is puzzling. Why would someone want a totem covered in spiders? There must be more pieces of this parchment amongst the toxic crawlers.')
  31. end
  32. function PutTogether(Item, Player)
  33. local con = CreateConversation()
  34. AddConversationOption(con, "Roll the parchment up.", "RollUp")
  35. StartDialogConversation(con, 2, Item, Player, "You line up the parchment pieces. The newest piece adds enough new words that you can read: ''The toxic crawlers will be useful to cover our tracks. Leave the totem in the eastern rocks...'' Apparently Deianeira's concern about the spiders is well-placed, though not for the reasons she thinks. I must find more of this parchment to learn what this totem means.")
  36. end
  37. function RollUp(Item, Player)
  38. local con = CreateConversation()
  39. AddConversationOption(con, "Put the parchment away.", "CloseItemConversation")
  40. StartDialogConversation(con, 2, Item, Player, "You carefully roll the parchment and stow it away.")
  41. if GetQuestStep(Player, Tainted) == 4 then
  42. SetStepComplete(Player, Tainted, 4)
  43. elseif GetQuestStep(Player, Tainted) == 7 then
  44. RemoveItem(Player, 10315)
  45. SetStepComplete(Player, Tainted, 7)
  46. end
  47. end
  48. function PieceTogether(Item, Player)
  49. local con = CreateConversation()
  50. AddConversationOption(con, "Roll the parchment up.", "RollUp")
  51. StartDialogConversation(con, 2, Item, Player, "The last bit of parchment was caught on the web near the large pile of rocks. You piece it together and read: ''The toxic crawlers will be useful to cover our tracks. Leave the totem in the eastern rocks beneath Direspike.'' Direspike must be a tainted spider with greater power. You realize you may have to flush him from his lair by picking off the nearby spiders until he appears to meet your challenge.")
  52. end