Explorar o código

Far Journey LUA scripts

LethalEncounter %!s(int64=4) %!d(string=hai) anos
pai
achega
7a03363551

+ 170 - 28
server/Quests/FarJourneyFreeport/TasksaboardtheFarJourney.lua

@@ -26,7 +26,7 @@ function Init(Quest)
 	AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
 	AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
 end
 end
 
 
-function Step1Complete(Quest, QuestGiver, Player)
+function Step2Init(Quest, QuestGiver, Player)
 	UpdateQuestStepDescription(Quest, 1, "I spoke to Waulon.")
 	UpdateQuestStepDescription(Quest, 1, "I spoke to Waulon.")
 	UpdateQuestTaskGroupDescription(Quest, 1, "I spoke to Waulon as Captain Varlos had asked of me.")
 	UpdateQuestTaskGroupDescription(Quest, 1, "I spoke to Waulon as Captain Varlos had asked of me.")
 
 
@@ -34,7 +34,8 @@ function Step1Complete(Quest, QuestGiver, Player)
 	AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
 	AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
 end
 end
 
 
-function Step2Complete(Quest, QuestGiver, Player)
+function Step3Init(Quest, QuestGiver, Player)
+	SetTutorialStep(Player, 17)
 	UpdateQuestStepDescription(Quest, 2, "I found Waulon's hat.")
 	UpdateQuestStepDescription(Quest, 2, "I found Waulon's hat.")
 	UpdateQuestTaskGroupDescription(Quest, 2, "I found Waulon's hat in one of the boxes.")
 	UpdateQuestTaskGroupDescription(Quest, 2, "I found Waulon's hat in one of the boxes.")
 
 
@@ -42,39 +43,41 @@ function Step2Complete(Quest, QuestGiver, Player)
 	AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
 	AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
 end
 end
 
 
-function Step3Complete(Quest, QuestGiver, Player)
+function Step4Init(Quest, QuestGiver, Player)
 	UpdateQuestStepDescription(Quest, 3, "I returned Waulon's hat to him.")
 	UpdateQuestStepDescription(Quest, 3, "I returned Waulon's hat to him.")
 	UpdateQuestTaskGroupDescription(Quest, 3, "I returned Waulon's hat.")
 	UpdateQuestTaskGroupDescription(Quest, 3, "I returned Waulon's hat.")
-
+	
 	AddQuestStepChat(Quest, 4, "I should speak to Ingrid.", 1, "Waulon has asked me to speak to Ingrid.", 11, Ingrid)
 	AddQuestStepChat(Quest, 4, "I should speak to Ingrid.", 1, "Waulon has asked me to speak to Ingrid.", 11, Ingrid)
 	AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
 	AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
 end
 end
 
 
-function Step4Complete(Quest, QuestGiver, Player)
+function Step5Init(Quest, QuestGiver, Player)
 	UpdateQuestStepDescription(Quest, 4, "I have spoken to Ingrid as Waulon had asked.")
 	UpdateQuestStepDescription(Quest, 4, "I have spoken to Ingrid as Waulon had asked.")
 	UpdateQuestTaskGroupDescription(Quest, 4, "I have spoken to Ingrid.")
 	UpdateQuestTaskGroupDescription(Quest, 4, "I have spoken to Ingrid.")
 
 
 	AddQuestStepObtainItem(Quest, 5, "I should find a way to buy the shard from Merchant Vim.", 1, 100, "Ingrid would like me to buy her a Shard of Luclin.", 11, ShardOfLucin)
 	AddQuestStepObtainItem(Quest, 5, "I should find a way to buy the shard from Merchant Vim.", 1, 100, "Ingrid would like me to buy her a Shard of Luclin.", 11, ShardOfLucin)
 	AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
 	AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
+	SetTutorialStep(Player, 24)
 end
 end
 
 
-function Step5Complete(Quest, QuestGiver, Player)
+function Step6Init(Quest, QuestGiver, Player)
 	UpdateQuestStepDescription(Quest, 5, "I have purchased a Shard of Luclin.")
 	UpdateQuestStepDescription(Quest, 5, "I have purchased a Shard of Luclin.")
 	UpdateQuestTaskGroupDescription(Quest, 5, "I purchased a Shard of Luclin.")
 	UpdateQuestTaskGroupDescription(Quest, 5, "I purchased a Shard of Luclin.")
 
 
 	AddQuestStepChat(Quest, 6, "Return to Ingrid.", 1, "Ingrid would like me to give her the Shard of Luclin.", 183, Ingrid)
 	AddQuestStepChat(Quest, 6, "Return to Ingrid.", 1, "Ingrid would like me to give her the Shard of Luclin.", 183, Ingrid)
 	AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
 	AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
+	SetTutorialStep(Player, 30)
 end
 end
 
 
-function Step6Complete(Quest, QuestGiver, Player)
+function Step7Init(Quest, QuestGiver, Player)
 	UpdateQuestStepDescription(Quest, 6, "I gave the Shard of Luclin to Ingrid.")
 	UpdateQuestStepDescription(Quest, 6, "I gave the Shard of Luclin to Ingrid.")
-	UpdateQuestTaskGroupDescription(Quest, 6, "I gave the Shard of Luclin to Ingrid.")
-
+	UpdateQuestTaskGroupDescription(Quest, 6, "I gave the Shard of Luclin to Ingrid.")	
+	
 	AddQuestStepChat(Quest, 7, "I should speak to Captain Varlos again.", 1, "Captain Varlos is trying to get my attention.", 11, CaptainVarlos)
 	AddQuestStepChat(Quest, 7, "I should speak to Captain Varlos again.", 1, "Captain Varlos is trying to get my attention.", 11, CaptainVarlos)
-	AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
+	AddQuestStepCompleteAction(Quest, 7, "Step7Complete")		
 end
 end
 
 
-function Step7Complete(Quest, QuestGiver, Player)
+function Step8Init(Quest, QuestGiver, Player)
 	UpdateQuestStepDescription(Quest, 7, "I spoke with Captain Varlos as Ingrid has asked of me.")
 	UpdateQuestStepDescription(Quest, 7, "I spoke with Captain Varlos as Ingrid has asked of me.")
 	UpdateQuestTaskGroupDescription(Quest, 7, "I have spoken to Captain Varlos.")
 	UpdateQuestTaskGroupDescription(Quest, 7, "I have spoken to Captain Varlos.")
 
 
@@ -82,7 +85,7 @@ function Step7Complete(Quest, QuestGiver, Player)
 	AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
 	AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
 end
 end
 
 
-function Step8Complete(Quest, QuestGiver, Player)
+function Step9Init(Quest, QuestGiver, Player)
 	UpdateQuestStepDescription(Quest, 8, "I have killed the rats.")
 	UpdateQuestStepDescription(Quest, 8, "I have killed the rats.")
 	UpdateQuestTaskGroupDescription(Quest, 8, "I killed the rats that Captain Varlos requested.")
 	UpdateQuestTaskGroupDescription(Quest, 8, "I killed the rats that Captain Varlos requested.")
 
 
@@ -90,14 +93,156 @@ function Step8Complete(Quest, QuestGiver, Player)
 	AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
 	AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
 end
 end
 
 
-function Step9Complete(Quest, QuestGiver, Player)
+function Step10Init(Quest, QuestGiver, Player)
 	UpdateQuestStepDescription(Quest, 9, "I spoke to Captain Varlos.")
 	UpdateQuestStepDescription(Quest, 9, "I spoke to Captain Varlos.")
-	UpdateQuestTaskGroupDescription(Quest, 9, "Captain Varlos has ordered you to kill the escaped goblin.")
+	UpdateQuestTaskGroupDescription(Quest, 9, "I spoke to Captain Varlos.") --this this is not 100% like Live but seeing the same entry in your journal for step 9 and 10 like Live is dumb
 
 
 	AddQuestStepKill(Quest, 10, "I must kill the goblin.", 1, 100, "Captain Varlos has ordered you to kill the escaped goblin.", 11, Goblin)
 	AddQuestStepKill(Quest, 10, "I must kill the goblin.", 1, 100, "Captain Varlos has ordered you to kill the escaped goblin.", 11, Goblin)
 	AddQuestStepCompleteAction(Quest, 10, "QuestComplete")
 	AddQuestStepCompleteAction(Quest, 10, "QuestComplete")
 end
 end
 
 
