123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- --[[
- Script Name : SpawnScripts/Baubbleshire/GanlaDindlenod.lua
- Script Purpose : Kualdin Swoonsong
- Script Author : Dorbin
- Script Date : 2022.02.13
- Script Notes :
- --]]
- dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
- require "SpawnScripts/Generic/DialogModule"
- local Delivery = 5471
- function spawn(NPC)
- SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
- ProvidesQuest(NPC, Delivery)
- SetTempVariable(NPC, "CalloutTimer", "false")
- SetTempVariable(NPC, "CalloutTimer1", "false")
- SetTempVariable(NPC, "CalloutTimer2", "false")
- end
- function InRange(NPC, Spawn) --Quest Callout
- if GetFactionAmount(Spawn,11)<0 then
- FactionChecking(NPC, Spawn, faction)
- else
- if CanReceiveQuest (Spawn, Delivery) then
- if GetTempVariable(NPC, "CalloutTimer")== "false"then
- SetTempVariable(NPC, "CalloutTimer", "true")
- AddTimer(NPC,10000,"ResetTimer",1,Spawn)
- FaceTarget(NPC, Spawn)
- if GetTempVariable(NPC, "CalloutTimer1")== "false"then
- PlayFlavor(NPC, "voiceover/english/kualdin_swoonsong/qey_village05/100_kualdin_swoonsong_callout_47db249c.mp3", "Gather around people ... gather around. I'll be warming up my voice in a few minutes.", "orate", 1269733907, 434806140, Spawn)
- SetTempVariable(NPC, "CalloutTimer1", "true")
- elseif GetTempVariable(NPC, "CalloutTimer2")== "false"then
- PlayFlavor(NPC, "voiceover/english/kualdin_swoonsong/qey_village05/100_kualdin_swoonsong_multhail2_1c41a7b8.mp3", "Hail, fair adventurer. If you can spare some time, my devotees are gathering to hear the latest masterpiece by yours truely.", "royalwave", 2123310145, 515687997, Spawn)
- SetTempVariable(NPC, "CalloutTimer2", "true")
- else
- SetTempVariable(NPC, "CalloutTimer1", "false")
- SetTempVariable(NPC, "CalloutTimer2", "false")
- PlayFlavor(NPC, "voiceover/english/kualdin_swoonsong/qey_village05/100_kualdin_swoonsong_multhail1_7f060d18.mp3", "Hail fair, adventurer. Please be on your way. I've no time for chatting with commoners. I must warm up my voice. My fans await me...", "smirk", 2685665398, 3421389957, Spawn)
- end
- end
-
- else
- if MakeRandomInt(1, 100) <= 50 then
- choice = MakeRandomInt(1,2)
- FaceTarget(NPC, Spawn)
- if choice ==1 then
- PlayFlavor(NPC, "", "", "royalwave", 0, 0, Spawn)
- else
- PlayFlavor(NPC, "", "", "smirk", 0, 0, Spawn)
- end
- end
- end
- end
- end
- function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
- SetTempVariable(NPC, "CalloutTimer", "false")
- end
- function respawn(NPC)
- spawn(NPC)
- end
- function hailed(NPC, Spawn)
- if GetFactionAmount(Spawn,11)<0 then
- FaceTarget(NPC, Spawn)
- FactionChecking(NPC, Spawn, faction)
- else
- if not HasQuest(Spawn, Delivery) and not HasCompletedQuest(Spawn, Delivery) then
- Dialog1(NPC,Spawn)
- elseif HasQuest(Spawn, Delivery) and not HasCompletedQuest(Spawn, Delivery) then
- Dialog2(NPC,Spawn)
- else
- PlayFlavor(NPC, "voiceover/english/kualdin_swoonsong/qey_village05/100_kualdin_swoonsong_callout_47db249c.mp3", "Gather around people ... gather around. I'll be warming up my voice in a few minutes.", "smirk", 1269733907, 434806140, Spawn)
- end
- end
- end
- function Dialog1(NPC, Spawn)
- FaceTarget(NPC, Spawn)
- Dialog.New(NPC, Spawn)
- Dialog.AddDialog("Hail to you, fair adventurer. If you want to wait around a bit, my devotees will be gathering soon to hear my latest masterpiece sung by yours truly.")
- Dialog.AddVoiceover("voiceover/english/kualdin_swoonsong/qey_village05/kualdinswoonsong000.mp3", 4042301311, 2032672217)
- PlayFlavor(NPC, "", "", "royalwave", 0, 0, Spawn)
- Dialog.AddOption("Are you preparing for a concert?", "Book")
- Dialog.AddOption("Not right now.")
- Dialog.Start()
- end
- function Dialog2(NPC, Spawn)
- FaceTarget(NPC, Spawn)
- conversation = CreateConversation()
- PlayFlavor(NPC,"voiceover/english/voice_emotes/greetings/greetings_3_1008.mp3","","nod",0,0,Spawn)
- if GetQuestStep (Spawn, Delivery) == 2 then
- AddConversationOption(conversation, "Bupipa agreed to join you as long as she can have her own solo performance.", "Delivered")
- end
- AddConversationOption(conversation, "I'm still heading that way.")
- StartConversation(conversation, NPC, Spawn, "Did you find Bupipa! You must find her! She'll be elated to sing at my concert.")
- end
- function Book(NPC, Spawn)
- FaceTarget(NPC, Spawn)
- Dialog.New(NPC, Spawn)
- Dialog.AddDialog("A concert? Oh, no! Concerts are held in lavish auditoriums and feature many different songs. Unfortunately, right now, I don't have access to a concert hall. But I'm holding an event soon! I even have a partner for duets ... Well, I haven't actually asked the singer I have in mind ... Would you do me a favor and ask if she'll accompany me?")
- Dialog.AddVoiceover("voiceover/english/kualdin_swoonsong/qey_village05/kualdinswoonsong001.mp3", 1787982830, 1127515675)
- PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
- Dialog.AddOption("Who do you want to ask?", "QuestBegin")
- Dialog.AddOption("I'm a bit preoccupied. Sorry.")
- Dialog.Start()
- end
- function QuestBegin (NPC, Spawn)
- FaceTarget(NPC, Spawn)
- OfferQuest(NPC, Spawn, Delivery)
- end
- function Delivered(NPC, Spawn)
- FaceTarget(NPC, Spawn)
- Dialog.New(NPC, Spawn)
- Dialog.AddDialog("Wonderful! I'll add Bupipa to my concert plans. I'll fit her in somewhere between my second and fifth solo. Thanks for your help. Take this coin for your time. You MUST save it and buy a concert ticket!")
- Dialog.AddVoiceover("voiceover/english/kualdin_swoonsong/qey_village05/kualdinswoonsong003.mp3", 2468409303, 338695465)
- PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
- Dialog.AddOption("I'll consider it. Glad I could help.", "Reward")
- Dialog.Start()
- end
- function Reward(NPC, Spawn)
- SetStepComplete(Spawn, Delivery, 2)
- end
|