Someone correct me if I'm wrong, but it's just the way to are gathering
the argument and how you're parsing it in the function once you receive
it. (I think that's what you're asking)

Here's the way do_cast handles it:

<snippet>
void do_cast( CHAR_DATA *ch, char *argument )
{
    char arg1[MAX_INPUT_LENGTH];
    char arg2[MAX_INPUT_LENGTH];
    CHAR_DATA *victim;
    OBJ_DATA *obj;
    void *vo;
    int mana, loc;
    int sn;
    int target;
    bool restricted;

    /*
     * Switched NPC's can cast spells, but others can't.
     */
    if ( IS_NPC(ch) && ch->desc == NULL)
        return;


/* 
   Look here!!! What it's doing is grabbing the argument 
   and using the parser, "one_argument()", to "choose" the spell.
*/

    target_name = one_argument( argument, arg1 );
    one_argument( target_name, arg2 );

    if ( arg1[0] == '\0' )
    {
        send_to_char( "Cast which what where?\n\r", ch );
        return;
    }

<snip>

Now, as I recall murder will do the same thing.  One thing you can check
is to make sure that "igg" is the unique name for the PC/NPC you're
trying to murder.

Although, I could just not be understanding your question -- it *is*
2:00am :)

Vertigo

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf 
> Of Matthew Martin
> Sent: Tuesday, May 13, 2003 1:25 AM
> To: [email protected]
> Subject: Auto-aiming
> 
> 
> Got a quandary for you guys which should be easy once I know 
> where to look.
> 
> As you all know when you input a command you can simply use 
> the first couple 
> of letters. Ie, instead of typing "cast 'magic missile' Bob" 
> you can just do 
> "c mag Bob".
> 
> My question comes in that I want to be able to put something 
> in interp where 
> instead of typing "murder Iggilwiv" you could feasible type 
> "murder Igg" to 
> produce the same effect. I've seen this done in other places 
> where they used 
> it for mobs, objects, and pc's, but I can't seem to find 
> exactly where to 
> begin on that.
> 
> Thanks in advance.
> 
> -UD
> 
> _________________________________________________________________
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
> http://join.msn.com/?page=features/junkmail
> 
> 
> -- 
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
> 


Reply via email to