function OnWarpEnter()
	if not firstEnter then
		AddToBag("J_Oeil")
		AddToBag("Vase_purification")
		AddToBag("J_Mouchoir")
		AddToBag("J_cobra")
		AddToBag("J_oriflamme")
		AddToBag("j_abeille")
		AddToBag("J_filet")

		AddToBag("J_Depot_fondation")
		AddToBag("J_Couteau")
		AddToBag("J_serpent")

		AddToBag("J_Couteau_etrange")
		AddToBag("J_graine_nenuphare")
		AddToBag("J_figurine_cuite")
		firstEnter = true
	end

	Music_as=true 
	Sakhmet1_jar_head="front" 
	Dwarf_waitingSoga_pt_008=false 
	BeenIn_Ptah_me=true 
	CURSE_END=true 
	BirdFly_me_018=true 
	TuyaTalking_as_015=true 
	CabinetOpen_me_009=true 
	BackQuartierVideo=true 
	WentOf_me_3=true 
	PapCopied_as=true 
	BeenIn_025_cr=true 
	Door_as_007=true 
	Dwarf_turned_ptS_008=true 
	O_SistreManche_ptS_013=true 
	BeenIn_asQ_001=true 
	ToMem=false 
	TalkedPamose_me_004=true 
	PASER_FALL=false 
	DjerTalking_piT_003=true 
	FigureReady_as=true 
	PlayingCarriere=false 
	Question="STEP4" 
	O_sekhmet_ptS2_031=true 
	A="empty" 
	FIRST_DWARF_TALK=true 
	C="empty" 
	B="Pyramid" 
	BeenIn_me_009=true 
	D="Ball" 
	O_DolleriteMagic=true 
	Ball="taken" 
	SISTRE_MADE=true 
	Video_pi_053=true 
	FIRST_ENTER_DWARF_STAGE=true 
	O_carptet_as_010=true 
	QUESTION_PUZZLE_SOLVED=true 
	FIRST_DJER_SEEN=true 
	Slab_down_ptS1_038=true 
	O_gum_as_015=true 
	FireExt_as=true 
	BrickmakerTalking_piT_014=true 
	FinishCH5_as=true 
	TuyaTalking_as_007=true 
	EggFallen_me=true 
	FIRST_WARP_ENTER=true 
	O_Dollerite4_pt_S2_035=true 
	VPlayed_as_017=true 
	MOLD_COOLED=true 
	PapPlaced_as=true 
	O_key_me_007=true 
	SECRET_DEVEAL=true 
	GodessTalking_me=true 
	Talked_as_022=true 
	O_Dollerite2_pt_S2_031=true 
	Puzzle_me_009=true 
	DWARF_ASK_KEY=true 
	BallTaken_as_002=true 
	O_papers_as_017=true 
	_VERSION="Lua 5.1" 
	TuyaTesting_as_015=false 
	Door_as_004=true 
	CARTOUCHE_PIECE_FOUND=true 
	Door_as_008=true 
	O_terebinth_as_015=true 
	O_jar_as_015=true 
	GivenIncompletePap_me=true 
	MaiaIntroduced_me=true 
	DWARF_WORKING2=true 
	Sakhmet_System_down=true 
	O_Dollerite3_pt_S2_037=true 
	O_cartouchepiece_piT_022=true 
	TRAVEL_TO_MEMPHIS=true 
	O_BApple_as_015=true 
	Door_as_012=true 
	Ouni_docs_as_001=true 
	BeenIn_as5_001=true 
	Video_me_017=true 
	Sekmet_Passage1_Opened=true 
	O_Grappin_me_017=true 
	Scorp_Given_as=true 
	FigInOven_as=true 
	BurnedFigure_as=true 
	O_Sechentet_ptS2_031=true 
	FIRST_ENTER_SEKMET1=true 
	O_whitepap_as_006=true 
	Pyramid="B" 
	BallBroken_as_002=true 
	O_EggPlate_me=true 
	O_pen_as_006=true 
	O_Sticks_as_016=true 
	DWARF_ON_SEKMET=true 
	QUARY_DOCUMENTS_FOUND=true 
	DjerRecognizeMaya_piT_003=true 
	FirstSakhmetMoved=true 
	DWARF_SALLE=true 
	Ball_as_002=true 
	MYSTERIUXCARTOUCHE_GIVEN=true 
	O_tourche_piM_011=true 
	O_stick_as_024=true 
	Sakhmet1_jar_head_Release=true 
	Paser_DoorRoom_Opened_piM_004=true 
	Bandeu_Worked_ptS_003=true 
	O_Coupe_me_021=true 
	CompleteOffer_me=true 
	PerfumeGiven_me_009=true 
	O_PapComplete_me_017=true 
	TalkedPamCH6_me=true 
	CRYPTE_LOCKED=false 
	O_ocre_as_005=true 
	GivenEgg_me=true 
	DWARF_GIVES_MOLD=true 
	O_stick_me_014=true 
	O_Document_extraction_piM_010=true 
	O_plate_me_017=true 
	GivenPap_me_009=true 
	SOGA_CUT=true 
	Winds_me_009=true 
	BAppleCutted_as_15=true 
	PTAH_APPEAR=true 
	Objects_Picked_pi_053=true 
	CartouchePieceRemoved_piT_030=true 
	O_PapInc_me_021=true 
	O_Rocks_me_018=false 
	NPapSemiCopied_me=true 
	NPapPlaced_me=true 
	DwarfAnimPlaying=false 
	SemiHip_me_004=true 
	O_pincers_ptS_005=true 
	NiloMeterSpeak_me=true 
	ACTIVATE_1=true 
	FireSemiReady_as=true 
	O_serp_dried_as=true 
	CartouchePieceIn_piT_030=false 
	VideoConstr_as=true 
	OuniTalkCH3_as_001=true 
	KnowLili_me_017=true 
	ReadyToGo_as_001=true 
	PASER_UNCONSCIOUS=true 
	BrickMaker_Recognize_piM_014=true 
	O_morter_as_015=true 
	BoatmanTalking_piT_003=true 
	transition="Ball" 
	Left="empty" 
	O_Maillet_ptS_014=true 
	CrypteDoorOpened_piT_030=false 
	Excrements_as_004=true 
	PTAH_SET=true 
	FinishCH6_me=true 
	SISTRUM_BRONZE_MISSING=true 
	Bandeu_On_Anvil_ptS_003=false 
	ACTIVATE_4=true 
	FIRST_FORGE_ENTRACE=true 
	SquareBase_opened_ptS1_038=true 
	O_CoteauS_as_025=true 
	O_objetdelave_ptS_003=true 
	CRYPTE_PUZZLE_SOLVED=true 
	HSpell=true 
	TimeRunning_as_15=false 
	CartoucheIn_piT_030=true 
	O_scorpGiven_me_009=true 
	O_jarBroken_as_015=true 
	Paser_Sit_pt_0008=true 
	GodessAnimStart_me=false 
	TALK_TO_PASER=true 
	CarpetSide_as=true 
	First_Entrance_piT_021=true 
	Remedy_Done_as_015=true 
	DjerStandIn_piU_012=false 
	O_Dollerite1_pt_S2_033=true 
	UsedKnife_me_009=true 
	GuardHipnotized_me_004=true 
	O_rope_me_024=true 
	O_figCrue_as_007=true 
	O_formule_Serp_as_007=true 
	O_DoleriteBalls_ptS2_038=true 
	O_Dollerite2_pt_S2_033=false 
	FirstDjerTalk_piT_003=true 
	O_perf_me_009=true 
	ResetTimer_as_017=false 
	STICK_LIGHTED=false 
	O_frag_me_017=true 
	FIRST_TIME_SAW_PTAH=true 
	BeenIn_me_001=true 
	O_scorp_me_009=true 
	Wax_Given_pt_003=true 
	O_Bandeau_ptS_012=true 
	Sakhmet_key_ptS1_038=true 
	O_lighter_as_007=true 
	BeenIn_as_001=true 
	KnowName_me_004=true 
	CARTOUCHEPIECEGIVEN=true 
	CanOpen_as_016=true 
	FinishCH3_me=true 
	PurificationSpellOn=true 
	Imhotep_Moved_piM_010=true 
	FIRST_ENTER_PASSAGE1=true 
	O_knife_as_015=true 
	KhaemAnimPlaying=false 
	Ouni_Permission=true 
	O_Bastet_ptS2_031=true 
	Intro=true 
	Check_SomethingMoved_ptS1_038=true 
	Door_as_016=true 
	TuyaTest_as_015=true 
	Sakhmet_System_Up_ptS1_021=false 
	PaserDoorOpened_piT_018=true 
	BoatmanFirstTalk_piT_007=true 
	PutPlate_me_013=true 
	O_metal_me_018=true 
	ACTIVATE_3=true 
	FireConstruction_as=true 
	Cube="Right" 
	O_Dollerite1_pt_S2_031=false 
	O_Ouadjyt_ptS2_031=true 
	FirstBrickmakerTalk_piT_014=true 
	ACTIVATE_2=true 
	DWARF_WORKING=true 
	Tool_DoorRoom_Opened_piM_008=true 
	Right="Cube" 
	Center="empty" 
	TALK_FINAL_PTAH=true 
	SemiTest_as_015=false 
	TuyaLeft_as_015=true 
	SemiKnife_as=true 
	FIXED_ROPE=true 
	BoatMTalking_as_010=false 
	Slab_up_ptS1_038=false 
	TSpell=true 
	O_gouge_me_017=true

	PlaySound("Sounds/SFX/A_Water1.ogg",-1)
	SetMarker("Isis\\Warp_0004.wp",0,0)

	if not MusicIsis then
		PlayMusic("Sounds/Musiques/M_Quete1.ogg")
		MusicIsis=true
	end
	
	if not BeenIn_is_004 and not BeenIn_is_002  then
		LookAt(173,005)
		StartAnimationPart("I1I1",0,90,1,true)
		SetMarker("I1I1",4,0)
	elseif  not BeenIn_is_004 then
		StartAnimationPart("I1I1",60,90,-1,true)
		SetMarker("I1I1",4,0)
	end
	
	if not BeenIn_is_002 then
		
		DrawText("MAIA0712","MAIA0712.ogg")
		DrawText("MAIA0751","MAIA0751.ogg")
		DrawText("ISIS0752","ISIS0752.ogg")

		DrawText("MAIA0753","MAIA0753.ogg")
		DrawText("ISIS0726","ISIS0726.ogg")
			
		DrawText("ISIS0729","ISIS0729.ogg")
		DrawText("MAIA0780","MAIA0780.ogg")
		DrawText("ISIS0781","ISIS0781.ogg")
		BeenIn_is_002=true
	end
