First thing, I wouldn't make it racial.
In my opinion languages are regional.
This depends on your mud.
But, I added skills for my languages.
First, change do_say to not send it TO_ROOM, but TO_CHAR.
(You'll need to loop through the characters in your room.
Make sure you fix your SPEECH trigger if you have one, it also
loops through the room)
You'll need to keep the string of speech stored somewhere, because this will
modify the string you pass it. Then pass this before each act() to the
players in the room.
You'll need to change quite a bit since this has functionality added for my
mud.
void language_convert(CHAR_DATA *ch, CHAR_DATA *victim, char *lang)
{
int i=0, perc=0, len;
if (IS_AFFECTED(ch, AFF_TONGUES)) return;
len = strlen(lang);
for(i=0; i<len; i++) {
if ((lang[i]>='a' && lang[i]<='z') ||
(lang[i]>='A' && lang[i]<='Z')){
perc = number_percent();
if (get_skill(victim, ch->speaking) >
get_skill(victim, gsn_reading_lips)) {
if (perc - 25 > get_skill(victim, ch->speaking)){
lang[i] = lang[i] + number_range(-3,3);
/* come up with something here so there are no weird letters
*/
if (lang[i] < 'A') lang[i] = 'A';
else
if (lang[i] > 'Z' && lang[i] < 'a') lang[i] = 'a';
else
if (lang[i] > 'z') lang[i] = 'z';
}
}
else{
if (perc - 25 > get_skill(victim, gsn_reading_lips)){
lang[i] = lang[i] + number_range(-3,3);
/* come up with something here so there are no weird letters
*/
if (lang[i] < 'A') lang[i] = 'A';
else
if (lang[i] > 'Z' && lang[i] < 'a') lang[i] = 'a';
else
if (lang[i] > 'z') lang[i] = 'z';
}
}
}
}
if (get_skill(victim, gsn_reading_lips))
check_improve(victim, gsn_reading_lips, TRUE,4);
else{
if (number_percent()>50)
check_improve(victim, ch->speaking, TRUE,4);
}
}
> -----Original Message-----
> From: Verias [mailto:[EMAIL PROTECTED]
> Sent: Saturday, December 22, 2001 4:21 PM
> To: [email protected]
> Subject: Racial Languages
>
>
> Hey list.
>
> This may be a bit overkill on my part, but I like the detail
> in the idea. I
> was thinking of giving each race a language.
> And yeah, I've seen the snippets, however I was unsatisfied.
>
> Here's what I'm trying to lay out on paper so far, no actual
> coding has
> begun, I'm still in idea phase now.
>
> 2 elves and 1 dwarf are in the same room, dwarf doesn't know
> how to speak
> elven.
>
> Elf1 says 'Hey, I think we should kill the dwarf.'
> Elf 2 sees this
> Dward sees this
> Elf1 says 'Dvashid, o'oind locuta daman.'
>
> I have no clue how i'm going to make this work, but dang it
> i'm gonna try.
>
> any ideas or inputs would be appreciated.
>
>
> Veri
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>