CrystalDreams Assorted Stuff

From Gwen Morse's Wiki
Jump to: navigation, search
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;;         CrystalDREAMS stuff
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Crystal Dreams sorting
;;;

/addworld -T'tiny.mush3.dream' cd crystal.theurgy.org 5000

;;;

/def -T"tiny.mush3.dream*" -p7 -mregexp -t"There are (\\d+) cartons here, waiting to be sorted\." cd_sort_highlight_cartons = \
  /set CARTON_NUMBER=%P1%;\
    /if ({CARTON_NUMBER} == "0") \
      /test substitute(decode_attr(strcat({PL}, "@{BCred}", {P0}, "@{n}", {PR})))%;\
    /elseif ({CARTON_NUMBER}  >= "1") \
      /test substitute(decode_attr(strcat({PL}, "@{BCgreen}", {P0}, "@{n}", {PR})))%;\
    /else \
      /echo TFRC: Broken match on the number of cartons in this room.%;\
    /endif

/def -T"tiny.mush3.dream*" -p10 -aCred -mregexp -t"^\\s?(\\d+)\\s(A|B|C|D|E|F|G)(b|#|\\s)\\s+(tiny|medium small|medium large|medium|very small|small|large|very large)\\s+(light|pale|deep|rich deep|very pale|medium|pure)\\s+(green|rose|blue|yello|white|black|amethyst|\\s)\\s*?(pyram |rectangle|dodecah|dodecahedron|prism|cylinde|cylinder|rectang|pentagon|pentago| cone|octagon)\\s+(very slightly flawed|slightly flawed|flawed|majorly flawed|severely flawed|almost perfect|perfect)" cd_sort_get_line = \
  /set CD_NUM %{P1} %;\
  /test put_2array('CDSORT',%{CD_NUM},0,'%{CD_NUM}') %;\
  /if ({P3} =~ "#") \
    /test put_2array('CDSORT',%{CD_NUM},1,'%{P2} sharp') %;\
  /elseif ({P3} =~ "b") \
    /test put_2array('CDSORT',%{CD_NUM},1,'%{P2} flat') %;\
  /else \
    /test put_2array('CDSORT',%{CD_NUM},1,'%{P2}') %;\
  /endif%;\
  /test put_2array('CDSORT',%{CD_NUM},2,'%{P4}') %;\
  /test put_2array('CDSORT',%{CD_NUM},3,'%{P5}') %;\
  /test put_2array('CDSORT',%{CD_NUM},4,'%{P6}') %;\
  /test put_2array('CDSORT',%{CD_NUM},5,'%{P7}') %;\
  /test put_2array('CDSORT',%{CD_NUM},6,'%{P8}')

;;; Grab the current crystal market

/def -qFp5 -T"tiny.mush3.dream*" -mregexp -t"^\\s+ (black) \\s+(\\d+)\\s+(-?\\d+)\\s+  (pyramid) \\s+(\\d+)\\s+(-?\\d+)\\s+  (very large) \\s+(\\d+)\\s+(-?\\d+)" cdsort_get_market_color1 = \
  /set MARKET_BLACK %{P2}:%{P3}%; \
  /set MARKET_PYRAMID %{P5}:%{P6}%; \
  /set MARKET_VERYLARGE %{P8}:%{P9}

/def -qFp5 -T"tiny.mush3.dream*" -mregexp -t"^\\s+ (white) \\s+(\\d+)\\s+(-?\\d+)\\s+  (tetrahedron) \\s+(\\d+)\\s+(-?\\d+)\\s+  (large) \\s+(\\d+)\\s+(-?\\d+)" cdsort_get_market_color2 = \
  /set MARKET_WHITE %{P2}:%{P3}%; \
  /set MARKET_TETRAHEDRON %{P5}:%{P6}%; \
  /set MARKET_LARGE %{P8}:%{P9}

/def -qFp5 -T"tiny.mush3.dream*" -mregexp -t"^\\s+ (amethyst) \\s+(\\d+)\\s+(-?\\d+)\\s+  (rectangle) \\s+(\\d+)\\s+(-?\\d+)\\s+  (medium large) \\s+(\\d+)\\s+(-?\\d+)" cdsort_get_market_color3 = \
  /set MARKET_AMETHYST %{P2}:%{P3}%; \
  /set MARKET_RECTANGLE %{P5}:%{P6}%; \
  /set MARKET_MEDIUMLARGE %{P8}:%{P9}

