@LabelIndex 54126
@StringIndex 0
class 0 sanctuary_door_guard_basic : citizen {
parameter:
	int	Pass1 = 8064;
	int	Pass2 = 8065;
	int	Pass3 = 8067;
	string	DoorName = "sanctuary_door_guard_basic_default";
	string	GateOpenHTML = "sanctuary_door_guard002.htm";
	string	GateOpenFailHTML = "sanctuary_door_guard003.htm";

handler:
	EventHandler TALKED(talker) {
		myself::ShowPage(talker,fnHi);
		super;
	}

	EventHandler MENU_SELECTED(talker,ask,reply) {
		if( ask == 502 && reply == 1 ) {
			if( gg::OwnItemCount(talker,Pass1) >= 1 || gg::OwnItemCount(talker,Pass2) >= 1 || gg::OwnItemCount(talker,Pass3) >= 1 ) {
				gg::Castle_GateOpenClose2(DoorName,0);
				myself::ShowPage(talker,GateOpenHTML);
			} else {
				myself::ShowPage(talker,GateOpenFailHTML);
			}
		}
		super;
	}

}
