@LabelIndex 13839
@StringIndex 0
class 0 warrior_patrol : warrior {
parameter:
	waypointstype	WayPoints;
	waypointdelaystype	WayPointDelays;

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

	EventHandler CREATED() {
		myself::AddMoveToWayPointDesire(WayPoints,WayPointDelays,1,10);
		super;
	}

	EventHandler MOVE_TO_WAY_POINT_FINISHED(way_point_index,next_way_point_index) {
		myself.i_ai1 = next_way_point_index;
		myself::AddTimerEx(100001,( myself::GetWayPointDelay(WayPointDelays,way_point_index) * 1000 ));
	}

	EventHandler TIMER_FIRED_EX(timer_id) {
		if( timer_id == 100001 ) {
			if( myself.i_ai1 > 0 ) {
				myself::AddMoveToWayPointDesire(WayPoints,WayPointDelays,myself.i_ai1,10);
			} else {
				myself::AddMoveToWayPointDesire(WayPoints,WayPointDelays,1,10);
			}
		}
		super;
	}

}