+function CurrentStep(Quest, QuestGiver, Player)
+	if GetQuestStep(Player, 524) == 2 then
+		i = 1
+		spawns = GetSpawnListBySpawnID(Player, 270010)
+		repeat
+			spawn = GetSpawnFromList(spawns, i-1)
+			if spawn then
+				ChangeHandIcon(spawn, 1)
+			end
+			i = i + 1
+		until spawn == Nil
+		InstructionWindow(Player, -1.0, "You completed the first part of the quest. As you complete quests and defeat enemies, you earn experience points. This is represented in your experience point display. Filling your experience point display is always a requirement to gain your next level. As you gain levels, you will gain access to more powerful skills and abilities.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_011_f16aa848.mp3", 1702963584, 3318288731, "tutorial_stage_15", "", "continue")
+		FlashWindow(Player, "MainHUD.Experience", 15.0)			
+		SetTutorialStep(Player, 14)
+		AddPrimaryEntityCommandAllSpawns(Player, 270010, "open", 10, "open")
+		chest = GetRandomSpawnByID(Player, 270010)
+		GiveLoot(chest, Player, 0, 185427)
+		GiveLoot(chest, Player, 0, 20902)
+		GiveLoot(chest, Player, 0, 15354)					
+	elseif GetQuestStep(Player, 524) == 3 then			
+		InstructionWindow(Player, -1.0, "The items are now in your inventory.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_014_eaa89ef7.mp3", 361706387, 1106127199, "tutorial_stage_18", "", "continue")		
+		SetTutorialStep(Player, 16)
+	elseif GetQuestStep(Player, 524) == 5 then
+		InstructionWindowClose(Player)
+		InstructionWindow(Player, -1.0, "A merchant is a special type of character who buys and sells things. Find and double left click on Merchant Vim to start a transaction.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_020_6ea052d3.mp3", 4250953579, 3003156164, "tutorial_stage_24", "Double left click on Merchant Vim.", "server")		
+	elseif GetQuestStep(Player, 524) == 6 then
+		InstructionWindowClose(Player)
+		InstructionWindow(Player, -1.0, "You have made the first of many purchases. Now close the merchant window and speak to Ingrid to complete the quest.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_026_d484fa8d.mp3", 4213145594, 1811880905, "tutorial_stage_31", "Return to Ingrid and speak to her.", "server")		
+	elseif GetQuestStep(Player, 524) == 7 then
+		InstructionWindowClose(Player)
+		captain = GetSpawn(Player, 270000)	
+		AddTimer(captain, 2000, "get_attention_init", 1, Player) 
+	elseif GetQuestStep(Player, 524) == 8 then
+		AddPrimaryEntityCommandAllSpawns(Player, 270009, "attack", 10000.0, "attack")
+		i=1
+		spawns = GetSpawnListBySpawnID(Player, 270009)
+		repeat
+			rat = GetSpawnFromList(spawns, i-1)
+			if rat then
+				SetAttackable(rat, 1)
+				if HasLootItem(rat, 11615) == false then
+					AddLootItem(rat, 11615)	
+				end
+			end
+			i = i + 1
+		until rat == Nil
+		if GetQuestStepProgress(Player, 524, 8) == 1 then -- if we already have credit for a kill, remove one rat
+			delrat = GetRandomSpawnByID(Player, 270009)
+			Despawn(delrat)
+		end
+		if HasItem(Player, 88140) == false then
+			GiveImmediateQuestReward(Quest, Player, 0, 0, "88140")
+		end
+		if HasItemEquipped(Player, 88140) == false then
+			ShowWindow(Player, "Inventory.Inventory", 0)
+			InstructionWindow(Player, -1.0, "Open your inventory by clicking the inventory button, then right click on the club the Captain just gave you.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_028_458903e8.mp3", 4151437794, 834827635, "equipping_weapons", "Open your inventory. (click on the inventory button)", "open Inventory")
+			ShowWindow(Player, "MainHUD.StartMenu", 1)
+			FlashWindow(Player, "MainHUD.StartMenu.inventory", 20.0)
+		end
+	elseif GetQuestStep(Player, 524) == 9 then
+		SetTutorialStep(Player, 49)
+		InstructionWindow(Player, -1.0, "You have earned enough experience to gain a level. Congratulations.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_046_7e59cd54.mp3", 3272157184, 1454283978, "tutorial_stage_50", "", "continue")
+		i=1
+		spawns = GetSpawnListBySpawnID(Player, 270009)
+		repeat
+			delrat = GetSpawnFromList(spawns, i-1)
+			if IsAlive(delrat) then
+				Despawn(delrat)
+			end
+			i = i + 1
+		until delrat == Nil
+	elseif GetQuestStep(Player, 524) == 10 then
+		AddPrimaryEntityCommandAllSpawns(Player, 270008, "attack", 10000.0, "attack")
+		i=1
+		spawns = GetSpawnListBySpawnID(Player, 270011)
+		repeat
+			cage = GetSpawnFromList(spawns, i-1)
+			if cage then
+				Despawn(cage)
+			end
+			i = i + 1
+		until cage == Nil
+		i=1
+		spawns = GetSpawnListBySpawnID(Player, 270009)
+		repeat
+			delrat = GetSpawnFromList(spawns, i-1)
+			if delrat then
+				Despawn(delrat)
+			end
+			i = i + 1
+		until delrat == Nil
+	end
+end
+
+function Step1Complete(Quest, QuestGiver, Player)
+	GiveExp(Player, 110)
+	Step2Init(Quest, QuestGiver, Player)
+	CurrentStep(Quest, QuestGiver, Player)
+end
+
+function Step2Complete(Quest, QuestGiver, Player)
+	Step3Init(Quest, QuestGiver, Player)	
+	CurrentStep(Quest, QuestGiver, Player)
+end
+
+function Step3Complete(Quest, QuestGiver, Player)
+	RemoveItem(Player, WaulonsHat)
+	GiveImmediateQuestReward(Quest, Player, 0, 0, "9357")
+	Step4Init(Quest, QuestGiver, Player)	
+	CurrentStep(Quest, QuestGiver, Player)
+end
+
+function Step4Complete(Quest, QuestGiver, Player)	
+	Step5Init(Quest, QuestGiver, Player)	
+	CurrentStep(Quest, QuestGiver, Player)
+end
+
+function Step5Complete(Quest, QuestGiver, Player)
+	Step6Init(Quest, QuestGiver, Player)	
+	CurrentStep(Quest, QuestGiver, Player)
+end
+
+function Step6Complete(Quest, QuestGiver, Player)
+	Step7Init(Quest, QuestGiver, Player)	
+	CurrentStep(Quest, QuestGiver, Player)
+end
+
+function Step7Complete(Quest, QuestGiver, Player)
+	Step8Init(Quest, QuestGiver, Player)	
+	CurrentStep(Quest, QuestGiver, Player)
+end
+
+function Step8Complete(Quest, QuestGiver, Player)	
+	Step9Init(Quest, QuestGiver, Player)	
+	CurrentStep(Quest, QuestGiver, Player)
+end
+
+function Step9Complete(Quest, QuestGiver, Player)
+	Step10Init(Quest, QuestGiver, Player)	
+	CurrentStep(Quest, QuestGiver, Player)
+end
+
 function QuestComplete(Quest, QuestGiver, Player)
 function QuestComplete(Quest, QuestGiver, Player)
 	-- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
 	-- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
 	UpdateQuestStepDescription(Quest, 10, "I have killed the goblin.")
 	UpdateQuestStepDescription(Quest, 10, "I have killed the goblin.")
@@ -109,23 +254,23 @@ end
 
 
 function Reload(Quest, QuestGiver, Player, Step)
 function Reload(Quest, QuestGiver, Player, Step)
 	if Step == 1 then
 	if Step == 1 then
-		Step1Complete(Quest, QuestGiver, Player)
+		Step2Init(Quest, QuestGiver, Player)
 	elseif Step == 2 then
 	elseif Step == 2 then
-		Step2Complete(Quest, QuestGiver, Player)
+		Step3Init(Quest, QuestGiver, Player)
 	elseif Step == 3 then
 	elseif Step == 3 then
-		Step3Complete(Quest, QuestGiver, Player)
+		Step4Init(Quest, QuestGiver, Player)
 	elseif Step == 4 then
 	elseif Step == 4 then
-		Step4Complete(Quest, QuestGiver, Player)
+		Step5Init(Quest, QuestGiver, Player)
 	elseif Step == 5 then
 	elseif Step == 5 then
-		Step5Complete(Quest, QuestGiver, Player)
+		Step6Init(Quest, QuestGiver, Player)
 	elseif Step == 6 then
 	elseif Step == 6 then
-		Step6Complete(Quest, QuestGiver, Player)
+		Step7Init(Quest, QuestGiver, Player)
 	elseif Step == 7 then
 	elseif Step == 7 then
-		Step7Complete(Quest, QuestGiver, Player)
+		Step8Init(Quest, QuestGiver, Player)
 	elseif Step == 8 then
 	elseif Step == 8 then
-		Step8Complete(Quest, QuestGiver, Player)
+		Step9Init(Quest, QuestGiver, Player)
 	elseif Step == 9 then
 	elseif Step == 9 then
-		Step9Complete(Quest, QuestGiver, Player)
+		Step10Init(Quest, QuestGiver, Player)
 	elseif Step == 10 then
 	elseif Step == 10 then
 		QuestComplete(Quest, QuestGiver, Player)
 		QuestComplete(Quest, QuestGiver, Player)
 	end
 	end
@@ -139,11 +284,8 @@ function Accepted(Quest, QuestGiver, Player)
 	AddConversationOption(conversation, "Okay.")
 	AddConversationOption(conversation, "Okay.")
 	StartConversation(conversation, QuestGiver, Player, "Whoa there, the seas are gettin' a bit angry. Go speak ta' me first mate, Waulon. He might have something for ya' ta' do.")
 	StartConversation(conversation, QuestGiver, Player, "Whoa there, the seas are gettin' a bit angry. Go speak ta' me first mate, Waulon. He might have something for ya' ta' do.")
 	
 	
-	local Waulon = GetSpawn(NPC, 270002)
-	FaceTarget(NPC, Waulon)
-end
-
-function Deleted(Quest, QuestGiver, Player)
+	local Waulon = GetSpawn(QuestGiver, 270002)
+	FaceTarget(QuestGiver, Waulon)	
 end
 end
 
 
 function Declined(Quest, QuestGiver, Player)
 function Declined(Quest, QuestGiver, Player)

+ 12 - 20
server/SpawnScripts/FarJourneyFreeport/Anikra.lua

@@ -13,28 +13,20 @@ function spawn(NPC)
 end
 end
 
 
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)
-    FaceTarget(NPC, Spawn)
-
-    Dialog.New(NPC, Spawn)
-    Dialog.AddDialog("Do you want to call down the Drake?")
-    Dialog.AddOption("Yes, I want to see him in action!", "callDrake")
-    Dialog.AddOption("Hell No!")
-    Dialog.Start()
+	goblin = GetSpawn(NPC, 270008)
+	if goblin == nil or IsAlive(goblin) == false then
+		FaceTarget(NPC, Spawn)	
+		choice = math.random(1, 2) 	    
+		if choice == 1 then
+			PlayFlavor(NPC, "voiceover/english/anikra/boat_06p_tutorial02_fvo_001.mp3", "Thanks for saving me", "thanks", 3802219844, 3242323771)
+		else
+			PlayFlavor(NPC, "voiceover/english/anikra/boat_06p_tutorial02/anikra_0_003.mp3", "I don't know how I did that. What was that?", "boggle", 927876289, 3048340606)
+		end
+	else
+		PlayFlavor(NPC, "voiceover/english/anikra/boat_06p_tutorial02_fvo_002.mp3", "I really miss my husband. Why did those smugglers have to throw him overboard?", "sigh", 1493499523, 2767493059)
+	end
 end
 end
 
 
-function callDrake(NPC, Spawn)
-    FaceTarget(NPC, Spawn)
-    local drake = GetSpawn(NPC, 270013)
-    if drake ~= nil then
-        AddTimer(drake, 5000, "startanimation")
-	Say(NPC, "Drake should be flying")
-		
-	AddTimer(drake, 31000, "stopanimation")
-	Say(NPC, "Drake should be gone now")
-    end
-end
-
-
 --[[
 --[[
 function callDrake(NPC, Spawn)
 function callDrake(NPC, Spawn)
     FaceTarget(NPC, Spawn)
     FaceTarget(NPC, Spawn)

+ 328 - 103
server/SpawnScripts/FarJourneyFreeport/CaptainVarlos.lua

@@ -6,150 +6,375 @@
                    : 
                    : 
 --]]
 --]]
 
 
+get_attention_animation = true
+needs_selection_help = true
+finished_hailed = false
+finished_where_am_I = false
+finished_who_are_you = false
+finished_how_did_I_get_here = false
+finished_where_are_we_headed = false
+finished_high_winds_1 = false
+finished_high_winds_2 = false
+finished_high_winds_3 = false
+seen_quest_praise = false
+
 require "SpawnScripts/Generic/DialogModule"
 require "SpawnScripts/Generic/DialogModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
 
 
 end
 end
 
 
-function hailed(NPC, Spawn)
-    FaceTarget(NPC, Spawn)
-	
-	Dialog.New(NPC, Spawn)
-    Dialog.AddDialog("Ahoy! 'Tis good to see you awake. Ya seem a little squiffy, least ya' cheated death!")
-	Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_001.mp3", 1930075150, 2666442405)
-	Dialog.AddEmote("salute")
-    Dialog.AddOption("Where am I?", "dlg_1")
-    Dialog.Start()
+function get_attention_init(NPC, player)
+	InstructionWindow(player, -1.0, "Captain Varlos looks like he is trying to get your attention.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_027_30c39009.mp3", 2146230300, 3258594756, "captain_attention", "", "continue")
+	AddTimer(NPC, 100, "get_attention", 1, player)
 end
 end
 
 
-function dlg_1(NPC, Spawn)
-	FaceTarget(NPC, Spawn)
-	
-	Dialog.New(NPC, Spawn)
-	Dialog.AddDialog("Me apologies.")
-	Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_002.mp3", 2054400186, 1976167819)
-	Dialog.AddEmote("bow")
-	Dialog.AddOption("Who are you?", "dlg_2")
-    Dialog.Start()
+function get_attention(NPC, player)	
+	FaceTarget(NPC, player)
+	SendStateCommand(NPC, 883)
+	AddTimer(NPC, math.random(2000, 3000), "stop_get_attention", 1, player)	
 end
 end
 
 
-function dlg_2(NPC, Spawn)
-	FaceTarget(NPC, Spawn)
-	
-	Dialog.New(NPC, Spawn)
-	Dialog.AddDialog("I am Captain Draik Varlos, and this 'ere fine ship is the Far Journey.")
-	Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_003.mp3", 2565389482, 560555759)
-	Dialog.AddOption("How did I get here?", "dlg_3")
-    Dialog.Start()
+function stop_get_attention(NPC, player)
+	SendStateCommand(NPC, 0)
+	if get_attention_animation and HasQuest(player, 524) == true and GetQuestStep(player, 524) == 7 then
+		AddTimer(NPC, 500, "get_attention", 1, player)
+	end
 end
 end
 
 