/def -qFp5 -T"tiny.mush3.dream*" -mregexp -t"^\\s+ (green) \\s+(\\d+)\\s+(-?\\d+)\\s+  (prism) \\s+(\\d+)\\s+(-?\\d+)\\s+  (medium) \\s+(\\d+)\\s+(-?\\d+)" cdsort_get_market_color4 = \
  /set MARKET_GREEN %{P2}:%{P3}%; \
  /set MARKET_PRISM %{P5}:%{P6}%; \
  /set MARKET_MEDIUM %{P8}:%{P9}

/def -qFp5 -T"tiny.mush3.dream*" -mregexp -t"^\\s+ (yellow) \\s+(\\d+)\\s+(-?\\d+)\\s+  (pentagon) \\s+(\\d+)\\s+(-?\\d+)\\s+  (medium small) \\s+(\\d+)\\s+(-?\\d+)" cdsort_get_market_color5 = \
  /set MARKET_YELLOW %{P2}:%{P3}%; \
  /set MARKET_PENTAGON %{P5}:%{P6}%; \
  /set MARKET_MEDIUMSMALL %{P8}:%{P9}

/def -qFp5 -T"tiny.mush3.dream*" -mregexp -t"^\\s+ (blue) \\s+(\\d+)\\s+(-?\\d+)\\s+ (octagon) \\s+(\\d+)\\s+(-?\\d+)\\s+ (small) \\s+(\\d+)\\s+(-?\\d+)" cdsort_get_market_color6 = \
  /set MARKET_BLUE %{P2}:%{P3}%; \
  /set MARKET_OCTAGON %{P5}:%{P6}%; \
  /set MARKET_SMALL %{P8}:%{P9}

/def -qFp5 -T"tiny.mush3.dream*" -mregexp -t"^\\s+ (rose) \\s+(\\d+)\\s+(-?\\d+)\\s+  (dodecahedron) \\s+(\\d+)\\s+(-?\\d+)\\s+  (very small) \\s+(\\d+)\\s+(-?\\d+)" cdsort_get_market_color7 = \
  /set MARKET_ROSE %{P2}:%{P3}%; \
  /set MARKET_DODECAHEDRON %{P5}:%{P6}%; \
  /set MARKET_VERYSMALL %{P8}:%{P9}

/def -qFp5 -T"tiny.mush3.dream*" -mregexp -t"^\\s+  (cylinder) \\s+(\\d+)\\s+(-?\\d+)\\s+  (tiny) \\s+(\\d+)\\s+(-?\\d+)" cdsort_get_market_color8 = \
  /set MARKET_CYLINDER %{P2}:%{P3}%; \
  /set MARKET_TINY %{P5}:%{P6}

/def -qFp5 -T"tiny.mush3.dream*" -mregexp -t"^\\s+  (cone) \\s+(\\d+)\\s+(-?\\d+)\\s+" cdsort_get_market_color9 = \
  /set MARKET_CONE %{P2}:%{P3}%;\
  /set MARKET_COLOR_CDALL Market Color: Black %{MARKET_BLACK}, White %{MARKET_WHITE}, Amethyst %{MARKET_AMETHYST}, Green %{MARKET_GREEN}, Yellow %{MARKET_YELLOW}, Blue %{MARKET_BLUE}, Rose %{MARKET_ROSE}%;\
  /set MARKET_SHAPE_CDALL Market Shape: Pyramid %{MARKET_PYRAMID}, Tetrahedron %{MARKET_TETRAHEDRON}, Rectangle %{MARKET_RECTANGLE}, Prism %{MARKET_PRISM}, Pentagon %{MARKET_PENTAGON}, Octagon %{MARKET_OCTAGON}, Dodecahedron %{MARKET_DODECAHEDRON}, Cylinder %{MARKET_CYLINDER}, Cone %{MARKET_CONE}%;\
  /set MARKET_SIZE_CDALL Market Size: Very Large %{MARKET_VERYLARGE}, Large %{MARKET_LARGE}, Medium Large %{MARKET_MEDIUMLARGE}, Medium %{MARKET_MEDIUM}, Medium Small %{MARKET_MEDIUMSMALL}, Small %{MARKET_SMALL}, Very Small %{MARKET_VERYSMALL}, Tiny %{MARKET_TINY}