@LabelIndex 104056
@StringIndex 12177
class 0 raid_naia_shambler : wizard_basic {
parameter:
	int	babble_mode = 0;
	int	IsAggressive = 1;
	int	Aggressive_Time = 1;
	int	aspect_myself = 0;
	string	door_defeated = "";
	string	my_maker_name = "gludio59_1825_naia01m1";
	int	Skill01_ID = 458752001;
	int	Skill01_Probablity = 10000;
	int	Skill01_FStringRate = 0;
	int	Skill01_MainAttack = 1;
	int	Skill02_ID = 458752001;
	int	Skill02_Probablity = 5000;
	int	Skill02_HPTarget = 0;
	int	Skill02_HighHP = 50;
	int	Skill02_MainAttack = 0;
	int	Skill03_ID = 458752001;
	int	Skill03_Probablity = 10000;
	int	Skill03_MainAttack = 1;
	int	Skill04_ID = 458752001;
	int	Skill04_Probablity = 5000;
	int	Skill04_Target = 3;
	int	Skill04_Type = 3;
	float	Skill04_Desire = 1000000.000000;
	int	Skill04_HPTarget = 0;
	int	Skill04_HighHP = 10;
	string	PrivatesFire3 = "naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec";
	string	PrivatesFire6 = "naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec";
	string	PrivatesFire12 = "naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0secnaia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec;naia_spore_fire:naia_spore_fire:1:0sec";
	string	PrivatesWater3 = "naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec";
	string	PrivatesWater6 = "naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec";
	string	PrivatesWater12 = "naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec;naia_spore_water:naia_spore_water:1:0sec";
	string	PrivatesWind3 = "naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec";
	string	PrivatesWind6 = "naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec";
	string	PrivatesWind12 = "naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec;naia_spore_wind:naia_spore_wind:1:0sec";
	string	PrivatesEarth3 = "naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec";
	string	PrivatesEarth6 = "naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec";
	string	PrivatesEarth12 = "naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec;naia_spore_earth:naia_spore_earth:1:0sec";
	int	merge1_x = -45488;
	int	merge1_y = 246768;
	int	merge1_z = -14183;
	int	merge2_x = -44767;
	int	merge2_y = 247419;
	int	merge2_z = -14183;
	int	merge3_x = -46207;
	int	merge3_y = 247417;
	int	merge3_z = -14183;
	int	merge4_x = -45462;
	int	merge4_y = 248174;
	int	merge4_z = -14183;

handler:
	EventHandler CREATED() {
		myself.i_ai0 = gg::FloatToInt(myself.sm.max_hp);
		myself::AddTimerEx(78001,( 10 * 1000 ));
		myself.i_ai2 = 0;
		myself::AddTimerEx(78003,( ( 10 * 60 ) * 1000 ));
		myself::EffectMusic(myself.sm,4000,"Rm01_A");
		super;
	}

	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2,script_event_arg3) {
		if( script_event_arg1 == 78010031 ) {
			if( babble_mode == 1 ) {
				myself::Shout("  : " + script_event_arg2 + "  !");
			}
			switch(script_event_arg2) {
				case 1: {
					myself::InstantTeleport(myself.sm,merge1_x,merge1_y,merge1_z);
					break;
				}
				case 2: {
					myself::InstantTeleport(myself.sm,merge2_x,merge2_y,merge2_z);
					break;
				}
				case 3: {
					myself::InstantTeleport(myself.sm,merge3_x,merge3_y,merge3_z);
					break;
				}
				case 4: {
					myself::InstantTeleport(myself.sm,merge3_x,merge3_y,merge3_z);
					break;
				}
			}
		} else if( script_event_arg1 == 78010043 && script_event_arg2 == 99 ) {
			myself.i_ai2 = ( myself.i_ai2 - 1 );
			if( babble_mode == 1 ) {
				myself::Shout("  " + gg::IntToStr(myself.i_ai2));
			}
		}
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id,maker0,private,f0,f1) {
		if( timer_id == 78001 ) {
			if( gg::Rand(1000) > 250 ) {
				f0 = myself.sm.hp;
				f1 = myself.sm.max_hp;
				myself.i_ai1 = gg::FloatToInt(( ( ( myself.i_ai0 - gg::FloatToInt(f0) ) / gg::FloatToInt(f1) ) * 100 ));
				if( myself.i_ai1 > 5 && myself.i_ai1 <= 15 ) {
					if( babble_mode == 1 ) {
						myself::Shout(" +  3 ");
					}
					myself::RemoveAllDesire();
					myself::AddUseSkillDesire(myself.sm,Skill02_ID,0,1,10000000000);
					if( myself.i_ai2 <= 9 ) {
						myself.i_ai2 = ( myself.i_ai2 + 3 );
						if( babble_mode == 1 ) {
							myself::Shout(" :   " + gg::IntToStr(myself.i_ai2));
						}
						switch(aspect_myself) {
							case 0: {
								myself::CreatePrivates(PrivatesFire3);
								break;
							}
							case 1: {
								myself::CreatePrivates(PrivatesWater3);
								break;
							}
							case 2: {
								myself::CreatePrivates(PrivatesWind3);
								break;
							}
							case 3: {
								myself::CreatePrivates(PrivatesEarth3);
								break;
							}
						}
					} else if( babble_mode == 1 ) {
						myself::Shout("  - ");
					}
					myself::BroadcastScriptEvent(78010043,3,5000);
				} else if( ( myself.i_ai1 > 15 && myself.i_ai1 <= 30 ) || ( myself.i_ai1 > 1 && myself.i_ai1 <= 5 ) ) {
					if( babble_mode == 1 ) {
						myself::Shout(" +  6 ");
					}
					myself::RemoveAllDesire();
					myself::AddUseSkillDesire(myself.sm,Skill02_ID,0,1,10000000000);
					if( myself.i_ai2 <= 6 ) {
						myself.i_ai2 = ( myself.i_ai2 + 6 );
						if( babble_mode == 1 ) {
							myself::Shout(" :   " + gg::IntToStr(myself.i_ai2));
						}
						switch(aspect_myself) {
							case 0: {
								myself::CreatePrivates(PrivatesFire6);
								break;
							}
							case 1: {
								myself::CreatePrivates(PrivatesWater6);
								break;
							}
							case 2: {
								myself::CreatePrivates(PrivatesWind6);
								break;
							}
							case 3: {
								myself::CreatePrivates(PrivatesEarth6);
								break;
							}
						}
					} else if( babble_mode == 1 ) {
						myself::Shout("  - ");
					}
					myself::BroadcastScriptEvent(78010043,6,5000);
				} else if( babble_mode == 1 ) {
					myself::Shout(" +  12 ");
				}
				myself::RemoveAllDesire();
				myself::AddUseSkillDesire(myself.sm,Skill02_ID,0,1,10000000000);
				if( myself.i_ai2 == 0 ) {
					myself.i_ai2 = ( myself.i_ai2 + 12 );
					if( babble_mode == 1 ) {
						myself::Shout(" :   " + gg::IntToStr(myself.i_ai2));
					}
					switch(aspect_myself) {
						case 0: {
							myself::CreatePrivates(PrivatesFire12);
							break;
						}
						case 1: {
							myself::CreatePrivates(PrivatesWater12);
							break;
						}
						case 2: {
							myself::CreatePrivates(PrivatesWind12);
							break;
						}
						case 3: {
							myself::CreatePrivates(PrivatesEarth12);
							break;
						}
					}
				} else if( babble_mode == 1 ) {
					myself::Shout("  - ");
				}
				myself::BroadcastScriptEvent(78010043,12,5000);
				myself.i_ai0 = gg::FloatToInt(myself.sm.hp);
			}
			myself::AddTimerEx(78001,( 10 * 1000 ));
		} else if( timer_id == 78003 ) {
			if( myself.p_state == 1 || myself.p_state == 2 || myself.p_state == 11 || myself.p_state == 0 ) {
				maker0 = gg::GetNpcMaker(my_maker_name);
				if( gg::IsNull(maker0) == 0 ) {
					gg::SendMakerScriptEvent(maker0,78010035,0,0);
				}
			} else {
				myself::AddTimerEx(78003,( ( 10 * 60 ) * 1000 ));
			}
		}
		super;
	}

	EventHandler PARTY_DIED(private) {
		if( private != myself.sm ) {
			myself.i_ai2 = ( myself.i_ai2 - 1 );
			if( babble_mode == 1 ) {
				myself::Shout("  " + gg::IntToStr(myself.i_ai2));
			}
		}
		super;
	}

	EventHandler MY_DYING(maker0) {
		myself::CreateOnePrivateEx(1032376,"cube_for_naia",0,0,-45482,246277,-14184,0,0,0,0);
		if( babble_mode == 1 ) {
			myself::Shout("  ");
		}
		super;
	}

	EventHandler OUT_OF_TERRITORY() {
	}

}