-function dlg_3(NPC, Spawn)
-	FaceTarget(NPC, Spawn)
-	
-	Dialog.New(NPC, Spawn)
-	Dialog.AddDialog("Me hearties pulled ya' from the sea, you an those other bilge rats. Do ya' remember?")
-	Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_004.mp3", 29296168, 2709023783)
-	Dialog.AddOption("Vaguely. Where are we headed?", "dlg_4")
-    Dialog.Start()
+function hailed(NPC, player)	
+    FaceTarget(NPC, player)
+	SendStateCommand(GetSpawn(NPC, 270000), 318)
+	SendStateCommand(GetSpawn(NPC, 270000), 0)
+	if HasQuest(player, 524) == false and HasCompletedQuest(player, 524) == false then
+		InstructionWindowClose(player)
+		needs_selection_help = true
+		finished_hailed = false
+		finished_where_am_I = false
+		finished_who_are_you = false
+		finished_how_did_I_get_here = false
+		finished_where_are_we_headed = false
+		finished_high_winds_1 = false
+		finished_high_winds_2 = false
+		finished_high_winds_3 = false
+		Dialog.New(NPC, player)
+		Dialog.AddDialog("Ahoy! 'Tis good to see you awake. Ya seem a little squiffy, least ya' cheated death!")
+		Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_001.mp3", 1930075150, 2666442405)
+		Dialog.AddEmote("salute")
+		Dialog.AddOption("Where am I?", "where_am_I")
+		Dialog.Start()		
+		AddTimer(NPC, 8000, "hailed_instructions", 1, player)
+	elseif HasQuest(player, 524) == true and GetQuestStep(player, 524) == 7 then
+		SetTutorialStep(player, 32)
+		Dialog.New(NPC, player)
+		Dialog.AddDialog("Avast ye! We need to talk.")
+		Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_011.mp3", 570868734, 3287597835)
+		Dialog.AddOption("What is it?", "quest_step_7a")
+		Dialog.Start()
+		get_attention_animation = false
+	elseif HasQuest(player, 524) == true and GetQuestStep(player, 524) == 10 then
+		PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_023.mp3", "You still need to kill that landlubber of a goblin! Get to it mate!", "", 3269557913, 3104212801)
+	elseif HasQuest(player, 524) == true and GetQuestStep(player, 524) == 9 then
+		SetTutorialStep(player, 51)
+		Dialog.New(NPC, player)
+		Dialog.AddDialog("Ya' made quick work of them vermin.")
+		Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_016.mp3", 1130776869, 4119313971)
+		Dialog.AddOption("Thanks.", "quest_step_9")
+		Dialog.Start()
+	elseif HasCompletedQuest(player, 524) == true and seen_quest_praise == false then
+		seen_quest_praise = true
+		Dialog.New(NPC, player)
+		Dialog.AddDialog("Arr! Ya saved the Far Journey and me crew! Seems ya' proved ta' be quite a hero.  Well, with the help of that young lass there, ya' do.")
+		Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_024.mp3", 998172564, 1159207795)
+		Dialog.AddOption("It was nothing.", "quest_completed")
+		Dialog.Start()
+	elseif HasCompletedQuest(player, 524) == true then
+		Dialog.New(NPC, player)
+		Dialog.AddDialog("So, ya' ready ta go ashore matey?")
+		Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_027.mp3", 2285948102, 2994720481)
+		Dialog.AddOption("Yes.", "ready_to_go_ashore")
+		Dialog.AddOption("No. I would like some more time.", "conversation8_2")
+		Dialog.Start()
+	end
 end
 end
 
 
-function dlg_4(NPC, Spawn)
-	FaceTarget(NPC, Spawn)
-	
-	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_005.mp3", "We are heading to the Island of Refuge.", "", 1602680439, 2810422278, Spawn)
-	
-	AddTimer(NPC, 3000, "ShakeCamera_1", 1, Spawn)
+function quest_completed(NPC, player)
+	Dialog.New(NPC, player)
+	Dialog.AddDialog("There be the Island of Refuge, get ready ta' drop anchor. Just let me know when ya' want ta' go ashore.")
+	Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_025.mp3", 3643967618, 2645907420)
+	Dialog.AddOption("Ok.", "drop_anchor")
+	Dialog.Start()
 end
 end
 
 
-function ShakeCamera_1(NPC, Spawn)
-	PerformCameraShake(Spawn, 52429, 15948)
-	AddTimer(NPC, 400, "ShakeCamera_2", 1, Spawn)
+function drop_anchor(NPC, player)
+	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_026.mp3", "Ingrid! Swing the lead and prepare to drop anchor!", 3011518245, 3851752713)
 end
 end
 
 
-function ShakeCamera_2(NPC, Spawn)
-	PerformCameraShake(Spawn, 52429, 15948)
-	AddTimer(NPC, 400, "ShakeCamera_3", 1, Spawn)
+function ready_to_go_ashore(NPC, player)
+	Dialog.New(NPC, player)
+	Dialog.AddDialog("Don't ya' mind, we get paid ta' do that.")
+	Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_028.mp3", 1009737776, 2173458794)
+	Dialog.AddOption("Good point.", "zone_to_isle")
+	Dialog.Start()
 end
 end
 
 
-function ShakeCamera_3(NPC, Spawn)
-	
-	PerformCameraShake(Spawn, 52429, 15948)
-	
-	AddTimer(NPC, 800, "CallIngrid", 1, Spawn)
-	
+function zone_to_isle(NPC, player)
+	Zone(GetZone(325), player)
+end
 
 
+function quest_step_9(NPC, player)	
+	AddTimer(GetSpawn(NPC, 270013), 100, "attack")
+	AddTimer(NPC, 1000, "quest_step_9b", 1, player)	
 end
 end
 
 
-function CallIngrid(NPC, Spawn)
-	FaceTarget(NPC, Spawn)
-	
-	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_006.mp3", "Ingird! Quit gawking at the shorty and fix that yard-arm!", "", 2753489262, 3183736171, Spawn)
-	
-	local Geredo = GetSpawn(NPC, 270004)
-	local Ingrid = GetSpawn(NPC, 270001)
-	
-	SetTempVariable(Ingrid, "TempAnimationVar", nil)
-	
-	FaceTarget(NPC, Ingrid)
-	
-	AddTimer(Ingrid, 500, "CaptainCallingIngrid", 1, Spawn)
-	AddTimer(Geredo, 500, "CaptainCallingIngrid", 1, Spawn)
-	
+function quest_step_9b(NPC, player)	
+	FaceTarget(NPC, GetSpawn(NPC, 270013))
+	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_017.mp3", "Wait. Tis that a... No, it cain' be!", "", 1253231512, 1752159147)
+	AddTimer(NPC, 5000, "quest_step_9c", 1, player)	
+	SendStateCommand(GetSpawn(NPC, 270005), 250)	
 end
 end
 
 
-function TalkToCaptainVarlos(NPC, Spawn)
-	
-	local Ingrid = GetSpawn(NPC, 270001)
+function quest_step_9c(NPC, player)	
+	Drake = GetSpawn(NPC, 270013)
 	
 	
-	FaceTarget(NPC, Ingrid)
+	Anikra = GetSpawn(NPC, 270006)	
+	Valik = GetSpawn(NPC, 270005)	
+	Geredo = GetSpawn(NPC, 270004)
 	
 	
-	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_007.mp3", "Don't want the ship to come apart in these high winds, do ya'?!", "scold", 517097409, 4194681002, Spawn)
-	
-	AddTimer(Ingrid, 4000, "SaluteCaptainVarlos", 1, Spawn)
+	FaceTarget(Anikra, Drake)
+	FaceTarget(Valik, Drake)	
+	FaceTarget(Geredo, Drake)		
 	
 	
+	SendStateCommand(Anikra, 429)
+	SendStateCommand(Valik, 429)
+	SendStateCommand(Geredo, 429)
 	
 	
+	SendStateCommand(GetSpawn(NPC, 270001), 219)
+	SendStateCommand(GetSpawn(NPC, 270007), 631)
+	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_018.mp3", "Quick! Ingrid, secure th'loot! Thar be a Drakota off the bow! Quick now! Secure those chests!", "", 3607547478, 39534308)
+	AddTimer(NPC, 9000, "quest_step_9d", 1, player)	
 end
 end
 
 
-function IngridLeaveCaptain(NPC, Spawn)
-	FaceTarget(NPC, Spawn)
-	
-	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_008.mp3", "Ya think she'd never seen a gnome afore.", "", 2447879193, 4289147535, Spawn)
+function quest_step_9d(NPC, player)	
+	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_019.mp3", "Everyone down! Watch it!", "", 2065401462, 2542613809)
+	SendStateCommand(GetSpawn(NPC, 270007), 219)
+	SendStateCommand(GetSpawn(NPC, 270001), 220)
+	SendStateCommand(GetSpawn(NPC, 270004), 210)
+	SendStateCommand(GetSpawn(NPC, 270006), 403)
+	SendStateCommand(GetSpawn(NPC, 270005), 218)
+	SendStateCommand(GetSpawn(NPC, 270002), 218)
+	AddTimer(NPC, 3500, "quest_step_9e", 1, player)
+	i=1
+	spawns = GetSpawnListBySpawnID(player, 270011)
+	repeat
+		cage = GetSpawnFromList(spawns, i-1)
+		if cage then
+			Despawn(cage)			
+		end
+		i = i + 1
+	until cage == Nil
+end
 
 
-	--AddTimer(NPC, 3000, "ShakeCamera_1", 1, Spawn)
-	
-	--AddTimer(NPC, 4000, "TheQuestOffer")
-	
+function quest_step_9e(NPC, player)
+	PerformCameraShake(player, 0.699999988079071)	
+	PerformCameraShake(player, 0.5)	
+	PerformCameraShake(player, 0.30000001192092896)
+	PerformCameraShake(player, 0.10000000149011612)
+	AddTimer(NPC, 3500, "quest_step_9f", 1, player)
 end
 end
 
 
-function TheQuestOffer(NPC,Spawn)
-	
+function quest_step_9f(NPC, player)		
+	AddTimer(NPC, 3500, "quest_step_9g", 1, player)
 end
 end
 
 
-function callDrake(NPC, Spawn)
-    FaceTarget(NPC, Spawn)
-    local drake = GetSpawn(NPC, 270013)
-    if drake ~= nil then
-        AddTimer(drake, 5000, "startanimation")
-	Say(NPC, "Drake should be flying")
-		
-	AddTimer(drake, 31000, "stopanimation")
-	Say(NPC, "Drake should be gone now")
-    end
+function quest_step_9g(NPC, player)	
+	AddTimer(NPC, 3000, "quest_step_9h", 1, player)	
 end
 end
 
 
