9
3

Licha.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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. ProvidesQuest(NPC, SparklyOrNothing)
  15. ProvidesQuest(NPC, ANewDressNOW)
  16. ProvidesQuest(NPC, LichaDancingQueen)
  17. ProvidesQuest(NPC, SheHadRibbonsInHerHair)
  18. end
  19. function InRange(NPC, Spawn)
  20. end
  21. function hailed(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. local choice = MakeRandomInt(1, 3)
  24. if choice == 1 then
  25. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1007.mp3", "", "", 0, 0, Spawn)
  26. elseif choice == 2 then
  27. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1007.mp3", "", "", 0, 0, Spawn)
  28. elseif choice == 3 then
  29. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1007.mp3", "", "", 0, 0, Spawn)
  30. end
  31. if not HasQuest(Spawn, SparklyOrNothing) and not HasCompletedQuest(Spawn, SparklyOrNothing) then
  32. Option1(NPC, Spawn)
  33. elseif HasCompletedQuest(Spawn, SparklyOrNothing) and not HasQuest(Spawn, ANewDressNOW) and not HasCompletedQuest(Spawn, ANewDressNOW) then
  34. Option6(NPC, Spawn)
  35. elseif HasCompletedQuest(Spawn, SparklyOrNothing) and HasCompletedQuest(Spawn, ANewDressNOW) and not HasQuest(Spawn, LichaDancingQueen) and not HasCompletedQuest(Spawn, LichaDancingQueen) then
  36. Option10(NPC, Spawn)
  37. elseif HasCompletedQuest(Spawn, SparklyOrNothing) and HasCompletedQuest(Spawn, ANewDressNOW) and HasCompletedQuest(Spawn, LichaDancingQueen) and not HasQuest(Spawn, SheHadRibbonsInHerHair) and not HasCompletedQuest(Spawn, SheHadRibbonsInHerHair) then
  38. Option14(NPC, Spawn)
  39. 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
  40. Quest_Progress(NPC, Spawn)
  41. elseif GetQuestStep(Spawn, SparklyOrNothing) == 3 or GetQuestStep(Spawn, ANewDressNOW) == 2 or GetQuestStep(Spawn, LichaDancingQueen) == 4 or GetQuestStep(Spawn, SheHadRibbonsInHerHair) == 2 then
  42. Quest_Finish(NPC, Spawn)
  43. elseif HasCompletedQuest(Spawn, SparklyOrNothing) and HasCompletedQuest(Spawn, ANewDressNOW) and HasCompletedQuest(Spawn, LichaDancingQueen) and HasCompletedQuest(Spawn, SheHadRibbonsInHerHair) then
  44. PlayFlavor(NPC, "", "You already have everything I want to give.", "", 0, 0, Spawn)
  45. end
  46. end
  47. function Option1(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. local conversation = CreateConversation()
  50. AddConversationOption(conversation, "What? Umm, okay.", "Option2")
  51. AddConversationOption(conversation, "See something you like?", "Option3")
  52. AddConversationOption(conversation, "I've had enough orders from you.")
  53. StartConversation(conversation, NPC, Spawn, "Turn around. Let me look you over.")
  54. PlayFlavor(NPC,"","","peer",0,0,Spawn)
  55. end
  56. function Option2(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. local conversation = CreateConversation()
  59. AddConversationOption(conversation, "What is it you want me to do?", "Option4")
  60. AddConversationOption(conversation, "No.")
  61. 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?")
  62. PlayFlavor(NPC,"","","sniff",0,0,Spawn)
  63. end
  64. function Option3(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. local conversation = CreateConversation()
  67. AddConversationOption(conversation, "I can assure you, miss, that I can kill anything I want to.", "Option4")
  68. AddConversationOption(conversation, "Adventurers do not have time for baths or spoiled children. Good day.")
  69. 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.")
  70. PlayFlavor(NPC,"","","lookaway",0,0,Spawn)
  71. end
  72. function Option4(NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. local conversation = CreateConversation()
  75. AddConversationOption(conversation, "Basilisks are dangerous.", "Option5")
  76. AddConversationOption(conversation, "Dear gods, I'm out of here.")
  77. 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.")
  78. end
  79. function Option5(NPC, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. local conversation = CreateConversation()
  82. AddConversationOption(conversation, "As you wish.", "offer")
  83. AddConversationOption(conversation, "Get them yourself. A good wallop might do you good.")
  84. 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.")
  85. PlayFlavor(NPC,"","","smirk",0,0,Spawn)
  86. end
  87. -- 2nd QUEST
  88. function Option6(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. local conversation = CreateConversation()
  91. AddConversationOption(conversation, "What do you want, now?", "Option7")
  92. AddConversationOption(conversation, "I don't know, and I don't want to know.")
  93. StartConversation(conversation, NPC, Spawn, "Why is he so mean?")
  94. PlayFlavor(NPC,"","","grumble",0,0,Spawn)
  95. end
  96. function Option7(NPC, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. local conversation = CreateConversation()
  99. AddConversationOption(conversation, "Calm yourself. Where is it being delivered?", "Option9")
  100. AddConversationOption(conversation, "I'm shocked!", "Option8")
  101. AddConversationOption(conversation, "Oh no... Bye.")
  102. 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!")
  103. end
  104. function Option8(NPC, Spawn)
  105. FaceTarget(NPC, Spawn)
  106. local conversation = CreateConversation()
  107. AddConversationOption(conversation, "Fine. Where is it being delivered?", "Option9")
  108. AddConversationOption(conversation, "No.")
  109. 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.")
  110. PlayFlavor(NPC,"","","scold",0,0,Spawn)
  111. end
  112. function Option9(NPC, Spawn)
  113. FaceTarget(NPC, Spawn)
  114. local conversation = CreateConversation()
  115. AddConversationOption(conversation, "Alright.", "offer2")
  116. AddConversationOption(conversation, "No.")
  117. 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!")
  118. end
  119. -- 3d QUEST
  120. function Option10(NPC, Spawn)
  121. FaceTarget(NPC, Spawn)
  122. local conversation = CreateConversation()
  123. AddConversationOption(conversation, "Your face is contorted. What do you want now?", "Option11")
  124. AddConversationOption(conversation, "Still rude, I see. Goodbye.")
  125. StartConversation(conversation, NPC, Spawn, "Still filthy, I see.")
  126. end
  127. function Option11(NPC, Spawn)
  128. FaceTarget(NPC, Spawn)
  129. local conversation = CreateConversation()
  130. AddConversationOption(conversation, "Performance?", "Option13")
  131. AddConversationOption(conversation, "You are as pretty as a pig.", "Option12")
  132. AddConversationOption(conversation, "Your narcissism is overwhelming. Goodbye.")
  133. 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?")
  134. PlayFlavor(NPC,"","","shimmy",0,0,Spawn)
  135. end
  136. function Option12(NPC, Spawn)
  137. FaceTarget(NPC, Spawn)
  138. local conversation = CreateConversation()
  139. AddConversationOption(conversation, "Fine, fine... What do you want?", "Option13")
  140. AddConversationOption(conversation, "My stench and I will be going.")
  141. 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!")
  142. PlayFlavor(NPC,"","","boggle",0,0,Spawn)
  143. end
  144. function Option13(NPC, Spawn)
  145. FaceTarget(NPC, Spawn)
  146. local conversation = CreateConversation()
  147. AddConversationOption(conversation, "I'll try.", "offer3")
  148. AddConversationOption(conversation, "No one will be willing, trust me. Bye.")
  149. AddConversationOption(conversation, "I'm too busy right now.")
  150. 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.")
  151. PlayFlavor(NPC,"","","orate",0,0,Spawn)
  152. end
  153. --- 4TH QUEST
  154. function Option14(NPC, Spawn)
  155. FaceTarget(NPC, Spawn)
  156. local conversation = CreateConversation()
  157. AddConversationOption(conversation, "What happened to you?", "Option15")
  158. AddConversationOption(conversation, "Well, you're not exactly full of rainbows and sunshine, friend.")
  159. AddConversationOption(conversation, "I'm rather busy right now.")
  160. StartConversation(conversation, NPC, Spawn, "Why would anyone hurt poor, little me?")
  161. PlayFlavor(NPC,"","","whome",0,0,Spawn)
  162. end
  163. function Option15(NPC, Spawn)
  164. FaceTarget(NPC, Spawn)
  165. local conversation = CreateConversation()
  166. AddConversationOption(conversation, "Who did this to you? What evil men?", "Option16")
  167. AddConversationOption(conversation, "Not as lonely as you think. Goodbye.")
  168. 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.")
  169. end
  170. function Option16(NPC, Spawn)
  171. FaceTarget(NPC, Spawn)
  172. local conversation = CreateConversation()
  173. AddConversationOption(conversation, "Okay, okay... I'll go get them.", "offer4")
  174. AddConversationOption(conversation, "You will never learn. Goodbye.")
  175. StartConversation(conversation, NPC, Spawn, "Evil, vile highwaymen! Go get them back, unless you are too scared, adventurer of slime.")
  176. PlayFlavor(NPC,"","","shakefist",0,0,Spawn)
  177. end
  178. function Quest_Finish(NPC, Spawn)
  179. if GetQuestStep(Spawn, SparklyOrNothing) == 3 then
  180. SetStepComplete(Spawn, SparklyOrNothing, 3)
  181. elseif GetQuestStep(Spawn, ANewDressNOW) == 2 then
  182. SetStepComplete(Spawn, ANewDressNOW, 2)
  183. elseif GetQuestStep(Spawn, LichaDancingQueen) == 4 then
  184. SetStepComplete(Spawn, LichaDancingQueen, 4)
  185. elseif GetQuestStep(Spawn, SheHadRibbonsInHerHair) == 2 then
  186. SetStepComplete(Spawn, SheHadRibbonsInHerHair, 2)
  187. end
  188. FaceTarget(NPC, Spawn)
  189. local conversation = CreateConversation()
  190. AddConversationOption(conversation, "Your gratitude is astounding.")
  191. StartConversation(conversation, NPC, Spawn, "Took you long enough.")
  192. end
  193. function Quest_Progress(NPC, Spawn)
  194. PlayFlavor(NPC, "", "Aren't you done yet?", "", 0, 0, Spawn)
  195. end
  196. function offer(NPC, Spawn)
  197. OfferQuest(NPC, Spawn, SparklyOrNothing)
  198. end
  199. function offer2(NPC, Spawn)
  200. OfferQuest(NPC, Spawn, ANewDressNOW)
  201. end
  202. function offer3(NPC, Spawn)
  203. OfferQuest(NPC, Spawn, LichaDancingQueen)
  204. end
  205. function offer4(NPC, Spawn)
  206. OfferQuest(NPC, Spawn, SheHadRibbonsInHerHair)
  207. end
  208. function respawn(NPC)
  209. spawn(NPC)
  210. end