9
3

MeteorChunk.lua 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. --[[
  2. Script Name : ItemScripts/MeteorChunk.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.16 08:05:43
  5. Script Purpose :
  6. :
  7. --]]
  8. local Quest = 5832
  9. function examined(Item, Player)
  10. if not HasQuest(Player, Quest) and not HasCompletedQuest(Player, Quest) then
  11. Dialog1(Item,Player)
  12. elseif GetQuestStep(Player,Quest)==1 or GetQuestStep(Player,Quest)==2 then
  13. Dialog2(Item,Player)
  14. elseif GetQuestStep(Player,Quest)==3 or GetQuestStep(Player,Quest)==4 then
  15. Dialog3(Item,Player)
  16. elseif GetQuestStep(Player,Quest)==5 or GetQuestStep(Player,Quest)==6 then
  17. Dialog4(Item,Player)
  18. elseif HasCompletedQuest(Player, Quest)then
  19. Completed(Item,Player)
  20. end
  21. end
  22. function Dialog1(Item,Player)
  23. conversation = CreateConversation()
  24. AddConversationOption(conversation, "[Examine the rock more closely.]", "Dialog2")
  25. AddConversationOption(conversation, "[Put the rock away.]", "CloseItemConversation")
  26. StartDialogConversation(conversation, 2, Item, Player, "This chunk of rock looks much different than most of the rocks you've seen in the surrounding area. The stone itself reminds you of meteor fragments you've seen before.")
  27. end
  28. function Dialog2(Item,Player)
  29. conversation = CreateConversation()
  30. if CanReceiveQuest(Player,Quest) then
  31. OfferQuest(nil,Player,Quest)
  32. end
  33. if GetQuestStep(Player,Quest)==2 then
  34. AddConversationOption(conversation, "[Use the ink to dye the burned spots.]", "Dialog3")
  35. end
  36. AddConversationOption(conversation, "[Put the rock away.]", "CloseItemConversation")
  37. StartDialogConversation(conversation, 2, Item, Player, "The more you inspect it the more you're convinced it is a meteor. It's rather mottled due to it burning up on impact. Perhaps if you could find some way to dye the burned spots, such as a dark ink, you just might be able to turn this meteorite into a nice piece of jewelry.")
  38. end
  39. function Dialog3(Item,Player)
  40. conversation = CreateConversation()
  41. if GetQuestStep(Player,Quest)==4 then
  42. AddConversationOption(conversation, "[Compare the harvested stone to this rock]", "Dialog4")
  43. end
  44. if GetQuestStep(Player,Quest)==2 then
  45. SetStepComplete(Player,Quest,2)
  46. end
  47. AddConversationOption(conversation, "[Put the rock away.]", "CloseItemConversation")
  48. StartDialogConversation(conversation, 2, Item, Player, "Taking the octopus ink and rubbing it into the stone doesn't do too much. Fortunately you acquired a large amount. After much work you're able to even out the discoloration. Now you're going to need to fashion a hoop to attach the chunk to. You should gather some rock from the surrounding lands of Antonica.")
  49. end
  50. function Dialog4(Item,Player)
  51. conversation = CreateConversation()
  52. if GetQuestStep(Player,Quest)==6 then
  53. AddConversationOption(conversation, "[Carefully use the rock hammer to craft the jewelery]", "Dialog5")
  54. end
  55. if GetQuestStep(Player,Quest)==4 then
  56. SetStepComplete(Player,Quest,4)
  57. end
  58. AddConversationOption(conversation, "[Put the rock away.]", "CloseItemConversation")
  59. StartDialogConversation(conversation, 2, Item, Player, "You compare the rock to the meteor chunk and see that this will do just fine. You have enough to turn it into an impressive earring. You'll need a rock hammer to shape it to the form you want, however.")
  60. end
  61. function Dialog5(Item,Player)
  62. conversation = CreateConversation()
  63. AddConversationOption(conversation, "Glorious!", "QuestFinish")
  64. StartDialogConversation(conversation, 2, Item, Player, "After several hours of work, you're able to chip, carve, and shape the rocks in a perfect hoop. Using the meteor as the center ball, you've managed to make a pristine Meteoric Hoop.")
  65. end
  66. --
  67. function QuestFinish(Item,Player)
  68. CloseItemConversation(Item,Player)
  69. if GetQuestStep(Player,Quest)==6 then
  70. SetStepComplete(Player,Quest,6)
  71. end
  72. if HasItem(Player,1343) then
  73. RemoveItem(Player,1343,1)
  74. end
  75. end
  76. function Completed(Item,Player)
  77. conversation = CreateConversation()
  78. AddConversationOption(conversation, "[Keep the rock. It is from beyond this realm, after all!]")
  79. AddConversationOption(conversation, "[Toss the rock aside. You've got better things to carry.]", "QuestFinish")
  80. StartDialogConversation(conversation, 2, Item, Player, "This rock shimmers like the meteor chunk you used to make a piece of jewelery! You don't really have another use for it.")
  81. end