Thanks to everyone,
Now i works perfectly!!!

Ranka
http://www.zone.ee/gain
telnet://irc.nohik.ee 4242


From: "Richard Lindsey" <[EMAIL PROTECTED]>
To: "Rainer Roomet" <[EMAIL PROTECTED]>,<[email protected]>
Subject: RE: get, kill, look <number>
Date: Mon, 10 May 2004 13:02:35 -0500

Here,  you can use my get_obj_list which does that:

/*
 * Find an obj in a list.
 */
OBJ_DATA *get_obj_list( CHAR_DATA *ch, char *argument, OBJ_DATA *list )
{
    char arg[MAX_INPUT_LENGTH];
    OBJ_DATA *obj;
    int number;
    int count;
    bool blank = FALSE;

    number = number_argument( argument, arg );
    count  = 0;

    if ( number > 0 && arg[0] == '\0' )
        blank = TRUE;

    for ( obj = list; obj != NULL; obj = obj->next_content )
    {
        if ( can_see_obj( ch, obj ) && (blank ? 1 : is_name( arg,
obj->name ) ) )
        {
            if ( ++count == number )
                return obj;
        }
    }

    return NULL;
}

Richard Lindsey

-----Original Message-----
From: Rainer Roomet [mailto:[EMAIL PROTECTED]
Sent: Monday, May 10, 2004 5:22 AM
To: [email protected]
Subject: get, kill, look <number>

Hello Everyone.

Anyone knows how to add number to different functions. For example: In
the
room is 4 items.
shield(first), sword(second item), vest(third item) and lantern(fourth
item). And i want to get second item and i type "get 2."; Then player
got
second item from room. In this case the second item is sword. And player
get
sword.

Any ideas ?

-- Ranka
The Lost Lands of Arion
http://www.zone.ee/gain
telnet://irc.nohik.ee port 4242.

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail


Reply via email to