+function quest_step_9h(NPC, player)
+	SendStateCommand(GetSpawn(NPC, 270001), 0)
+	SendStateCommand(GetSpawn(NPC, 270004), 0)
+	SendStateCommand(GetSpawn(NPC, 270006), 0)
+	SendStateCommand(GetSpawn(NPC, 270005), 0)
+	SendStateCommand(GetSpawn(NPC, 270002), 0)	
+	SendStateCommand(GetSpawn(NPC, 270007), 220)
+	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_020.mp3", "Blimey! That was close! It has been near two months since the last reported sightings of one of them.", "", 814285897, 1688547621)
+	AddTimer(NPC, 6000, "quest_step_9i", 1, player)	
+end
 
 
---[[
-function callDrake(NPC, Spawn)
-    FaceTarget(NPC, Spawn)
-Say(NPC,"I have made it past FaceTarget")
-    local drake = GetSpawn(Spawn, 270013)
-Say(NPC, "I have set the local drake to the spawn id")
-Say(NPC, "Test " .. drake)
-    SpawnSet(drake, "visual_state", 10783)
+function quest_step_9i(NPC, player)	
+	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_021.mp3", "That damnable goblin has escaped. An' look, me beautiful ship is on fire!", "", 1401094820, 2183903275)
+	AddTimer(NPC, 6000, "quest_step_9j", 1, player)
+end
+
+function quest_step_9j(NPC, player)	
+	SetStepComplete(player, 524, 9)
+	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_022.mp3", "Ye must put an end to 'is life, afore he tears me ship apart!", "", 2385052787, 1324494518)
+end
+
+function quest_step_7a(NPC, player)
+	Dialog.New(NPC, player)
+	Dialog.AddDialog("Well, 'tis a bit of a problem. Ya' see, there be rats on board. The vermin keep eating the supplies and I need ya' to go feed them to the deep, afore they eat anything else.")
+	Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_012.mp3", 705765462, 3202743441)
+	Dialog.AddOption("So you want me to kill them?", "quest_step_7b")
+	Dialog.Start()
+end
+
+function quest_step_7b(NPC, player)
+	Dialog.New(NPC, player)
+	Dialog.AddDialog("Yar! That's what we be needin'.")
+	Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_013.mp3", 3880459741, 170861362)
+	Dialog.AddOption("How do you expect me to kill them?", "quest_step_7c")
+	Dialog.Start()
+end
+
+function quest_step_7c(NPC, player)
+	Dialog.New(NPC, player)
+	Dialog.AddDialog("Wit this 'ere club. It is nice and splintered, sure ta' cause them some pain.")
+	Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_014.mp3", 2083163804, 202693960)
+	Dialog.AddOption("Aye, aye, Captain!", "quest_step_7d")
+	Dialog.Start()
+end
+
+function quest_step_7d(NPC, player)	
+	SetStepComplete(player, 524, 7) 
+end
+
+function hailed_instructions(NPC, player)	
+	if needs_selection_help == true then
+		InstructionWindowGoal(player,0)	
+		InstructionWindowClose(player)
+		InstructionWindow(player, -1.0, "To respond to the Captain and other characters you will meet, left click on the response text.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_006_7521b625.mp3", 3936228257, 1877316160, "tutorial_stage_8", "Left click on one of the response options.", "server")
+		needs_selection_help = false
+	end
+end
+function where_am_I(NPC, player)
+	finished_hailed = true
+	--[[Say(NPC, "Testing function call")
+	drake = GetSpawn(player, 270013)
+	SendStateCommand(drake,65")
+	Say(drake, "attacking")
+	AddTimer(drake, 40000, "drake_rain")
+	--]]
+	if needs_selection_help == true then
+		needs_selection_help = false
+	else
+		InstructionWindowGoal(player,0)	
+		InstructionWindowClose(player)	
+	end
+	if finished_where_am_I == false then
+		FaceTarget(NPC, player)
+		Dialog.New(NPC, player)
+		Dialog.AddDialog("Me apologies.")
+		Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_002.mp3", 2054400186, 1976167819)
+		Dialog.AddOption("Who are you?", "who_are_you")
+		Dialog.Start()
+	end
+end
+
+function who_are_you(NPC, player)
+	if finished_who_are_you == false then
+		finished_where_am_I = true
+		FaceTarget(NPC, player)
+		Dialog.New(NPC, player)
+		Dialog.AddDialog("I am Captain Draik Varlos, and this 'ere fine ship is the Far Journey.")
+		Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_003.mp3", 2565389482, 560555759)
+		Dialog.AddOption("How did I get here?", "how_did_I_get_here")
+		Dialog.Start()
+	end
+end
+
+function how_did_I_get_here(NPC, player)
+	finished_who_are_you = true
+	if finished_how_did_I_get_here == false then
+		FaceTarget(NPC, player)
+		Dialog.New(NPC, player)
+		Dialog.AddDialog("Me hearties pulled ya' from the sea, you an those other bilge rats. Do ya' remember?")
+		Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_004.mp3", 29296168, 2709023783)
+		Dialog.AddOption("Vaguely. Where are we headed?", "where_are_we_headed")
+		Dialog.Start()
+	end
+end
+
+function where_are_we_headed(NPC, player)
+	finished_how_did_I_get_here = true
+	if finished_where_are_we_headed == false then
+		FaceTarget(NPC, player)
+		PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_005.mp3", "We are heading to the Island of Refuge.", "", 1602680439, 2810422278)
+		AddTimer(NPC, 500, "shake_camera_medium", 1, player)
+		AddTimer(NPC, 1500, "shake_camera_low", 1, player)
+		AddTimer(NPC, 2500, "shake_camera_low", 1, player)	
+		AddTimer(NPC, 3000, "high_winds_1", 1, player)
+	end
+end
+
+function shake_camera_low(NPC, player)
+	PerformCameraShake(player, 0.10000000149011612)
+end
+
+function shake_camera_medium(NPC, player)
+	PerformCameraShake(player, 0.20000000298023224)	
+end
+
+function shake_camera_high(NPC, player)
+	PerformCameraShake(player, 0.699999988079071)
+end
+
+function high_winds_1(NPC, player)	
+	finished_where_are_we_headed = true
+	if finished_high_winds_1 == false then
+		FaceTarget(NPC, GetSpawn(NPC, 270001))
+		PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_006.mp3", "Ingrid! Quit gawking at the shorty and fix that yard-arm!", "", 2753489262, 3183736171)
+		SendStateCommand(GetSpawn(NPC, 270001), 0)
+		AddTimer(NPC, 3500, "high_winds_2", 1, player)
+	end
+end
+
+function high_winds_2(NPC, player)
+	finished_high_winds_1 = true
+	if finished_high_winds_2 == false then
+		PlayFlavor(GetSpawn(NPC, 270001), "voiceover/english/ingrid/boat_06p_tutorial02/020_deckhand_ingrid_010_1637e047.mp3", "Aye, aye, Captain!", "", 1250282628, 237171958)
+		SendStateCommand(GetSpawn(NPC, 270001), 520)
+		AddTimer(NPC, 2500, "high_winds_3", 1, player)
+	end
+end
+
+function high_winds_3(NPC, player)
+	finished_high_winds_2 = true
+	if finished_high_winds_3 == false then
+		PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_007.mp3", "Don't want the ship to come apart in these high winds, do ya'?!", "", 517097409, 4194681002)
+		SendStateCommand(GetSpawn(NPC, 270001), 0)
+		AddTimer(NPC, 5000, "high_winds_4", 1, player)
+	end
+end
+
+function high_winds_4(NPC, player)
+	finished_high_winds_3 = true
+	FaceTarget(NPC, player)
+	PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_008.mp3", "Ya think she'd never seen a gnome afore.", "", 2447879193, 4289147535)
+	SendStateCommand(GetSpawn(NPC, 270001), 630)
+	AddTimer(NPC, 500, "shake_camera_medium", 1, player)
+	AddTimer(NPC, 3500, "shake_camera_high", 1, player)
+	AddTimer(NPC, 5500, "shake_camera_medium", 1, player)
+	AddTimer(NPC, 9500, "shake_camera_low", 1, player)	
+	AddTimer(NPC, 5000, "offer_quest", 1, player)
+end
+
+function offer_quest(NPC, player)
+	if HasQuest(player, 524) == false then
+		OfferQuest(NPC, player, 524, true)
+		AddTimer(NPC, 7000, "Accepted_Tutorial_Instructions", 1, player)	
+	end
+end
 
 
+function Accepted_Tutorial_Instructions(NPC, player)
+	InstructionWindowClose(player)
+	ShowWindow(player, "Journals.JournalsQuest", 0)
+	InstructionWindow(player, -1.0, "The Captain has given you a quest. Left click on the quest journal button to open your quest journal.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_007_59f6d83b.mp3", 1470829818, 519016852, "tutorial_stage_9", "Open your quest journal. (click on the journal button)", "open JournalsQuest")
+	ShowWindow(player, "MainHUD.StartMenu", 1)
+	FlashWindow(player, "MainHUD.StartMenu.quest_journal", 20.0)
+	SetTutorialStep(player, 8)
 end
 end
-]]--
 
 
 function respawn(NPC)
 function respawn(NPC)
 
 

+ 10 - 91
server/SpawnScripts/FarJourneyFreeport/Geredo.lua

@@ -3,104 +3,23 @@
     Script Author  : Cynnar
     Script Author  : Cynnar
     Script Date    : 2019.08.04 12:08:08
     Script Date    : 2019.08.04 12:08:08
     Script Purpose : 
     Script Purpose : 
-    Notes          : Geredo is suppose to blow a kiss to Ingrid. PlayFlavor(NPC, "", "", "blowkiss", 0, 0) is not working
-	Notes          : Replaced with PlayFlavor(NPC, "", "", "scheme", 0, 0) for now
+                   : 
 --]]
 --]]
 
 
-local TempAnimationPos = nil
-
 function spawn(NPC)
 function spawn(NPC)
-	
-end
-
--- sent from Ingrid to start the flirting
--- sends back to Ingrid after Geredo starts flirting with a flex
-function GeredoFlirtingWithIngird(NPC, Spawn)
-	
-	local Ingrid = GetSpawn(NPC, 270001)
-	
-	if GetTempVariable(Ingrid, "TempAnimationVar") ~= nil then
-		PlayFlavor(NPC, "", "", "flex", 0, 0)
-	end
-
-	if Ingrid ~= nil then
-		AddTimer(Ingrid, 2000, "FlirtWithIngrid")
-	end
-	
-	--Say(NPC, "TempAnimationVar = " .. GetTempVariable(Ingrid, "TempAnimationVar") .. "!")
-	--SetTempVariable(Ingrid, "TempAnimationVar", "SecondRun")
-end
-
-
--- sent from Ingrid's chuckle
--- sends back to Ingrid after Geredo responds with a bow
-function FlirtingWithGeredo(NPC, Spawn)
-	
-	local Ingrid = GetSpawn(NPC, 270001)
-	
-	if GetTempVariable(Ingrid, "TempAnimationVar") ~= nil then
-		PlayFlavor(NPC, "", "", "bow", 0, 0)
-	end
-	
-	if Ingrid ~= nil then
-		AddTimer(Ingrid, 3000, "FlirtWithIngrid_2")
-	end
-end
-
--- sent from Ingrid's curtsey
--- sends back to Ingrid afer Geredo responds with a flirt
-function FlirtingWithGeredo_2(NPC, Spawn)
-	
-	local Ingrid = GetSpawn(NPC, 270001)
-	
-	if GetTempVariable(Ingrid, "TempAnimationVar") ~= nil then
-		PlayFlavor(NPC, "", "", "flirt", 0, 0)
-	end
-	
-	if Ingrid ~= nil then
-		AddTimer(Ingrid, 2500, "FlirtWithIngrid_3")
-	end
-end
 
 
--- sent from Ingrid's flustered
--- sends back to Ingrid afer Geredo responds with a blowkiss
-function FlirtingWithGeredo_3(NPC, Spawn)
-	
-	local Ingrid = GetSpawn(NPC, 270001)
-	
-	if GetTempVariable(Ingrid, "TempAnimationVar") ~= nil then
-		PlayFlavor(NPC, "", "", "scheme", 0, 0)
-		--PlayAnimation(NPC, 11762)
-	end
-	
-	if Ingrid ~= nil then
-		AddTimer(Ingrid, 2000, "FlirtWithIngrid_4")
-	end
-end
-
--- sent from Ingrid's no
--- sends back to Ingrid afer Geredo responds with beg
-function FlirtingWithGeredo_4(NPC, Spawn)
-	
-	local Ingrid = GetSpawn(NPC, 270001)
-	
-	if GetTempVariable(Ingrid, "TempAnimationVar") ~= nil then
-		PlayFlavor(NPC, "", "", "beg", 0, 0)
-	end
-	
-	if Ingrid ~= nil then
-		AddTimer(Ingrid, 1500, "FlirtWithIngrid_5")
-	end
-end
-
-function CaptainCallingIngrid(NPC, Spawn)
-	-- Testing to set animation during the captain calling ingrid
-	--PlayFlavor(NPC, "", "", "blowkiss", 0, 0)
-	PlayAnimation(NPC, 12246)
 end
 end
 
 
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)
-
+    choice = math.random(0, 2)	
+    FaceTarget(NPC, Spawn)	
+	if choice == 1 then
+		PlayFlavor(NPC, "voiceover/english/geredo/boat_06p_tutorial02_fvo_001.mp3", "Do you happen to have any mechanical leg extenders? I want to see the water.", "agree", 2902186099, 1357276764)
+	elseif choice == 2 then
+		PlayFlavor(NPC, "voiceover/english/geredo/boat_06p_tutorial02_fvo_002.mp3", "Thinking I should design a new mechanical boat. It would be perfect! Yes, perfect indeed!", "ponder", 2630458163, 1309095480)
+	else
+		PlayFlavor(NPC, "voiceover/english/geredo/boat_06p_tutorial02_fvo_003.mp3", "Owie, my elbow is sore!  It always gets this way when I am near water.  I could have helped rescue Anikra and Valik, but I wasn't able to swim.  Thanks for helping me.", "grumble", 2653823570, 1351171804)
+	end
 end
 end
 
 
 function respawn(NPC)
 function respawn(NPC)

