Posted by
| Nick Gammon
Australia (22,973 posts) bio
Forum Administrator |
Message
| I don't want to do a step-by-step for this problem, because then you will need the same thing for the next one.
I understand your English, it is better than my Italian. :)
You need to become familiar with the tools, so you can do it for yourself. I can guide you in the general idea, but then you need to work it out.
My page http://www.gammon.com.au/smaug/howtocompile.htm describes the general idea of searching for things and recompiling.
In your case, you have removed CLASS_PALADIN so you need to remove references to it. Use "grep" if you are using Cygwin or Linux to find things, or if you are using Windows use a editor with "find in files".
For example:
$ grep -n CLASS_PALADIN *.c
act_info.c:103: if ( (IS_AFFECTED(ch, AFF_DETECT_EVIL) || ch->class==CLASS_PALADIN)
act_info.c:106: if ( ch->class==CLASS_PALADIN
act_info.c:109: if ( ch->class==CLASS_PALADIN
act_info.c:112: if ( ch->class==CLASS_PALADIN
act_info.c:117: if ( ch->class==CLASS_PALADIN
act_info.c:120: if ( ch->class==CLASS_PALADIN
act_info.c:123: if ( ch->class==CLASS_PALADIN
act_info.c:562: && ( IS_AFFECTED(ch, AFF_DETECT_EVIL) || ch->class==CLASS_PALADIN) )
strcat( buf, "(Red Aura) " );
act_info.c:564: && ch->class==CLASS_PALADIN ) strcat( buf, "(Grey Aura) " );
act_info.c:566: && ch->class==CLASS_PALADIN ) strcat( buf, "(White Aura) " );
act_obj.c:1493: && ch->class == CLASS_PALADIN )
act_wiz.c:5103: (victim->class == CLASS_PALADIN) )
comm.c:1860: if ( ch->class == CLASS_PALADIN )
comm.c:2068: if ( ch->class == CLASS_PALADIN )
update.c:596: if(ch->class == CLASS_PALADIN){
The -n option says to show line numbers. So you can see above both the file names and line numbers tha you need to edit to find each case.
In the above example, we see a whole batch. Taking the last one (update.c:596) we can see the sort of thing.
Edit update.c (vi update.c) and go to line 596 (596G):
/* Paladins need some restrictions, this is where we crunch 'em -h */
if(ch->class == CLASS_PALADIN){
if(ch->alignment<250){
set_char_color( AT_BLOOD, ch );
send_to_char( "You are wracked with guilt and remorse for your craven actions!\n\r", ch );
act( AT_BLOOD, "$n prostrates $mself, seeking forgiveness from $s Lord.", ch,
NULL, NULL, TO_ROOM);
worsen_mental_state( ch, 15 );
return;
}
if(ch->alignment<500){
set_char_color( AT_BLOOD, ch );
send_to_char( "As you betray your faith, your mind begins to betray you.\n\r", ch );
act( AT_BLOOD, "$n shudders, judging $s actions unworthy of a Paladin.", ch,
NULL, NULL, TO_ROOM);
worsen_mental_state( ch, 6 );
return;
}
}
Now if you are using vi, and you put the cursor on the last "{" on the first line, and press the % key it will take the cursor to the matching end brace. This shows how many lines need to be deleted, or commented out.
Delete those, and that file should now compile OK.
If you are using Windows then MUSHclient has a "find matching brace" function in its internal notepad, that does the same thing.
Now do the same thing for the other files. Don't forget to "make" afterwards to recompile everything.
You may wish to use the FUSS (Fixed Up Smaug Source) code which is now in the downloads area of this site. That fixes the problem with the "-2" in the class list, so you will see 3 classes if you have 3 classes and not just 1.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|