@LabelIndex 17756
@StringIndex 4244
class 0 wizard : wizard_parameter {
parameter:
	float	Attack_DecayRatio = 6.600000;
	float	UseSkill_DecayRatio = 66000.000000;
	float	Attack_BoostValue = 300.000000;
	float	UseSkill_BoostValue = 100000.000000;

handler:
	EventHandler NO_DESIRE() {
		myself::AddMoveAroundDesire(5,5);
	}

	EventHandler CREATED() {
		if( ShoutMsg1 > 0 ) {
			if( IsSay == 0 ) {
				myself::Shout(gg::MakeFString(ShoutMsg1,"","","","",""));
			} else {
				myself::Say(gg::MakeFString(ShoutMsg1,"","","","",""));
			}
		}
		if( MoveAroundSocial > 0 || ShoutMsg2 > 0 || ShoutMsg3 > 0 ) {
			myself::AddTimerEx(1001,10000);
		}
		myself::AddTimerEx(1002,10000);
		myself.i_ai0 = 0;
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id,h0,i0) {
		if( timer_id == 1001 ) {
			if( myself.p_state == 1 || myself.p_state == 2 || myself.p_state == 9 ) {
				if( MoveAroundSocial > 0 || MoveAroundSocial1 > 0 || MoveAroundSocial2 > 0 ) {
					if( MoveAroundSocial2 > 0 && gg::Rand(100) < 20 ) {
						myself::AddEffectActionDesire(myself.sm,3,( ( MoveAroundSocial2 * 1000 ) / 30 ),50);
					} else if( MoveAroundSocial1 > 0 && gg::Rand(100) < 20 ) {
						myself::AddEffectActionDesire(myself.sm,2,( ( MoveAroundSocial1 * 1000 ) / 30 ),50);
					} else if( MoveAroundSocial > 0 && gg::Rand(100) < 20 ) {
						myself::AddEffectActionDesire(myself.sm,1,( ( MoveAroundSocial * 1000 ) / 30 ),50);
					}
				}
				if( ShoutMsg2 > 0 && gg::Rand(1000) < 17 ) {
					if( IsSay == 0 ) {
						myself::Shout(gg::MakeFString(ShoutMsg2,"","","","",""));
					} else {
						myself::Say(gg::MakeFString(ShoutMsg2,"","","","",""));
					}
				}
			} else if( myself.p_state == 3 ) {
				if( ShoutMsg3 > 0 && gg::Rand(100) < 10 ) {
					if( IsSay == 0 ) {
						myself::Shout(gg::MakeFString(ShoutMsg3,"","","","",""));
					} else {
						myself::Say(gg::MakeFString(ShoutMsg3,"","","","",""));
					}
				}
			}
			myself::AddTimerEx(1001,10000);
		}
		if( timer_id == 1002 ) {
			myself::AddTimerEx(1002,10000);
			myself::RemoveAllHateInfoIF(1,0);
			myself::RemoveAllHateInfoIF(3,1000);
		}
		if( timer_id == 1003 ) {
			if( gg::GetAbnormalLevel(myself.sm,myself::Skill_GetAbnormalType(69730305)) > 0 || gg::GetAbnormalLevel(myself.sm,myself::Skill_GetAbnormalType(87556097)) > 0 ) {
				myself::AddTimerEx(1003,10000);
			} else {
				myself::RemoveAllAttackDesire();
				myself.i_ai0 = 0;
				h0 = myself::GetMaxHateInfo(0);
				i0 = 0;
				if( myself::IsNullHateInfo(h0) == 0 ) {
					if( myself::IsNullCreature(h0.creature) == 0 ) {
						i0 = 1;
					}
				}
				if( i0 == 1 ) {
					myself::MakeAttackEvent(h0.creature,100,0);
				}
			}
		}
		super;
	}