+ 62 - 217
server/SpawnScripts/FarJourneyFreeport/Ingrid.lua

@@ -3,248 +3,93 @@
     Script Author  : Cynnar
     Script Author  : Cynnar
     Script Date    : 2019.10.18 06:10:27
     Script Date    : 2019.10.18 06:10:27
     Script Purpose : 
     Script Purpose : 
-    Notes          : 
-	Notes          : 
+                   : 
 --]]
 --]]
-
 require "SpawnScripts/Generic/DialogModule"
 require "SpawnScripts/Generic/DialogModule"
 
 
-local TaskAboardTheFarJourney  = 524
-local TempAnimationVar = nil
+local ShardOfLucin = 12565
 
 
 function spawn(NPC)
 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
 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")
+function hailed(NPC, player)
+    FaceTarget(NPC, player)
+	if HasQuest(player, 524) == false or HasCompletedQuest(player, 524) == true then
+		choice = math.random(1, 3) 
+		if choice == 1 then
+			PlayFlavor(NPC, "voiceover/english/ingrid/boat_06p_tutorial02_fvo_008.mp3", "Don't you just love the sea?", "", 541733813, 1294072887)
+		elseif choice == 2 then
+			PlayFlavor(NPC, "voiceover/english/ingrid/boat_06p_tutorial02_fvo_007.mp3", "Yo ho ho and a bottle of rum!", "", 964088856, 3568852318)
+		else
+			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.", "", 3636322414, 1973183674)
 		end
 		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")
+	else
+		step = GetQuestStep(player, 524) 
+		if step == 4 then
+			SendStateCommand(NPC, 0)
+			Dialog.New(NPC, player)
+			Dialog.AddDialog("Hello, how are you?")
+			Dialog.AddVoiceover("voiceover/english/ingrid/boat_06p_tutorial02/ingrid_0_001.mp3", 1960704460, 917558592)
+			Dialog.AddOption("Good, thanks. How about you?", "small_talk")
+			Dialog.Start()
+		elseif step == 5 then
+			PlayFlavor(NPC, "voiceover/english/ingrid/boat_06p_tutorial02_fvo_005.mp3", "Is Vim not going to sell it to you? That is just my luck... well I guess I will have to finish this work then.", "", 4181806501, 3186272404)
+		elseif step == 6 then
+			SetTutorialStep(player, 31)
+			AddCoin(player, 10)
+			DisplayText(player, 34, "You receive 10 Copper.")
+			Dialog.New(NPC, player)
+			Dialog.AddDialog("Ah! You got the shard. Great! Now I can stop doing this work and enjoy the rest of this trip. Here is some coin for your help.")
+			Dialog.AddVoiceover("voiceover/english/ingrid/boat_06p_tutorial02/ingrid_0_006.mp3", 502975024, 483052250)
+			Dialog.AddOption("Thanks.", "thanks_for_getting_shard")
+			Dialog.Start()					
 		end
 		end
 	end
 	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
-	
+function thanks_for_getting_shard(NPC, player)
+	SetStepComplete(player, 524, 6) 
+	RemoveItem(player, ShardOfLucin)
 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
-	
+function small_talk(NPC, player)
+	Dialog.New(NPC, player)
+	Dialog.AddDialog("I am fine, just... after the last pickup I have been working extra hard, since Vim said she would give me the piece of Luclin she found.")
+	Dialog.AddVoiceover("voiceover/english/ingrid/boat_06p_tutorial02/ingrid_0_002.mp3", 3891218598, 1657063801)
+	Dialog.AddOption("Vim?", "vim_who")
+	Dialog.Start()
 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)
-
+function vim_who(NPC, player)
+	Dialog.New(NPC, player)
+	Dialog.AddDialog("Yes, yes, Vim. The merchant over there. She found a small piece of the moon and is having me work for it. Maybe you can go buy it from her for me?")
+	Dialog.AddVoiceover("voiceover/english/ingrid/boat_06p_tutorial02/ingrid_0_003.mp3", 3050752668, 1437910974)
+	Dialog.AddOption("Sure, but I have no money.", "no_money")
+	Dialog.Start()
+	vim = GetRandomSpawnByID(NPC, 270007)
+	FaceTarget(NPC, vim)
+	AddTimer(NPC, 3000, "turn_towards_player", 1, player)	
 end
 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
-	
+function turn_towards_player(NPC, player)
+	FaceTarget(NPC, player)
 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)
-	
+function no_money(NPC, player)
+	Dialog.New(NPC, player)
+	Dialog.AddDialog("Maybe you have something she will buy. Why don't you go talk to her.")
+	Dialog.AddVoiceover("voiceover/english/ingrid/boat_06p_tutorial02/ingrid_0_004.mp3", 3978048706, 2537762235)
+	Dialog.AddOption("Sure.", "finished_step_four")
+	Dialog.Start()	
 end
 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)
-	
+function finished_step_four(NPC, player)
+	SetTutorialStep(player, 22)
+	SetStepComplete(player, 524, 4) 
 end
 end
 
 
 function respawn(NPC)
 function respawn(NPC)
 
 
 end
 end
+

+ 2 - 19
server/SpawnScripts/FarJourneyFreeport/Valik.lua

@@ -7,29 +7,12 @@
 --]]
 --]]
 
 
 function spawn(NPC)
 function spawn(NPC)
-	AddTimer(NPC, 5000, "ValikMove")
-end
-
-function ValikMove(NPC, Spawn)
-	MoveToLocation(NPC, -4.17, -2.02, -1.52, 2)
-	MoveToLocation(NPC, -5.37, -1.97, -4.22, 2)
-	MoveToLocation(NPC, -6.39, -1.81, -3.96, 2)
-	
-	AddTimer(NPC, 30000, "ValikMove_2")
-end
 
 
-function ValikMove_2(NPC, Spawn)
-	MoveToLocation(NPC, -4.17, -2.02, -1.52, 2)
-	MoveToLocation(NPC, -6.62, -1.82, 5.12, 2)
-	
-	AddTimer(NPC, 30000, "ValikMove")
 end
 end
 
 
 function hailed(NPC, Spawn)
 function hailed(NPC, Spawn)
-	choice = math.random(0, 1)
-	
-    FaceTarget(NPC, Spawn)
-	
+	choice = math.random(0, 1)	
+    FaceTarget(NPC, Spawn)	
 	if choice == 1 then
 	if choice == 1 then
 		PlayFlavor(NPC, "voiceover/english/valik/boat_06p_tutorial02/001_refugee_valik_002_eaf98080.mp3", "I can't wait to reach the island, dry land and dry food. Fish is only good for a while, even for a Kerran.", "", 1919549905, 2798982211)
 		PlayFlavor(NPC, "voiceover/english/valik/boat_06p_tutorial02/001_refugee_valik_002_eaf98080.mp3", "I can't wait to reach the island, dry land and dry food. Fish is only good for a while, even for a Kerran.", "", 1919549905, 2798982211)
 	else
 	else

+ 21 - 19
server/SpawnScripts/FarJourneyFreeport/Vim.lua

@@ -12,23 +12,27 @@ function spawn(NPC)
 
 
 end
 end
 
 
-function hailed(NPC, Spawn)
-    choice = math.random(0, 3) 
-	
-    FaceTarget(NPC, Spawn)
-	
-	if choice == 0 then
-		PlayFlavor(NPC, "voiceover/english/merchant_vim/boat_06p_tutorial02/020_merchant_vim_hail_c5d0b965.mp3", "I have some tattered clothes for sale, want to take a look?", "agree", 1974233264, 2156679701)
-
-	elseif choice == 1 then
-		PlayFlavor(NPC, "voiceover/english/merchant_vim/boat_06p_tutorial02/020_merchant_vim_hail_6c0c3c22.mp3", "The Far Journey is a beautiful ship, ain't she?", "smirk", 139722646, 2672074756)
-
+function hailed(NPC, player)	
+    choice = math.random(1, 5) 	
+    FaceTarget(NPC, player)	
+	if choice == 1 then
+		PlayFlavor(NPC, "voiceover/english/merchant_vim/boat_06p_tutorial02/020_merchant_vim_hail_c5d0b965.mp3", "I have some tattered clothes for sale, want to take a look?", "", 1974233264, 2156679701)
 	elseif choice == 2 then
 	elseif choice == 2 then
-		PlayFlavor(NPC, "voiceover/english/merchant_vim/boat_06p_tutorial02/020_merchant_vim_hail_d3204929.mp3", "Looking for something sturdy to wear?", "nod", 696787059, 2593820637)
-
+		PlayFlavor(NPC, "voiceover/english/merchant_vim/boat_06p_tutorial02/020_merchant_vim_hail_6c0c3c22.mp3", "The Far Journey is a beautiful ship, ain't she?", "", 139722646, 2672074756)
 	elseif choice == 3 then
 	elseif choice == 3 then
