function OnWarpEnter()
	SetMarker("Pi Ramses\\Maison de Paser\\Warp_0008.wp",0,0)
	SetMarker("Pi Ramses\\Maison de Paser\\Warp_0006.wp",0,0)
	SetMarker("Pi Ramses\\Maison de Paser\\Warp_0005.wp",0,0)
	StartAnimation("L3P1",-1)
        StartAnimationPart("L4P1",0,50,-1,true) --fuego en el fuego

   	if  MAYA_BEATED then
		AnimationSetToStart("FIP1")
	end
	if PASER_HARMED and not MAYA_BEATED then
		if SMOKE_ACTIVATED then
			StartAnimationPart("TOp1",60,85,-1,true)			
			StartAnimationPart("G2P1",90,110,-1,true)
			StartAnimationPart("L4P1",60,90,-1,true) --fuego en el fuego
		else
			StartAnimationPart("TOp1",0,54,-1,true)
			StartAnimationPart("G2P1",0,80,-1,true)
			StartAnimationPart("L4P1",0,30,-1,true) --fuego en el fuego
			SetMarker("L4P1",4,0)
		end
	end
	--PASER (check conditions)
	if MAYA_BEATED then
		StartAnimationPart("PAP1",90,119,-1,true)
	else
		if not PASER_HARMED then
			StartAnimationPart("PAP1",90,119,-1,true) --Paser unconscious
		else
			StartAnimationPart("PAP1",120,140,-1,true) --Paser crossing arms
		end
	end
end

function OnWarpLeave()
end

function OnDialogFinished(dialogName)
	if dialogName=="TOUY1290" then
		PlayMovie("Videos/GC_C16_Montage.ogv", "Videos/cine16.ogg")
	end 
end

function OnMovieFinished(movieId)
	--if movieId=="Videos/GC_C16_Montage.ogv" then
		DrawText("MAIA1291","MAIA1291.ogg")
	--end
end

function OnAnimationFinished(objectName)
	if objectName=="L4P1" then
		StartAnimationPart("L4P1",60,90,-1,true)
	end
end

function OnWarpObjectHit(objectName)
	if objectName == "FIP1" then

------------------------------------------------------------
	elseif objectName == "G2P1" then

------------------------------------------------------------
	elseif objectName == "L3P1" then

------------------------------------------------------------
	elseif objectName == "L4P1" then
		if Khaem_on_Countryyard then
			if not  SMOKE_ACTIVATED and Selected("J_Pot_onguent") then
				StartAnimationPart("L4P1",50,60,1,true)
				StartAnimationPart("TOp1",60,85,-1,true)			
				StartAnimationPart("G2P1",90,110,-1,true)
				RemoveFromBag()
				SMOKE_ACTIVATED = true
				DrawText("SOLD1289","SOLD1289.ogg")
				DrawText("TOUY1290","TOUY1290.ogg")
				SetMarker("L4P1",-1,0)
				
			end
		end


------------------------------------------------------------
	elseif objectName == "N3P1" then

------------------------------------------------------------
	elseif objectName == "P2P1" then

------------------------------------------------------------
	elseif objectName == "P3P1" then

------------------------------------------------------------
	elseif objectName == "PAP1" then

------------------------------------------------------------
	elseif objectName == "TOp1" then

------------------------------------------------------------
	elseif objectName == "V2P1" then

------------------------------------------------------------
	elseif objectName == "V5P1" then
	end
	if objectName=="3D\\Pi Ramses\\Maison de Paser\\Warp_0008.wp" then
		ChangeWarp(objectName)
        end
	if objectName=="3D\\Pi Ramses\\Maison de Paser\\Warp_0006.wp" then
		if Khaem_on_Countryyard and not SMOKE_ACTIVATED then
			DrawText("SOLD1288","SOLD1288.ogg")
		else
			ChangeWarp(objectName)
		end
        end
	if objectName=="3D\\Pi Ramses\\Maison de Paser\\Warp_0005.wp" then
		if Khaem_on_Countryyard and not SMOKE_ACTIVATED then
			DrawText("SOLD1287","SOLD1287.ogg")
		else
			ChangeWarp(objectName)
		end
        end
end
