combat system question

Posted by Addrodoc on Fri 03 Oct 2003 04:05 AM — 7 posts, 25,177 views.

#0
I started working with smaug a few months ago.. this is my first mud so i guess i'm still kind of a newbie but everything went great so far.... untill the last few days..
I'm trying to change smaug combat system messages to another language, but I cant seem to find out how to change the 'Your' in "Your slash cuts someone" and the 'you!'in "someone hits you!".

Example:

Your slag mist Puff.
Puff parries your attack.
You parry Puff's attack.
Puff's slash krabt you.
You parry Puff's attack.
Puff grijpt you.

As you can see I changed a few generic combat messages already but I'm having a real hard time finding the rest..

Help would be greatly appreciated, thanks in advance.

oh and if anyone knows where to locate "dodges your attack" and "parries your attack" that would be great :)

-Addrodoc-
#1
Grep the specific messages, and then...you might have to edit the actual variables as in $n off hand I dont know where those are but it wouldnt be too hard to do a search and find them.
#2
I found the dodge and parry messages.. I'm still trying to find the 'You, Your, and you!' messages.. :(
Canada #3
Look for something like the following:
Quote:
if ( dt == TYPE_HIT || dam==0 )
{
sprintf( buf1, "$n %s $N%c", vp, punct );
sprintf( buf2, "You %s $N%c", vs, punct );
sprintf( buf3, "$n %s you%c", vp, punct );
}
Quote:
sprintf( buf1, "$n's %s %s $N%c", attack, vp, punct );
sprintf( buf2, "&c&CYour %s %s $N%c", attack, vp, punct );
sprintf( buf3, "&c&C$n's %s %s you%c", attack, vp, punct );

Amended on Fri 03 Oct 2003 08:33 AM by Greven
#4
Thanks, that really helped.. I still havent worked it out though.. I found what I was looking for and changed the messages but after compiling I get a Error..

This is what it looks like:

fight.c: In function 'Damage':
fight.c:1845: too few arguments to function 'is_safe'
fight.c: At top level:
fight.c:2502: conflicting types for 'is_safe'
mud.h:4705: previous declaration of 'is_safe'
make[1]: ***[fight.o]*** Error 1

I've been trying to get this to work for days now and I wont stop untill I've made it.... so if I dont reply It's probably because I died because of a lack of sleep :P

I hope someone knows how to get rid of the error.

Thanks!

-Addrodoc-
Canada #5
Quote:
fight.c:1845: too few arguments to function 'is_safe'
This means that you are not puting enough information into the check, it should be in the format of
 if ( is_safe( ch, victim ) )

Quote:
fight.c:2502: conflicting types for 'is_safe'
mud.h:4705: previous declaration of 'is_safe'

This looks like you may have made a bad call to the function, or that you have a ";" at the end of the is_safe check. The compiler seems to think that you are declaring a new prototype, I beleive. Check to make sure that it is in the proper format, but if your still having troubles, can you post the code that is giving the errors? This might help us figure out whats wrong.
#6
I guess I've been looking at the same files for too long... I dont know what I did wrong but I couldnt find the error so I took a clean version of the fight.c file and started all over... and voila I got it to work almost exactly as I wished. :))

Thanks for the help, I would not have been able to do this on my own.. so thanks a 100 times!