@LabelIndex 61602
@StringIndex 9907
class 0 ai_boss08_follower_of_frintessa_tran_set_db : default_npc {
parameter:
	int	Swing = 328597505;
	int	Dash = 328663043;
	int	DashAll = 328663046;
	int	AntiGravity = 328728577;
	int	MagicCircle = 328859650;
	int	Vampiric = 328925185;
	int	GM_ID = 6;
	string	evilate_maker1 = "frintessa_evilate_maker1";
	string	evilate_maker2 = "frintessa_evilate_maker2";

handler:
	EventHandler CREATED(reply,i0,maker0,c1,i1,c2,i0,i2,c0) {
		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);
			i1 = myself::GetGlobalMap(4);
			c1 = gg::GetCreatureFromIndex(i1);
			if( myself::IsNullCreature(c1) == 0 ) {
				gg::SendScriptEvent(c1,gg::GetIndexFromCreature(myself.sm),0);
			}
			myself::SetDBValue(myself.sm,5);
			i1 = myself::GetGlobalMap(4);
			c1 = gg::GetCreatureFromIndex(i1);
			if( myself::IsNullCreature(c1) == 0 ) {
				gg::SendScriptEvent(c1,gg::GetIndexFromCreature(myself.sm),0);
			}
		} else if( myself.sm.db_value == 7 ) {
			if( myself.sm.hp < ( myself.sm.max_hp * 0.750000 ) ) {
				i2 = myself::GetGlobalMap(4);
				c0 = gg::GetCreatureFromIndex(i2);
				if( myself::IsNullCreature(c0) == 0 ) {
					gg::SendScriptEvent(c0,gg::GetIndexFromCreature(myself.sm),30021);
				}
				myself.i_ai4 = 30021;
			} else if( myself.sm.hp < ( myself.sm.max_hp * 0.500000 ) ) {
				i2 = myself::GetGlobalMap(4);
				c0 = gg::GetCreatureFromIndex(i2);
				if( myself::IsNullCreature(c0) == 0 ) {
					gg::SendScriptEvent(c0,gg::GetIndexFromCreature(myself.sm),30022);
				}
				myself.i_ai4 = 30022;
			} else if( myself.sm.hp < ( myself.sm.max_hp * 0.250000 ) ) {
				i2 = myself::GetGlobalMap(4);
				c0 = gg::GetCreatureFromIndex(i2);
				if( myself::IsNullCreature(c0) == 0 ) {
					gg::SendScriptEvent(c0,gg::GetIndexFromCreature(myself.sm),30023);
				}
				myself.i_ai4 = 30023;
			} else if( myself.sm.hp < ( myself.sm.max_hp * 0.100000 ) ) {
				i2 = myself::GetGlobalMap(4);
				c0 = gg::GetCreatureFromIndex(i2);
				if( myself::IsNullCreature(c0) == 0 ) {
					gg::SendScriptEvent(c0,gg::GetIndexFromCreature(myself.sm),30024);
				}
				myself.i_ai4 = 30024;
			} else {
				i2 = myself::GetGlobalMap(4);
				c0 = gg::GetCreatureFromIndex(i2);
				if( myself::IsNullCreature(c0) == 0 ) {
					gg::SendScriptEvent(c0,gg::GetIndexFromCreature(myself.sm),7);
				}
				myself.i_ai4 = 7;
			}
			myself::AddTimerEx(1001,2000);
		}
		super;
	}

	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2,i0,i1,c0) {
		i0 = myself::GetGlobalMap(4);
		if( script_event_arg1 == i0 ) {
		}
		if( script_event_arg1 == 99999999 ) {
			myself::MPCC_SetMasterPartyRouting(script_event_arg2,myself.sm,1);
			myself.int_list::Add(script_event_arg2);
		} else if( script_event_arg1 == 7 ) {
			myself::AddTimerEx(1001,2000);
			myself::AddTimerEx(1001,7000);
		} else if( script_event_arg2 == 0 ) {
			myself::SetDBValue(myself.sm,0);
			myself::RemoveAllDesire();
			myself.i_quest2 = 0;
			myself.i_quest3 = 0;
			myself.i_quest4 = 0;
			gg::InstantTeleportEx(myself.sm,-105200,-253104,-15264,16384);
		}
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id,i0,i1,i2,c0,c2,c3,i3,maker0) {
		if( timer_id == 1001 ) {
			myself.i_quest1 = myself::GetCurrentTick();
			i3 = myself::GetGlobalMap(4);
			c3 = gg::GetCreatureFromIndex(i3);
			if( myself::IsNullCreature(c3) == 0 ) {
				gg::SendScriptEvent(c3,gg::GetIndexFromCreature(myself.sm),7);
			}
			myself::AddTimerEx(1900,2000);
		} else if( timer_id == 1900 ) {
			myself::AddTimerEx(5001,4000);
		} else if( timer_id == 5001 ) {
			myself.i_ai0 = 30020;
			myself::AddEffectActionDesire2(myself.sm,2,5000,10000000,5000);
			myself::AddTimerEx(5002,5000);
		} else if( timer_id == 5002 ) {
			myself::LookNeighbor(2000);
			if( myself::IsNullCreature(myself.c_quest2) ) {
				myself.i_quest2 = 0;
			} else if( myself::DistFromMe(myself.c_quest2) > 5000 || myself.c_quest2.alive == 0 ) {
				myself.i_quest2 = 0;
			}
			if( myself::IsNullCreature(myself.c_quest3) ) {
				myself.i_quest3 = 0;
			} else if( myself::DistFromMe(myself.c_quest3) > 5000 || myself.c_quest3.alive == 0 ) {
				myself.i_quest3 = 0;
			}
			if( myself::IsNullCreature(myself.c_quest4) ) {
				myself.i_quest4 = 0;
			} else if( myself::DistFromMe(myself.c_quest4) > 5000 || myself.c_quest4.alive == 0 ) {
				myself.i_quest4 = 0;
			}
			if( myself.i_quest2 > myself.i_quest3 ) {
				i1 = 2;
				i2 = myself.i_quest2;
				c2 = myself.c_quest2;
			} else {
				i1 = 3;
				i2 = myself.i_quest3;
				c2 = myself.c_quest3;
			}
			if( myself.i_quest4 > i2 ) {
				i1 = 4;
				i2 = myself.i_quest4;
				c2 = myself.c_quest4;
			}
			if( i2 > 0 ) {
				if( gg::Rand(100) < 5 ) {
					switch(i1) {
						case 2: {
							myself.i_quest2 = 500;
							break;
						}
						case 3: {
							myself.i_quest3 = 500;
							break;
						}
						case 4: {
							myself.i_quest4 = 500;
							break;
						}
					}
				}
				if( myself::IsNullCreature(c2) == 0 ) {
					if( myself.i_ai2 > 0 ) {
						if( myself.i_ai2 > 0 && myself.i_ai2 < 3 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,Dash,0,1,10000);
							}
							myself.i_ai2 = ( myself.i_ai2 + 1 );
						} else if( myself.i_ai2 == 3 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
							}
							myself.i_ai2 = 0;
						} else {
							myself.i_ai2 = 0;
						}
					} else if( myself.sm.hp > ( myself.sm.max_hp * 0.750000 ) ) {
						if( gg::Rand(10000) < 2000 ) {
							if( myself::IsInThisTerritory("25_15_frintessa_NoCharge01") == 1 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
							}
						} else if( gg::Rand(10000) < 1000 ) {
							myself.i_ai2 = 1;
							if( myself.i_ai2 > 0 && myself.i_ai2 < 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,Dash,0,1,10000);
								}
								myself.i_ai2 = ( myself.i_ai2 + 1 );
							} else if( myself.i_ai2 == 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
								myself.i_ai2 = 0;
							} else {
								myself.i_ai2 = 0;
							}
						} else if( gg::Rand(10000) < 1000 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,AntiGravity,0,1,10000);
							}
						} else if( gg::Rand(10000) < 0 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,MagicCircle,0,1,10000);
							}
						} else if( gg::Rand(10000) < 0 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,Vampiric,0,1,10000);
							}
						} else if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,Swing,0,1,10000);
						}
					} else if( myself.sm.hp > ( myself.sm.max_hp * 0.500000 ) ) {
						if( gg::Rand(10000) < 2000 ) {
							if( myself::IsInThisTerritory("25_15_frintessa_NoCharge01") == 1 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
							}
						} else if( gg::Rand(10000) < 1000 ) {
							myself.i_ai2 = 1;
							if( myself.i_ai2 > 0 && myself.i_ai2 < 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,Dash,0,1,10000);
								}
								myself.i_ai2 = ( myself.i_ai2 + 1 );
							} else if( myself.i_ai2 == 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
								myself.i_ai2 = 0;
							} else {
								myself.i_ai2 = 0;
							}
						} else if( gg::Rand(10000) < 750 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,AntiGravity,0,1,10000);
							}
						} else if( gg::Rand(10000) < 500 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,MagicCircle,0,1,10000);
							}
						} else if( gg::Rand(10000) < 500 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,Vampiric,0,1,10000);
							}
						} else if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,Swing,0,1,10000);
						}
					} else if( myself.sm.hp > ( myself.sm.max_hp * 0.250000 ) ) {
						if( gg::Rand(10000) < 2000 ) {
							if( myself::IsInThisTerritory("25_15_frintessa_NoCharge01") == 1 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
							}
						} else if( gg::Rand(10000) < 1000 ) {
							myself.i_ai2 = 1;
							if( myself.i_ai2 > 0 && myself.i_ai2 < 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,Dash,0,1,10000);
								}
								myself.i_ai2 = ( myself.i_ai2 + 1 );
							} else if( myself.i_ai2 == 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
								myself.i_ai2 = 0;
							} else {
								myself.i_ai2 = 0;
							}
						} else if( gg::Rand(10000) < 750 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,AntiGravity,0,1,10000);
							}
						} else if( gg::Rand(10000) < 1000 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,MagicCircle,0,1,10000);
							}
						} else if( gg::Rand(10000) < 500 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,Vampiric,0,1,10000);
							}
						} else if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,Swing,0,1,10000);
						}
					} else if( myself.sm.hp > ( myself.sm.max_hp * 0.100000 ) ) {
						if( gg::Rand(10000) < 2000 ) {
							if( myself::IsInThisTerritory("25_15_frintessa_NoCharge01") == 1 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
							}
						} else if( gg::Rand(10000) < 1000 ) {
							myself.i_ai2 = 1;
							if( myself.i_ai2 > 0 && myself.i_ai2 < 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,Dash,0,1,10000);
								}
								myself.i_ai2 = ( myself.i_ai2 + 1 );
							} else if( myself.i_ai2 == 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
								myself.i_ai2 = 0;
							} else {
								myself.i_ai2 = 0;
							}
						} else if( gg::Rand(10000) < 1000 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,AntiGravity,0,1,10000);
							}
						} else if( gg::Rand(10000) < 1000 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,MagicCircle,0,1,10000);
							}
						} else if( gg::Rand(10000) < 1000 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,Vampiric,0,1,10000);
							}
						} else if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,Swing,0,1,10000);
						}
					} else if( gg::Rand(10000) < 2000 ) {
						if( myself::IsInThisTerritory("25_15_frintessa_NoCharge01") == 1 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
							}
						}
					} else if( gg::Rand(10000) < 1000 ) {
						myself.i_ai2 = 1;
						if( myself.i_ai2 > 0 && myself.i_ai2 < 3 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,Dash,0,1,10000);
							}
							myself.i_ai2 = ( myself.i_ai2 + 1 );
						} else if( myself.i_ai2 == 3 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
							}
							myself.i_ai2 = 0;
						} else {
							myself.i_ai2 = 0;
						}
					} else if( gg::Rand(10000) < 500 ) {
						if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,AntiGravity,0,1,10000);
						}
					} else if( gg::Rand(10000) < 500 ) {
						if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,MagicCircle,0,1,10000);
						}
					} else if( gg::Rand(10000) < 0 ) {
						if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,Vampiric,0,1,10000);
						}
					} else if( myself::IsNullCreature(c2) == 0 ) {
						myself::AddUseSkillDesire(c2,Swing,0,1,10000);
					}
				}
			}
			myself::AddTimerEx(5004,2000);
		} else if( timer_id == 5004 ) {
			maker0 = gg::GetNpcMaker(evilate_maker1);
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1000,0,0);
			}
			maker0 = gg::GetNpcMaker(evilate_maker2);
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1000,0,0);
			}
			myself::BroadcastScriptEvent(0,20000,8000);
			myself.i_ai0 = 7;
			myself.i_ai4 = 1;
			if( myself::IsNullCreature(myself.c_quest2) ) {
				myself.i_quest2 = 0;
			} else if( myself::DistFromMe(myself.c_quest2) > 5000 || myself.c_quest2.alive == 0 ) {
				myself.i_quest2 = 0;
			}
			if( myself::IsNullCreature(myself.c_quest3) ) {
				myself.i_quest3 = 0;
			} else if( myself::DistFromMe(myself.c_quest3) > 5000 || myself.c_quest3.alive == 0 ) {
				myself.i_quest3 = 0;
			}
			if( myself::IsNullCreature(myself.c_quest4) ) {
				myself.i_quest4 = 0;
			} else if( myself::DistFromMe(myself.c_quest4) > 5000 || myself.c_quest4.alive == 0 ) {
				myself.i_quest4 = 0;
			}
			if( myself.i_quest2 > myself.i_quest3 ) {
				i1 = 2;
				i2 = myself.i_quest2;
				c2 = myself.c_quest2;
			} else {
				i1 = 3;
				i2 = myself.i_quest3;
				c2 = myself.c_quest3;
			}
			if( myself.i_quest4 > i2 ) {
				i1 = 4;
				i2 = myself.i_quest4;
				c2 = myself.c_quest4;
			}
			if( i2 > 0 ) {
				if( gg::Rand(100) < 5 ) {
					switch(i1) {
						case 2: {
							myself.i_quest2 = 500;
							break;
						}
						case 3: {
							myself.i_quest3 = 500;
							break;
						}
						case 4: {
							myself.i_quest4 = 500;
							break;
						}
					}
				}
				if( myself::IsNullCreature(c2) == 0 ) {
					if( myself.i_ai2 > 0 ) {
						if( myself.i_ai2 > 0 && myself.i_ai2 < 3 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,Dash,0,1,10000);
							}
							myself.i_ai2 = ( myself.i_ai2 + 1 );
						} else if( myself.i_ai2 == 3 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
							}
							myself.i_ai2 = 0;
						} else {
							myself.i_ai2 = 0;
						}
					} else if( myself.sm.hp > ( myself.sm.max_hp * 0.750000 ) ) {
						if( gg::Rand(10000) < 2000 ) {
							if( myself::IsInThisTerritory("25_15_frintessa_NoCharge01") == 1 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
							}
						} else if( gg::Rand(10000) < 1000 ) {
							myself.i_ai2 = 1;
							if( myself.i_ai2 > 0 && myself.i_ai2 < 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,Dash,0,1,10000);
								}
								myself.i_ai2 = ( myself.i_ai2 + 1 );
							} else if( myself.i_ai2 == 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
								myself.i_ai2 = 0;
							} else {
								myself.i_ai2 = 0;
							}
						} else if( gg::Rand(10000) < 1000 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,AntiGravity,0,1,10000);
							}
						} else if( gg::Rand(10000) < 0 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,MagicCircle,0,1,10000);
							}
						} else if( gg::Rand(10000) < 0 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,Vampiric,0,1,10000);
							}
						} else if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,Swing,0,1,10000);
						}
					} else if( myself.sm.hp > ( myself.sm.max_hp * 0.500000 ) ) {
						if( gg::Rand(10000) < 2000 ) {
							if( myself::IsInThisTerritory("25_15_frintessa_NoCharge01") == 1 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
							}
						} else if( gg::Rand(10000) < 1000 ) {
							myself.i_ai2 = 1;
							if( myself.i_ai2 > 0 && myself.i_ai2 < 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,Dash,0,1,10000);
								}
								myself.i_ai2 = ( myself.i_ai2 + 1 );
							} else if( myself.i_ai2 == 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
								myself.i_ai2 = 0;
							} else {
								myself.i_ai2 = 0;
							}
						} else if( gg::Rand(10000) < 750 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,AntiGravity,0,1,10000);
							}
						} else if( gg::Rand(10000) < 500 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,MagicCircle,0,1,10000);
							}
						} else if( gg::Rand(10000) < 500 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,Vampiric,0,1,10000);
							}
						} else if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,Swing,0,1,10000);
						}
					} else if( myself.sm.hp > ( myself.sm.max_hp * 0.250000 ) ) {
						if( gg::Rand(10000) < 2000 ) {
							if( myself::IsInThisTerritory("25_15_frintessa_NoCharge01") == 1 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
							}
						} else if( gg::Rand(10000) < 1000 ) {
							myself.i_ai2 = 1;
							if( myself.i_ai2 > 0 && myself.i_ai2 < 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,Dash,0,1,10000);
								}
								myself.i_ai2 = ( myself.i_ai2 + 1 );
							} else if( myself.i_ai2 == 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
								myself.i_ai2 = 0;
							} else {
								myself.i_ai2 = 0;
							}
						} else if( gg::Rand(10000) < 750 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,AntiGravity,0,1,10000);
							}
						} else if( gg::Rand(10000) < 1000 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,MagicCircle,0,1,10000);
							}
						} else if( gg::Rand(10000) < 500 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,Vampiric,0,1,10000);
							}
						} else if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,Swing,0,1,10000);
						}
					} else if( myself.sm.hp > ( myself.sm.max_hp * 0.100000 ) ) {
						if( gg::Rand(10000) < 2000 ) {
							if( myself::IsInThisTerritory("25_15_frintessa_NoCharge01") == 1 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
							}
						} else if( gg::Rand(10000) < 1000 ) {
							myself.i_ai2 = 1;
							if( myself.i_ai2 > 0 && myself.i_ai2 < 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,Dash,0,1,10000);
								}
								myself.i_ai2 = ( myself.i_ai2 + 1 );
							} else if( myself.i_ai2 == 3 ) {
								if( myself::IsNullCreature(c2) == 0 ) {
									myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
								}
								myself.i_ai2 = 0;
							} else {
								myself.i_ai2 = 0;
							}
						} else if( gg::Rand(10000) < 1000 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,AntiGravity,0,1,10000);
							}
						} else if( gg::Rand(10000) < 1000 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,MagicCircle,0,1,10000);
							}
						} else if( gg::Rand(10000) < 1000 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,Vampiric,0,1,10000);
							}
						} else if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,Swing,0,1,10000);
						}
					} else if( gg::Rand(10000) < 2000 ) {
						if( myself::IsInThisTerritory("25_15_frintessa_NoCharge01") == 1 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
							}
						}
					} else if( gg::Rand(10000) < 1000 ) {
						myself.i_ai2 = 1;
						if( myself.i_ai2 > 0 && myself.i_ai2 < 3 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,Dash,0,1,10000);
							}
							myself.i_ai2 = ( myself.i_ai2 + 1 );
						} else if( myself.i_ai2 == 3 ) {
							if( myself::IsNullCreature(c2) == 0 ) {
								myself::AddUseSkillDesire(c2,DashAll,0,1,10000);
							}
							myself.i_ai2 = 0;
						} else {
							myself.i_ai2 = 0;
						}
					} else if( gg::Rand(10000) < 500 ) {
						if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,AntiGravity,0,1,10000);
						}
					} else if( gg::Rand(10000) < 500 ) {
						if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,MagicCircle,0,1,10000);
						}
					} else if( gg::Rand(10000) < 0 ) {
						if( myself::IsNullCreature(c2) == 0 ) {
							myself::AddUseSkillDesire(c2,Vampiric,0,1,10000);
						}
					} else if( myself::IsNullCreature(c2) == 0 ) {
						myself::AddUseSkillDesire(c2,Swing,0,1,10000);
					}
				}
			}
			myself.i_quest1 = myself::GetCurrentTick();
			myself::AddTimerEx(3000,( 60 * 1000 ));
		} else if( timer_id == 2000 ) {
			myself::SpecialCamera3(myself.sm,430,300,80,0,5000,10000,0,0,1,1,1);
			myself::AddTimerEx(2001,100);
		} else if( timer_id == 2001 ) {
			myself::EffectMusic(myself.sm,6000,"BS05_D");
			myself::SpecialCamera3(myself.sm,430,300,80,0,5000,10000,0,0,1,1,1);
			myself::AddTimerEx(2002,400);
		} else if( timer_id == 2002 ) {
			myself::SpecialCamera3(myself.sm,0,180,80,4000,5000,6000,0,0,1,1,1);
			myself::AddTimerEx(2003,6000);
		}
	}

	EventHandler MY_DYING(i0,plist0,pos0,i1,c1) {
		myself::UnregisterGlobalMap(GM_ID);
		myself::BroadcastScriptEvent(gg::GetIndexFromCreature(myself.sm),8,8000);
		myself::AddTimerEx(2000,1);
	}

}
