@LabelIndex 110274
@StringIndex 13190
class 0 c_tower_warrior_run_away : warrior_use_skill {
parameter:
	int	flee_x = 0;
	int	flee_y = 0;
	int	flee_z = 0;

handler:
	EventHandler CREATED() {
		myself.i_ai0 = 0;
	}

	EventHandler ATTACKED(attacker,damage,i0,i1) {
		if( gg::FloatToInt(( ( myself.sm.hp / myself.sm.max_hp ) * 100 )) < 10 && flee_x != 0 && flee_y != 0 && flee_z != 0 && myself.i_ai0 == 0 ) {
			myself.c_ai0 = attacker;
			myself::Say(gg::MakeFString(1800132,"","","","",""));
			myself::AddMoveToDesire(flee_x,flee_y,flee_z,999999999999999999);
			myself.i_ai0 = 1;
		}
		super;
	}

	EventHandler MOVE_TO_FINISHED(attacker,x,y,z) {
		myself::Say(gg::MakeFString(1800133,"","","","",""));
		myself::BroadcastScriptEvent(88001,gg::GetIndexFromCreature(myself.c_ai0),600);
	}

	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2,c0) {
		if( myself.sm.alive == 0 ) {
			return;
		}
		if( script_event_arg1 == 88001 && myself.p_state != 3 ) {
			c0 = gg::GetCreatureFromIndex(script_event_arg2);
			if( myself::IsNullCreature(c0) == 0 ) {
				myself::AddAttackDesire(c0,1,1000000);
			}
		}
	}

}
