So one of the early things I want to do is rename and redescribe alot of the stock skills/spells, to give them my own flavor.
I started by changing mistwalk to shadowstep. I used windows search to find all examples of mistwalk, changed them and recompiled. But upon logging in, I still have mistwalk on my admin's skill list, and if I type 'mistwalk' or 'shadowstep' both commands return with a "Huh?".
Code changes:
in skills.c
void do_shadowstep( CHAR_DATA* ch, const char* argument)
{
char arg[MAX_INPUT_LENGTH];
CHAR_DATA *victim;
bool allowday;
set_char_color( AT_DGREEN, ch );
if( IS_NPC( ch ) && IS_AFFECTED( ch, AFF_CHARM ) )
{
send_to_char( "You can't do that right now.\r\n", ch );
return;
}
if( ch->mount )
{
send_to_char( "And scare your mount to death?\r\n", ch );
return;
}
one_argument( argument, arg );
if( arg[0] == '\0' )
{
send_to_char( "Who will be your victim?\r\n", ch );
return;
}
WAIT_STATE( ch, skill_table[gsn_shadowstep]->beats );
if( ( victim = get_char_world( ch, arg ) ) == NULL || victim == ch )
{
send_to_char( "You are unable to sense your victim.\r\n", ch );
return;
}
if( IS_PKILL( ch ) && ch->pcdata->condition[COND_BLOODTHIRST] > 22 )
allowday = TRUE;
else
allowday = FALSE;
if( ( time_info.hour < 21 && time_info.hour > 5 && !allowday )
|| !victim->in_room
|| xIS_SET( victim->in_room->room_flags, ROOM_PRIVATE )
|| xIS_SET( victim->in_room->room_flags, ROOM_SOLITARY )
|| xIS_SET( victim->in_room->room_flags, ROOM_NO_ASTRAL )
|| xIS_SET( victim->in_room->room_flags, ROOM_DEATH )
|| xIS_SET( victim->in_room->room_flags, ROOM_PROTOTYPE )
|| xIS_SET( ch->in_room->room_flags, ROOM_NO_RECALL )
|| victim->level >= ch->level + 15
|| ( IS_NPC( victim ) && xIS_SET( victim->act, ACT_PROTOTYPE ) )
|| ( IS_NPC( victim ) && saves_spell_staff( ch->level, victim ) )
|| ( CAN_PKILL( victim ) && !IS_NPC( ch ) && !CAN_PKILL( ch ) )
|| !in_hard_range( ch, victim->in_room->area )
|| ( IS_SET( victim->in_room->area->flags, AFLAG_NOPKILL ) && IS_PKILL( ch ) ) )
{
send_to_char( "You are unable to sense your victim.\r\n", ch );
learn_from_failure( ch, gsn_shadowstep );
return;
}
/*
* Subtract 22 extra bp for mist walk from 0500 to 2100 SB
*/
if( time_info.hour < 21 && time_info.hour > 5 && !IS_NPC( ch ) )
gain_condition( ch, COND_BLOODTHIRST, -22 );
act( AT_DGREEN, "Your surroundings blur as you assume a form of churning mist!", ch, NULL, NULL, TO_CHAR );
act( AT_DGREEN, "$n dissolves into a cloud of glowing mist, then vanishes!", ch, NULL, NULL, TO_ROOM );
learn_from_success( ch, gsn_shadowstep );
char_from_room( ch );
char_to_room( ch, victim->in_room );
act( AT_DGREEN, "A cloud of glowing mist engulfs you, then withdraws to unveil $n!", ch, NULL, NULL, TO_ROOM );
do_look( ch, "auto" );
return;
}
in db.c
short gsn_shadowstep;
and
ASSIGN_GSN( gsn_shadowstep, "shadowstep" );
in mud.h
DECLARE_DO_FUN( do_shadowstep );
and
extern short gsn_shadowstep;
in smaug.def
gsn_shadowstep @ 2333 DATA
and
do_shadowstep @ 2115
I then changed the skill name in the class list in Vampire.class and updated the helpfile. I could understand why it might not be working because my immort isnt a vampire with BP, but I cant explain why its still in my skills list and why both commands give me a "Huh?"
|