@LabelIndex 422236
@StringIndex 0
class 1 dark_house_pathway2_maker : inzone_door_open_maker {
parameter:
	string	c_doorname = "island_of_oracle_e";
	string	d_doorname = "island_of_oracle_f";
	string	a_pathway_doorname = "island_of_oracle_d";
	string	DoorName = "island_of_oracle_d";

handler:
	EventHandler ON_START(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,def0) {
		myself.i_ai0 = 0;
		super;
	}

	EventHandler ON_ALL_NPC_DELETED(i0,def0,maker0) {
		if( myself.i_ai0 == 0 ) {
			gg::Castle_GateOpenCloseEx(c_doorname,0,myself::GetInZoneID());
		} else if( myself.i_ai0 == 1 ) {
			gg::Castle_GateOpenCloseEx(d_doorname,0,myself::GetInZoneID());
		}
	}

	EventHandler ON_SCRIPT_EVENT(script_event_arg1,script_event_arg2,script_event_arg3,def0,i0,i1) {
		switch(script_event_arg1) {
			case 1001: {
				myself.i_ai0 = script_event_arg3;
				for(i0 = 0; i0 < myself.def_count; i0++) {
					def0 = myself::GetSpawnDefine(i0);
					if( gg::IsNull(def0) == 0 ) {
						i1 = ( def0.total - def0.npc_count );
						if( i1 > 0 ) {
							if( myself::AtomicIncreaseTotal(def0,i1,1) ) {
								def0::Spawn2(i1,script_event_arg2,0);
							}
						}
					}
				}
				break;
			}
		}
	}

}
