9
3

Marcus.lua 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/Marcus.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.25 06:05:36
  5. Script Purpose :
  6. :
  7. --]]
  8. local TheSecretValley = 5234
  9. function spawn(NPC)
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. local conversation = CreateConversation()
  14. if GetQuestStep(Spawn, TheSecretValley) == 1 then
  15. AddConversationOption(conversation, "Are you the Merchant Marcus who put up the wanted poster in the Crossroads?", "Option1")
  16. elseif GetQuestStep(Spawn, TheSecretValley) == 2 or GetQuestStep(Spawn, TheSecretValley) == 3 or GetQuestStep(Spawn, TheSecretValley) == 4 then
  17. AddConversationOption(conversation, "Hello again Marcus.", "QuestProgress")
  18. elseif GetQuestStep(Spawn, TheSecretValley) == 5 then
  19. AddConversationOption(conversation, "I have gathered the ingredients you asked for.", "Option9")
  20. end
  21. AddConversationOption(conversation, "Just browsing your wares...")
  22. StartConversation(conversation, NPC, Spawn, "Hello theres, hows can I helps you today?")
  23. end
  24. function Option1(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. local conversation = CreateConversation()
  27. AddConversationOption(conversation, "What offer?", "Option2")
  28. StartConversation(conversation, NPC, Spawn, "Why yes, indeed, that poster is mine. Yous are interested in the offer then?")
  29. end
  30. function Option2(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. local conversation = CreateConversation()
  33. AddConversationOption(conversation, "Antonica?", "Option3")
  34. StartConversation(conversation, NPC, Spawn, "Wells you see, just a short time ago a group of Rogue Magi came by here. From the continent of Antonica they were...")
  35. end
  36. function Option3(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. local conversation = CreateConversation()
  39. AddConversationOption(conversation, "Secrets?", "Option4")
  40. StartConversation(conversation, NPC, Spawn, "Yes, Antonica. Theys seemed to be fleeing something, banishments perhaps. No matter though, you sees that rockpile over there? It is actually the entrance to an ancient valley, one which holds a great many secrets...")
  41. end
  42. function Option4(NPC, Spawn)
  43. FaceTarget(NPC, Spawn)
  44. local conversation = CreateConversation()
  45. AddConversationOption(conversation, "Your assistance?", "Option5")
  46. StartConversation(conversation, NPC, Spawn, "Yes, that valley is where the magi have gone. With my helps of course. They had devised a potion that would allows them to pass through the rock unharmed....a Potion of Earthwalking if yous will. In so doing theys required my assistance of course, for I am Marcus.")
  47. end
  48. function Option5(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. local conversation = CreateConversation()
  51. AddConversationOption(conversation, "So you put the sign up so you could sell others the potion to let them into the valley?", "Option7")
  52. AddConversationOption(conversation, "Why don't you go into the valley yourself?", "Option6")
  53. StartConversation(conversation, NPC, Spawn, "The potion that they had devised required certain ingredients....some of which they did not have in their possession. Not knowing the area well they contracted me to assist them in gathering these items, for a fee, of course. In the course of gathering their ingredients I was able to discern the secrets to creating this potion myself.")
  54. end
  55. function Option6(NPC, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. local conversation = CreateConversation()
  58. AddConversationOption(conversation, "Of course Marcus, you were saying?", "Option7")
  59. StartConversation(conversation, NPC, Spawn, "Marcus, I ams a merchant see? Yous, you are the brave adventurer.")
  60. end
  61. function Option7(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. local conversation = CreateConversation()
  64. AddConversationOption(conversation, "Very well, I've come this far, what do you need me to get?", "Option8")
  65. AddConversationOption(conversation, "No, I'm not interested")
  66. StartConversation(conversation, NPC, Spawn, "The magi, they depleted my stores you see, and I am out of a few key ingredients at this time. If you were to gather them for me I would give you a potion, free of charge.")
  67. end
  68. function Option8(NPC, Spawn)
  69. SetStepComplete(Spawn, TheSecretValley, 1)
  70. FaceTarget(NPC, Spawn)
  71. local conversation = CreateConversation()
  72. AddConversationOption(conversation, "Thanks.")
  73. StartConversation(conversation, NPC, Spawn, "That's a nice book you have there, let me see it. Yes, I'll jot down for you now the items I wills be needing. Come see me again when you have them all.")
  74. end
  75. function Option9(NPC, Spawn)
  76. SetStepComplete(Spawn, TheSecretValley, 5)
  77. FaceTarget(NPC, Spawn)
  78. local conversation = CreateConversation()
  79. AddConversationOption(conversation, "You're not really making a potion out of what I gave you are you?", "Option10")
  80. StartConversation(conversation, NPC, Spawn, "Excellent, yous have gathered whats I need! Gives them here...and yes, heres is your potion as I promised. Marcus always stays true to his word, he does.")
  81. end
  82. function Option10(NPC, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. local conversation = CreateConversation()
  85. AddConversationOption(conversation, "Thank you for the warning, I'm sure I can handle myself.", "Option11")
  86. AddConversationOption(conversation, "That does sound dangerous, maybe i'd better not go in", "Option11")
  87. StartConversation(conversation, NPC, Spawn, "Yes, but it's a special potion. Anyway, before you goes in theres, a words of warning for yous. That valley is very dangerous and very old. I know not whats has happened since the Magi have entered but terrible sounds have come from the valley in recent nights, howling, wretched sounds they are.")
  88. end
  89. function Option11(NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. local conversation = CreateConversation()
  92. AddConversationOption(conversation, "Well thank you again for the warning, good day to you.", "Option12")
  93. StartConversation(conversation, NPC, Spawn, "Ahh yess, but the treasures there, I am sure that they are amazing. These are not the first magi to enter that valley you know, no's, they are not.")
  94. end
  95. function Option12(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. local conversation = CreateConversation()
  98. AddConversationOption(conversation, "Yes Marcus, I'm sure you would be more than eager to sell me more of these potions.")
  99. StartConversation(conversation, NPC, Spawn, "Oh yes, one last thing. The potion, there is enough to cover three in a bottle but once opened it will only work once. If you needs to go back for some reason, you know who to talk to.")
  100. end
  101. function QuestProgress(NPC, Spawn)
  102. FaceTarget(NPC, Spawn)
  103. local conversation = CreateConversation()
  104. AddConversationOption(conversation, "Fine.")
  105. StartConversation(conversation, NPC, Spawn, "I can't helps you if yous don't bring me whats I need. Come back to Marcus when you have everythings that I asked for.")
  106. end
  107. function respawn(NPC)
  108. spawn(NPC)
  109. end