@LabelIndex 426310
@StringIndex 0
class 1 cleft_maker : default_maker {
parameter:

handler:
	EventHandler ON_TIMER(timer_id,i0,i1,maker0,def0,s0) {
		if( timer_id == 1000 ) {
			maker0 = gg::GetNpcMaker(myself.name);
			if( gg::IsNull(maker0) == 0 && myself.i_ai0 == 0 ) {
				gg::SendMakerScriptEvent(maker0,1001,0,0);
			}
			myself.enabled = 1;
		}
	}

	EventHandler ON_NPC_DELETED(deleted_def,i0,i1,maker0,reply) {
		if( myself.enabled == 0 ) {
			return;
		}
		if( deleted_def.respawn_time != 0 ) {
			if( myself::AtomicIncreaseTotal(deleted_def,1,1) ) {
				deleted_def::Spawn2(1,deleted_def.respawn_time,deleted_def.respawn_rand);
			}
		}
	}

	EventHandler ON_SCRIPT_EVENT(script_event_arg1,script_event_arg2,script_event_arg3,def0,i0,i1,maker0) {
		if( script_event_arg1 == 10025 ) {
			myself.enabled = 0;
			for(i0 = 1; i0 < myself.def_count; i0++) {
				def0 = myself::GetSpawnDefine(i0);
				if( gg::IsNull(def0) == 0 ) {
					def0::Despawn();
				} else {
				}
			}
			myself::AddTimerEx(1000,( ( 3 * 60 ) * 1000 ));
		}
		if( script_event_arg1 == 1325001 ) {
			myself.enabled = 0;
			myself.i_ai0 = 1;
			for(i0 = 0; i0 < myself.def_count; i0++) {
				def0 = myself::GetSpawnDefine(i0);
				if( gg::IsNull(def0) == 0 ) {
					def0::Despawn();
				}
			}
		}
		if( script_event_arg1 == 1001 ) {
			myself.i_ai0 = 0;
		}
		super;
	}

}
