translate.c

foundationI_fluffos_v1/lib/secure/SimulEfun/translate.c · 807 B

From the archive foundation1_fluffos_v1.zip

Download the archive   « Back to the archive contents

//      /adm/simul_efun/translate.c
//      from the Nightmare Mudlib
//      translates a string into nonsense for non-proficient speakers
//      created by Descartes of Borg 930823
//      based on a speak function by Valodin@Nightmare

#define FLUBS ({ "womble", "assimilate", "scruvy", "bing", "lait", "krishe",\
"something", "blarg", "gyro", "yellow hephalumps", "darmok", "tanagra",\
"cabbage", "blurgle", "jello", "migrated", "furry", "driznit", "folnar",\
"pamplemousse", "burrito", "eyne", "duh", "hamster",\
})

string translate(string str, int prof) {
    string *words;
    int i, max, flubsize;

    flubsize = sizeof(FLUBS);
    for(i=0, max = sizeof(words = explode(str, " ")); i<max; i++) 
      if(random(10)+1 > prof) words[i] = FLUBS[random(flubsize)];
    return implode(words, " ");
}

Site Stats

Snippets: 1791
Codebases: 571