Re: newbie question

From: d. hall (dhall@APK.NET)
Date: 12/23/97


// thus on Tue, 23 Dec 1997 15:25:31 -0500, dmitri virtually wrote:

dmitri> how do i implement the feature that enables me to type for example
dmitri> 'kill merc' instead of 'kill mercenary'?

dmitri> i warned you this was a newbie question.

Look at do_kill() in act.offensive.c

You'll notice the victim is gotten from get_char_room_vis()

Look at get_char_room_vis() in handler.c, and it uses isname()

Now look at isname() and it's similiar to a strcmp() function.

If you're able to get isname() similiar in functionality to is_abbrev(),
then you'll probably get what you want.  Be sure to keep the old function
around just in case something screws up.

Or do it the easy way, make merc part of the "name" for the mercenary
mobile.

d.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST