Posted by
| Robert Powell
Australia (367 posts) Bio
|
Message
|
else
{
int adept;
bool can_prac = TRUE;
if( !IS_AWAKE( ch ) )
{
send_to_char( "In your dreams, or what?rn", ch );
return;
}
if( !mob )
{
send_to_char( "You can't do that here.rn", ch );
return;
}
if( ch->practice <= 0 )
{
act( AT_TELL, "$n tells you 'You must earn some more practice sessions.'", mob, NULL, ch, TO_VICT );
return;
}
sn = skill_lookup( argument );
if( can_prac && ( ( sn == -1 ) || ( !IS_NPC( ch ) && ch->level < skill_table[sn]->skill_level[ch->Class]
&& ch->level < skill_table[sn]->race_level[ch->race] ) ) )
{
act( AT_TELL, "$n tells you 'You're not ready to learn that yet...'", mob, NULL, ch, TO_VICT );
return;
}
if( is_name( skill_tname[skill_table[sn]->type], CANT_PRAC ) )
{
act( AT_TELL, "$n tells you 'I do not know how to teach that.'", mob, NULL, ch, TO_VICT );
return;
}
/*
* Skill requires a special teacher
*/
if( skill_table[sn]->teachers && skill_table[sn]->teachers[0] != '' )
{
snprintf( buf, MAX_STRING_LENGTH, "%d", mob->pIndexData->vnum );
if( !is_name( buf, skill_table[sn]->teachers ) )
{
act( AT_TELL, "$n tells you, 'I know not know how to teach that.'", mob, NULL, ch, TO_VICT );
return;
}
}
/*
* Guild checks - right now, cant practice guild skills - done on
* induct/outcast
*/
/*
if ( !IS_NPC(ch) && !IS_GUILDED(ch)
&& skill_table[sn]->guild != CLASS_NONE)
{
act( AT_TELL, "$n tells you 'Only guild members can use that..'"
mob, NULL, ch, TO_VICT );
return;
}
if ( !IS_NPC(ch) && skill_table[sn]->guild != CLASS_NONE
&& ch->pcdata->clan->class != skill_table[sn]->guild )
{
act( AT_TELL, "$n tells you 'That can not be used by your guild.'"
mob, NULL, ch, TO_VICT );
return;
}
*/
if( !IS_NPC( ch ) && skill_table[sn]->guild != CLASS_NONE )
{
act( AT_TELL, "$n tells you 'That is only for members of guilds...'", mob, NULL, ch, TO_VICT );
return;
}
/*
* Disabled for now
if ( mob->level < skill_table[sn]->skill_level[ch->class]
|| mob->level < skill_table[sn]->skill_level[mob->class] )
{
act( AT_TELL, "$n tells you 'You must seek another to teach you that...'",
mob, NULL, ch, TO_VICT );
return;
}
*/
adept = ( int )( class_table[ch->Class]->skill_adept * 0.6 );
if( ch->pcdata->learned[sn] >= adept )
{
snprintf( buf, MAX_STRING_LENGTH, "$n tells you, 'I've taught you everything I can about %s.'",
skill_table[sn]->name );
act( AT_TELL, buf, mob, NULL, ch, TO_VICT );
act( AT_TELL, "$n tells you, 'You'll have to practice it on your own now...'", mob, NULL, ch, TO_VICT );
}
else
{
ch->practice--;
ch->pcdata->learned[sn] += int_app[get_curr_int( ch )].learn;
act( AT_ACTION, "You practice $T.", ch, NULL, skill_table[sn]->name, TO_CHAR );
act( AT_ACTION, "$n practices $T.", ch, NULL, skill_table[sn]->name, TO_ROOM );
if( ch->pcdata->learned[sn] >= adept )
{
ch->pcdata->learned[sn] = adept;
act( AT_TELL, "$n tells you. 'You'll have to practice it on your own now...'", mob, NULL, ch, TO_VICT );
}
}
}
return;
}
|
Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated. | Top |
|