-		PlayFlavor(NPC, "voiceover/english/merchant_vim/boat_06p_tutorial02/020_merchant_vim_hail_187fc6bb.mp3", "I am busy right now...", "no", 1835666244, 487490745)
-
+		PlayFlavor(NPC, "voiceover/english/merchant_vim/boat_06p_tutorial02/020_merchant_vim_hail_d3204929.mp3", "Looking for something sturdy to wear?", "", 696787059, 2593820637)
+	elseif choice == 4 then
+		--PlayFlavor(NPC, "voiceover/english/merchant_vim/boat_06p_tutorial02/020_merchant_vim_hail_187fc6bb.mp3", "I am busy right now...", "", 1835666244, 487490745)
+		PlayFlavor(NPC, "voiceover/english/merchant_vim/boat_06p_tutorial02/020_merchant_vim_hail_481beac8.mp3", "I love traveling the seas... Oh! Did you need something?", "", 2187888771, 2112320089)
+	else
+		PlayFlavor(NPC, "voiceover/english/merchant_vim/boat_06p_tutorial02_fvo_005.mp3", "The Far Journey's a beautiful ship, ain't she?", "",3585442471, 604828909)
+	end
+	if GetTutorialStep(player) == 24 then
+		InstructionWindow(player, -1.0, "This is the merchant screen where all buying and selling takes place. Money comes in four denominations: copper, silver, gold, and platinum. Each type of coin is worth 100 times more than the previous one. For example, 100 copper pieces equals 1 silver piece. But right now, as this display shows, you have no money, so left click on the sell tab.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_021_6c80e66e.mp3", 1226703760, 969427050, "tutorial_stage_25", "Click on the 'Sell' tab in the merchant window.", "pane Merchant Sell")
+		FlashWindow(player, "Inventory.Merchant.PlatinumCoinIcon", 8.0)
+		FlashWindow(player, "Inventory.Merchant.GoldCoinIcon", 8.0)
+		FlashWindow(player, "Inventory.Merchant.SilverCoinIcon", 8.0)
+		FlashWindow(player, "Inventory.Merchant.CopperCoinIcon", 8.0)
 	end
 	end
 end
 end
 
 
@@ -36,8 +40,6 @@ function respawn(NPC)
 
 
 end
 end
 
 
-function targeted(NPC, Spawn)
-    if GetDistance(Spawn, NPC) < 10 then
-        hailed(NPC, Spawn)
-    end
+function targeted(NPC, Player)	
+    
 end
 end

+ 69 - 3
server/SpawnScripts/FarJourneyFreeport/Waulon.lua

@@ -5,16 +5,82 @@
     Script Purpose : 
     Script Purpose : 
                    : 
                    : 
 --]]
 --]]
+require "SpawnScripts/Generic/DialogModule"
 
 
 function spawn(NPC)
 function spawn(NPC)
 
 
 end
 end
 
 
-function hailed(NPC, Spawn)
-    FaceTarget(NPC, Spawn)
-	PlayFlavor(NPC, "voiceover/english/waulon/boat_06p_tutorial02/walon_0_008.mp3", "What? Can't ye see? Busy, away with ye!", "", 1608066875, 70639594)
+function hailed(NPC, player)
+    FaceTarget(NPC, player)
+	if HasQuest(player, 524) == false or HasCompletedQuest(player, 524) == true then	
+		PlayFlavor(NPC, "voiceover/english/waulon/boat_06p_tutorial02/walon_0_008.mp3", "What? Can't ye see? Busy, away with ye!", "", 1608066875, 70639594)
+	else
+		step = GetQuestStep(player, 524) 
+		if step == 1 then			
+			InstructionWindowGoal(player,0)	
+			InstructionWindowClose(player)
+			Dialog.New(NPC, player)
+			Dialog.AddDialog("Wot? Oh, hey there, ye' startled me.")
+			Dialog.AddVoiceover("voiceover/english/waulon/boat_06p_tutorial02/walon_0_001.mp3", 814960513, 2301562586)
+			Dialog.AddOption("Sorry about that.", "startled_me")
+			Dialog.Start()	
+		elseif step == 3 then
+			PlayFlavor(NPC, "voiceover/english/waulon/boat_06p_tutorial02/walon_0_004.mp3", "Where's me hat? Needs me lucky hat!", "", 2688932325, 103225044)
+			Dialog.New(NPC, player)
+			Dialog.AddDialog("Ah, me hat! Was worried. See, dis' hat gives me the luck.")
+			Dialog.AddVoiceover("voiceover/english/waulon/boat_06p_tutorial02/walon_0_005.mp3", 4097259098, 893296183)
+			Dialog.AddOption("Glad to help!", "returned_hat")
+			Dialog.Start()
+			InstructionWindowGoal(player, 0)
+		end
+	end	
 end
 end
 
 
+function returned_hat(NPC, player)
+	Dialog.New(NPC, player)
+	Dialog.AddDialog("Now me is safe, thanks ta' ye. Here, take this charm. Ya' may find a use for it.")
+	Dialog.AddVoiceover("voiceover/english/waulon/boat_06p_tutorial02/walon_0_006.mp3", 316186630, 2628530085)
+	Dialog.AddOption("Thanks, Waulon.", "received_charm")
+	Dialog.Start()
+end
+
+function returned_hat(NPC, player)
+	Dialog.New(NPC, player)
+	Dialog.AddDialog("Well now, Ingrid o'er there, can show ya' the rest of the ship. Me needs ta' plot the course ta' the isles now.")
+	Dialog.AddVoiceover("voiceover/english/waulon/boat_06p_tutorial02/walon_0_007.mp3", 1973137904, 2648127610)
+	Dialog.AddOption("Ok.", "finished_step_three")
+	Dialog.Start()
+end
+
+function finished_step_three(NPC, player)
+	SetStepComplete(player, 524, 3) 
+end
+
+function startled_me(NPC, player)
+	Dialog.New(NPC, player)
+	Dialog.AddDialog("Can't seem ta' find me hat.")
+	Dialog.AddVoiceover("voiceover/english/waulon/boat_06p_tutorial02/walon_0_002.mp3", 1759807851, 3940656870)
+	Dialog.AddOption("Do you need some help?", "help_find_hat")
+	Dialog.Start()
+end
+
+function help_find_hat(NPC, player)
+	chest = GetRandomSpawnByID(NPC, 270010)
+	FaceTarget(NPC, chest)
+	Dialog.New(NPC, player)	
+	Dialog.AddDialog("Sure! Me needs ya' ta' go lookie in them there boxes and if ye' find it, lets me know.")
+	Dialog.AddVoiceover("voiceover/english/waulon/boat_06p_tutorial02/walon_0_003.mp3", 2072797774, 185252141)
+	Dialog.AddOption("Ok.", "finished_step_one")
+	Dialog.Start()	
+end
+
+function finished_step_one(NPC, player)
+	InstructionWindowGoal(player, 0)	
+	InstructionWindowClose(player)
+	SetStepComplete(player, 524, 1) 	
+end 
+
 function respawn(NPC)
 function respawn(NPC)
 
 
 end
 end

+ 137 - 0
server/SpawnScripts/FarJourneyFreeport/agoblin.lua

@@ -0,0 +1,137 @@
+--[[
+    Script Name    : SpawnScripts/FarJourneyFreeport/a goblin.lua
+    Script Author  : LethalEncounter
+    Script Date    : 2020.07.02
+    Script Purpose : 
+                   : 
+--]]
+
+function spawn(NPC)
+	AddTimer(NPC, 5000, "idle_loop")
+end
+
+function hailed(NPC, player)
+	AddTimer(NPC, 100, "idle_loop")
+end
+
+function idle_loop(NPC)
+    choice = math.random(0, 15) 
+	if choice == 0 then
+		SendStateCommand(NPC, 217)
+	elseif choice == 1 then
+		SendStateCommand(NPC, 218)
+	elseif choice == 2 then
+		SendStateCommand(NPC, 883)
+	elseif choice == 3 then
+		SendStateCommand(NPC, 226)		
+	elseif choice == 4 then
+		SendStateCommand(NPC, 296)
+	elseif choice == 5 then
+		SendStateCommand(NPC, 311)
+	elseif choice == 6 then
+		SendStateCommand(NPC, 315)
+	elseif choice == 7 then
+		SendStateCommand(NPC, 488)
+	elseif choice == 8 then
+		SendStateCommand(NPC, 519)
+	elseif choice == 9 then
+		SendStateCommand(NPC, 521)
+	elseif choice == 10 then
+		SendStateCommand(NPC, 524)
+	elseif choice == 11 then
+		SendStateCommand(NPC, 550)
+	elseif choice == 12 then
+		SendStateCommand(NPC, 632)
+	elseif choice == 13 then
+		SendStateCommand(NPC, 637)
+	elseif choice == 14 then
+		SendStateCommand(NPC, 717)
+	else
+		SendStateCommand(NPC, 82)
+	end
+	AddTimer(NPC, math.random(5000, 7000), "stop_animation")	
+end
+
+function stop_animation(NPC)
+	SendStateCommand(NPC, 0)
+	if GetSpawn(NPC, 270011) == Nil then
+		AddTimer(NPC, 500, "run_around_loop_init")
+	else
+		AddTimer(NPC, math.random(3000, 10000), "idle_loop")
+	end
+end
+
+function run_around_loop_init(NPC)
+	MoveToLocation(NPC, 2.92, 0.57, 15.98, 5, "run_around_loop_init_pause", false)	
+end
+
+function run_around_loop_init_pause(NPC)
+	ClearRunningLocations(NPC)
+	AddTimer(NPC, 700, "run_around_loop_init_continue")
+end
+
+function run_around_loop_init_continue(NPC)
+	MoveToLocation(NPC, 3.23, -2.07, 10.83, 5, "run_around_loop_init_finished", false)
+end
+
+function run_around_loop_init_finished(NPC)
+	ClearRunningLocations(NPC)
+	AddTimer(NPC, 100, "run_around_loop")
+end
+
+function run_around_loop(NPC)
+	MovementLoopAdd(NPC, -4.43, -2.07, 6.17, 5, 3, "run_around_loop_pause1")
+	MovementLoopAdd(NPC, -5.23, -2.01, 0.39, 5, 3, "run_around_loop_pause2")
+	MovementLoopAdd(NPC, -4.88, -2.06, 4.26, 5, 3, "run_around_loop_pause3")
+	MovementLoopAdd(NPC, 3.94, -2.07, 0.66, 5, 3, "run_around_loop_pause4")
+	MovementLoopAdd(NPC, 2.84, -2.07, -2.07, 5, 3, "run_around_loop_pause5")
+	MovementLoopAdd(NPC, 3.41, -1.99, -7.42, 5, 3, "run_around_loop_pause6")
+end
+
+function run_around_loop_pause(NPC)
+	choice = math.random(0, 7) --[ mostly get threaten (125) this way ]--
+	if choice == 0 then
+		SendStateCommand(NPC, 217)
+	elseif choice == 1 then
+		SendStateCommand(NPC, 226)		
+	elseif choice == 2 then
+		SendStateCommand(NPC, 550)
+	elseif choice == 3 then
+		SendStateCommand(NPC, 717)
+	else
+		SendStateCommand(NPC, 125)
+	end
+	AddTimer(NPC, 2800, "run_around_loop_stop_animation")
+end
+
+function run_around_loop_pause1(NPC)
+	SendStateCommand(GetSpawn(NPC, 270005), 218)
+	run_around_loop_pause(NPC)
+end
+
+function run_around_loop_pause2(NPC)
+	SendStateCommand(GetSpawn(NPC, 270006), 525)
+	run_around_loop_pause(NPC)
+end
+
+function run_around_loop_pause3(NPC)
+	run_around_loop_pause(NPC)
+end
+
+function run_around_loop_pause4(NPC)
+	SendStateCommand(GetSpawn(NPC, 270004), 535)
+	run_around_loop_pause(NPC)
+end
+
+function run_around_loop_pause5(NPC)
+	SendStateCommand(GetSpawn(NPC, 270001), 218)
+	run_around_loop_pause(NPC)
+end
+
+function run_around_loop_pause6(NPC)
+	run_around_loop_pause(NPC)
+end
+
+function run_around_loop_stop_animation(NPC)
+	SendStateCommand(NPC, 0)	
+end

+ 28 - 0
server/SpawnScripts/FarJourneyFreeport/atreasurechest.lua

