SLASH_TORTOLLANQUEST1, SLASH_TORTOLLANQUEST2 = '/tortollanquest' , '/tq';

function SlashCmdList.TORTOLLANQUEST(msg, editbox)

print("|cff40E0D0 TORTOLLAN QUESTCHAIN PROGRESS|r")

if UnitLevel("player")>=110 then
	local function checkQuestComplete(repu, coordinates, qid, qint)

		if IsQuestFlaggedCompleted(qid) == true then
			print(qint .. " |cff008000 Completed|r")

		elseif IsQuestFlaggedCompleted(qid) == false then
			print(qint .. " |cffff0000 " .. repu .. " Not Completed|r" .. " Location: " .. coordinates)

		else
			return "cQC error"
		end
	end

	local englishFaction = UnitFactionGroup("player")
	if englishFaction == "Horde" then
		print("\n|cff40E0D0 Horde questchains:|r")
		checkQuestComplete("(0 rep)","58.4,13.8 Nazmir",49064,"\124cffffff00\124Hquest:49064:-1\124h[Torga, the Turtle Loa]\124h\124r")
		checkQuestComplete("(500 rep)","67.2,40.9 Nazmir",52477,"\124cffffff00\124Hquest:52477:-1\124h[WANTED: Ayame]\124h\124r")
		checkQuestComplete("(75 rep)","62.0,22.2 Vol'dun",47943,"\124cffffff00\124Hquest:47943:-1\124h[Crab Trapping]\124h\124r")
		checkQuestComplete("(75 rep)","56.2,91.6 Dazar'alor",52472,"\124cffffff00\124Hquest:52472:-1\124h[Make Loh Go]\124h\124r")
		checkQuestComplete("(225 rep)","56.0,88.8 Dazar'alor",48404,"\124cffffff00\124Hquest:48404:-1\124h[The Scamps]\124h\124r")

	elseif englishFaction == "Alliance" then
		print("\n|cff40E0D0 Alliance questchains:|r")
		checkQuestComplete("(250 rep)","62.3,41.3 Nazmir",52480,"\124cffffff00\124Hquest:52480:-1\124h[WANTED: Ayame]\124h\124r")
		checkQuestComplete("(75 rep)","40.2,37.6 Stormsong Valley",53369,"\124cffffff00\124Hquest:53369:-1\124h[Make Loh Go]\124h\124r")
		checkQuestComplete("(150 rep)","70.6,81.8 Tiragarde Sound",49290,"\124cffffff00\124Hquest:49290:-1\124h[Aged to Perfection]\124h\124r")
		checkQuestComplete("(75 rep)","51.2, 25.8 Tiragarde Sound",48899,"\124cffffff00\124Hquest:48899:-1\124h[Safety First]\124h\124r")

	else
	message("UFG error")
	end

	print("\n|cff40E0D0 Neutral questchains:|r")
	checkQuestComplete("(1000 rep)","Collected from treasure chests",53476,"\124cffffff00\124Hquest:53476:-1\124h[The Great Sea Scrolls]\124h\124r")
	checkQuestComplete("(75 rep)","55.2,36.6 Nazmir",47924,"\124cffffff00\124Hquest:47924:-1\124h[Profanity Filter]\124h\124r")
	checkQuestComplete("(75 rep)","40.2,37.6 Stormsong Valley",51352,"\124cffffff00\124Hquest:51352:-1\124h[Don't Play with Matches]\124h\124r")
	checkQuestComplete("(75 rep)","70.4,65.0 Zuldazar",49284,"\124cffffff00\124Hquest:49284:-1\124h[Perfect Tidings]\124h\124r")


else
print("|cffff0000 You do not meet the requirement of level 110|r")
end
end
