IF
	Global("Cb_DoorMagicOpen","AR3544",1)
	!Range([GOODCUTOFF],10)
THEN
	RESPONSE #100
		CloseDoor("DoorMagic")
		Lock("DoorMagic")
		SetGlobal("Cb_DoorMagicOpen","AR3544",0)
END

IF
	IsOverMe([GOODCUTOFF])
	!GlobalTimerNotExpired("Cb_DoorMagic","AR3544")
	Global("Cb_DoorMagicOpen","AR3544",0)
	OR(73)
		HasItem("POTN02",LastTrigger)
		HasItem("POTN03",LastTrigger)
		HasItem("POTN04",LastTrigger)
		HasItem("POTN05",LastTrigger)
		HasItem("POTN06",LastTrigger)
		HasItem("POTN07",LastTrigger)
		HasItem("POTN08",LastTrigger)
		HasItem("POTN09",LastTrigger)
		HasItem("POTN10",LastTrigger)
		HasItem("POTN11",LastTrigger)
		HasItem("POTN12",LastTrigger)
		HasItem("POTN13",LastTrigger)
		HasItem("POTN14",LastTrigger)
		HasItem("POTN15",LastTrigger)
		HasItem("POTN16",LastTrigger)
		HasItem("POTN17",LastTrigger)
		HasItem("POTN18",LastTrigger)
		HasItem("POTN19",LastTrigger)
		HasItem("POTN20",LastTrigger)
		HasItem("POTN21",LastTrigger)
		HasItem("POTN22",LastTrigger)
		HasItem("POTN23",LastTrigger)
		HasItem("POTN24",LastTrigger)
		HasItem("POTN25",LastTrigger)
		HasItem("POTN26",LastTrigger)
		HasItem("POTN27",LastTrigger)
		HasItem("POTN28",LastTrigger)
		HasItem("POTN29",LastTrigger)
		HasItem("POTN30",LastTrigger)
		HasItem("POTN31",LastTrigger)
		HasItem("POTN32",LastTrigger)
		HasItem("POTN33",LastTrigger)
		HasItem("POTN34",LastTrigger)
		HasItem("POTN35",LastTrigger)
		HasItem("POTN36",LastTrigger)
		HasItem("POTN37",LastTrigger)
		HasItem("POTN38",LastTrigger)
		HasItem("POTN39",LastTrigger)
		HasItem("POTN40",LastTrigger)
		HasItem("POTN41",LastTrigger)
		HasItem("POTN42",LastTrigger)
		HasItem("POTN43",LastTrigger)
		HasItem("POTN44",LastTrigger)
		HasItem("POTN45",LastTrigger)
		HasItem("POTN46",LastTrigger)
		HasItem("POTN47",LastTrigger)
		HasItem("POTN48",LastTrigger)
		HasItem("POTN49",LastTrigger)
		HasItem("POTN50",LastTrigger)
		HasItem("POTN51",LastTrigger)
		HasItem("POTN52",LastTrigger)
		HasItem("POTN53",LastTrigger)
		HasItem("POTN54",LastTrigger)
		HasItem("POTN55",LastTrigger)
		HasItem("POTN56",LastTrigger)
		HasItem("WAND02",LastTrigger)
		HasItem("WAND03",LastTrigger)
		HasItem("WAND04",LastTrigger)
		HasItem("WAND05",LastTrigger)
		HasItem("WAND06",LastTrigger)
		HasItem("WAND07",LastTrigger)
		HasItem("WAND08",LastTrigger)
		HasItem("WAND09",LastTrigger)
		HasItem("WAND10",LastTrigger)
		HasItem("WAND11",LastTrigger)
		HasItem("WAND12",LastTrigger)
		HasItem("WAND13",LastTrigger)
		HasItem("WAND14",LastTrigger)
		HasItem("WAND15",LastTrigger)
		HasItem("WAND16",LastTrigger)
		HasItem("WAND17",LastTrigger)
		HasItem("WAND18",LastTrigger)
		HasItem("WAND19",LastTrigger)
THEN
	RESPONSE #100
		SetGlobalTimer("Cb_DoorMagic","AR3544",10)
		DisplayString(LastTrigger,@550028)
END