	EventHandler ATTACKED(attacker,damage,skill_name_id,f0) {
		if( attacker.is_pc != 0 || myself::IsInCategory(12,attacker.class_id) ) {
			if( myself::GetHateInfoCount() == 0 ) {
				f0 = 0;
				if( SetHateGroup >= 0 ) {
					if( myself::IsInCategory(SetHateGroup,attacker.occupation) ) {
						f0 = ( f0 + SetHateGroupRatio );
					}
				}
				if( attacker.occupation == SetHateOccupation ) {
					f0 = ( f0 + SetHateOccupationRatio );
				}
				if( SetHateRace == attacker.race ) {
					f0 = ( f0 + SetHateRaceRatio );
				}
				f0 = ( ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) + ( ( f0 / 100 ) * ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) ) );
				myself::AddHateInfo(attacker,gg::FloatToInt(( ( f0 * 100 ) + 300 )),0,1,1);
			} else {
				f0 = 0;
				if( SetHateGroup >= 0 ) {
					if( myself::IsInCategory(SetHateGroup,attacker.occupation) ) {
						f0 = ( f0 + SetHateGroupRatio );
					}
				}
				if( attacker.occupation == SetHateOccupation ) {
					f0 = ( f0 + SetHateOccupationRatio );
				}
				if( SetHateRace == attacker.race ) {
					f0 = ( f0 + SetHateRaceRatio );
				}
				f0 = ( ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) + ( ( f0 / 100 ) * ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) ) );
				myself::AddHateInfo(attacker,gg::FloatToInt(( f0 * 100 )),0,1,1);
			}
		}
		if( gg::GetAbnormalLevel(myself.sm,myself::Skill_GetAbnormalType(69730305)) > 0 || gg::GetAbnormalLevel(myself.sm,myself::Skill_GetAbnormalType(87556097)) > 0 ) {
			myself.i_ai0 = 1;
			myself::AddTimerEx(1003,10000);
		}
		super;
	}

	EventHandler CLAN_ATTACKED(attacker,damage,f0,skill_name_id) {
		if( myself::GetLifeTime() > 7 ) {
			if( attacker.is_pc != 0 || myself::IsInCategory(12,attacker.class_id) ) {
				if( myself::GetHateInfoCount() == 0 ) {
					f0 = 0;
					if( SetHateGroup >= 0 ) {
						if( myself::IsInCategory(SetHateGroup,attacker.occupation) ) {
							f0 = ( f0 + SetHateGroupRatio );
						}
					}
					if( attacker.occupation == SetHateOccupation ) {
						f0 = ( f0 + SetHateOccupationRatio );
					}
					if( SetHateRace == attacker.race ) {
						f0 = ( f0 + SetHateRaceRatio );
					}
					f0 = ( ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) + ( ( f0 / 100 ) * ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) ) );
					myself::AddHateInfo(attacker,gg::FloatToInt(( ( f0 * 30 ) + 300 )),0,1,1);
				} else {
					f0 = 0;
					if( SetHateGroup >= 0 ) {
						if( myself::IsInCategory(SetHateGroup,attacker.occupation) ) {
							f0 = ( f0 + SetHateGroupRatio );
						}
					}
					if( attacker.occupation == SetHateOccupation ) {
						f0 = ( f0 + SetHateOccupationRatio );
					}
					if( SetHateRace == attacker.race ) {
						f0 = ( f0 + SetHateRaceRatio );
					}
					f0 = ( ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) + ( ( f0 / 100 ) * ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) ) );
					myself::AddHateInfo(attacker,gg::FloatToInt(( f0 * 30 )),0,1,1);
				}
			}
		}
	}

	EventHandler SEE_SPELL(speller,skill_name_id,target,f0,i0) {
		if( myself::Skill_GetEffectPoint(skill_name_id) > 0 ) {
			if( myself.p_state == 3 && myself.top_desire_target == speller ) {
				i0 = myself::Skill_GetEffectPoint(skill_name_id);
				f0 = 0;
				if( SetHateGroup >= 0 ) {
					if( myself::IsInCategory(SetHateGroup,speller.occupation) ) {
						f0 = ( f0 + SetHateGroupRatio );
					}
				}
				if( speller.occupation == SetHateOccupation ) {
					f0 = ( f0 + SetHateOccupationRatio );
				}
				if( SetHateRace == speller.race ) {
					f0 = ( f0 + SetHateRaceRatio );
				}
				f0 = ( ( ( 1.000000 * i0 ) / ( myself.sm.level + 7 ) ) + ( ( f0 / 100 ) * ( ( 1.000000 * i0 ) / ( myself.sm.level + 7 ) ) ) );
				myself::AddHateInfo(speller,gg::FloatToInt(( f0 * 150 )),0,1,1);
			} else {
				i0 = myself::Skill_GetEffectPoint(skill_name_id);
				f0 = 0;
				if( SetHateGroup >= 0 ) {
					if( myself::IsInCategory(SetHateGroup,speller.occupation) ) {
						f0 = ( f0 + SetHateGroupRatio );
					}
				}
				if( speller.occupation == SetHateOccupation ) {
					f0 = ( f0 + SetHateOccupationRatio );
				}
				if( SetHateRace == speller.race ) {
					f0 = ( f0 + SetHateRaceRatio );
				}
				f0 = ( ( ( 1.000000 * i0 ) / ( myself.sm.level + 7 ) ) + ( ( f0 / 100 ) * ( ( 1.000000 * i0 ) / ( myself.sm.level + 7 ) ) ) );
				myself::AddHateInfo(speller,gg::FloatToInt(( f0 * 75 )),0,1,1);
			}
		}
	}

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

	EventHandler MY_DYING() {
		if( ShoutMsg4 > 0 && gg::Rand(100) < 30 ) {
			if( IsSay == 0 ) {
				myself::Shout(gg::MakeFString(ShoutMsg4,"","","","",""));
			} else {
				myself::Say(gg::MakeFString(ShoutMsg4,"","","","",""));
			}
		}
	}

}
