PatchofDogFur.lua 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. --[[
  2. Script Name : ItemScripts/PatchofDogFur.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.14 04:05:08
  5. Script Purpose :
  6. :
  7. --]]
  8. --
  9. local Quest = 5815
  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 then
  14. Dialog2(Item,Player)
  15. elseif GetQuestStep(Player,Quest)==3 or GetQuestStep(Player,Quest)==4 then
  16. Dialog3(Item,Player)
  17. elseif GetQuestStep(Player,Quest)==5 or GetQuestStep(Player,Quest)==6 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, "[Closely study the patch of fur...]", "Dialog2")
  26. AddConversationOption(conversation, "[Put the fur away]", "CloseItemConversation")
  27. StartDialogConversation(conversation, 2, Item, Player, "This is nothing more than a simple patch of fur. Judging by the texture it is probably from a dog. Aside from that there's nothing special about it.")
  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)==2 then
  35. AddConversationOption(conversation, "[Compare the patches of fur]", "Dialog3")
  36. end
  37. AddConversationOption(conversation, "[Put the fur away]", "CloseItemConversation")
  38. StartDialogConversation(conversation, 2, Item, Player, "The small patch of dog fur has given me an idea. If I can gather enough of the pieces together, I might actually be able to make a nice set of gloves that wrap around my fingers perfectly.")
  39. end
  40. function Dialog3(Item,Player)
  41. conversation = CreateConversation()
  42. if GetQuestStep(Player,Quest)==4 then
  43. AddConversationOption(conversation, "[Stuff the gloves with down]", "Dialog4")
  44. end
  45. if GetQuestStep(Player,Quest)==2 then
  46. SetStepComplete(Player,Quest,2)
  47. end
  48. AddConversationOption(conversation, "[Put the cut fur patch away]", "CloseItemConversation")
  49. StartDialogConversation(conversation, 2, Item, Player, "You throw away the small patch of fur. The large patch will be enough to make a nice set of gloves from. Cutting and shaping the fur, you're now going to have to stuff the gloves with a filling to keep them warm. Maybe you can find something soft in Antonica.")
  50. end
  51. function Dialog4(Item,Player)
  52. conversation = CreateConversation()
  53. if GetQuestStep(Player,Quest)==6 then
  54. AddConversationOption(conversation, "[Attempt to sew the lining]", "QuestFinish")
  55. end
  56. if GetQuestStep(Player,Quest)==4 then
  57. SetStepComplete(Player,Quest,4)
  58. end
  59. AddConversationOption(conversation, "[Put the stuffed glove pattern away]", "CloseItemConversation")
  60. StartDialogConversation(conversation, 2, Item, Player, "You shove as much down as you can in between the lining of the gloves. You managed to grab just enough to do the job. All you need now is a strong way to close up the lining. Perhaps the zombies around the area have some extra tendons they don't need.")
  61. end
  62. function QuestFinish(Item,Player)
  63. CloseItemConversation(Item,Player)
  64. if GetQuestStep(Player,Quest)==6 then
  65. SetStepComplete(Player,Quest,6)
  66. end
  67. if HasItem(Player,10331) then
  68. RemoveItem(Player,10331,1)
  69. end
  70. end
  71. function Completed(Item,Player)
  72. conversation = CreateConversation()
  73. AddConversationOption(conversation, "[Pack the fur back in your bags.]", "QuestFinish")
  74. AddConversationOption(conversation, "[Get rid of the fur.]", "QuestFinish")
  75. StartDialogConversation(conversation, 2, Item, Player, "This patch of dog fur reminds you of some Fur Lined Gloves you've made in the past. They sure were comfortable!")
  76. end