end

function OnWarpLeave()
end

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

function OnDialogFinished(dialogName)
	if dialogName=="ISIS0718" or dialogName=="ISIS0791" or dialogName=="ISIS0720"  then
		AskSeparation()
	end
	if dialogName=="ISIS0729" then 
		if not MagNet_is then 
			MagNet_is=true
		end
	end 

end

function AskSeparation()
        PushAnswer("MAIA0717")
        PushAnswer("MAIA0788")
	PushAnswer("MAIA0719")
        PushAnswer("MAIA0757")
end

function OnAnswered(textId)

	if textId == "MAIA0717" then
		DrawText("MAIA0717","MAIA0717.ogg")
		DrawText("ISIS0718","ISIS0718.ogg")	

	elseif textId == "MAIA0788" then
		DrawText("MAIA0788","MAIA0788.ogg")
		DrawText("ISIS0789","ISIS0789.ogg")
		DrawText("MAIA0790","MAIA0790.ogg")
		DrawText("ISIS0791","ISIS0791.ogg")
		

	elseif textId == "MAIA0719" then
		DrawText("MAIA0719","MAIA0719.ogg")
		DrawText("ISIS0720","ISIS0720.ogg")
		

	elseif textId == "MAIA0757" then
		DrawText("MAIA0757","MAIA0757.ogg")

	end
end

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

------------------------------------------------------------
	elseif objectName == "g2I1" then

------------------------------------------------------------
	elseif objectName == "n1I1" then

------------------------------------------------------------
	elseif objectName == "n2I1" then

------------------------------------------------------------
	elseif objectName == "s1I1" then

------------------------------------------------------------
	elseif objectName == "s2I1" then

------------------------------------------------------------
	elseif objectName == "I1I1" then
		
		AskSeparation()
		
------------------------------------------------------------
	elseif objectName == "l1I1" then
	end
	if objectName=="3D\\Isis\\Warp_0004.wp" then
		ChangeWarp(objectName)
	end
end
