#( "Funny (?) madlib-esq sayings, inspired by gnarr" )

#( "This is *very very ugly*, I should just do it in perl...." )

#( "ml* are the  possible base strings, @ml should match the number of strings you set" )
#( "~ means cancel last space, e.g fool ~'s == fool's, for use with *tags" )
#( "btw most of these tags were ripped off from gnarr:" )
#( "http://www.sacredchao.net/freerpg/gnarr/index.shtml" )
#var $ml1=I am the *WEAPON of *DEITY ~!
#var $ml2=The *PEOPLE of *DEITY have come!
#var $ml3=Your *NEGADJ *NEGEVENT awaits!
#var $ml4=Your *NEGEVENT awaits!
#var $ml5=By the *POSADJ *POSITEM ~!
#var $ml6=By *DEITY ~'s *POSITEM ~!
#var $ml7=My *WEAPON seeks your *NEGEVENT ~!
#var $ml8=From the *PLACE of the *WEAPON I come!
#var $ml9=Face the *POSABILITY of *DEITY ~!
#var $ml10=By the *POSITEM of *DEITY ~!
#var $ml11=For the *PLACE of *DEITY ~!
#var $ml12=Your *NEGEVENT *TIME ~!
#var $ml13=Remember the *PLACE of the *PEOPLE ~!
#var $ml14=Go back to your *NEGADJ *PLACE ~!
#var $ml15=For *DEITY of *NAMEDPLACE ~'s honor!
#var $ml16=Your *NEGABILITY shall be your *NEGEVENT, like *ANIMAL in *NAMEDPLACE ~!
#var $ml17=The *PEOPLE of the *POSITEM have brought your *NEGEVENT ~!
#var $ml18=By the *POSADJ *PEOPLE of *DEITY ~, your *NEGEVENT *TIME ~!
#var $ml19=For *DEITY ~, the *POSITEM ~, and the *POSADJ ~!
#var $ml20=For the *POSABILITY of *DEITY comes your *NEGADJ *NEGEVENT ~!
#var $ml21=By *DEITY ~, your *NEGEVENT *TIME ~!
#var $ml22=The *POSABILITY of *DEITY brings your *NEGEVENT ~!
#var $ml23=By the *POSITEM of the *PEOPLE ~, you shall meet your *NEGEVENT ~!
#var $ml24=In the name of *DEITY of *NAMEDPLACE ~, the *POSADJ *PEOPLE ~, and the *POSITEM ~!
#var $ml25=May the *POSABILITY of *DEITY bring your *NEGEVENT ~!
#var $ml26=By *DEITY ~, I shall avenge the *NEGEVENT of my *PEOPLE ~!
#var $ml27=By *DEITY ~, I shall avenge the *NEGEVENT of my *POSADJ *PEOPLE ~!
#var $ml28=By *DEITY ~, help the *POSADJ *PEOPLE ~!
#var $ml29=By *DEITY ~'s *PLACE ~, I will bring your *NEGEVENT ~!
#var $ml30=By *DEITY ~'s *POSITEM ~, your *NEGEVENT *TIME ~!

#var @ml=30

#( "The between the * stuff is ml* things, just space sep'd items" )
#( "Here ~==space, so if you need to put spaces in something use ~" )
#var $ml_NEGADJ=stinking weak cowardly evil treacherous
#var $ml_POSADJ=mighty great strong honerable brave
#var $ml_POSABILITY=might greatness strength power
#var $ml_NEGABILITY=weakness evilness lies
#var $ml_ANIMAL=a~snake a~spider a~wolf
#var $ml_PLACE=house hills plains mountains cave
#var $ml_PEOPLE=sons blood brethren guardians heroes
#var $ml_NEGEVENT=death end defeat destruction fall fate last~day
#var $ml_PRONOUN=my his her
#var $ml_WEAPON=axe sword blade weapon hammer bow
#var $ml_DEITY=the~god the~Ainur the~elder our~forefather the~264~pound~woman
#var $ml_NAMEDPLACE=the~Blue~Mountains the~Grey~Havens Bree Fornost Arda Rivendell Moria Isengard
#var $ml_TIME=is~near is~nigh has~come
#var $ml_NEGITEM=fires
#var $ml_POSITEM=beard ring Silmaril Axe~of~Durin

#alias mlprint={ml_gen;#print ($mlstr)}
#alias mlsay={ml_gen;#send ("say " + $mlstr)}
#alias mlnarr={ml_gen;#send ("narr " + $mlstr)}

#( "Now we get extremely ugly.  Break each step in to an alias because it gets to become unmanagable very quickly" )

#( "Runs all sub parts, when done you have a $mlstr with the string :)" )
#alias ml_gen={ml_choose_string;ml_replace_all_tokens;#($mlstr=$mlstr.>2)}

#( "Choose a random string and put it in $mlstr" )
#alias ml_choose_string={#(@mlnum=(rand @ml)+1);#ex ("#($mlstr=$ml"+%@mlnum+")")}

#( "Replace tokens in the mlstr, returns mlnstr" )
#alias ml_replace_all_tokens={#(@mlwords=:?$mlstr);#($mlnstr="");#for (@mli=1;@mli<=@mlwords;@mli++) {#($mltok=$mlstr:@mli);ml_proc_token;#if ($mltok.1!="~") #($mlnstr+=" ");#else #($mltok=$mltok.>2);#($mlnstr+=$mltok)};#($mlstr=$mlnstr)}

#( "Checks if word is token.  Does any processing needed, final word to output is in $mltok" )
#alias ml_proc_token={#($mlfirst=$mltok.1);#if ($mlfirst=="*") {ml_strip_star;ml_get_word;#($mltok=$mlword)}}

#( "Strips ** from token" )
#alias ml_strip_star={#($mltok=$mltok.>2)}

#( "Strips non-alpha chars from a token" )
#alias ml_strip_non_alpha={#(@mlchars=.?$mltok);#($mlntok="");#for (@mlci=1;@mlci<=@mlchars;@mlci++) {#if ($mltok.@mlci>="A"&&$mltok.@mlci<="Z") #($mlntok+=$mltok.@mlci)};#($mltok=$mlntok)}

#( "Gets a word from the wordlist named in mltok, returns in mlword" )
#alias ml_get_word={ml_strip_non_alpha;#ex ("#($mlwords=$ml_"+$mltok+")");#if ($mlwords=="") #($mlwords=$mltok);#(@mlwnum=(rand :?$mlwords)+1);#($mlword=$mlwords:@mlwnum);ml_word_spacify}

#( "This makes all ~ spaces in mlword" )
#alias ml_word_spacify={#(@mlchars=.?$mlword);#($mlnword="");#for (@mlci=1;@mlci<=@mlchars;@mlci++) {#if ($mlword.@mlci=="~") #($mlnword+=" "); #else #($mlnword+=$mlword.@mlci)};#($mlword=$mlnword)}