IF
	IsOverMe([GOODCUTOFF])
	!GlobalTimerNotExpired("Cb_DoorMagic","AR3544")
	Global("Cb_DoorMagicOpen","AR3544",0)
	!HasItem("POTN02",LastTrigger)
	!HasItem("POTN03",LastTrigger) 
	!HasItem("POTN04",LastTrigger) 
	!HasItem("POTN05",LastTrigger) 
	!HasItem("POTN06",LastTrigger) 
	!HasItem("POTN07",LastTrigger) 
	!HasItem("POTN08",LastTrigger) 
	!HasItem("POTN09",LastTrigger) 
	!HasItem("POTN10",LastTrigger) 
	!HasItem("POTN11",LastTrigger) 
	!HasItem("POTN12",LastTrigger) 
	!HasItem("POTN13",LastTrigger) 
	!HasItem("POTN14",LastTrigger) 
	!HasItem("POTN15",LastTrigger) 
	!HasItem("POTN16",LastTrigger) 
	!HasItem("POTN17",LastTrigger) 
	!HasItem("POTN18",LastTrigger) 
	!HasItem("POTN19",LastTrigger) 
	!HasItem("POTN20",LastTrigger) 
	!HasItem("POTN21",LastTrigger) 
	!HasItem("POTN22",LastTrigger) 
	!HasItem("POTN23",LastTrigger) 
	!HasItem("POTN24",LastTrigger) 
	!HasItem("POTN25",LastTrigger) 
	!HasItem("POTN26",LastTrigger) 
	!HasItem("POTN27",LastTrigger) 
	!HasItem("POTN28",LastTrigger) 
	!HasItem("POTN29",LastTrigger) 
	!HasItem("POTN30",LastTrigger) 
	!HasItem("POTN31",LastTrigger) 
	!HasItem("POTN32",LastTrigger) 
	!HasItem("POTN33",LastTrigger) 
	!HasItem("POTN34",LastTrigger) 
	!HasItem("POTN35",LastTrigger) 
	!HasItem("POTN36",LastTrigger) 
	!HasItem("POTN37",LastTrigger) 
	!HasItem("POTN38",LastTrigger) 
	!HasItem("POTN39",LastTrigger) 
	!HasItem("POTN40",LastTrigger) 
	!HasItem("POTN41",LastTrigger) 
	!HasItem("POTN42",LastTrigger) 
	!HasItem("POTN43",LastTrigger) 
	!HasItem("POTN44",LastTrigger) 
	!HasItem("POTN45",LastTrigger) 
	!HasItem("POTN46",LastTrigger) 
	!HasItem("POTN47",LastTrigger) 
	!HasItem("POTN48",LastTrigger) 
	!HasItem("POTN49",LastTrigger)
	!HasItem("POTN50",LastTrigger)
	!HasItem("POTN51",LastTrigger)
	!HasItem("POTN52",LastTrigger) 
	!HasItem("POTN53",LastTrigger) 
	!HasItem("POTN54",LastTrigger) 
	!HasItem("POTN55",LastTrigger) 
	!HasItem("POTN56",LastTrigger) 
	!HasItem("WAND02",LastTrigger) 
	!HasItem("WAND03",LastTrigger) 
	!HasItem("WAND04",LastTrigger) 
	!HasItem("WAND05",LastTrigger) 
	!HasItem("WAND06",LastTrigger) 
	!HasItem("WAND07",LastTrigger) 
	!HasItem("WAND08",LastTrigger) 
	!HasItem("WAND09",LastTrigger) 
	!HasItem("WAND10",LastTrigger) 
	!HasItem("WAND11",LastTrigger) 
	!HasItem("WAND12",LastTrigger) 
	!HasItem("WAND13",LastTrigger) 
	!HasItem("WAND14",LastTrigger) 
	!HasItem("WAND15",LastTrigger) 
	!HasItem("WAND16",LastTrigger) 
	!HasItem("WAND17",LastTrigger) 
	!HasItem("WAND18",LastTrigger) 
	!HasItem("WAND19",LastTrigger)
THEN
	RESPONSE #100
		DisplayString(LastTrigger,@550029)
		Unlock("DoorMagic")
		OpenDoor("DoorMagic")
		SetGlobalTimer("Cb_DoorMagic","AR3544",20)
		SetGlobal("Cb_DoorMagicOpen","AR3544",1)
END


