simple...

Each room on rom has a list of pointers to each of the objects which are in the room. Simply cycle through them and if the object is already there, then simply exit out of the function with a message stating such.

For example:

your object struct  *temp_pointer;

for ( temp_pointer = character_pointer->room_pointer->obj_list; temp != NULL, temp = temp->next_in_list )
{
   if ( temp->index_number == spring->index_number )
   {
        print some message to the player saying a spring already exists
        return;
   }
}

this is all pseudo code but if you know enough bout programming and your code base, you should be able to fill in what you need..



----- Original Message ----- From: "Brinny" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, April 12, 2005 11:01 PM
Subject: Max # of item help



I'm trying to do something similar to the spell
create_spring, but I want the object (for instance the
spring) loaded to the room to only be loaded a max
amount of once. So, if a player does this skill, it
will load the object into the room, and will only
allow them to load it once in the room.  If another
player comes into the room it will not allow them to
load it because it's already there. Hopefully that
makes sense. :] Anyone know how to do this? Thanks.



__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
--
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom



Reply via email to