9
3

ARuinedBloodsaberChestpiece.lua 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. --[[
  2. Script Name : ItemScripts/ARuinedBloodsaberChestpiece.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.19 03:05:54
  5. Script Purpose :
  6. :
  7. --]]
  8. --
  9. local Quest = 5841
  10. function examined(Item, Player)
  11. if not HasQuest(Player, Quest) and not HasCompletedQuest(Player, Quest) then
  12. Dialog1(Item,Player)
  13. elseif GetQuestStep(Player,Quest)==1 or GetQuestStep(Player,Quest)==2 or GetQuestStep(Player,Quest)==3 then
  14. Dialog2(Item,Player)
  15. elseif GetQuestStep(Player,Quest)==4 or GetQuestStep(Player,Quest)==5 or GetQuestStep(Player,Quest)==6 then
  16. Dialog3(Item,Player)
  17. elseif GetQuestStep(Player,Quest)==7 or GetQuestStep(Player,Quest)==8 then
  18. Dialog4(Item,Player)
  19. elseif HasCompletedQuest(Player, Quest)then
  20. Completed(Item,Player)
  21. end
  22. end
  23. function Dialog1(Item,Player)
  24. conversation = CreateConversation()
  25. AddConversationOption(conversation, "[Inspect the chestpiece closely]", "Dialog2")
  26. AddConversationOption(conversation, "[Put the chestpiece away]", "CloseItemConversation")
  27. StartDialogConversation(conversation, 2, Item, Player, "This leather armor has seen better days. You have to wonder why someone would hold on to this...")
  28. end
  29. function Dialog2(Item,Player)
  30. conversation = CreateConversation()
  31. if CanReceiveQuest(Player,Quest) then
  32. OfferQuest(nil,Player,Quest)
  33. end
  34. if GetQuestStep(Player,Quest)==3 then
  35. AddConversationOption(conversation, "[Attempt a repair using the gnoll armor sections.]", "Dialog3")
  36. end
  37. AddConversationOption(conversation, "[Put the ruined chestpiece away]", "CloseItemConversation")
  38. StartDialogConversation(conversation, 2, Item, Player, "This appears to be a chestpiece that belonged to the once powerful Bloodsaber Clan. There seems to be a large hole in the back of this armor; whatever arcane forces hit this piece of armor must have devastated the poor soul wearing it.")
  39. end
  40. function Dialog3(Item,Player)
  41. conversation = CreateConversation()
  42. if GetQuestStep(Player,Quest)==6 then
  43. AddConversationOption(conversation, "[Use the Queen Klicnik eye on the armor.]", "Dialog4")
  44. end
  45. if GetQuestStep(Player,Quest)==3 then
  46. SetStepComplete(Player,Quest,3)
  47. end
  48. AddConversationOption(conversation, "[Consider a way to disenchant the armor.]", "CloseItemConversation")
  49. StartDialogConversation(conversation, 2, Item, Player, "While attempting to attach the gnoll armor segment you notice that it is almost repelled by the Bloodsaber armor. Magical forces seem to be preventing the repair of this armor.")
  50. end
  51. function Dialog4(Item,Player)
  52. conversation = CreateConversation()
  53. if GetQuestStep(Player,Quest)==8 then
  54. AddConversationOption(conversation, "[Craft a lining from the kodiak hides.]", "QuestFinish")
  55. end
  56. if GetQuestStep(Player,Quest)==6 then
  57. SetStepComplete(Player,Quest,6)
  58. end
  59. AddConversationOption(conversation, "[Put the jagged chestpiece away]", "CloseItemConversation")
  60. StartDialogConversation(conversation, 2, Item, Player, "When held near the gnoll armor segments the Bloodsaber armor starts shaking. The gnoll armor is pulled into and seemingly absorbed by the Bloodsaber armor. While the armor is now functional, the rough edges will make it almost impossible to wear.")
  61. end
  62. function QuestFinish(Item,Player)
  63. CloseItemConversation(Item,Player)
  64. if GetQuestStep(Player,Quest)==8 then
  65. SetStepComplete(Player,Quest,8)
  66. end
  67. if HasItem(Player,2543) then
  68. RemoveItem(Player,2543,1)
  69. end
  70. end
  71. function Completed(Item,Player)
  72. conversation = CreateConversation()
  73. AddConversationOption(conversation, "[Hold on to the ruined chestpiece.]", "QuestFinish")
  74. AddConversationOption(conversation, "[Toss this aside. It is ruined, after all.]", "QuestFinish")
  75. StartDialogConversation(conversation, 2, Item, Player, "This ruined chestpiece has the same Bloodsaber clan emblem from one you repaired. Apparently, more than one of them met their fate to a similar wound. Hopefully the one you repaired lasts longer than this one!")
  76. end