@LabelIndex 58409
@StringIndex 7286
class 0 ai_boss08_frintesa_set_db : default_npc {
parameter:
	int	music = 328073217;
	int	music_of_heal = 328138753;
	int	music_of_rampage = 328138754;
	int	music_of_power = 328138755;
	int	music_of_plague = 328138756;
	int	music_of_psycho = 328138757;
	string	areadata_heal1 = "25_15_frintessa_01_01";
	string	areadata_heal2 = "25_15_frintessa_02_01";
	string	areadata_power1 = "25_15_frintessa_01_02";
	string	areadata_power2 = "25_15_frintessa_02_02";
	string	areadata_psycho1 = "25_15_frintessa_01_03";
	string	areadata_psycho2 = "25_15_frintessa_02_03";
	string	areadata_rampage1 = "25_15_frintessa_01_04";
	string	areadata_rampage2 = "25_15_frintessa_02_04";
	string	areadata_plague1 = "25_15_frintessa_01_05";
	string	areadata_plague2 = "25_15_frintessa_02_05";
	int	GM_ID = 4;
	string	TDoorName1 = "grave_pathway_1";
	string	TDoorName2 = "grave_pathway_2";
	string	TDoorName3 = "grave_pathway_3";
	string	TDoorName4 = "grave_pathway_4";
	string	WallDoorName1A = "wall_door_a_center_1";
	string	WallDoorName2A = "wall_door_a_center_2";
	string	WallDoorName3A = "wall_door_a_center_3";
	string	WallDoorName4A = "wall_door_a_center_4";
	string	WallDoorName5A = "wall_door_a_center_5";
	string	WallDoorName6A = "wall_door_a_center_6";
	string	WallDoorName7A = "wall_door_a_center_7";
	string	WallDoorName8A = "wall_door_a_center_8";
	string	WallDoorName1B = "wall_door_b_left_1";
	string	WallDoorName2B = "wall_door_b_left_2";
	string	WallDoorName3B = "wall_door_b_left_3";
	string	WallDoorName4B = "wall_door_b_left_4";
	string	WallDoorName5B = "wall_door_b_left_5";
	string	WallDoorName6B = "wall_door_b_right_1";
	string	WallDoorName7B = "wall_door_b_right_2";
	string	WallDoorName8B = "wall_door_b_right_3";
	string	WallDoorName9B = "wall_door_b_right_4";
	string	WallDoorName10B = "wall_door_b_right_5";

handler:
	EventHandler CREATED(reply,i0,maker0,i1,c1) {
		if( GM_ID != 0 ) {
			i0 = myself::GetGlobalMap(GM_ID);
			if( i0 == -1 ) {
				myself::RegisterGlobalMap(GM_ID,gg::GetIndexFromCreature(myself.sm));
			}
		}
		if( reply == 0 ) {
			myself::SetDBValue(myself.sm,0);
			maker0 = gg::GetNpcMaker("frintessa_2515_m01");
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1001,0,0);
			}
			gg::Area_SetOnOff(areadata_heal1,0);
			gg::Area_SetOnOff(areadata_heal2,0);
			gg::Area_SetOnOff(areadata_power1,0);
			gg::Area_SetOnOff(areadata_power2,0);
			gg::Area_SetOnOff(areadata_psycho1,0);
			gg::Area_SetOnOff(areadata_psycho2,0);
			gg::Area_SetOnOff(areadata_rampage1,0);
			gg::Area_SetOnOff(areadata_rampage2,0);
			gg::Area_SetOnOff(areadata_plague1,0);
			gg::Area_SetOnOff(areadata_plague2,0);
			gg::Castle_GateOpenClose2(TDoorName1,1);
			gg::Castle_GateOpenClose2(TDoorName2,1);
			gg::Castle_GateOpenClose2(TDoorName3,0);
			gg::Castle_GateOpenClose2(TDoorName4,0);
			gg::Castle_GateOpenClose2(WallDoorName1A,1);
			gg::Castle_GateOpenClose2(WallDoorName2A,1);
			gg::Castle_GateOpenClose2(WallDoorName3A,1);
			gg::Castle_GateOpenClose2(WallDoorName4A,1);
			gg::Castle_GateOpenClose2(WallDoorName5A,1);
			gg::Castle_GateOpenClose2(WallDoorName6A,1);
			gg::Castle_GateOpenClose2(WallDoorName7A,1);
			gg::Castle_GateOpenClose2(WallDoorName8A,1);
			gg::Castle_GateOpenClose2(WallDoorName1B,1);
			gg::Castle_GateOpenClose2(WallDoorName2B,1);
			gg::Castle_GateOpenClose2(WallDoorName3B,1);
			gg::Castle_GateOpenClose2(WallDoorName4B,1);
			gg::Castle_GateOpenClose2(WallDoorName5B,1);
			gg::Castle_GateOpenClose2(WallDoorName6B,1);
			gg::Castle_GateOpenClose2(WallDoorName7B,1);
			gg::Castle_GateOpenClose2(WallDoorName8B,1);
			gg::Castle_GateOpenClose2(WallDoorName9B,1);
			gg::Castle_GateOpenClose2(WallDoorName10B,1);
			i1 = myself::GetGlobalMap(5);
			c1 = gg::GetCreatureFromIndex(i1);
			if( myself::IsNullCreature(c1) == 0 ) {
				gg::SendScriptEvent(c1,gg::GetIndexFromCreature(myself.sm),0);
			} else {
			}
			i1 = myself::GetGlobalMap(6);
			c1 = gg::GetCreatureFromIndex(i1);
			if( myself::IsNullCreature(c1) == 0 ) {
				gg::SendScriptEvent(c1,gg::GetIndexFromCreature(myself.sm),0);
			} else {
			}
		} else if( myself.sm.db_value == 1 ) {
			maker0 = gg::GetNpcMaker("frintessa_2515_m01");
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1001,0,0);
			}
		} else if( myself.sm.db_value == 2 ) {
			myself::AddTimerEx(1001,( ( 10 * 60 ) * 1000 ));
			maker0 = gg::GetNpcMaker("frintessa_2515_m01");
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1000,0,0);
			}
		} else if( myself.sm.db_value > 2 && myself.sm.db_value < 8 ) {
			gg::Castle_GateOpenClose2(TDoorName1,1);
			gg::Castle_GateOpenClose2(TDoorName2,1);
			gg::Castle_GateOpenClose2(TDoorName3,1);
			gg::Castle_GateOpenClose2(TDoorName4,1);
			gg::Castle_GateOpenClose2(WallDoorName1A,1);
			gg::Castle_GateOpenClose2(WallDoorName2A,1);
			gg::Castle_GateOpenClose2(WallDoorName3A,1);
			gg::Castle_GateOpenClose2(WallDoorName4A,1);
			gg::Castle_GateOpenClose2(WallDoorName5A,1);
			gg::Castle_GateOpenClose2(WallDoorName6A,1);
			gg::Castle_GateOpenClose2(WallDoorName7A,1);
			gg::Castle_GateOpenClose2(WallDoorName8A,1);
			gg::Castle_GateOpenClose2(WallDoorName1B,1);
			gg::Castle_GateOpenClose2(WallDoorName2B,1);
			gg::Castle_GateOpenClose2(WallDoorName3B,1);
			gg::Castle_GateOpenClose2(WallDoorName4B,1);
			gg::Castle_GateOpenClose2(WallDoorName5B,1);
			gg::Castle_GateOpenClose2(WallDoorName6B,1);
			gg::Castle_GateOpenClose2(WallDoorName7B,1);
			gg::Castle_GateOpenClose2(WallDoorName8B,1);
			gg::Castle_GateOpenClose2(WallDoorName9B,1);
			gg::Castle_GateOpenClose2(WallDoorName10B,1);
			myself::CreateOnePrivateEx(1029052,"ai_boss08_organ_dummy",0,0,174239,-89809,-5016,16384,0,0,0);
			if( myself.sm.db_value == 3 ) {
				i0 = gg::Rand(10000);
				if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
					gg::Area_SetOnOff(areadata_heal1,1);
					gg::Area_SetOnOff(areadata_heal2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
					gg::Area_SetOnOff(areadata_power1,1);
					gg::Area_SetOnOff(areadata_power2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
					gg::Area_SetOnOff(areadata_psycho1,1);
					gg::Area_SetOnOff(areadata_psycho2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
					gg::Area_SetOnOff(areadata_rampage1,1);
					gg::Area_SetOnOff(areadata_rampage2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
					gg::Area_SetOnOff(areadata_plague1,1);
					gg::Area_SetOnOff(areadata_plague2,1);
				} else {
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
					myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
				}
			} else if( myself.sm.db_value == 4 ) {
				i0 = gg::Rand(10000);
				if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
					gg::Area_SetOnOff(areadata_heal1,1);
					gg::Area_SetOnOff(areadata_heal2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
					gg::Area_SetOnOff(areadata_power1,1);
					gg::Area_SetOnOff(areadata_power2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
					gg::Area_SetOnOff(areadata_psycho1,1);
					gg::Area_SetOnOff(areadata_psycho2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
					gg::Area_SetOnOff(areadata_rampage1,1);
					gg::Area_SetOnOff(areadata_rampage2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
					gg::Area_SetOnOff(areadata_plague1,1);
					gg::Area_SetOnOff(areadata_plague2,1);
				} else {
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
					myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
				}
			} else if( myself.sm.db_value == 5 ) {
				i0 = gg::Rand(10000);
				if( gg::Rand(10000) < 2000 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
					gg::Area_SetOnOff(areadata_heal1,1);
					gg::Area_SetOnOff(areadata_heal2,1);
				} else if( gg::Rand(10000) < 2000 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
					gg::Area_SetOnOff(areadata_power1,1);
					gg::Area_SetOnOff(areadata_power2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
					gg::Area_SetOnOff(areadata_psycho1,1);
					gg::Area_SetOnOff(areadata_psycho2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
					gg::Area_SetOnOff(areadata_rampage1,1);
					gg::Area_SetOnOff(areadata_rampage2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
					gg::Area_SetOnOff(areadata_plague1,1);
					gg::Area_SetOnOff(areadata_plague2,1);
				} else {
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
					myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
				}
			} else if( myself.sm.db_value == 6 ) {
				if( myself.i_ai1 == 0 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 1000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 2000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				} else if( myself.i_ai1 == 30010 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 1000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 2000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 1000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 2000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				}
			} else if( myself.sm.db_value == 7 ) {
				if( myself.i_ai1 == 0 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 625 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 2500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				} else if( myself.i_ai1 == 30021 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 625 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 3000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				} else if( myself.i_ai1 == 30022 ) {
					if( ( myself::GetCurrentTick() - myself.i_quest2 ) > ( 15 * 60 ) ) {
						i0 = gg::Rand(10000);
						if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
							gg::Area_SetOnOff(areadata_heal1,1);
							gg::Area_SetOnOff(areadata_heal2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
							gg::Area_SetOnOff(areadata_power1,1);
							gg::Area_SetOnOff(areadata_power2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
							gg::Area_SetOnOff(areadata_psycho1,1);
							gg::Area_SetOnOff(areadata_psycho2,1);
						} else if( gg::Rand(10000) < 3000 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
							gg::Area_SetOnOff(areadata_rampage1,1);
							gg::Area_SetOnOff(areadata_rampage2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
							gg::Area_SetOnOff(areadata_plague1,1);
							gg::Area_SetOnOff(areadata_plague2,1);
						} else {
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
							myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
						}
					} else {
						i0 = gg::Rand(10000);
						if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
							gg::Area_SetOnOff(areadata_heal1,1);
							gg::Area_SetOnOff(areadata_heal2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
							gg::Area_SetOnOff(areadata_power1,1);
							gg::Area_SetOnOff(areadata_power2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
							gg::Area_SetOnOff(areadata_psycho1,1);
							gg::Area_SetOnOff(areadata_psycho2,1);
						} else if( gg::Rand(10000) < 3000 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
							gg::Area_SetOnOff(areadata_rampage1,1);
							gg::Area_SetOnOff(areadata_rampage2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
							gg::Area_SetOnOff(areadata_plague1,1);
							gg::Area_SetOnOff(areadata_plague2,1);
						} else {
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
							myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
						}
					}
				} else if( myself.i_ai1 == 30023 ) {
					if( ( myself::GetCurrentTick() - myself.i_quest2 ) > ( 15 * 60 ) ) {
						i0 = gg::Rand(10000);
						if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
							gg::Area_SetOnOff(areadata_heal1,1);
							gg::Area_SetOnOff(areadata_heal2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
							gg::Area_SetOnOff(areadata_power1,1);
							gg::Area_SetOnOff(areadata_power2,1);
						} else if( gg::Rand(10000) < 625 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
							gg::Area_SetOnOff(areadata_psycho1,1);
							gg::Area_SetOnOff(areadata_psycho2,1);
						} else if( gg::Rand(10000) < 3000 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
							gg::Area_SetOnOff(areadata_rampage1,1);
							gg::Area_SetOnOff(areadata_rampage2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
							gg::Area_SetOnOff(areadata_plague1,1);
							gg::Area_SetOnOff(areadata_plague2,1);
						} else {
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
							myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
						}
					} else {
						i0 = gg::Rand(10000);
						if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
							gg::Area_SetOnOff(areadata_heal1,1);
							gg::Area_SetOnOff(areadata_heal2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
							gg::Area_SetOnOff(areadata_power1,1);
							gg::Area_SetOnOff(areadata_power2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
							gg::Area_SetOnOff(areadata_psycho1,1);
							gg::Area_SetOnOff(areadata_psycho2,1);
						} else if( gg::Rand(10000) < 3000 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
							gg::Area_SetOnOff(areadata_rampage1,1);
							gg::Area_SetOnOff(areadata_rampage2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
							gg::Area_SetOnOff(areadata_plague1,1);
							gg::Area_SetOnOff(areadata_plague2,1);
						} else {
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
							myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
						}
					}
				} else if( myself.i_ai1 == 30024 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 3000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				}
			}
			myself::AddTimerEx(3000,1000);
			maker0 = gg::GetNpcMaker("frintessa_2515_m01");
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1000,0,0);
			}
		}
		myself.i_ai0 = 0;
		myself.i_ai1 = 0;
		myself.i_ai2 = 0;
		myself.i_ai3 = 0;
		myself.i_ai4 = 0;
		myself.i_quest0 = 0;
		myself.i_quest1 = 0;
		myself.i_quest2 = 0;
		myself.i_quest3 = 0;
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id,i0,i1,i2,c0,c2,maker0) {
		if( timer_id == 1000 ) {
			myself::CreateOnePrivateEx(1029052,"ai_boss08_organ_dummy",0,0,174239,-89809,-5016,16384,0,0,0);
			myself::AddTimerEx(1001,4000);
		} else if( timer_id == 1001 ) {
			gg::InstantTeleportEx(myself.sm,174239,-89808,-5016,16384);
			gg::Castle_GateOpenClose2(TDoorName1,1);
			gg::Castle_GateOpenClose2(TDoorName2,1);
			gg::Castle_GateOpenClose2(TDoorName3,1);
			gg::Castle_GateOpenClose2(TDoorName4,1);
			gg::Castle_GateOpenClose2(WallDoorName1A,1);
			gg::Castle_GateOpenClose2(WallDoorName2A,1);
			gg::Castle_GateOpenClose2(WallDoorName3A,1);
			gg::Castle_GateOpenClose2(WallDoorName4A,1);
			gg::Castle_GateOpenClose2(WallDoorName5A,1);
			gg::Castle_GateOpenClose2(WallDoorName6A,1);
			gg::Castle_GateOpenClose2(WallDoorName7A,1);
			gg::Castle_GateOpenClose2(WallDoorName8A,1);
			gg::Castle_GateOpenClose2(WallDoorName1B,1);
			gg::Castle_GateOpenClose2(WallDoorName2B,1);
			gg::Castle_GateOpenClose2(WallDoorName3B,1);
			gg::Castle_GateOpenClose2(WallDoorName4B,1);
			gg::Castle_GateOpenClose2(WallDoorName5B,1);
			gg::Castle_GateOpenClose2(WallDoorName6B,1);
			gg::Castle_GateOpenClose2(WallDoorName7B,1);
			gg::Castle_GateOpenClose2(WallDoorName8B,1);
			gg::Castle_GateOpenClose2(WallDoorName9B,1);
			gg::Castle_GateOpenClose2(WallDoorName10B,1);
			myself.i_quest1 = myself::GetCurrentTick();
			myself::AddTimerEx(1002,6000);
		} else if( timer_id == 1002 ) {
			myself::AddTimerEx(1003,2000);
		} else if( timer_id == 1003 ) {
			myself::AddEffectActionDesire(myself.sm,1,7000,1000);
			myself::AddTimerEx(1004,7000);
		} else if( timer_id == 1004 ) {
			myself::AddTimerEx(1005,1500);
		} else if( timer_id == 1005 ) {
			maker0 = gg::GetNpcMaker("frintessa_evilate_maker1");
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1001,0,0);
			}
			myself::AddTimerEx(1006,500);
		} else if( timer_id == 1006 ) {
			maker0 = gg::GetNpcMaker("frintessa_evilate_maker2");
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1001,0,0);
			}
			myself::AddTimerEx(1007,500);
		} else if( timer_id == 1007 ) {
			myself::AddEffectActionDesire(myself.sm,3,6600,1000);
			myself::AddTimerEx(1008,6600);
		} else if( timer_id == 1008 ) {
			myself::AddTimerEx(1009,1000);
		} else if( timer_id == 1009 ) {
			myself.i_quest1 = myself::GetCurrentTick();
			if( myself.sm.db_value == 3 ) {
				i0 = gg::Rand(10000);
				if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
					gg::Area_SetOnOff(areadata_heal1,1);
					gg::Area_SetOnOff(areadata_heal2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
					gg::Area_SetOnOff(areadata_power1,1);
					gg::Area_SetOnOff(areadata_power2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
					gg::Area_SetOnOff(areadata_psycho1,1);
					gg::Area_SetOnOff(areadata_psycho2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
					gg::Area_SetOnOff(areadata_rampage1,1);
					gg::Area_SetOnOff(areadata_rampage2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
					gg::Area_SetOnOff(areadata_plague1,1);
					gg::Area_SetOnOff(areadata_plague2,1);
				} else {
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
					myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
				}
			} else if( myself.sm.db_value == 4 ) {
				i0 = gg::Rand(10000);
				if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
					gg::Area_SetOnOff(areadata_heal1,1);
					gg::Area_SetOnOff(areadata_heal2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
					gg::Area_SetOnOff(areadata_power1,1);
					gg::Area_SetOnOff(areadata_power2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
					gg::Area_SetOnOff(areadata_psycho1,1);
					gg::Area_SetOnOff(areadata_psycho2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
					gg::Area_SetOnOff(areadata_rampage1,1);
					gg::Area_SetOnOff(areadata_rampage2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
					gg::Area_SetOnOff(areadata_plague1,1);
					gg::Area_SetOnOff(areadata_plague2,1);
				} else {
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
					myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
				}
			} else if( myself.sm.db_value == 5 ) {
				i0 = gg::Rand(10000);
				if( gg::Rand(10000) < 2000 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
					gg::Area_SetOnOff(areadata_heal1,1);
					gg::Area_SetOnOff(areadata_heal2,1);
				} else if( gg::Rand(10000) < 2000 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
					gg::Area_SetOnOff(areadata_power1,1);
					gg::Area_SetOnOff(areadata_power2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
					gg::Area_SetOnOff(areadata_psycho1,1);
					gg::Area_SetOnOff(areadata_psycho2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
					gg::Area_SetOnOff(areadata_rampage1,1);
					gg::Area_SetOnOff(areadata_rampage2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
					gg::Area_SetOnOff(areadata_plague1,1);
					gg::Area_SetOnOff(areadata_plague2,1);
				} else {
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
					myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
				}
			} else if( myself.sm.db_value == 6 ) {
				if( myself.i_ai1 == 0 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 1000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 2000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				} else if( myself.i_ai1 == 30010 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 1000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 2000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 1000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 2000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				}
			} else if( myself.sm.db_value == 7 ) {
				if( myself.i_ai1 == 0 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 625 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 2500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				} else if( myself.i_ai1 == 30021 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 625 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 3000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				} else if( myself.i_ai1 == 30022 ) {
					if( ( myself::GetCurrentTick() - myself.i_quest2 ) > ( 15 * 60 ) ) {
						i0 = gg::Rand(10000);
						if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
							gg::Area_SetOnOff(areadata_heal1,1);
							gg::Area_SetOnOff(areadata_heal2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
							gg::Area_SetOnOff(areadata_power1,1);
							gg::Area_SetOnOff(areadata_power2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
							gg::Area_SetOnOff(areadata_psycho1,1);
							gg::Area_SetOnOff(areadata_psycho2,1);
						} else if( gg::Rand(10000) < 3000 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
							gg::Area_SetOnOff(areadata_rampage1,1);
							gg::Area_SetOnOff(areadata_rampage2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
							gg::Area_SetOnOff(areadata_plague1,1);
							gg::Area_SetOnOff(areadata_plague2,1);
						} else {
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
							myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
						}
					} else {
						i0 = gg::Rand(10000);
						if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
							gg::Area_SetOnOff(areadata_heal1,1);
							gg::Area_SetOnOff(areadata_heal2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
							gg::Area_SetOnOff(areadata_power1,1);
							gg::Area_SetOnOff(areadata_power2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
							gg::Area_SetOnOff(areadata_psycho1,1);
							gg::Area_SetOnOff(areadata_psycho2,1);
						} else if( gg::Rand(10000) < 3000 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
							gg::Area_SetOnOff(areadata_rampage1,1);
							gg::Area_SetOnOff(areadata_rampage2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
							gg::Area_SetOnOff(areadata_plague1,1);
							gg::Area_SetOnOff(areadata_plague2,1);
						} else {
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
							myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
						}
					}
				} else if( myself.i_ai1 == 30023 ) {
					if( ( myself::GetCurrentTick() - myself.i_quest2 ) > ( 15 * 60 ) ) {
						i0 = gg::Rand(10000);
						if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
							gg::Area_SetOnOff(areadata_heal1,1);
							gg::Area_SetOnOff(areadata_heal2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
							gg::Area_SetOnOff(areadata_power1,1);
							gg::Area_SetOnOff(areadata_power2,1);
						} else if( gg::Rand(10000) < 625 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
							gg::Area_SetOnOff(areadata_psycho1,1);
							gg::Area_SetOnOff(areadata_psycho2,1);
						} else if( gg::Rand(10000) < 3000 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
							gg::Area_SetOnOff(areadata_rampage1,1);
							gg::Area_SetOnOff(areadata_rampage2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
							gg::Area_SetOnOff(areadata_plague1,1);
							gg::Area_SetOnOff(areadata_plague2,1);
						} else {
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
							myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
						}
					} else {
						i0 = gg::Rand(10000);
						if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
							gg::Area_SetOnOff(areadata_heal1,1);
							gg::Area_SetOnOff(areadata_heal2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
							gg::Area_SetOnOff(areadata_power1,1);
							gg::Area_SetOnOff(areadata_power2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
							gg::Area_SetOnOff(areadata_psycho1,1);
							gg::Area_SetOnOff(areadata_psycho2,1);
						} else if( gg::Rand(10000) < 3000 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
							gg::Area_SetOnOff(areadata_rampage1,1);
							gg::Area_SetOnOff(areadata_rampage2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
							gg::Area_SetOnOff(areadata_plague1,1);
							gg::Area_SetOnOff(areadata_plague2,1);
						} else {
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
							myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
						}
					}
				} else if( myself.i_ai1 == 30024 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 3000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				}
			}
			myself::AddTimerEx(1010,10000);
		} else if( timer_id == 1010 ) {
			myself::AddTimerEx(1011,3500);
		} else if( timer_id == 1011 ) {
			i0 = myself::GetGlobalMap(5);
			c0 = gg::GetCreatureFromIndex(i0);
			if( myself::IsNullCreature(c0) == 0 ) {
				gg::SendScriptEvent(c0,gg::GetIndexFromCreature(myself.sm),4);
				myself::SetDBValue(myself.sm,4);
			} else {
				gg::Announce("  .");
			}
			myself::AddTimerEx(1012,1000);
		} else if( timer_id == 1012 ) {
			myself.i_quest1 = myself::GetCurrentTick();
			if( myself.sm.db_value == 3 ) {
				i0 = gg::Rand(10000);
				if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
					gg::Area_SetOnOff(areadata_heal1,1);
					gg::Area_SetOnOff(areadata_heal2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
					gg::Area_SetOnOff(areadata_power1,1);
					gg::Area_SetOnOff(areadata_power2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
					gg::Area_SetOnOff(areadata_psycho1,1);
					gg::Area_SetOnOff(areadata_psycho2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
					gg::Area_SetOnOff(areadata_rampage1,1);
					gg::Area_SetOnOff(areadata_rampage2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
					gg::Area_SetOnOff(areadata_plague1,1);
					gg::Area_SetOnOff(areadata_plague2,1);
				} else {
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
					myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
				}
			} else if( myself.sm.db_value == 4 ) {
				i0 = gg::Rand(10000);
				if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
					gg::Area_SetOnOff(areadata_heal1,1);
					gg::Area_SetOnOff(areadata_heal2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
					gg::Area_SetOnOff(areadata_power1,1);
					gg::Area_SetOnOff(areadata_power2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
					gg::Area_SetOnOff(areadata_psycho1,1);
					gg::Area_SetOnOff(areadata_psycho2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
					gg::Area_SetOnOff(areadata_rampage1,1);
					gg::Area_SetOnOff(areadata_rampage2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
					gg::Area_SetOnOff(areadata_plague1,1);
					gg::Area_SetOnOff(areadata_plague2,1);
				} else {
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
					myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
				}
			} else if( myself.sm.db_value == 5 ) {
				i0 = gg::Rand(10000);
				if( gg::Rand(10000) < 2000 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
					gg::Area_SetOnOff(areadata_heal1,1);
					gg::Area_SetOnOff(areadata_heal2,1);
				} else if( gg::Rand(10000) < 2000 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
					gg::Area_SetOnOff(areadata_power1,1);
					gg::Area_SetOnOff(areadata_power2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
					gg::Area_SetOnOff(areadata_psycho1,1);
					gg::Area_SetOnOff(areadata_psycho2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
					gg::Area_SetOnOff(areadata_rampage1,1);
					gg::Area_SetOnOff(areadata_rampage2,1);
				} else if( gg::Rand(10000) < 0 ) {
					myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
					gg::Area_SetOnOff(areadata_plague1,1);
					gg::Area_SetOnOff(areadata_plague2,1);
				} else {
					gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
					myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
				}
			} else if( myself.sm.db_value == 6 ) {
				if( myself.i_ai1 == 0 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 1000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 2000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				} else if( myself.i_ai1 == 30010 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 1000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 2000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 1000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 2000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				}
			} else if( myself.sm.db_value == 7 ) {
				if( myself.i_ai1 == 0 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 625 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 2500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				} else if( myself.i_ai1 == 30021 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 625 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 3000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				} else if( myself.i_ai1 == 30022 ) {
					if( ( myself::GetCurrentTick() - myself.i_quest2 ) > ( 15 * 60 ) ) {
						i0 = gg::Rand(10000);
						if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
							gg::Area_SetOnOff(areadata_heal1,1);
							gg::Area_SetOnOff(areadata_heal2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
							gg::Area_SetOnOff(areadata_power1,1);
							gg::Area_SetOnOff(areadata_power2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
							gg::Area_SetOnOff(areadata_psycho1,1);
							gg::Area_SetOnOff(areadata_psycho2,1);
						} else if( gg::Rand(10000) < 3000 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
							gg::Area_SetOnOff(areadata_rampage1,1);
							gg::Area_SetOnOff(areadata_rampage2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
							gg::Area_SetOnOff(areadata_plague1,1);
							gg::Area_SetOnOff(areadata_plague2,1);
						} else {
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
							myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
						}
					} else {
						i0 = gg::Rand(10000);
						if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
							gg::Area_SetOnOff(areadata_heal1,1);
							gg::Area_SetOnOff(areadata_heal2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
							gg::Area_SetOnOff(areadata_power1,1);
							gg::Area_SetOnOff(areadata_power2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
							gg::Area_SetOnOff(areadata_psycho1,1);
							gg::Area_SetOnOff(areadata_psycho2,1);
						} else if( gg::Rand(10000) < 3000 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
							gg::Area_SetOnOff(areadata_rampage1,1);
							gg::Area_SetOnOff(areadata_rampage2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
							gg::Area_SetOnOff(areadata_plague1,1);
							gg::Area_SetOnOff(areadata_plague2,1);
						} else {
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
							myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
						}
					}
				} else if( myself.i_ai1 == 30023 ) {
					if( ( myself::GetCurrentTick() - myself.i_quest2 ) > ( 15 * 60 ) ) {
						i0 = gg::Rand(10000);
						if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
							gg::Area_SetOnOff(areadata_heal1,1);
							gg::Area_SetOnOff(areadata_heal2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
							gg::Area_SetOnOff(areadata_power1,1);
							gg::Area_SetOnOff(areadata_power2,1);
						} else if( gg::Rand(10000) < 625 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
							gg::Area_SetOnOff(areadata_psycho1,1);
							gg::Area_SetOnOff(areadata_psycho2,1);
						} else if( gg::Rand(10000) < 3000 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
							gg::Area_SetOnOff(areadata_rampage1,1);
							gg::Area_SetOnOff(areadata_rampage2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
							gg::Area_SetOnOff(areadata_plague1,1);
							gg::Area_SetOnOff(areadata_plague2,1);
						} else {
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
							myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
						}
					} else {
						i0 = gg::Rand(10000);
						if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
							gg::Area_SetOnOff(areadata_heal1,1);
							gg::Area_SetOnOff(areadata_heal2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
							gg::Area_SetOnOff(areadata_power1,1);
							gg::Area_SetOnOff(areadata_power2,1);
						} else if( gg::Rand(10000) < 1500 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
							gg::Area_SetOnOff(areadata_psycho1,1);
							gg::Area_SetOnOff(areadata_psycho2,1);
						} else if( gg::Rand(10000) < 3000 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
							gg::Area_SetOnOff(areadata_rampage1,1);
							gg::Area_SetOnOff(areadata_rampage2,1);
						} else if( gg::Rand(10000) < 0 ) {
							myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
							gg::Area_SetOnOff(areadata_plague1,1);
							gg::Area_SetOnOff(areadata_plague2,1);
						} else {
							gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
							myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
						}
					}
				} else if( myself.i_ai1 == 30024 ) {
					i0 = gg::Rand(10000);
					if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
						gg::Area_SetOnOff(areadata_heal1,1);
						gg::Area_SetOnOff(areadata_heal2,1);
					} else if( gg::Rand(10000) < 1500 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
						gg::Area_SetOnOff(areadata_power1,1);
						gg::Area_SetOnOff(areadata_power2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
						gg::Area_SetOnOff(areadata_psycho1,1);
						gg::Area_SetOnOff(areadata_psycho2,1);
					} else if( gg::Rand(10000) < 3000 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
						gg::Area_SetOnOff(areadata_rampage1,1);
						gg::Area_SetOnOff(areadata_rampage2,1);
					} else if( gg::Rand(10000) < 0 ) {
						myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
						gg::Area_SetOnOff(areadata_plague1,1);
						gg::Area_SetOnOff(areadata_plague2,1);
					} else {
						gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
						myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
					}
				}
			}
			myself::AddTimerEx(1013,3000);
		} else if( timer_id == 1500 ) {
			gg::SendScriptEvent(myself.sm,gg::GetIndexFromCreature(myself.sm),3);
			i0 = myself::GetGlobalMap(5);
			c0 = gg::GetCreatureFromIndex(i0);
			if( myself::IsNullCreature(c0) == 0 ) {
				gg::SendScriptEvent(c0,gg::GetIndexFromCreature(myself.sm),3);
			}
		} else if( timer_id == 2000 ) {
			myself::RemoveAllDesire();
			myself::AddEffectActionDesire(myself.sm,4,7000,10000000);
			myself::AddTimerEx(2001,7000);
		} else if( timer_id == 2001 ) {
			myself::AddTimerEx(2002,1000);
		} else if( timer_id == 2002 ) {
			myself::RemoveAllDesire();
			i0 = gg::Rand(10000);
			if( gg::Rand(10000) < 0 ) {
				myself::AddUseSkillDesire(myself.sm,music_of_heal,1,1,10000);
				gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000522,"","","","",""));
				gg::Area_SetOnOff(areadata_heal1,1);
				gg::Area_SetOnOff(areadata_heal2,1);
			} else if( gg::Rand(10000) < 0 ) {
				myself::AddUseSkillDesire(myself.sm,music_of_power,1,1,10000);
				gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000523,"","","","",""));
				gg::Area_SetOnOff(areadata_power1,1);
				gg::Area_SetOnOff(areadata_power2,1);
			} else if( gg::Rand(10000) < 0 ) {
				myself::AddUseSkillDesire(myself.sm,music_of_psycho,1,1,10000);
				gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000525,"","","","",""));
				gg::Area_SetOnOff(areadata_psycho1,1);
				gg::Area_SetOnOff(areadata_psycho2,1);
			} else if( gg::Rand(10000) < 10000 ) {
				myself::AddUseSkillDesire(myself.sm,music_of_rampage,1,1,10000);
				gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000524,"","","","",""));
				gg::Area_SetOnOff(areadata_rampage1,1);
				gg::Area_SetOnOff(areadata_rampage2,1);
			} else if( gg::Rand(10000) < 0 ) {
				myself::AddUseSkillDesire(myself.sm,music_of_plague,1,1,10000);
				gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000526,"","","","",""));
				gg::Area_SetOnOff(areadata_plague1,1);
				gg::Area_SetOnOff(areadata_plague2,1);
			} else {
				gg::BroadcastOnScreenMsgStr(myself.sm,4000,2,0,0,0,0,1,3000,0,gg::MakeFString(1000527,"","","","",""));
				myself::AddUseSkillDesire(myself.sm,music,1,1,10000);
			}
			myself::AddTimerEx(2003,4000);
		} else if( timer_id == 5000 ) {
			myself::AddEffectActionDesire(myself.sm,3,( ( 3 * 1000 ) / 30 ),50);
		} else if( timer_id == 6000 ) {
			gg::SendScriptEvent(myself.sm,gg::GetIndexFromCreature(myself.sm),3);
		} else if( timer_id == 7000 ) {
			myself::Suicide();
		} else if( timer_id == 8000 ) {
			myself::SetDBValue(myself.sm,0);
			gg::InstantTeleportEx(myself.sm,-105200,-253104,-15264,16384);
			gg::Castle_GateOpenClose2(TDoorName1,1);
			gg::Castle_GateOpenClose2(TDoorName2,1);
			gg::Castle_GateOpenClose2(TDoorName3,0);
			gg::Castle_GateOpenClose2(TDoorName4,0);
			gg::Castle_GateOpenClose2(WallDoorName1A,1);
			gg::Castle_GateOpenClose2(WallDoorName2A,1);
			gg::Castle_GateOpenClose2(WallDoorName3A,1);
			gg::Castle_GateOpenClose2(WallDoorName4A,1);
			gg::Castle_GateOpenClose2(WallDoorName5A,1);
			gg::Castle_GateOpenClose2(WallDoorName6A,1);
			gg::Castle_GateOpenClose2(WallDoorName7A,1);
			gg::Castle_GateOpenClose2(WallDoorName8A,1);
			gg::Castle_GateOpenClose2(WallDoorName1B,1);
			gg::Castle_GateOpenClose2(WallDoorName2B,1);
			gg::Castle_GateOpenClose2(WallDoorName3B,1);
			gg::Castle_GateOpenClose2(WallDoorName4B,1);
			gg::Castle_GateOpenClose2(WallDoorName5B,1);
			gg::Castle_GateOpenClose2(WallDoorName6B,1);
			gg::Castle_GateOpenClose2(WallDoorName7B,1);
			gg::Castle_GateOpenClose2(WallDoorName8B,1);
			gg::Castle_GateOpenClose2(WallDoorName9B,1);
			gg::Castle_GateOpenClose2(WallDoorName10B,1);
			maker0 = gg::GetNpcMaker("frintessa_2515_m01");
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1000,0,0);
			}
		}
		super;
	}

	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2,c0,i0,maker0,c2,i2,c3,i3) {
		if( script_event_arg2 == 0 ) {
			i2 = myself::GetGlobalMap(5);
			c2 = gg::GetCreatureFromIndex(i2);
			i3 = myself::GetGlobalMap(6);
			c3 = gg::GetCreatureFromIndex(i3);
			if( myself::IsNullCreature(c2) != 0 || myself::IsNullCreature(c3) != 0 ) {
				return;
			}
			gg::Castle_GateOpenClose2(TDoorName1,1);
			gg::Castle_GateOpenClose2(TDoorName2,1);
			gg::Castle_GateOpenClose2(TDoorName3,0);
			gg::Castle_GateOpenClose2(TDoorName4,0);
			gg::Castle_GateOpenClose2(WallDoorName1A,1);
			gg::Castle_GateOpenClose2(WallDoorName2A,1);
			gg::Castle_GateOpenClose2(WallDoorName3A,1);
			gg::Castle_GateOpenClose2(WallDoorName4A,1);
			gg::Castle_GateOpenClose2(WallDoorName5A,1);
			gg::Castle_GateOpenClose2(WallDoorName6A,1);
			gg::Castle_GateOpenClose2(WallDoorName7A,1);
			gg::Castle_GateOpenClose2(WallDoorName8A,1);
			gg::Castle_GateOpenClose2(WallDoorName1B,1);
			gg::Castle_GateOpenClose2(WallDoorName2B,1);
			gg::Castle_GateOpenClose2(WallDoorName3B,1);
			gg::Castle_GateOpenClose2(WallDoorName4B,1);
			gg::Castle_GateOpenClose2(WallDoorName5B,1);
			gg::Castle_GateOpenClose2(WallDoorName6B,1);
			gg::Castle_GateOpenClose2(WallDoorName7B,1);
			gg::Castle_GateOpenClose2(WallDoorName8B,1);
			gg::Castle_GateOpenClose2(WallDoorName9B,1);
			gg::Castle_GateOpenClose2(WallDoorName10B,1);
			gg::Area_SetOnOff(areadata_heal1,0);
			gg::Area_SetOnOff(areadata_heal2,0);
			gg::Area_SetOnOff(areadata_power1,0);
			gg::Area_SetOnOff(areadata_power2,0);
			gg::Area_SetOnOff(areadata_psycho1,0);
			gg::Area_SetOnOff(areadata_psycho2,0);
			gg::Area_SetOnOff(areadata_rampage1,0);
			gg::Area_SetOnOff(areadata_rampage2,0);
			gg::Area_SetOnOff(areadata_plague1,0);
			gg::Area_SetOnOff(areadata_plague2,0);
			myself::SetDBValue(myself.sm,0);
			gg::InstantTeleportEx(myself.sm,-105200,-253104,-15264,16384);
			maker0 = gg::GetNpcMaker("frintessa_2515_m01");
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1001,0,0);
			}
		} else if( script_event_arg2 == 1 ) {
			myself::SetDBValue(myself.sm,1);
			i0 = myself::GetGlobalMap(5);
			c0 = gg::GetCreatureFromIndex(i0);
			if( myself::IsNullCreature(c0) == 0 ) {
				gg::SendScriptEvent(c0,gg::GetIndexFromCreature(myself.sm),1);
			}
		} else if( script_event_arg2 == 2 ) {
			myself::SetDBValue(myself.sm,2);
			i0 = myself::GetGlobalMap(5);
			c0 = gg::GetCreatureFromIndex(i0);
			if( myself::IsNullCreature(c0) == 0 ) {
				gg::SendScriptEvent(c0,gg::GetIndexFromCreature(myself.sm),2);
			}
			maker0 = gg::GetNpcMaker("frintessa_2515_m01");
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1000,0,0);
			}
			myself::AddTimerEx(1500,( ( 10 * 60 ) * 1000 ));
		} else if( script_event_arg2 == 3 ) {
			myself::SetDBValue(myself.sm,3);
			myself::AddTimerEx(1000,4000);
		} else if( script_event_arg2 == 8 ) {
			myself::AddTimerEx(7000,7500);
		} else if( script_event_arg2 == 50000 ) {
			myself::AddTimerEx(2000,500);
		} else if( script_event_arg1 == 99999999 ) {
			myself.i_ai3 = script_event_arg2;
		}
		super;
	}

	EventHandler MY_DYING(i0,maker0) {
		myself::UnregisterGlobalMap(GM_ID);
		gg::Area_SetOnOff(areadata_heal1,0);
		gg::Area_SetOnOff(areadata_heal2,0);
		gg::Area_SetOnOff(areadata_power1,0);
		gg::Area_SetOnOff(areadata_power2,0);
		gg::Area_SetOnOff(areadata_psycho1,0);
		gg::Area_SetOnOff(areadata_psycho2,0);
		gg::Area_SetOnOff(areadata_rampage1,0);
		gg::Area_SetOnOff(areadata_rampage2,0);
		gg::Area_SetOnOff(areadata_plague1,0);
		gg::Area_SetOnOff(areadata_plague2,0);
		gg::Castle_GateOpenClose2(TDoorName1,1);
		gg::Castle_GateOpenClose2(TDoorName2,1);
		gg::Castle_GateOpenClose2(TDoorName3,0);
		gg::Castle_GateOpenClose2(TDoorName4,0);
		gg::Castle_GateOpenClose2(WallDoorName1A,1);
		gg::Castle_GateOpenClose2(WallDoorName2A,1);
		gg::Castle_GateOpenClose2(WallDoorName3A,1);
		gg::Castle_GateOpenClose2(WallDoorName4A,1);
		gg::Castle_GateOpenClose2(WallDoorName5A,1);
		gg::Castle_GateOpenClose2(WallDoorName6A,1);
		gg::Castle_GateOpenClose2(WallDoorName7A,1);
		gg::Castle_GateOpenClose2(WallDoorName8A,1);
		gg::Castle_GateOpenClose2(WallDoorName1B,1);
		gg::Castle_GateOpenClose2(WallDoorName2B,1);
		gg::Castle_GateOpenClose2(WallDoorName3B,1);
		gg::Castle_GateOpenClose2(WallDoorName4B,1);
		gg::Castle_GateOpenClose2(WallDoorName5B,1);
		gg::Castle_GateOpenClose2(WallDoorName6B,1);
		gg::Castle_GateOpenClose2(WallDoorName7B,1);
		gg::Castle_GateOpenClose2(WallDoorName8B,1);
		gg::Castle_GateOpenClose2(WallDoorName9B,1);
		gg::Castle_GateOpenClose2(WallDoorName10B,1);
		gg::Castle_GateOpenClose2(TDoorName1,1);
		gg::Castle_GateOpenClose2(TDoorName2,1);
		gg::Castle_GateOpenClose2(TDoorName3,0);
		gg::Castle_GateOpenClose2(TDoorName4,0);
		gg::Castle_GateOpenClose2(WallDoorName1A,1);
		gg::Castle_GateOpenClose2(WallDoorName2A,1);
		gg::Castle_GateOpenClose2(WallDoorName3A,1);
		gg::Castle_GateOpenClose2(WallDoorName4A,1);
		gg::Castle_GateOpenClose2(WallDoorName5A,1);
		gg::Castle_GateOpenClose2(WallDoorName6A,1);
		gg::Castle_GateOpenClose2(WallDoorName7A,1);
		gg::Castle_GateOpenClose2(WallDoorName8A,1);
		gg::Castle_GateOpenClose2(WallDoorName1B,1);
		gg::Castle_GateOpenClose2(WallDoorName2B,1);
		gg::Castle_GateOpenClose2(WallDoorName3B,1);
		gg::Castle_GateOpenClose2(WallDoorName4B,1);
		gg::Castle_GateOpenClose2(WallDoorName5B,1);
		gg::Castle_GateOpenClose2(WallDoorName6B,1);
		gg::Castle_GateOpenClose2(WallDoorName7B,1);
		gg::Castle_GateOpenClose2(WallDoorName8B,1);
		gg::Castle_GateOpenClose2(WallDoorName9B,1);
		gg::Castle_GateOpenClose2(WallDoorName10B,1);
		myself::SetDBValue(myself.sm,0);
		maker0 = gg::GetNpcMaker("frintessa_teleportcuve");
		if( gg::IsNull(maker0) == 0 ) {
			gg::SendMakerScriptEvent(maker0,1001,0,0);
		}
	}

}