@@ -0,0 +1,28 @@
+--[[
+    Script Name    : SpawnScripts/FarJourneyFreeport/atreasurechest.lua
+    Script Author  : LethalEncounter
+    Script Date    : 2020.07.02
+    Script Purpose : 
+                   : 
+--]]
+
+function spawn(NPC)
+
+end
+
+function open(NPC, Player)
+	SendStateCommand(NPC, 399)
+	AddTimer(NPC, 2000, "finished_open_animation")
+	if HasPendingLoot(NPC, Player) then		
+		ShowLootWindow(Player, NPC)
+		DisplayText(Player, 12, "There appears to be something inside this box.")
+		InstructionWindow(Player, -1.0, "This screen shows the contents of the box you just opened. Left click on the loot all button to take the items from the box.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_013_f0780e49.mp3", 1581263773, 1569244108, "tutorial_stage_17", "Left click on the loot all button.", "server")
+		SetTutorialStep(player, 16)
+	else
+		DisplayText(Player, 12, "This box is empty.")
+	end
+end
+
+function finished_open_animation(NPC)
+	SendStateCommand(NPC, 400)
+end

+ 9 - 13
server/SpawnScripts/FarJourneyFreeport/tutorialdrake.lua

@@ -10,20 +10,16 @@ function spawn(NPC)
 
 
 end
 end
 
 
-function hailed(NPC, Spawn)
-    FaceTarget(NPC, Spawn)
-SpawnSet(NPC, visual_state, 10783)
-Say(NPC, "I should have changed my visual state")
+function attack(NPC)
+	SendStateCommand(NPC, 65)
+	AddTimer(NPC, 40000, "drake_rain")
 end
 end
 
 
-function respawn(NPC)
-
-end
-
-function startanimation(NPC, Spawn)
-	SpawnSet(NPC, "visual_state", "10783")
+function drake_rain(NPC)
+	SendStateCommand(NPC, 910)
+	AddTimer(NPC, 10000, "drake_stop")
 end
 end
 
 
-function stopanimation(NPC, Spawn)
-	SpawnSet(NPC, "visual_state", "0")
-end
+function drake_stop(NPC)
+	SendStateCommand(NPC, 33678)
+end

+ 247 - 0
server/ZoneScripts/FarJourneyFreeport.lua

