9
3

Licha.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. --[[
  2. Script Name : SpawnScripts/Antonica/Licha.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.08.16 09:08:15
  5. Script Purpose :
  6. :
  7. --]]
  8. local SparklyOrNothing = 5340-- Sparkly or Nothing quest
  9. local ANewDressNOW = 5341 -- A New Dress, NOW! quest
  10. local LichaDancingQueen = 5342 -- Licha, Dancing Queen quest
  11. local SheHadRibbonsInHerHair = 5343 -- She Had Ribbon in Her Hair quest
  12. function spawn(NPC)
  13. SetPlayerProximityFunction(NPC, 20, "InRange")
  14. end
  15. function InRange(NPC, Spawn)
  16. if not HasQuest(Spawn, SparklyOrNothing) and not HasCompletedQuest(Spawn, SparklyOrNothing) then
  17. ProvidesQuest(NPC, SparklyOrNothing)
  18. SetInfoFlag(NPC)
  19. SetVisualFlag(NPC)
  20. elseif HasCompletedQuest(Spawn, SparklyOrNothing) then
  21. ProvidesQuest(NPC, ANewDressNOW)
  22. SetInfoFlag(NPC)
  23. SetVisualFlag(NPC)
  24. elseif HasCompletedQuest(Spawn, ANewDressNOW) then
  25. ProvidesQuest(NPC, LichaDancingQueen)
  26. SetInfoFlag(NPC)
  27. SetVisualFlag(NPC)
  28. elseif HasCompletedQuest(Spawn, LichaDancingQueen) then
  29. ProvidesQuest(NPC, SheHadRibbonsInHerHair)
  30. SetInfoFlag(NPC)
  31. SetVisualFlag(NPC)
  32. end
  33. end
  34. function hailed(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. local choice = MakeRandomInt(1, 3)
  37. if choice == 1 then
  38. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1007.mp3", "", "", 0, 0, Spawn)
  39. elseif choice == 2 then
  40. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1007.mp3", "", "", 0, 0, Spawn)
  41. elseif choice == 3 then
  42. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1007.mp3", "", "", 0, 0, Spawn)
  43. end
  44. if not HasQuest(Spawn, SparklyOrNothing) and not HasCompletedQuest(Spawn, SparklyOrNothing) then
  45. Option1(NPC, Spawn)
  46. elseif HasCompletedQuest(Spawn, SparklyOrNothing) and not HasQuest(Spawn, ANewDressNOW) and not HasCompletedQuest(Spawn, ANewDressNOW) then
  47. Option6(NPC, Spawn)
  48. elseif HasCompletedQuest(Spawn, SparklyOrNothing) and HasCompletedQuest(Spawn, ANewDressNOW) and not HasQuest(Spawn, LichaDancingQueen) and not HasCompletedQuest(Spawn, LichaDancingQueen) then
  49. Option10(NPC, Spawn)
  50. elseif HasCompletedQuest(Spawn, SparklyOrNothing) and HasCompletedQuest(Spawn, ANewDressNOW) and HasCompletedQuest(Spawn, LichaDancingQueen) and not HasQuest(Spawn, SheHadRibbonsInHerHair) and not HasCompletedQuest(Spawn, SheHadRibbonsInHerHair) then
  51. Option14(NPC, Spawn)
  52. elseif GetQuestStep(Spawn, SparklyOrNothing) == 1 or GetQuestStep(Spawn, SparklyOrNothing) == 2 or GetQuestStep(Spawn, ANewDressNOW) == 1 or GetQuestStep(Spawn, LichaDancingQueen) == 1 or GetQuestStep(Spawn, LichaDancingQueen) == 2 or GetQuestStep(Spawn, LichaDancingQueen) == 3 or GetQuestStep(Spawn, SheHadRibbonsInHerHair) == 1 then
  53. Quest_Progress(NPC, Spawn)
  54. elseif GetQuestStep(Spawn, SparklyOrNothing) == 3 or GetQuestStep(Spawn, ANewDressNOW) == 2 or GetQuestStep(Spawn, LichaDancingQueen) == 4 or GetQuestStep(Spawn, SheHadRibbonsInHerHair) == 2 then
  55. Quest_Finish(NPC, Spawn)
  56. elseif HasCompletedQuest(Spawn, SparklyOrNothing) and HasCompletedQuest(Spawn, ANewDressNOW) and HasCompletedQuest(Spawn, LichaDancingQueen) and HasCompletedQuest(Spawn, SheHadRibbonsInHerHair) then
  57. PlayFlavor(NPC, "", "You already have everything I want to give.", "", 0, 0, Spawn)
  58. end
  59. end
  60. function Option1(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. local conversation = CreateConversation()
  63. AddConversationOption(conversation, "What? Umm, okay.", "Option2")
  64. AddConversationOption(conversation, "See something you like?", "Option3")
  65. AddConversationOption(conversation, "I've had enough orders from you.")
  66. StartConversation(conversation, NPC, Spawn, "Turn around. Let me look you over.")
  67. end
  68. function Option2(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. local conversation = CreateConversation()
  71. AddConversationOption(conversation, "What is it you want me to do?", "Option4")
  72. AddConversationOption(conversation, "No.")
  73. StartConversation(conversation, NPC, Spawn, "I suppose you will have to do. There are things I need and surely no one expects me to dirty my flawless nails doing them. So, you will do them for me?")
  74. end
  75. function Option3(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. local conversation = CreateConversation()
  78. AddConversationOption(conversation, "I can assure you, miss, that I can kill anything I want to.", "Option4")
  79. AddConversationOption(conversation, "Adventurers do not have time for baths or spoiled children. Good day.")
  80. StartConversation(conversation, NPC, Spawn, "Hardly.... Tell me, what dirt pile did you crawl out of? Your armor, if you can call it that, is filthy. Really, you should wash more. And you call that a weapon? I would be surprised if you could kill a lowly mouse with that thing.")
  81. end
  82. function Option4(NPC, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. local conversation = CreateConversation()
  85. AddConversationOption(conversation, "Basilisks are dangerous.", "Option5")
  86. AddConversationOption(conversation, "Dear gods, I'm out of here.")
  87. StartConversation(conversation, NPC, Spawn, "Do you know what a girl loves? By the blank look on your face, I would say no. Anyways, I adore everything that shines and sparkles. In fact, basilisks have the most wonderful shiny scales. I wanted one as a pet, but father said no.")
  88. end
  89. function Option5(NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. local conversation = CreateConversation()
  92. AddConversationOption(conversation, "As you wish.", "offer")
  93. AddConversationOption(conversation, "Get them yourself. A good wallop might do you good.")
  94. StartConversation(conversation, NPC, Spawn, "Too dangerous for you, my strong, dirty adventurer? I think not! Bring me the shiniest scales you can find, and do it quickly.")
  95. end
  96. -- 2nd QUEST
  97. function Option6(NPC, Spawn)
  98. FaceTarget(NPC, Spawn)
  99. local conversation = CreateConversation()
  100. AddConversationOption(conversation, "What do you want, now?", "Option7")
  101. AddConversationOption(conversation, "I don't know, and I don't want to know.")
  102. StartConversation(conversation, NPC, Spawn, "Why is he so mean?")
  103. end
  104. function Option7(NPC, Spawn)
  105. FaceTarget(NPC, Spawn)
  106. local conversation = CreateConversation()
  107. AddConversationOption(conversation, "Calm yourself. Where is it being delivered?", "Option9")
  108. AddConversationOption(conversation, "I'm shocked!", "Option8")
  109. AddConversationOption(conversation, "Oh no... Bye.")
  110. StartConversation(conversation, NPC, Spawn, "My father refuses to go pick up and pay for the new dress I ordered. How can I be seen wearing this old rag? I look like you! I want the new dress now!")
  111. end
  112. function Option8(NPC, Spawn)
  113. FaceTarget(NPC, Spawn)
  114. local conversation = CreateConversation()
  115. AddConversationOption(conversation, "Fine. Where is it being delivered?", "Option9")
  116. AddConversationOption(conversation, "No.")
  117. StartConversation(conversation, NPC, Spawn, "Your sarcasm is not appreciated! This is no laughing matter, adventurer of filth. That dress is imported from a distant land, and it is priceless. Priceless, I tell you! Go and get it for me now.")
  118. end
  119. function Option9(NPC, Spawn)
  120. FaceTarget(NPC, Spawn)
  121. local conversation = CreateConversation()
  122. AddConversationOption(conversation, "Alright.", "offer2")
  123. AddConversationOption(conversation, "No.")
  124. StartConversation(conversation, NPC, Spawn, "The merchant will be arriving at the dock in The Thundering Steppes in a matter of seconds! Go and get it for me or I shall never be happy again! Go... NOW!")
  125. end
  126. -- 3d QUEST
  127. function Option10(NPC, Spawn)
  128. FaceTarget(NPC, Spawn)
  129. local conversation = CreateConversation()
  130. AddConversationOption(conversation, "Your face is contorted. What do you want now?", "Option11")
  131. AddConversationOption(conversation, "Still rude, I see. Goodbye.")
  132. StartConversation(conversation, NPC, Spawn, "Still filthy, I see.")
  133. end
  134. function Option11(NPC, Spawn)
  135. FaceTarget(NPC, Spawn)
  136. local conversation = CreateConversation()
  137. AddConversationOption(conversation, "Performance?", "Option13")
  138. AddConversationOption(conversation, "You are as pretty as a pig.", "Option12")
  139. AddConversationOption(conversation, "Your narcissism is overwhelming. Goodbye.")
  140. StartConversation(conversation, NPC, Spawn, "Don't I look gorgeous? Ah, this new dress is perfect for my performance, but what is a performance without an audience?")
  141. end
  142. function Option12(NPC, Spawn)
  143. FaceTarget(NPC, Spawn)
  144. local conversation = CreateConversation()
  145. AddConversationOption(conversation, "Fine, fine... What do you want?", "Option13")
  146. AddConversationOption(conversation, "My stench and I will be going.")
  147. StartConversation(conversation, NPC, Spawn, "How dare you! Never will you see a pig dance as I will! Adventurer of swine, assist me now or rid me of your stench!")
  148. end
  149. function Option13(NPC, Spawn)
  150. FaceTarget(NPC, Spawn)
  151. local conversation = CreateConversation()
  152. AddConversationOption(conversation, "I'll try.", "offer3")
  153. AddConversationOption(conversation, "No one will be willing, trust me. Bye.")
  154. AddConversationOption(conversation, "I'm too busy right now.")
  155. StartConversation(conversation, NPC, Spawn, "I will be performing an original dance number of my own creation. It is an inspired piece... A story told through movement. It is the story of a princess finding her one, true love. Now, bring my audience quickly, while the muse still flows through me.")
  156. end
  157. --- 4TH QUEST
  158. function Option14(NPC, Spawn)
  159. FaceTarget(NPC, Spawn)
  160. local conversation = CreateConversation()
  161. AddConversationOption(conversation, "What happened to you?", "Option15")
  162. AddConversationOption(conversation, "Well, you're not exactly full of rainbows and sunshine, friend.")
  163. AddConversationOption(conversation, "I'm rather busy right now.")
  164. StartConversation(conversation, NPC, Spawn, "Why would anyone hurt poor, little me?")
  165. end
  166. function Option15(NPC, Spawn)
  167. FaceTarget(NPC, Spawn)
  168. local conversation = CreateConversation()
  169. AddConversationOption(conversation, "Who did this to you? What evil men?", "Option16")
  170. AddConversationOption(conversation, "Not as lonely as you think. Goodbye.")
  171. StartConversation(conversation, NPC, Spawn, "Men... Ghastly, evil men attacked me and stole my favorite ribbons. Whatever shall I do? How can I live without those ribbons? How will I ever be beautiful again? I will grow old, ugly, and alone, like you.")
  172. end
  173. function Option16(NPC, Spawn)
  174. FaceTarget(NPC, Spawn)
  175. local conversation = CreateConversation()
  176. AddConversationOption(conversation, "Okay, okay... I'll go get them.", "offer4")
  177. AddConversationOption(conversation, "You will never learn. Goodbye.")
  178. StartConversation(conversation, NPC, Spawn, "Evil, vile highwaymen! Go get them back, unless you are too scared, adventurer of slime.")
  179. end
  180. function Quest_Finish(NPC, Spawn)
  181. if GetQuestStep(Spawn, SparklyOrNothing) == 3 then
  182. SetStepComplete(Spawn, SparklyOrNothing, 3)
  183. elseif GetQuestStep(Spawn, ANewDressNOW) == 2 then
  184. SetStepComplete(Spawn, ANewDressNOW, 2)
  185. elseif GetQuestStep(Spawn, LichaDancingQueen) == 4 then
  186. SetStepComplete(Spawn, LichaDancingQueen, 4)
  187. elseif GetQuestStep(Spawn, SheHadRibbonsInHerHair) == 2 then
  188. SetStepComplete(Spawn, SheHadRibbonsInHerHair, 2)
  189. end
  190. FaceTarget(NPC, Spawn)
  191. local conversation = CreateConversation()
  192. AddConversationOption(conversation, "Your gratitude is astounding.")
  193. StartConversation(conversation, NPC, Spawn, "Took you long enough.")
  194. end
  195. function Quest_Progress(NPC, Spawn)
  196. PlayFlavor(NPC, "", "Aren't you done yet?", "", 0, 0, Spawn)
  197. end
  198. function offer(NPC, Spawn)
  199. OfferQuest(NPC, Spawn, SparklyOrNothing)
  200. end
  201. function offer2(NPC, Spawn)
  202. OfferQuest(NPC, Spawn, ANewDressNOW)
  203. end
  204. function offer3(NPC, Spawn)
  205. OfferQuest(NPC, Spawn, LichaDancingQueen)
  206. end
  207. function offer4(NPC, Spawn)
  208. OfferQuest(NPC, Spawn, SheHadRibbonsInHerHair)
  209. end
  210. function respawn(NPC)
  211. spawn(NPC)
  212. end