*continued from last post*
cat_j:
send_to_char( "\nYour superior dexterity is no match for the mouse, and you swiftly overtake it!\n", victim );
TEMPWAIT_STATE(victim, 20);
tempwaitb = 11;
tempwaitc = 1;
return;
cat_k:
send_to_char( "\nWith a quick bite to the neck, you kill your prey.\n", victim );
TEMPWAIT_STATE(victim, 20);
tempwaitb = 12;
tempwaitc = 1;
return;
cat_l:
send_to_char( "\nYou take your catch deep into the woods, where hundreds of cats are waiting for your arrival....\n", victim );
TEMPWAIT_STATE(victim, 20);
tempwaitb = 13;
tempwaitc = 1;
return;
cat_m:
send_to_char( "\n\nAn orange-yellow tabby steps forth from the group.\n", victim );
TEMPWAIT_STATE(victim, 20);
tempwaitb = 14;
tempwaitc = 1;
return;
cat_n:
send_to_char( "\nYou open your mouth and let the mouse fall upon the ground for the tabby to see....\n", victim );
TEMPWAIT_STATE(victim, 20);
tempwaitb = 15;
tempwaitc = 1;
return;
cat_o:
send_to_char( "\nThe tabby nods approvingly.\n", victim );
TEMPWAIT_STATE(victim, 20);
tempwaitb = 16;
tempwaitc = 1;
return;
cat_p:
send_to_char( "\nThe tabby says: You came to know our ways and our tongue. You have found much more than that. You have the heart of a tiger within you.... You are one of us.... We shall always be with you, my friend.... My brother....\n", victim );
TEMPWAIT_STATE(victim, 20);
tempwaitb = 17;
tempwaitc = 1;
return;
cat_q:
send_to_char( "\nThe tabby purrs. Soon, the rest of the group starts purring as well.... The sound resonates your ears, and your heart....\n", victim );
TEMPWAIT_STATE(victim, 20);
tempwaitb = 18;
tempwaitc = 1;
return;
cat_r:
send_to_char( "\nThe tabby lovingly rubs his cheek against yours, and disappears, along with the rest of the vision....\n", victim );
victim->race = RACE_CAT;
victim->perm_str += race_table[victim->race]->str_plus;
victim->perm_int += race_table[victim->race]->int_plus;
victim->perm_wis += race_table[victim->race]->wis_plus;
victim->perm_dex += race_table[victim->race]->dex_plus;
victim->perm_con += race_table[victim->race]->con_plus;
victim->perm_cha += race_table[victim->race]->cha_plus;
victim->affected_by = race_table[victim->race]->affected;
victim->perm_lck += race_table[victim->race]->lck_plus;
victim->armor += race_table[victim->race]->ac_plus;
victim->alignment += race_table[victim->race]->alignment;
victim->attacks = race_table[victim->race]->attacks;
victim->defenses = race_table[victim->race]->defenses;
victim->saving_poison_death = race_table[victim->race]->saving_poison_death;
victim->saving_wand = race_table[victim->race]->saving_wand;
victim->saving_para_petri = race_table[victim->race]->saving_para_petri;
victim->saving_breath = race_table[victim->race]->saving_breath;
victim->saving_spell_staff = race_table[victim->race]->saving_spell_staff;
victim->height = number_range(race_table[victim->race]->height *.9, race_table[victim->race]->height *1.1);
victim->weight = number_range(race_table[victim->race]->weight *.9, race_table[victim->race]->weight *1.1);
if ( (iLang = skill_lookup( "common" )) < 0 )
bug( "Nanny: cannot find common language." );
else
victim->pcdata->learned[iLang] = 100;
for ( iLang = 0; lang_array[iLang] != LANG_UNKNOWN; iLang++ )
if ( lang_array[iLang] == race_table[victim->race]->language )
break;
if ( lang_array[iLang] == LANG_UNKNOWN )
bug( "Nanny: invalid racial language." );
else
{
if ( (iLang = skill_lookup( lang_names[iLang] )) < 0 )
bug( "Nanny: cannot find racial language." );
else
victim->pcdata->learned[iLang] = 100;
}
victim->level += 1;
victim->exp += 5000;
victim->max_hit += race_table[victim->race]->hit;
victim->max_mana += race_table[victim->race]->mana;
TEMPWAIT_STATE(victim, 20);
tempwaitb = 19;
tempwaitc = 1;
return;
cat_s:
send_to_char( "\nBut wait a minute....\n", victim );
TEMPWAIT_STATE(victim, 20);
tempwaitb = 20;
tempwaitc = 1;
return;
cat_t:
send_to_char( "\nWhy are you standing on all fours?......\n", victim );
TEMPWAIT_STATE(victim, 20);
tempwaitb = 21;
tempwaitc = 1;
return;
cat_u:
send_to_char( "\nOh my....\n", victim );
TEMPWAIT_STATE(victim, 20);
tempwaitb = 22;
tempwaitc = 1;
return;
cat_v:
send_to_char( "\n\nYou have been transformed into a CAT!!\n", victim );
TEMPWAIT_STATE(victim, 20);
tempwaitb = 23;
tempwaitc = 1;
return;
cat_w:
tempwaitb = 0;
tempwaitc = 0;
return;
}
*that's it*
Now, I know it's probably a lot sloppier and more redundant than it needs to be. I think I have the premise right, but I'm having trouble with the function declaration in comm.c, and with some variables. I assumed that by putting tempwaitb and tempwaitc in mud.h, it would remember those variables' values between functions, but I'm not sure. I hope I've provided enough information for you to be able to get me past this obstacle. Thank you for your time and help =) |