hey again:p ive been tryin to make a little player owned shop code for my
mud, everythings great except for one issue...this is the code:
mobVnum = ch->in_room->vnum;
pRoom = ch->in_room;
pMobIndex = get_mob_index( ch->in_room->vnum );
mob = create_mobile( pMobIndex );
char_to_room( mob, pRoom );
sprintf(buf,"{cA shopkeeper for {C%s{c's store.{x",ch->in_room->owner);
mob->short_descr = str_dup( buf );
sprintf(buf,"{cA shopkeeper for {C%s{c's store.{x",ch->in_room->owner);
mob->long_descr = str_dup( buf);
sprintf(buf,"%s player owner shopkeeper\n\r",ch->in_room->owner);
mob->name = str_dup( buf );
SET_BIT( mob->act, ACT_PLRSHOP);
SET_BIT( mob->act, ACT_NOPURGE);
/* make the mob reset into the room */
loc_reset = new_reset_data();
loc_reset->command = 'M';
loc_reset->arg1 = mobVnum;
loc_reset->arg2 = 1;
loc_reset->arg3 = ch->in_room->vnum;
loc_reset->arg4 = 1;
add_reset( loc, loc_reset, 0 );
SET_BIT(loc_area->area_flags, AREA_CHANGED);
it resets fine, that saves, no problems there, the problem comes with the
name, short, long and act flags not saving to the area file...once the
command is executed everything will work, just not save and goes to default
after a copyover...understand? i hope so.
for example, the player types
--- shop create confirm
so this is great, this is what it all looks like:
A shopkeeper for Orlis's store.
but after a reboot it repops as:
(no long description)
i could set it normally via olc, however the idea is for it to be automated
for players to do it, and since its expected a lot of shops will be around
it is much easier for the code to set it instead of an imm individually
doing it.
i hope ive provided enough information
(btw, dennis' solution to my tqcamount problem thing worked like a charm:D
thanks a lot)