@@ -0,0 +1,247 @@
+--[[
+	Script Name		:	FarJourneyFreeport.lua
+	Script Purpose	:	Handles boat scripted events
+	Script Author	:	LethalEncounter
+	Script Date		:	6/28/2020
+	Script Notes	:	
+--]]
+
+seen_step_45 = false
+
+function signal_changed(zone, player, signal)
+	if signal == "sys_client_avatar_ready" and HasQuest(player, 524) == false and HasCompletedQuest(player, 524) == false then
+		i = 1
+		spawns = GetSpawnListBySpawnID(player, 270010)
+		repeat
+			spawn = GetSpawnFromList(spawns, i-1)
+			if spawn then
+				ChangeHandIcon(spawn, 0)
+			end
+			i = i + 1
+		until spawn == Nil
+		InstructionWindow(player, 10.0, "Welcome to Norrath, the world of EverQuest II. Left click on the help button at any time for more detailed help and information.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_001_63779ca0.mp3", 3450229107, 2555116653, "introduction", "", "continue")
+		ShowWindow(player, "MainHUD.StartMenu", 1)
+		FlashWindow(player, "MainHUD.StartMenu.help", 10.0)
+		SetTutorialStep(player, 1)
+	end
+	if signal == "introduction" then
+			ShowWindow(player, "MainHUD.StartMenu", 0)
+			InstructionWindow(player, -1.0, "EverQuest II can be played in either a third person view, which you see now, or from a first person perspective. Scrolling the mouse wheel or pressing the F9 key will change your view. Try changing your view now.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_002_57cbfd77.mp3", 3053902814, 2060319388, "camera_control", "Switch the camera view to first-person. (mouse wheel up)", "camera firstperson", "Switch the camera view to third-person. (mouse wheel down)", "camera thirdperson")
+			SetTutorialStep(player, 2)
+	end
+	if signal == "camera_control" then
+			InstructionWindow(player, -1.0, "The first thing you need to know how to do is look around using the mouse. Hold down the right mouse button and move the mouse right and left. Notice that moving your mouse up and down will make you look in those directions as well.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_003_a3b38888.mp3", 130321605, 3870508467, "tutorial_stage_4", "Look to the left (hold right mouse button and move the mouse left)", "mouselook left", "Look to the right (hold right mouse button and move the mouse right)", "mouselook right", "Look up (hold right mouse button and move the mouse up)", "mouselook up", "Look down (hold right mouse button and move the mouse down)", "mouselook down")
+			SetTutorialStep(player, 3)
+	end
+	if signal == "tutorial_stage_4" and GetTutorialStep(player) == 3 then
+			InstructionWindow(player, -1.0, "Use the A, S, W, and D keys for basic movement. These keys cause you to turn left and right as well as to move forward and back.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_004_ff730a9b.mp3", 825281976, 127545929, "tutorial_stage_5", "Turn left. (press the A key)", "move turnleft", "Turn right. (press the D key)", "move turnright", "Move forward. (press the W key)", "move forward", "Move backward. (press the S key)", "move back")
+			SetTutorialStep(player, 4)
+	end
+	if signal == "tutorial_stage_5" and GetTutorialStep(player) == 4 then
+			InstructionWindow(player, -1.0, "Double left click on Captain Varlos to interact with him.", "", 0, 0, "tutorial_stage_6", "", "server")
+			SetTutorialStep(player, 5)
+	end
+	if signal == "tutorial_stage_9" and GetTutorialStep(player) == 8 then
+			ShowWindow(player, "MainHUD.StartMenu", 0)
+			FlashWindow(player, "MainHUD.StartMenu.quest_journal", 0.0)
+			InstructionWindow(player, -1.0, "The quest journal will keep track of all important quest information for you.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_008_dea98146.mp3", 1585802421, 4158930887, "tutorial_stage_10", "", "continue")
+			SetTutorialStep(player, 9)
+	end
+	if signal == "tutorial_stage_10" and GetTutorialStep(player) == 9 then
+			FlashWindow(player, "Journals.ActiveQuest", 6.5)
+			InstructionWindow(player, -1.0, "This is your quest helper. It displays the current step of your active quest.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_009_7270f5ed.mp3", 1886677883, 3646680727, "tutorial_stage_13", "", "continue")
+			SetTutorialStep(player, 10)
+	end
+	if (signal == "tutorial_stage_13" and GetTutorialStep(player) == 10) or (signal == "sys_client_avatar_ready" and HasQuest(player, 524) == true and GetQuestStep(player, 524) == 1) then
+			InstructionWindow(player, -1.0, "Place your mouse pointer on Waulon. Notice that your mouse pointer changes shape. This indicates what the normal action of a double left click on that object or person will do. In this case you will hail Waulon. Double left click on Waulon now.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_010_73e16723.mp3", 1311374862, 3104741396, "tutorial_stage_14", "Double left click on Waulon to hail him.", "server")
+			ShowWindow(player, "Journals.JournalsQuest", 0)
+			SetTutorialStep(player, 13)
+	end
+	if (signal == "tutorial_stage_15" and GetTutorialStep(player) == 14)  or (signal == "sys_client_avatar_ready" and HasQuest(player, 524) == true and GetQuestStep(player, 524) == 2) then		
+		InstructionWindow(player, -1.0, "Move your mouse pointer over the boxes. Notice that your mouse pointer changes shape again, and the boxes start to glow. Double left click to open each of the boxes.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_012_9ba468fb.mp3", 1009896073, 25784171, "tutorial_stage_16", "Double left click on a box to open it.", "server")
+		SetTutorialStep(player, 15)
+	end
+	if signal == "tutorial_stage_18" and GetTutorialStep(player) == 16 then
+			ShowWindow(player, "Inventory.Inventory", 0)
+			InstructionWindow(player, -1.0, "Managing your inventory and equipment is very important. It is how you use all of the gear that you will find on your adventures. Left click on the inventory button.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_015_46f20016.mp3", 2394903675, 552673556, "tutorial_stage_19", "Open your inventory. (click on the inventory button)", "open Inventory")
+			ShowWindow(player, "MainHUD.StartMenu", 1)
+			FlashWindow(player, "MainHUD.StartMenu.inventory", 16.0)
+			SetTutorialStep(player, 18)
+	end
+	if signal == "tutorial_stage_19" and GetTutorialStep(player) == 18 then
+			ShowWindow(player, "MainHUD.StartMenu", 0)
+			FlashWindow(player, "MainHUD.StartMenu.inventory", 0.0)
+			InstructionWindow(player, -1.0, "This is your inventory. These slots represent available space to carry items.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_016_3f62b542.mp3", 2423921165, 856268766, "tutorial_stage_20", "", "continue")
+			ShowWindow(player, "Inventory.Inventory", 1)
+			FlashWindow(player, "Inventory.Inventory.GeneralPage.InvSlot0", 6.0)
+			FlashWindow(player, "Inventory.Inventory.GeneralPage.InvSlot1", 6.0)
+			FlashWindow(player, "Inventory.Inventory.GeneralPage.InvSlot2", 6.0)
+			FlashWindow(player, "Inventory.Inventory.GeneralPage.InvSlot3", 6.0)
+			FlashWindow(player, "Inventory.Inventory.GeneralPage.InvSlot4", 6.0)
+			FlashWindow(player, "Inventory.Inventory.GeneralPage.InvSlot5", 6.0)
+			SetTutorialStep(player, 19)
+	end
+	if (signal == "tutorial_stage_20" and GetTutorialStep(player) == 19) or (signal == "sys_client_avatar_ready" and HasQuest(player, 524) == true and GetQuestStep(player, 524) == 3)  then
+			InstructionWindow(player, -1.0, "This is your equipment. These slots represent the locations you can equip with armor, weapons, jewelry, and other items. Double left click on the tunic in your inventory.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_017_d8bd9733.mp3", 598366253, 952105390, "tutorial_stage_21", "Double left click on the threadbare tunic to equip it.", "server")
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot0", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot1", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot2", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot3", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot4", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot5", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot6", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot7", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot8", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot9", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot10", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot11", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot12", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot13", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot14", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot15", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot16", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot17", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot18", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot19", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot20", 8.0)
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot21", 8.0)
+			SetTutorialStep(player, 20)
+	end
+	if signal == "tutorial_stage_21" and GetTutorialStep(player) == 20 then
+		InstructionWindow(player, -1.0, "Notice the tunic now occupies the chest equipment slot and you are now wearing it.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_018_8786e939.mp3", 3902294834, 2836623234, "tutorial_stage_22", "", "continue")
+		FlashWindow(player, "Inventory.Inventory.EquipmentPage.EqSlot3", 6.0)
+		SetTutorialStep(player, 21)
+	end
+	if signal == "tutorial_stage_22" and GetTutorialStep(player) == 21 then
+			FlashWindow(player, "Inventory.Inventory.EquipmentPage.Chest3", 0.0)
+			InstructionWindow(player, -1.0, "Waulon is waiting for you to return with his hat. Close your inventory window and go talk to him. Remember, double left clicking on Waulon will start the conversation.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_019_9da1b75d.mp3", 741062937, 535829184, "tutorial_stage_23", "Double left click on Waulon to hail him.", "server")			
+	end
+	if signal == "sys_client_avatar_ready" and HasQuest(player, 524) == true and GetQuestStep(player, 524) == 5 then
+		InstructionWindow(player, -1.0, "A merchant is a special type of character who buys and sells things. Find and double left click on Merchant Vim to start a transaction.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_020_6ea052d3.mp3", 4250953579, 3003156164, "tutorial_stage_24", "Double left click on Merchant Vim.", "server")
+		SetTutorialStep(player, 24)
+	end
+	if signal == "tutorial_stage_25" and GetTutorialStep(player) == 24 then
+		InstructionWindow(player, -1.0, "The sell tab displays the items in your inventory that a merchant is interested in and how much they will pay for each item. Different merchants are interested in different things, and the price they will pay varies.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_022_11c56393.mp3", 3020037974, 1310705478, "tutorial_stage_26", "", "continue")			
+		SetTutorialStep(player, 25)
+	end
+	if signal == "tutorial_stage_26" and GetTutorialStep(player) == 25 then
+		InstructionWindow(player, -1.0, "Congratulations. Now left click on the buy tab", "voiceover/english/narrator/boat_06p_tutorial02/narrator_024_d8a4efd6.mp3", 2701661062, 119120428, "tutorial_stage_28", "Click on the 'Buy' tab in the merchant window.", "pane Merchant Buy")
+		SetTutorialStep(player, 26)
+	end
+	if signal == "tutorial_stage_28" and GetTutorialStep(player) == 26 then
+		InstructionWindow(player, -1.0, "Double left click on the Shard of Luclin.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_025_fae8d9aa.mp3", 2465701012, 531235298, "tutorial_stage_30", "Double left click on the Shard of Luclin.", "server")		
+		SetTutorialStep(player, 28)
+	end
+
+	if signal == "equipping_weapons" then
+		SetTutorialStep(player, 34)
+		ShowWindow(player, "MainHUD.StartMenu", 0)
+		FlashWindow(player, "MainHUD.StartMenu.inventory", 0.0)
+		InstructionWindow(player, -1.0, "This is an action menu. Right clicking on any character, item, or interface element will bring up the action menu for that object.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_029_759b20ee.mp3", 2551751095, 1683887648, "tutorial_stage_35", "Right click on an item in your inventory.", "open RadialMenu")
+		ShowWindow(player, "Inventory.Inventory", 1)
+	end
+	if signal == "tutorial_stage_35" then
+		SetTutorialStep(player, 35)
+		InstructionWindow(player, -1.0, "Left click on the examine action.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_030_ae336060.mp3", 1661740791, 1051227725, "tutorial_stage_36", "Right click on an item, then left click on the examine button.", "open ExamineItem")
+	end
+	if signal == "tutorial_stage_36" then
+		SetTutorialStep(player, 36)
+		InstructionWindow(player, -1.0, "This window shows the detailed specifics about an item.  Notice that the name of the item is white.  This indicates that the item is a good match for you.  If an item's name ever turns grey, you will want to replace it with a better version.  A red name indicates that the item is either unusable by your character class or out of your level range.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_030_ae336060.mp3", 1307292988, 58658687, "tutorial_stage_37", "", "continue")
+	end
+	if signal == "tutorial_stage_37" then
+		SetTutorialStep(player, 37)
+		InstructionWindow(player, -1.0, "Left clicking and dragging on an item will pick that item up and allow you to move it from one slot to another. Pick up the club.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_032_c4d45830.mp3", 1069757593, 1169701151, "tutorial_stage_38", "", "continue")
+	end
+	if signal == "tutorial_stage_38" then
+		SetTutorialStep(player, 38)
+		InstructionWindow(player, -1.0, "Releasing the mouse button over an available slot will drop the item again.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_033_7310c971.mp3", 329734483, 2927325554, "tutorial_stage_39", "", "continue")
+	end
+	if signal == "tutorial_stage_39" then
+		SetTutorialStep(player, 39)
+		InstructionWindow(player, -1.0, "If you drag and drop items onto the paper doll display, your character will attempt to equip that item. If the item cannot be equipped, it will automatically be stored into the first available inventory slot. Try auto-equipping the club.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_034_cb993d34.mp3", 2169570288, 2277767239, "tutorial_stage_40", "Left click and hold down the mouse button on the splintered club, then drag it to your character display.", "server")
+		FlashWindow(player, "Inventory.Inventory.EquipmentPage.PaperDoll", 6.0)
+	end
+	if (signal == "tutorial_stage_40" and GetTutorialStep(player) == 39) or (signal == "sys_client_avatar_ready" and HasQuest(player, 524) == true and GetQuestStep(player, 524) == 8) then
+		SetTutorialStep(player, 40)
+		InstructionWindow(player, -1.0, "Before approaching a potential enemy, you should evaluate a few things. This is your health display. As you are injured, your health  decreases. If it runs out completely you will collapse and could die. It is very important to keep an eye on your health at all times.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_036_ff1a8605.mp3", 4286041154, 293958730, "tutorial_stage_42", "", "continue")
+		FlashWindow(player, "MainHUD.Player.HealthBar", 18.0)
+		FlashWindow(player, "MainHUD.Player.Name", 18.0)
+	end
+	if signal == "tutorial_stage_42" then
+		SetTutorialStep(player, 42)
+		FlashWindow(player, "MainHUD.Player.HealthBar", 0.0)
+		FlashWindow(player, "MainHUD.Player.Name", 0.0)
+		InstructionWindow(player, -1.0, "It is also important to consider how powerful your opponent is. Place your mouse cursor onto the rat.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_037_e7c85534.mp3", 1222496721, 345453852, "tutorial_stage_42.5", "", "continue")
+	end
+	if signal == "tutorial_stage_42.5" then
+		InstructionWindow(player, -1.0, "Notice the mouse pointer changes color. This color indicates how difficult an opponent is. The cursor is white, which means that the rat is an even fight. Easier fights will be green or blue, meaning that these creatures are lower level than you. More difficult, higher level fights will be yellow, orange or red.  Looks however, can be deceiving.  Some creatures are very powerful for their size, and may require a group to conquer.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_038_19982dd.mp3", 1535688531, 2987489092, "tutorial_stage_43", "", "continue")
+	end
+	if signal == "tutorial_stage_43" then
+		SetTutorialStep(player, 43)
+		InstructionWindow(player, -1.0, "Notice his name is now flashing and there is a large targeting ring on the ground below him. This indicates that the rat is now your target.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_040_1e780c5b.mp3", 2045181958, 2230466907, "tutorial_stage_44.5", "", "continue")
+		FlashWindow(player, "MainHUD.Target.HealthBar", 12.0)
+		FlashWindow(player, "MainHUD.Target.Name", 12.0)
+	end
+	if signal == "tutorial_stage_44.5" then
+		SetTutorialStep(player, 44)
+		FlashWindow(player, "MainHUD.Player.HealthBar", 0.0)
+		FlashWindow(player, "MainHUD.Player.Name", 0.0)
+		InstructionWindow(player, -1.0, "You can see both the health and level of your target in the target display. You will also notice a downward pointing arrow above the rat's health bar.  This means that it is a below average difficulty opponent and can be defeated by a single player.  Opponents can range from three downward arrows (a very weak opponent) to three upward arrows (a heroic opponent requiring a group of players to defeat).  An opponent that indicates no arrows at all is considered to be of average difficulty.", "", 0, 0, "tutorial_stage_45", "", "continue")
+		FlashWindow(player, "MainHUD.Target.HealthBar", 12.0)
+		FlashWindow(player, "MainHUD.Target.Name", 12.0)
+	end
+	if signal == "tutorial_stage_45" then
+		SetTutorialStep(player, 45)
+		FlashWindow(player, "MainHUD.Player.HealthBar", 0.0)
+		FlashWindow(player, "MainHUD.Player.Name", 0.0)
+		InstructionWindow(player, -1.0, "Place your mouse pointer over the target box. The tool-tip will show you detailed information about the target and its encounter.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_040_1e780c5b.mp3", 0, 9, "tutorial_stage_45.5", "", "continue")
+		FlashWindow(player, "MainHUD.Target.HealthBar", 12.0)
+		FlashWindow(player, "MainHUD.Target.Name", 12.0)
+	end
+	if signal == "tutorial_stage_45.5" then
+		FlashWindow(player, "MainHUD.Player.HealthBar", 0.0)
+		FlashWindow(player, "MainHUD.Player.Name", 0.0)
+		InstructionWindow(player, -1.0, "It's time for some adventure. Double left click on the rat to attack it.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_042_791576f2.mp3", 1866452922, 760329708, "tutorial_stage_46", "Double left click on the rat.", "server")
+	end
+	if signal == "tutorial_stage_47" then
+		SetTutorialStep(player, 47)
+		InstructionWindow(player, 10.0, "Always be sure to take everything you can from a fallen opponent. Many seemingly worthless items can be valuable to merchants or other players.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_044_dc34536.mp3", 4221017573, 1055524726, "tutorial_stage_48", "", "continue")
+	end
+	if signal == "tutorial_stage_48" then
+		SetTutorialStep(player, 48)
+		InstructionWindow(player, -1.0, "Congratulations! As you see, you also earn experience and rewards for defeating enemies.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_045_db304a48.mp3", 3903602846, 3454863851, "tutorial_stage_49", "", "continue")
+	end	
+	if signal == "tutorial_stage_50" then
+		SetTutorialStep(player, 50)
+		InstructionWindow(player, -1.0, "Notice that your experience point display is now empty, and your maximum health and power have increased.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_047_5c382a71.mp3", 1130515024, 564825664, "tutorial_stage_51", "", "continue")
+		FlashWindow(player, "MainHUD.Player.HealthBarBkg", 6.0)
+		FlashWindow(player, "MainHUD.Player.ManaBarBkg", 6.0)
+		FlashWindow(player, "MainHUD.Player.Name", 6.0)
+		FlashWindow(spawn, "MainHUD.Experience", 3.0)
+	end
+end
+
+function item_equipped(zone, player, item_id, item_name, item_unique_id)
+	if item_name == "threadbare tunic" then
+		InstructionWindowGoal(player, 0)		
+	elseif item_name == "splintered club" then
+		InstructionWindowClose(player)
+		FlashWindow(player, "Inventory.Inventory.EquipmentPage.PaperDoll", 0.0)
+		InstructionWindow(player, -1.0, "Now, go and complete the quest that the Captain gave to you.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_035_acb2990a.mp3", 395837788, 2869210055, "tutorial_stage_40", "", "continue")
+	end
+end
+
+function item_unequipped(zone, player, item_id, item_name, item_unique_id)
+end
+
+function spawn_killed(zone, dead, killer)
+	if seen_step_45 == false and GetName(dead) == "a rat" then	
+		InstructionWindowClose(killer)
+		InstructionWindow(killer, 8.0, "Double click on the dead rat to search its body for valuables.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_043_a33564f1.mp3", 2552146487, 2098243078, "tutorial_stage_47", "Double left click on the corpse of a rat.", "open Loot")
+		seen_step_45 = true
+	end
+	SendStateCommand(GetSpawn(killer, 270001), 0)
+	SendStateCommand(GetSpawn(killer, 270004), 0)
+	SendStateCommand(GetSpawn(killer, 270005), 0)	
+	SendStateCommand(GetSpawn(killer, 270007), 0)
+end

+ 13 - 0
server/ZoneScripts/IsleOfRefuge.lua

@@ -0,0 +1,13 @@
+--[[
+	Script Name		:	IsleOfRefuge.lua
+	Script Purpose	:	Handles Isle of Refuge events
+	Script Author	:	LethalEncounter
+	Script Date		:	9/06/2020
+	Script Notes	:	
+--]]
+
+function signal_changed(zone, player, signal)
+	if signal == "sys_client_avatar_ready" and HasQuest(player, 1) == false and HasCompletedQuest(player, 1) == false then
+		InstructionWindow(player, -1.0, "Garven Tralk can guide you on what to do next.", "voiceover/english/narrator/tutorial_island02/narrator_031_328946a9.mp3", 933085482, 646811402, "tutorial_stage_52", "", "continue")
+	end
+end