@LabelIndex 38811
@StringIndex 0
class 0 lv3_wizard_private : lv3_party_private_monster {
parameter:
	int	SelfRangeDDMagic1 = 271253505;
	int	SelfRangeDDMagic2 = 271253505;
	int	SelfRangeDDMagic3 = 271253505;

handler:
	EventHandler CREATED(c0) {
		myself.c_ai0 = gg::GetCreatureFromIndex(myself.sm.param1);
		if( myself::IsNullCreature(myself.c_ai0) == 0 ) {
			if( myself::DistFromMe(myself.c_ai0) < 100 && myself::GetLifeTime() > 3 ) {
				myself::AddUseSkillDesire(myself.sm,SelfRangeDDMagic1,0,1,1000000);
			} else {
				myself::AddAttackDesire(myself.c_ai0,1,300);
			}
		}
		gg::SendScriptEvent(myself.boss,1000,gg::GetIndexFromCreature(myself.sm));
		myself::AddTimerEx(4000,1000);
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id) {
		if( timer_id == 4000 ) {
			if( myself::IsNullCreature(myself.c_ai0) == 0 ) {
				if( myself::DistFromMe(myself.c_ai0) < 100 ) {
					myself::AddUseSkillDesire(myself.sm,SelfRangeDDMagic1,0,1,1000000);
				}
				myself::AddAttackDesire(myself.c_ai0,1,50);
			}
			myself::AddTimerEx(4000,1000);
		}
		super;
	}

	EventHandler MOVE_TO_FINISHED(x,y,z) {
		return;
		if( myself::IsNullCreature(myself.c_ai0) == 0 ) {
			if( myself::DistFromMe(myself.c_ai0) < 100 ) {
				myself::AddUseSkillDesire(myself.c_ai0,SelfRangeDDMagic1,0,1,1000000);
			} else {
				myself::AddFollowDesire(myself.c_ai0,1000);
			}
		}
	}

	EventHandler USE_SKILL_FINISHED(target,skill_name_id) {
		if( skill_name_id == SelfRangeDDMagic1 ) {
			if( myself::IsNullCreature(myself.c_ai0) == 0 ) {
				if( gg::Rand(100) < 50 && myself::DistFromMe(myself.c_ai0) < 200 ) {
					myself::AddUseSkillDesire(myself.c_ai0,SelfRangeDDMagic2,0,1,3000);
				} else {
					myself::AddUseSkillDesire(myself.c_ai0,SelfRangeDDMagic3,0,1,3000);
				}
			}
			myself::RemoveAllAttackDesire();
		} else {
			myself::Suicide();
		}
	}

}
