123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250 |
- --[[
- Script Name : SpawnScripts/FarJourneyFreeport/Ingrid.lua
- Script Author : Cynnar
- Script Date : 2019.10.18 06:10:27
- Script Purpose :
- Notes :
- Notes :
- --]]
- require "SpawnScripts/Generic/DialogModule"
- local TaskAboardTheFarJourney = 524
- local TempAnimationVar = nil
- function spawn(NPC)
-
- if not HasCompletedQuest(Player, TaskAboardTheFarJourney) then
- SetTempVariable(NPC, "TempAnimationVar", "FirstRun")
- AddTimer(NPC, 1500, "WalkToGeredo")
- else
- SetTempVariable(NPC, "TempAnimationVar", nil)
- end
-
- end
- function hailed(NPC, Spawn)
-
-
-
- if GetTempVariable(NPC, "TempAnimationVar") == nil then
- FaceTarget(NPC, Spawn)
-
- local rand = math.random(0, 2)
-
- if rand == 0 then
- PlayFlavor(NPC, "voiceover/english/ingrid/boat_06p_tutorial02_fvo_009.mp3", "I hate rats, every time we dock they get on board and eat our supplies.", "grumble", 3636322414, 1973183674, Spawn)
- elseif rand == 1 then
- PlayFlavor(NPC, "voiceover/english/ingrid/boat_06p_tutorial02_fvo_008.mp3", "Don't you just love the sea?", "sniff", 541733813, 1294072887, Spawn)
- else
- PlayFlavor(NPC, "voiceover/english/ingrid/boat_06p_tutorial02_fvo_007.mp3", "Yo ho ho and a bottle of rum!", "smile", 964088856, 3568852318, Spawn)
- end
- end
-
- end
- function WalkToGeredo(NPC, Spawn)
-
- MoveToLocation(NPC, 5.85, -2.07, -2.94, 2, nil, true)
- MoveToLocation(NPC, 5.77, -2.07, -1.56, 2, nil, false)
-
- AddTimer(NPC, 1500, "EmoteAnimationStart")
-
- end
- --sends to Geredo to start the flirting
- --no action on Ingrid's part yet
- function EmoteAnimationStart(NPC, Spawn)
-
- if GetTempVariable(NPC, "TempAnimationVar") ~= nil then
- AnimationChoice = math.random(0, 10)
-
- local Geredo = GetSpawn(NPC, 270004)
-
- if Geredo ~= nil then
- if GetTempVariable(NPC, "TempAnimationVar") == "FirstRun" then
- AddTimer(Geredo, 2000, "GeredoFlirtingWithIngird")
- else
- if GetTempVariable(NPC, "TempAnimationVar") == "SecondRun" and AnimationChoice <= 5 then
- AddTimer(Geredo, 5000, "GeredoFlirtingWithIngird")
- else
- AddTimer(Geredo, 5000, "FlirtingWithGeredo")
- end
- end
- end
- end
-
- end
- --sent from Geredo's flex
- --sends back to Geredo after Ingrid's response with a chuckle
- function FlirtWithIngrid(NPC, Spawn)
-
- if GetTempVariable(NPC, "TempAnimationVar") ~= nil then
- PlayFlavor(NPC, "", "", "chuckle", 0, 0)
-
- AnimationChoice = math.random(0, 9)
-
- local Geredo = GetSpawn(NPC, 270004)
-
- if Geredo ~= nil then
- if GetTempVariable(NPC, "TempAnimationVar") == "FirstRun" then
- AddTimer(Geredo, 5000, "FlirtingWithGeredo")
- else
- if GetTempVariable(NPC, "TempAnimationVar") == "SecondRun" and AnimationChoice >= 7 then
- AddTimer(Geredo, 5000, "FlirtingWithGeredo")
- else
- EmoteAnimationStart(NPC, Spawn)
- end
- end
- end
- end
-
- end
- --sent form Geredo's bow
- --sends back to Geredo after Ingrid's curtsey
- function FlirtWithIngrid_2(NPC, Spawn)
-
- if GetTempVariable(NPC, "TempAnimationVar") ~= nil then
- PlayFlavor(NPC, "", "", "curtsey", 0, 0)
-
- AnimationChoice = math.random(0, 9)
-
- local Geredo = GetSpawn(NPC, 270004)
-
- if Geredo ~= nil then
- if GetTempVariable(NPC, "TempAnimationVar") == "FirstRun" then
- AddTimer(Geredo, 5000, "FlirtingWithGeredo_2")
- elseif GetTempVariable(NPC, "TempAnimationVar") == "SecondRun" and AnimationChoice >= 7 then
- AddTimer(Geredo, 5000, "FlirtingWithGeredo_2")
- else
- EmoteAnimationStart(NPC, Spawn)
- end
- end
- end
-
- end
- --sent form Geredo's flirt
- --sends to flustered animation next
- function FlirtWithIngrid_3(NPC, Spawn)
-
- if GetTempVariable(NPC, "TempAnimationVar") ~= nil then
- PlayFlavor(NPC, "", "", "giggle", 0, 0)
- AddTimer(NPC, 2500, "Ingridflustered")
- end
-
- end
- --emotes flustered
- --sends back to Geredo after Ingrid's giggle
- function Ingridflustered(NPC, Spawn)
-
- if GetTempVariable(NPC, "TempAnimationVar") ~= nil then
- PlayFlavor(NPC, "", "", "flustered", 0, 0)
-
- local Geredo = GetSpawn(NPC, 270004)
-
- if Geredo ~= nil then
- AddTimer(Geredo, 3000, "FlirtingWithGeredo_3")
- end
- end
-
- end
- --sent form Geredo's blowkiss
- --sends back to Geredo after Ingrid's no
- function FlirtWithIngrid_4(NPC, Spawn)
-
- if GetTempVariable(NPC, "TempAnimationVar") ~= nil then
- PlayFlavor(NPC, "", "", "no", 0, 0)
-
- local Geredo = GetSpawn(NPC, 270004)
-
- if Geredo ~= nil then
- AddTimer(Geredo, 2000, "FlirtingWithGeredo_4")
- end
- end
-
- end
- --sent form Geredo's beg
- --sends to foot tap animation
- function FlirtWithIngrid_5(NPC, Spawn)
-
- if GetTempVariable(NPC, "TempAnimationVar") ~= nil then
- PlayFlavor(NPC, "", "", "tapfoot", 0, 0)
-
- AddTimer(NPC, 3000, "IngridTapFoot")
- end
-
- end
- --emotes foot tap
- --sends back to Geredo after Ingrid's shrug
- function IngridTapFoot(NPC, Spawn)
-
- if GetTempVariable(NPC, "TempAnimationVar") ~= nil then
- PlayFlavor(NPC, "", "", "shrug", 0, 0)
-
- if GetTempVariable(NPC, "TempAnimationVar") == "FirstRun" then
- SetTempVariable(NPC, "TempAnimationVar", "SecondRun")
- end
-
- AddTimer(NPC, 5000, "EmoteAnimationStart")
- end
-
- end
- function CaptainCallingIngrid(NPC, Spawn)
-
- if GetTempVariable(NPC, "TempAnimationVar") == nil then
- MoveToLocation(NPC, 2.47, -2.07, -3.26, 5)
- end
-
- MoveToLocation(NPC, -2.72, -2.00, -8.34, 5, nil, true)
- MoveToLocation(NPC, -2.11, 1.21, -14.69, 5, nil, true)
- MoveToLocation(NPC, 0.78, 1.21, -14.51, 5, nil, true)
- MoveToLocation(NPC, 0.54, 1.18, -11.70, 5, nil, true)
- MoveToLocation(NPC, 1.68, 1.19, -12.13, 5, "FaceCaptainVarlos", false)
- end
- function FaceCaptainVarlos(NPC, Spawn)
-
- local Varlos = GetSpawn(NPC, 270000)
-
- FaceTarget(NPC, Varlos)
-
- if GetDistance(NPC, Varlos) >= 1.48 then
- AddTimer(Varlos, 500, "TalkToCaptainVarlos", 1, Spawn)
- end
-
- end
- function SaluteCaptainVarlos(NPC, Spawn)
-
- local Varlos = GetSpawn(NPC, 270000)
-
- PlayFlavor(NPC, "voiceover/english/ingrid/boat_06p_tutorial02/020_deckhand_ingrid_010_1637e047.mp3", "Aye, aye, Captain!", "salute", 1250282628, 237171958, Spawn)
-
- AddTimer(Varlos, 3000, "IngridLeaveCaptain", 1, Spawn)
- AddTimer(NPC, 2000, "ReturnToSpawnPoint", 1, Spawn)
-
- end
- function ReturnToSpawnPoint(NPC, Spawn)
-
- MoveToLocation(NPC, 0.78, 1.21, -14.51, 5, nil, true)
- MoveToLocation(NPC, -2.11, 1.21, -14.69, 5, nil, true)
- MoveToLocation(NPC, -2.72, -2.00, -8.34, 5, nil, true)
- MoveToLocation(NPC, 3.34, -2.07, -3.97, 5, nil, true)
- MoveToLocation(NPC, 2.35, -2.07, -3.34, 5, nil, false)
-
- end
- function respawn(NPC)
- end
|