Yes, that is about it. The linked-list macros in mud.h do that and more for you, and if you happen to have converted it to C++ you can use STL which greatly simplifies things like keeping lists.
nevermind, i figured it out. Basically i setup a function which creates a newnode, then assigns the existing list to the newnode->next. Then assigned the new values to newnode itself then in that function returned newnode so the new data would be at the top of the list. Then assigned the new list to the ch->pcdata->list directly.
The above code is the type of code i want to use to store a temporary list in memory. How would i add like say 5 mobs to the list 'ch->pcdata->list'. I'm hoping the above code is at least a start to the right path.
You may need a separate structure, something like this:
struct questmob_type
{
questmob_type * next;
int vnum;
};
Then in your pcdata you would put the *first* questmob (which might be NULL), and then you add them by putting the first mob as "first" and then next is linked onto the last one in the list.
There are plenty of examples of that in SMAUG, look at the macros LINK, UNLINK etc. in mud.h.
I've been approaching a new type of assemble system were items are combined to create another item. This exists on many muds already, but i'm taking a shot at coding it on my own. So far i've got it done and working great, but now i've come across the difficulty of coding it so it can be used for QUEST ASSEMBLES.
Now a quest assemble is a bit more work since all the pieces and the result piece have to be quest pieces, so i've figured out most of it, all the dirty work is done.. the problem i've run into is when the player types 'quest info' it should display what mobs have recieved the quest pieces and what room their in.
I've come up with an idea to add questmob to ch->pcdata which would be of CHAR_DATA * structure.
Now this is the problem, how can i add an unknown amount of mobs to ch->pcdata->questmob.
So when quest info is typed, it would cycle through that list and display all their info (because it would be a pointer to the target mobs).
I don't think this can be anymore descriptive.
BTW:
I have a vague idea of how it works, it would be like assigning mobs to questmob then doing something like questmob = questmob->next, then assigning the mob to questmob again, the only prob with that is getting back to the start and keeping the new mobs at the same time.
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.