Hello everyone,
It's been a while since I wrote to the list.
I have a small problem that I hope one of you will be able to help me with.
I installed the quest code that was enhanced by markanth, and I got most of
the errors fixed however i do have one problem left here is the snip of code
where i'm having the problem.
/* I have this in comm.c below the motd as suggested */
if (IS_QUESTOR(ch))
{
sprintf(log_buf, "Creating unfinished quest for %s.", ch->name);
log_string(log_buf);
wiznet(log_buf, NULL, NULL, 0, 0, 0);
if (ch->pcdata->questobj > 0)
{
OBJ_DATA *obj = NULL;
ROOM_INDEX_DATA *pRoom = NULL;
bool found = FALSE;
for(obj = object_list; obj != NULL; obj = obj->next)
if(obj->pIndexData->vnum == ch->pcdata->questobj
&& is_name(ch->name, obj->owner))
found = TRUE;
if(!found)
{
if ((obj = create_object(get_obj_index(ch->pcdata->questobj), ch->level))
== NULL)
end_quest(ch, 0);
else
{
if ((pRoom = get_room_index(ch->pcdata->questloc)) ==
NULL)
{
pRoom = get_random_room(ch);
ch->pcdata->questobj = pRoom->vnum;
}
obj_to_room(obj, pRoom);
}
do_quest(ch, "info");
chsend("\n\r", ch);
}
} else if (ch->pcdata->questmob > 0)
{
CHAR_DATA *mob;
/* the problem is right here get_char_vnum is not a function that is
available. i've tried writing my own but i'm just not getting it right. I
was wondering if one of you might be able to point me in the right direction
Or perhaps theirs anoter way of writing it that i'm overlooking either way
let me know */
if ((mob = get_char_vnum(ch->pcdata->questmob)) == NULL)
end_quest(ch, 5);
else
{
ch->pcdata->questloc = mob->in_room->vnum;
do_quest(ch, "info");
chsend("\n\r", ch);
}
}
}
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com