mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	"Seeing the Seers" quest etc3g0 scripted, no reward handling currently. Requires actor "Nellaure" (http://ffxiv.gamerescape.com/w/index.php?title=Nellaure) to be added in. Hangs out in back-right corner of Carpenter's Guild.
Added a quest completion check to etc5g0.lua to prevent it showing "!" on quest-givers' head when you've cleared the quest already. Fixed regression on select GM commands, !warp instant-warps within same zone again, !mypos reports to the thousandths place, !speed command works with one argument again.
This commit is contained in:
		| @@ -16,7 +16,7 @@ function onTrigger(player) | ||||
|        | ||||
|     local messageID = MESSAGE_TYPE_SYSTEM_ERROR; | ||||
|     local sender = "[mypos] "; | ||||
|     local message = string.format("current position X:%d Y:%d Z:%d (Rotation: %d) Zone:%d", x, y, z, rot, zone); | ||||
|     local message = string.format("X:%.3f Y:%.3f Z:%.3f (Rotation: %.3f) Zone:%d", x, y, z, rot, zone); | ||||
|  | ||||
|     player:SendMessage(messageID, sender, message); | ||||
| end; | ||||
| @@ -8,6 +8,11 @@ function onTrigger(player, argc, stop, walk, run) | ||||
|     stop = tonumber(stop) or 0; | ||||
|     walk = tonumber(walk) or 2; | ||||
|     run = tonumber(run) or 5; | ||||
|      | ||||
|     player:ChangeSpeed(stop, walk, run, run); | ||||
| end; | ||||
|     if argc == 3 then | ||||
| 		player:ChangeSpeed(stop, walk, run, run); | ||||
| 	elseif argc == 1 then | ||||
| 		player:ChangeSpeed(0, stop/2, stop, stop); | ||||
| 	else | ||||
| 		player:ChangeSpeed(0,2,5,5); | ||||
| 	end | ||||
| end | ||||
| @@ -53,7 +53,7 @@ function onTrigger(player, argc, p1, p2, p3, p4, privateArea, name, lastName) | ||||
|             local z = tonumber(applyPositionOffset(p3, player_z)) or player_z; | ||||
|              | ||||
|             player:SendMessage(messageID, sender, string.format("setting coordinates X:%d Y:%d Z:%d within current zone (%d)", x, y, z, player_zone)); | ||||
|             worldManager:DoPlayerMoveInZone(player, x, y, z, 0x0F); | ||||
|             worldManager:DoPlayerMoveInZone(player, x, y, z, player_rot, 0x00); | ||||
|         else | ||||
|             local zone = tonumber(applyPositionOffset(p1, player_zone)) or player_zone; | ||||
|             local x = tonumber(applyPositionOffset(p2, player_x)) or player_x; | ||||
|   | ||||
| @@ -1,19 +1,61 @@ | ||||
| -- Level requirement is 5 on any class.  Set to 1 for testing | ||||
| -- TODO:  Reward handling | ||||
|  | ||||
| --Actor Scripts | ||||
| --unique/fst0Town01a/PopulaceStandard/kinnison | ||||
| --unique/fst0Town01a/PopulaceStandard/mestonnaux | ||||
| --unique/fst0Town01a/PopulaceStandard/sybell | ||||
| --unique/fst0Town01a/PopulaceStandard/khuma_moshroca | ||||
| --unique/fst0Town01a/PopulaceStandard/lefwyne | ||||
| --unique/fst0Town01a/PopulaceStandard/nellaure | ||||
|  | ||||
|  | ||||
| --Quest Flags | ||||
| TALKED_1 = 0; | ||||
| TALKED_2 = 1; | ||||
| TALKED_3 = 2; | ||||
| TALKED_4 = 4; | ||||
| TALKED_5 = 8; | ||||
| FLAG_TALKED_MESTONNAUX = 0; | ||||
| FLAG_TALKED_SYBELL = 1; | ||||
| FLAG_TALKED_NELLAURE = 2; | ||||
| FLAG_TALKED_KHUMA_MOSHROCA = 4; | ||||
| FLAG_TALKED_LEFWYNE = 8; | ||||
|  | ||||
| function checkNextPhase(player) | ||||
| 	ownedQuest = player:GetQuest("Etc3g0"); | ||||
| 	if ( | ||||
| 		ownedQuest:GetQuestFlag(TALKED_1) == false and  | ||||
| 		ownedQuest:GetQuestFlag(TALKED_2) == false and  | ||||
| 		ownedQuest:GetQuestFlag(TALKED_3) == false and  | ||||
| 		ownedQuest:GetQuestFlag(TALKED_4) == false and  | ||||
| 		ownedQuest:GetQuestFlag(TALKED_5) == false | ||||
| 		) then | ||||
| 		ownedQuest:NextPhase(243); | ||||
| 	end | ||||
| end | ||||
|     ownedQuest = player:GetQuest("Etc3g0"); | ||||
|     if ( | ||||
|         ownedQuest:GetQuestFlag(FLAG_TALKED_MESTONNAUX) == true and  | ||||
|         ownedQuest:GetQuestFlag(FLAG_TALKED_SYBELL) == true and  | ||||
|         ownedQuest:GetQuestFlag(FLAG_TALKED_NELLAURE) == true and  | ||||
|         ownedQuest:GetQuestFlag(FLAG_TALKED_KHUMA_MOSHROCA) == true and  | ||||
|         ownedQuest:GetQuestFlag(FLAG_TALKED_LEFWYNE) == true | ||||
|         ) then | ||||
|         ownedQuest:NextPhase(243); | ||||
|     end | ||||
| end | ||||
|  | ||||
|  | ||||
| function canAcceptQuest(player) | ||||
| 	return (player:HasQuest("Etc3g0") == false and player:IsQuestCompleted("Etc3g0") == false and player:GetHighestLevel() >= 1); | ||||
| end | ||||
|  | ||||
| function isObjectivesComplete(player, quest) | ||||
| 	return (quest:GetPhase() == 243); | ||||
| end | ||||
|  | ||||
|  | ||||
| function onAbandonQuest(player, quest)	 | ||||
| 	kinnison = GetWorldManager():GetActorInWorldByUniqueId("kinnison"); | ||||
| 	mestonnaux = GetWorldManager():GetActorInWorldByUniqueId("mestonnaux"); | ||||
| 	sybell = GetWorldManager():GetActorInWorldByUniqueId("sybell"); | ||||
| 	khuma_moshroca = GetWorldManager():GetActorInWorldByUniqueId("khuma_moshroca"); | ||||
| 	lefwyne = GetWorldManager():GetActorInWorldByUniqueId("lefwyne"); | ||||
| 	nellaure = GetWorldManager():GetActorInWorldByUniqueId("nellaure");	 | ||||
| 	 | ||||
| 	if (kinnison ~= nil and canAcceptQuest(player)) then | ||||
| 		kinnison:SetQuestGraphic(player, 0x2);		 | ||||
| 	end	 | ||||
| 	 | ||||
| 	if (mestonnaux ~= nil) then mestonnaux:SetQuestGraphic(player, 0x0); end | ||||
| 	if (sybell ~= nil) then sybell:SetQuestGraphic(player, 0x0); end | ||||
| 	if (khuma_moshroca ~= nil) then khuma_moshroca:SetQuestGraphic(player, 0x0); end | ||||
| 	if (lefwyne ~= nil) then lefwyne:SetQuestGraphic(player, 0x0); end | ||||
| 	if (nellaure ~= nil) then nellaure:SetQuestGraphic(player, 0x0); end | ||||
| 	 | ||||
| end | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
| TALKED_PFARAHR = 0; | ||||
|  | ||||
| function canAcceptQuest(player) | ||||
| 	return (player:HasQuest("etc5g0") == false and player:GetHighestLevel() >= 1); | ||||
| 	return (player:HasQuest("etc5g0") == false and player:IsQuestCompleted("Etc5g0") == false and player:GetHighestLevel() >= 1); | ||||
| end | ||||
|  | ||||
| function isObjectivesComplete(player, quest) | ||||
|   | ||||
| @@ -1,7 +1,54 @@ | ||||
| require ("global") | ||||
| require ("quests/etc/etc3g0") | ||||
|  | ||||
| function onSpawn(player, npc) | ||||
|  | ||||
|    if (player:HasQuest("Etc3g0") == true and player:GetQuest("Etc3g0"):GetPhase() == 0) then	 | ||||
| 		if player:GetQuest("Etc3g0"):GetQuestFlag(FLAG_TALKED_KHUMA_MOSHROCA) == false then | ||||
| 			npc:SetQuestGraphic(player, 0x2); | ||||
| 		else | ||||
| 			npc:SetQuestGraphic(player, 0x0); | ||||
| 		end | ||||
|     else | ||||
|         npc:SetQuestGraphic(player, 0x0); | ||||
|     end | ||||
| 	 | ||||
| end | ||||
|  | ||||
|  | ||||
|  | ||||
| function onEventStarted(player, npc) | ||||
|     defaultFst = GetStaticActor("DftFst"); | ||||
| 	callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKhuma_moshroca_001", nil, nil, nil); | ||||
|  | ||||
| 	defaultFst = GetStaticActor("DftFst"); | ||||
|     quest = GetStaticActor("Etc3g0"); | ||||
|  | ||||
| 	if (player:HasQuest("Etc3g0") == true) then | ||||
| 	 | ||||
| 		unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1); | ||||
|      | ||||
| 		if (result == 1) then         | ||||
| 			callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKhumamoshroca_001", nil, nil, nil); | ||||
| 		elseif (result == 2) then | ||||
| 			ownedQuest = player:GetQuest("Etc3g0"); | ||||
| 			 | ||||
| 			if (ownedQuest:GetQuestFlag(FLAG_TALKED_KHUMA_MOSHROCA)) == false then | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "processEventKhumaSpeak", nil, nil, nil); | ||||
| 				ownedQuest:SetQuestFlag(FLAG_TALKED_KHUMA_MOSHROCA, true); | ||||
| 				ownedQuest:SaveData();	 | ||||
| 				npc:SetQuestGraphic(player, 0x0); | ||||
| 				checkNextPhase(player); | ||||
| 			else | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "processEventKhumaSpeakAfter", nil, nil, nil); | ||||
| 			end	 | ||||
| 		end | ||||
| 		 | ||||
| 	else | ||||
| 		callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKhumamoshroca_001", nil, nil, nil); | ||||
| 	end | ||||
| 	 | ||||
| 	 | ||||
| 	player:endEvent(); | ||||
| end | ||||
| end | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -3,40 +3,64 @@ require ("quests/etc/etc3g0") | ||||
|  | ||||
| function onSpawn(player, npc) | ||||
| 	 | ||||
| 	if (player:HasQuest("Etc3g0") == false and player:GetQuest("Etc3g0"):GetQuestFlag(TALKED_4)) then | ||||
| 	if (player:HasQuest("Etc3g0") == true and player:GetQuest("Etc3g0"):GetPhase() == 243) then | ||||
| 		npc:SetQuestGraphic(player, 0x4); | ||||
| 	elseif (canAcceptQuest(player)) then | ||||
| 		npc:SetQuestGraphic(player, 0x2); | ||||
| 	else | ||||
| 		npc:SetQuestGraphic(player, 0x0); | ||||
| 	end | ||||
| 	end	 | ||||
| 	 | ||||
| end | ||||
|  | ||||
| function onEventStarted(player, npc) | ||||
|  | ||||
|     defaultFst = GetStaticActor("DftFst"); | ||||
| 	quest = GetStaticActor("Etc3g0"); | ||||
| 	 | ||||
| 	unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1); | ||||
| 	if ((canAcceptQuest(player) == true) or (player:HasQuest("Etc3g0") == true)) then | ||||
| 	 | ||||
| 	if (result == 1) then		 | ||||
| 		callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKinnison_001", -1, -1); | ||||
| 	elseif (result == 2) then | ||||
| 		if (player:HasQuest("Etc3g0") == false) then | ||||
| 			offerQuestResult = callClientFunction(player, "delegateEvent", player, quest, "processEventOffersStart"); | ||||
| 			if (offerQuestResult == 1) then | ||||
| 				player:AddQuest("Etc3g0"); | ||||
| 				npc:SetQuestGraphic(player, 0x0); | ||||
| 			end | ||||
| 		else | ||||
| 			ownedQuest = player:GetQuest("Etc3g0"); | ||||
| 			if (ownedQuest:GetPhase() == 1) then				 | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "processEventClear"); | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); | ||||
| 				player:CompleteQuest("Etc3g0"); | ||||
| 		unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1); | ||||
| 	 | ||||
| 		if (result == 1) then		 | ||||
| 			callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKinnison_001", -1, -1); | ||||
| 		elseif (result == 2) then | ||||
| 			if (player:HasQuest("Etc3g0") == false) then | ||||
| 				offerQuestResult = callClientFunction(player, "delegateEvent", player, quest, "processEventOffersStart"); | ||||
| 				if (offerQuestResult == 1) then | ||||
| 					player:AddQuest("Etc3g0"); | ||||
| 					npc:SetQuestGraphic(player, 0x0); | ||||
| 					 | ||||
| 					-- This is to overcome some weirdness where some NPCs are not updating their quest marker upon quest accepted | ||||
| 					-- So we're just going to force the change to be sure | ||||
| 					mestonnaux = GetWorldManager():GetActorInWorldByUniqueId("mestonnaux"); | ||||
| 					sybell = GetWorldManager():GetActorInWorldByUniqueId("sybell"); | ||||
| 					khuma_moshroca = GetWorldManager():GetActorInWorldByUniqueId("khuma_moshroca"); | ||||
| 					lefwyne = GetWorldManager():GetActorInWorldByUniqueId("lefwyne"); | ||||
| 					nellaure = GetWorldManager():GetActorInWorldByUniqueId("nellaure");	 | ||||
| 					 | ||||
| 					if (mestonnaux ~= nil) then mestonnaux:SetQuestGraphic(player, 0x2); end | ||||
| 					if (sybell ~= nil) then sybell:SetQuestGraphic(player, 0x2); end | ||||
| 					if (khuma_moshroca ~= nil) then khuma_moshroca:SetQuestGraphic(player, 0x2); end | ||||
| 					if (lefwyne ~= nil) then lefwyne:SetQuestGraphic(player, 0x2); end | ||||
| 					if (nellaure ~= nil) then nellaure:SetQuestGraphic(player, 0x2); end | ||||
| 				 | ||||
| 				end | ||||
| 			else | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "processEventOffersAfter"); | ||||
| 				ownedQuest = player:GetQuest("Etc3g0"); | ||||
| 				if (ownedQuest:GetPhase() == 243) then				 | ||||
| 					callClientFunction(player, "delegateEvent", player, quest, "processEventClear"); | ||||
| 					callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); | ||||
| 					player:CompleteQuest("Etc3g0"); | ||||
| 					npc:SetQuestGraphic(player, 0x0); | ||||
| 				else | ||||
| 					callClientFunction(player, "delegateEvent", player, quest, "processEventOffersAfter"); | ||||
| 				end | ||||
| 			end | ||||
| 		end | ||||
| 	end | ||||
| 	else | ||||
| 		callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithKinnison_001", -1, -1); | ||||
| 	end	 | ||||
| 	 | ||||
| 	player:endEvent(); | ||||
| end | ||||
| @@ -1,7 +1,53 @@ | ||||
| require ("global") | ||||
| require ("quests/etc/etc3g0") | ||||
|  | ||||
| function onSpawn(player, npc) | ||||
|  | ||||
|    if (player:HasQuest("Etc3g0") == true and player:GetQuest("Etc3g0"):GetPhase() == 0) then	 | ||||
| 		if player:GetQuest("Etc3g0"):GetQuestFlag(FLAG_TALKED_LEFWYNE) == false then | ||||
| 			npc:SetQuestGraphic(player, 0x2); | ||||
| 		else | ||||
| 			npc:SetQuestGraphic(player, 0x0); | ||||
| 		end | ||||
|     else | ||||
|         npc:SetQuestGraphic(player, 0x0); | ||||
|     end | ||||
| 	 | ||||
| end | ||||
|  | ||||
|  | ||||
|  | ||||
| function onEventStarted(player, npc) | ||||
|     defaultFst = GetStaticActor("DftFst"); | ||||
| 	callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithLefwyne_001", nil, nil, nil); | ||||
|  | ||||
| 	defaultFst = GetStaticActor("DftFst"); | ||||
|     quest = GetStaticActor("Etc3g0"); | ||||
|  | ||||
| 	if (player:HasQuest("Etc3g0") == true) then | ||||
| 	 | ||||
| 		unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1); | ||||
|      | ||||
| 		if (result == 1) then         | ||||
| 			callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithLefwyne_001", nil, nil, nil); | ||||
| 		elseif (result == 2) then | ||||
| 			ownedQuest = player:GetQuest("Etc3g0"); | ||||
| 			 | ||||
| 			if (ownedQuest:GetQuestFlag(FLAG_TALKED_LEFWYNE)) == false then | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "processEventLefwyneSpeak", nil, nil, nil); | ||||
| 				ownedQuest:SetQuestFlag(FLAG_TALKED_LEFWYNE, true); | ||||
| 				ownedQuest:SaveData();	 | ||||
| 				npc:SetQuestGraphic(player, 0x0); | ||||
| 				checkNextPhase(player); | ||||
| 			else | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "processEventLefwyneSpeakAfter", nil, nil, nil); | ||||
| 			end	 | ||||
| 		end | ||||
| 		 | ||||
| 	else | ||||
| 		callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithLefwyne_001", nil, nil, nil); | ||||
| 	end | ||||
| 	 | ||||
| 	player:endEvent(); | ||||
| end | ||||
| end | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -1,7 +1,54 @@ | ||||
| require ("global") | ||||
| require ("quests/etc/etc3g0") | ||||
|  | ||||
| function onSpawn(player, npc) | ||||
| 	 | ||||
|    if (player:HasQuest("Etc3g0") == true and player:GetQuest("Etc3g0"):GetPhase() == 0) then	 | ||||
| 		if player:GetQuest("Etc3g0"):GetQuestFlag(FLAG_TALKED_MESTONNAUX) == false then | ||||
| 			npc:SetQuestGraphic(player, 0x2); | ||||
| 		else | ||||
| 			npc:SetQuestGraphic(player, 0x0); | ||||
| 		end | ||||
|     else | ||||
|         npc:SetQuestGraphic(player, 0x0); | ||||
|     end | ||||
| 		 | ||||
| end | ||||
|  | ||||
|  | ||||
|  | ||||
| function onEventStarted(player, npc) | ||||
|     defaultFst = GetStaticActor("DftFst"); | ||||
| 	callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithMestonnaux_001", nil, nil, nil); | ||||
|  | ||||
| 	defaultFst = GetStaticActor("DftFst"); | ||||
|     quest = GetStaticActor("Etc3g0"); | ||||
|  | ||||
| 	if (player:HasQuest("Etc3g0") == true) then | ||||
| 	 | ||||
| 		unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1); | ||||
|      | ||||
| 		if (result == 1) then         | ||||
| 			callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithMestonnaux_001", nil, nil, nil); | ||||
| 		elseif (result == 2) then | ||||
| 			ownedQuest = player:GetQuest("Etc3g0"); | ||||
| 			 | ||||
| 			if (ownedQuest:GetQuestFlag(FLAG_TALKED_MESTONNAUX)) == false then | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "processEventMestonnauxSpeak", nil, nil, nil); | ||||
| 				ownedQuest:SetQuestFlag(FLAG_TALKED_MESTONNAUX, true); | ||||
| 				ownedQuest:SaveData();	 | ||||
| 				npc:SetQuestGraphic(player, 0x0); | ||||
| 				checkNextPhase(player); | ||||
| 			else | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "processEventMestonnauxSpeakAfter", nil, nil, nil); | ||||
| 			end	 | ||||
| 		end | ||||
| 		 | ||||
| 	else | ||||
| 		callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithMestonnaux_001", nil, nil, nil); | ||||
| 	end | ||||
| 	 | ||||
| 	 | ||||
| 	player:endEvent(); | ||||
| end | ||||
| end | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -0,0 +1,51 @@ | ||||
| require ("global") | ||||
| require ("quests/etc/etc3g0") | ||||
|  | ||||
| function onSpawn(player, npc) | ||||
|  | ||||
|    if (player:HasQuest("Etc3g0") == true and player:GetQuest("Etc3g0"):GetPhase() == 0) then	 | ||||
| 		if player:GetQuest("Etc3g0"):GetQuestFlag(FLAG_TALKED_NELLAURE) == false then | ||||
| 			npc:SetQuestGraphic(player, 0x2); | ||||
| 		else | ||||
| 			npc:SetQuestGraphic(player, 0x0); | ||||
| 		end | ||||
|     else | ||||
|         npc:SetQuestGraphic(player, 0x0); | ||||
|     end | ||||
| 	 | ||||
| end | ||||
|  | ||||
|  | ||||
|  | ||||
| function onEventStarted(player, npc) | ||||
|  | ||||
| 	defaultFst = GetStaticActor("DftFst"); | ||||
|     quest = GetStaticActor("Etc3g0"); | ||||
|  | ||||
| 	if (player:HasQuest("Etc3g0") == true) then | ||||
| 	 | ||||
| 		unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1); | ||||
|      | ||||
| 		if (result == 1) then         | ||||
| 			callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithNellaure_001", nil, nil, nil); | ||||
| 		elseif (result == 2) then | ||||
| 			ownedQuest = player:GetQuest("Etc3g0"); | ||||
| 			 | ||||
| 			if (ownedQuest:GetQuestFlag(FLAG_TALKED_NELLAURE)) == false then | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "processEventNellaureSpeak", nil, nil, nil); | ||||
| 				ownedQuest:SetQuestFlag(FLAG_TALKED_NELLAURE, true); | ||||
| 				ownedQuest:SaveData();	 | ||||
| 				npc:SetQuestGraphic(player, 0x0); | ||||
| 				checkNextPhase(player); | ||||
| 			else | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "processEventNellaureSpeakAfter", nil, nil, nil); | ||||
| 			end	 | ||||
| 		end | ||||
| 		 | ||||
| 	else | ||||
| 		callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithNellaure_001", nil, nil, nil); | ||||
| 	end | ||||
| 	 | ||||
| 	 | ||||
| 	player:endEvent(); | ||||
| end | ||||
| @@ -1,7 +1,54 @@ | ||||
| require ("global") | ||||
| require ("quests/etc/etc3g0") | ||||
|  | ||||
| function onSpawn(player, npc) | ||||
|  | ||||
|    if (player:HasQuest("Etc3g0") == true and player:GetQuest("Etc3g0"):GetPhase() == 0) then	 | ||||
| 		if player:GetQuest("Etc3g0"):GetQuestFlag(FLAG_TALKED_SYBELL) == false then | ||||
| 			npc:SetQuestGraphic(player, 0x2); | ||||
| 		else | ||||
| 			npc:SetQuestGraphic(player, 0x0); | ||||
| 		end | ||||
|     else | ||||
|         npc:SetQuestGraphic(player, 0x0); | ||||
|     end | ||||
| 	 | ||||
| end | ||||
|  | ||||
|  | ||||
|  | ||||
| function onEventStarted(player, npc) | ||||
|     defaultFst = GetStaticActor("DftFst"); | ||||
| 	callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSybell_001", nil, nil, nil); | ||||
|  | ||||
| 	defaultFst = GetStaticActor("DftFst"); | ||||
|     quest = GetStaticActor("Etc3g0"); | ||||
|  | ||||
| 	if (player:HasQuest("Etc3g0") == true) then | ||||
| 	 | ||||
| 		unknown, result = callClientFunction(player, "switchEvent", defaultFst, quest, nil, nil, 1, 1, 0x3f1); | ||||
|      | ||||
| 		if (result == 1) then         | ||||
| 			callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSybell_001", nil, nil, nil); | ||||
| 		elseif (result == 2) then | ||||
| 			ownedQuest = player:GetQuest("Etc3g0"); | ||||
| 			 | ||||
| 			if (ownedQuest:GetQuestFlag(FLAG_TALKED_SYBELL)) == false then | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "processEventSybellSpeak", nil, nil, nil); | ||||
| 				ownedQuest:SetQuestFlag(FLAG_TALKED_SYBELL, true); | ||||
| 				ownedQuest:SaveData();	 | ||||
| 				npc:SetQuestGraphic(player, 0x0); | ||||
| 				checkNextPhase(player); | ||||
| 			else | ||||
| 				callClientFunction(player, "delegateEvent", player, quest, "processEventSybellSpeakAfter", nil, nil, nil); | ||||
| 			end	 | ||||
| 		end | ||||
| 		 | ||||
| 	else | ||||
| 		callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSybell_001", nil, nil, nil); | ||||
| 	end | ||||
| 	 | ||||
| 	 | ||||
| 	player:endEvent(); | ||||
| end | ||||
| end | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user