Kahlyla's Lazy Auto Leveler

From Gwen Morse's Wiki
Jump to: navigation, search

Don't use this if you use the full /Fly macro!

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Kahlyla's Lazy Auto-Leveler
;;;
;;; Requested by Kahlyla@CM and based on zMUD macros she used.
;;; Written by Gwen Morse (gwen dot morse at gmail dot com)
;;;
;;; At altitude 7, it levels the sled and then noses down by 2.
;;; At altitude 6, it levels the sled and then noses down by 1.
;;; At altitude 5 or lower, it levels the sled.
;;;
;;; This partially automates the process of landing your sled and
;;; minimizes your chances of crashing.
;;; 
;;; You don't need this macro if you use my full flying library.

/def -F -p30 -T'tiny.cm' -mregexp -t"^Loc: ([A-Z])([A-Z]) ([0-9][0-9]?[0-9]?) (NE|NW|SE|SW)+ Heading: (N|S|E|W|NE|NW|SE|SW|SSW|SSE|NNW|NNE)[(][0-9][0-9]?[)] Altitude: ([0-9][0-9]?[0-9]?), Speed: ([0-9][0-9]?)" loc_match = \
/set LOC_ALT=%P6%;\
/if ({LOC_ALT}=~"7") \
/send level %;\
/send nose down 2%;\
/elseif ({LOC_ALT}=~"6") \
/send level %;\
/send nose down 1%;\
/elseif ({LOC_ALT}=~"5") \
/send level %;\
/elseif ({LOC_ALT}=~"4") \
/send level %;\
/elseif ({LOC_ALT}=~"3") \
/send level %;\
/elseif ({LOC_ALT}=~"2") \
/send level %;\
/elseif ({LOC_ALT}=~"1") \
/send level %;\
/endif

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;