@LabelIndex 62217
@StringIndex 9918
class 0 ai_boss08_follower_of_frintessa_tran_select_target_skill : ai_boss08_follower_of_frintessa_tran_decide_action {
parameter:

handler:
	EventHandler CREATED(reply) {
		super;
		myself::AddTimerEx(3001,( 60 * 1000 ));
	}

	EventHandler ATTACKED(attacker,damage,i0,i1,i2,c2,skill_name_id,maker0,i3,c3) {
		super;
		if( attacker.yongma_type == 1 && gg::GetAbnormalLevel(attacker,myself::Skill_GetAbnormalType(279052289)) <= 0 ) {
			if( myself::Skill_GetConsumeMP(279052289) < myself.sm.mp && myself::Skill_GetConsumeHP(279052289) < myself.sm.hp && myself::Skill_InReuseDelay(279052289) == 0 ) {
				myself::AddUseSkillDesire(attacker,279052289,0,1,1000000);
			}
		}
		if( attacker == myself.c_quest2 ) {
			if( myself.i_quest2 < ( ( damage * 1000 ) + 1000 ) ) {
				myself.i_quest2 = gg::FloatToInt(( ( damage * 1000 ) + gg::Rand(3000) ));
			}
		} else if( attacker == myself.c_quest3 ) {
			if( myself.i_quest3 < ( ( damage * 1000 ) + 1000 ) ) {
				myself.i_quest3 = gg::FloatToInt(( ( damage * 1000 ) + gg::Rand(3000) ));
			}
		} else if( attacker == myself.c_quest4 ) {
			if( myself.i_quest4 < ( ( damage * 1000 ) + 1000 ) ) {
				myself.i_quest4 = gg::FloatToInt(( ( damage * 1000 ) + gg::Rand(3000) ));
			}
		} else if( myself.i_quest2 > myself.i_quest3 ) {
			i1 = 3;
		} else if( myself.i_quest2 == myself.i_quest3 ) {
			if( gg::Rand(100) < 50 ) {
				i1 = 2;
			} else {
				i1 = 3;
			}
		} else if( myself.i_quest2 < myself.i_quest3 ) {
			i1 = 2;
		}
		if( i1 == 2 ) {
			if( myself.i_quest2 > myself.i_quest4 ) {
				i1 = 4;
			} else if( myself.i_quest2 == myself.i_quest4 ) {
				if( gg::Rand(100) < 50 ) {
					i1 = 2;
				} else {
					i1 = 4;
				}
			} else if( myself.i_quest2 < myself.i_quest4 ) {
				i1 = 2;
			}
		} else if( i1 == 3 ) {
			if( myself.i_quest3 > myself.i_quest4 ) {
				i1 = 4;
			} else if( myself.i_quest3 == myself.i_quest4 ) {
				if( gg::Rand(100) < 50 ) {
					i1 = 3;
				} else {
					i1 = 4;
				}
			} else if( myself.i_quest3 < myself.i_quest4 ) {
				i1 = 3;
			}
		}
		switch(i1) {
			case 2: {
				myself.i_quest2 = gg::FloatToInt(( ( damage * 1000 ) + gg::Rand(3000) ));
				myself.c_quest2 = attacker;
				break;
			}
			case 3: {
				myself.i_quest3 = gg::FloatToInt(( ( damage * 1000 ) + gg::Rand(3000) ));
				myself.c_quest3 = attacker;
				break;
			}
			case 4: {
				myself.i_quest4 = gg::FloatToInt(( ( damage * 1000 ) + gg::Rand(3000) ));
				myself.c_quest4 = attacker;
				break;
			}
		}
		if( skill_name_id == 328204290 ) {
			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;
			}
		}
		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);
				}
			}
		}
	}

	EventHandler DESIRE_MANIPULATION(speller,desire) {
		myself::MakeAttackEvent(speller,( desire * 2 ),0);
	}

	EventHandler TIMER_FIRED_EX(timer_id,i0,i1,i2,c2) {
		super;
		if( timer_id == 3001 ) {
			if( myself.i_ai0 == 7 ) {
				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::LookNeighbor(2000);
			myself::AddTimerEx(3001,( 60 * 1000 ));
		}
	}

	EventHandler SEE_CREATURE(creature,i0,i1,i2,c2) {
		if( myself.i_ai4 == 0 ) {
			return;
		}
		if( creature.is_pc == 0 && myself::IsInCategory(12,creature.class_id) == 0 ) {
			return;
		}
		if( creature == myself.c_quest2 ) {
			if( myself.i_quest2 < ( ( 1 * 1000 ) + 1000 ) ) {
				myself.i_quest2 = gg::FloatToInt(( ( 1 * 1000 ) + gg::Rand(3000) ));
			}
		} else if( creature == myself.c_quest3 ) {
			if( myself.i_quest3 < ( ( 1 * 1000 ) + 1000 ) ) {
				myself.i_quest3 = gg::FloatToInt(( ( 1 * 1000 ) + gg::Rand(3000) ));
			}
		} else if( creature == myself.c_quest4 ) {
			if( myself.i_quest4 < ( ( 1 * 1000 ) + 1000 ) ) {
				myself.i_quest4 = gg::FloatToInt(( ( 1 * 1000 ) + gg::Rand(3000) ));
			}
		} else if( myself.i_quest2 > myself.i_quest3 ) {
			i1 = 3;
		} else if( myself.i_quest2 == myself.i_quest3 ) {
			if( gg::Rand(100) < 50 ) {
				i1 = 2;
			} else {
				i1 = 3;
			}
		} else if( myself.i_quest2 < myself.i_quest3 ) {
			i1 = 2;
		}
		if( i1 == 2 ) {
			if( myself.i_quest2 > myself.i_quest4 ) {
				i1 = 4;
			} else if( myself.i_quest2 == myself.i_quest4 ) {
				if( gg::Rand(100) < 50 ) {
					i1 = 2;
				} else {
					i1 = 4;
				}
			} else if( myself.i_quest2 < myself.i_quest4 ) {
				i1 = 2;
			}
		} else if( i1 == 3 ) {
			if( myself.i_quest3 > myself.i_quest4 ) {
				i1 = 4;
			} else if( myself.i_quest3 == myself.i_quest4 ) {
				if( gg::Rand(100) < 50 ) {
					i1 = 3;
				} else {
					i1 = 4;
				}
			} else if( myself.i_quest3 < myself.i_quest4 ) {
				i1 = 3;
			}
		}
		switch(i1) {
			case 2: {
				myself.i_quest2 = gg::FloatToInt(( ( 1 * 1000 ) + gg::Rand(3000) ));
				myself.c_quest2 = creature;
				break;
			}
			case 3: {
				myself.i_quest3 = gg::FloatToInt(( ( 1 * 1000 ) + gg::Rand(3000) ));
				myself.c_quest3 = creature;
				break;
			}
			case 4: {
				myself.i_quest4 = gg::FloatToInt(( ( 1 * 1000 ) + gg::Rand(3000) ));
				myself.c_quest4 = creature;
				break;
			}
		}
		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);
				}
			}
		}
	}

	EventHandler USE_SKILL_FINISHED(skill_name_id,success,i0,i1,i2,c2) {
		if( skill_name_id == DashAll && success == 1 && myself.i_ai2 == 3 ) {
			myself.i_ai2 = 0;
			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);
					}
				}
			}
		} else 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);
				}
			}
		}
	}

}
