@prog RandWordDup.Filter 1 99999 d 1 i ( Random word duplication By Warwick on FurryMUCK 8/3/94. {March, not Aug. :3} ----------------------- Duplicates a random number of words a random times at a random rate. :3 ` sayfilter words n - Set max number of words to duplicate sayfilter rate n - Set %likelihood to do each duplication sayfilter repeats n - Set max number of repeats per word ) var words var rate var repeats : setval ( n db ch mess s -- n db ch mess 0 ) ( n db ch mess s -- n ">> Done" "" 1 1 ) over tolower over strlen strncmp if 0 exit then dup " " instr dup not if pop pop pop pop "RandWordDup: Expected a numeric parameter" else strcut swap dup strlen 1 - strcut pop "_say///" 6 pick intostr "" subst 4 rotate intostr "" subst swap strcat swap atoi intostr 0 addprop "Value set." then "" 1 1 ; : start ( n db ch mess -- n db ch mess 0 ) command @ "sayfilter" stringcmp not if "words " setval if exit then "rate " setval if exit then "repeats " setval if exit then 0 exit then "_say/n/ch/" 5 pick dup < 0 if 0 swap - then intostr "n" subst 3 pick "ch" subst 4 pick swap over over "words" strcat getpropstr atoi dup not if pop 1 then words ! over over "rate" strcat getpropstr atoi dup not if pop 50 then rate ! "repeats" strcat getpropstr atoi dup not if pop 1 then repeats ! " " explode begin words @ dup 1 - words ! while random 100 % rate @ > if continue then random over % 3 + dup pick swap 2 + random repeats @ % 1 + begin dup while 1 - -3 rotate over over 0 swap - rotate 4 rotate 1 + -4 rotate rot repeat pop pop pop repeat begin 1 - dup while -3 rotate " " strcat swap strcat swap repeat ; 59 lines displayed. . c q @register #me RandWordDup.Filter=tmp/prog1 @set $tmp/prog1=L @set $tmp/prog1=Z @set $tmp/prog1=3 @propset $tmp/prog1=str:/_/de:A scroll containing a spell called RandWordDup.Filter @propset $tmp/prog1=str:/_help/1#:12 @propset $tmp/prog1=str:/_help/1#/1:The Random Word Duplicator by Warwick on FurryMUCK 9/Mar/94 @propset $tmp/prog1=str:/_help/1#/10:duplicated, any subsequent duplications are more likely to copy the word @propset $tmp/prog1=str:/_help/1#/11:already duplicated. @propset $tmp/prog1=str:/_help/1#/12:------------------------------------------------------------------------------- @propset $tmp/prog1=str:/_help/1#/2:------------------------------------------------------------------------------- @propset $tmp/prog1=str:/_help/1#/3:Duplicates a random number of words a random times at a random rate. @propset $tmp/prog1=str:/_help/1#/4:` @propset $tmp/prog1=str:/_help/1#/5:sayfilter words n - Set max number of words to duplicate @propset $tmp/prog1=str:/_help/1#/6:sayfilter rate n - Set %likelihood to do each duplication @propset $tmp/prog1=str:/_help/1#/7:sayfilter repeats n - Set max number of repeats per word @propset $tmp/prog1=str:/_help/1#/8:` @propset $tmp/prog1=str:/_help/1#/9:Be warned that the effects are cumulative, that is, once a word had been