Furniture 1.01 By Xerves (Released September 18, 1999) Xerves is the admin/owner of Rafermand (mud.rafermand.net port 3002) Website: http://www.rafermand.net Contact: xerves@rafermand.net Hello, and thanks for visiting my site and picking up a few of my snippets (well atleast 1 snippet). This 1.01 release is a huge bug fix for 1.0 and should fix most of the problems with the release. Also, I added some support for being able to type stand while you are standing and then typing stand while on the object to hop off of it and land on the ground. Not to mention all the if checks to see if the character is on an object before transfering (it will remove you from it if you are). Also, when you use any transfering spell/skill you now will be standing after it is used. If you want to change this, you need to remove the check to see if they are standing, and if they are not, make them stand. Well, that is it, here is my email address if you find any bugs rafermand@home.net As mentioned before, 1.1 will be out sometime (when I do not know). It will feature this. 1. HP/Mana/Move restoring on furniture 2. Weight limit/Person limit. If maxed it breaks in half 3. Container support Also, I am taking ideas for 1.1, so you can email me any ideas you would like to see. Thanks, and I will email the list when it is available. --------------------------------------------------------------------------------- act_info.c: [@]: void show_char_to_char_0( CHAR_DATA *victim, CHAR_DATA *ch ) [A]: char message[MAX_STRING_LENGTH]; [F]: case POS_STUNNED: strcat( buf, "&P is lying here stunned.&G" ); break; [R]: case POS_SLEEPING: if (ch->position == POS_SITTING || ch->position == POS_RESTING ) strcat( buf, " is sleeping nearby." ); else strcat( buf, " is deep in slumber here." ); break; case POS_RESTING: if (ch->position == POS_RESTING) strcat ( buf, " is sprawled out alongside you." ); else if (ch->position == POS_MOUNTED) strcat ( buf, " is sprawled out at the foot of your mount." ); else strcat (buf, " is sprawled out here." ); break; case POS_SITTING: if (ch->position == POS_SITTING) strcat( buf, " sits here with you." ); else if (ch->position == POS_RESTING) strcat( buf, " sits nearby as you lie around." ); else strcat( buf, " sits upright here." ); break; case POS_STANDING: if ( IS_IMMORTAL(victim) ) strcat( buf, " is here before you." ); else if ( ( victim->in_room->sector_type == SECT_UNDERWATER ) && !IS_AFFECTED(victim, AFF_AQUA_BREATH) && !IS_NPC(victim) ) strcat( buf, " is drowning here." ); else if ( victim->in_room->sector_type == SECT_UNDERWATER ) strcat( buf, " is here in the water." ); else if ( ( victim->in_room->sector_type == SECT_OCEANFLOOR ) && !IS_AFFECTED(victim, AFF_AQUA_BREATH) && !IS_NPC(victim) ) strcat( buf, " is drowning here." ); else if ( victim->in_room->sector_type == SECT_OCEANFLOOR ) strcat( buf, " is standing here in the water." ); else if ( IS_AFFECTED(victim, AFF_FLOATING) || IS_AFFECTED(victim, AFF_FLYING) ) strcat( buf, " is hovering here." ); else strcat( buf, " is standing here." ); break; [W]: case POS_SLEEPING: if (victim->on != NULL) { if (IS_SET(victim->on->value[2],SLEEP_AT)) { sprintf(message,"&P is sleeping at %s.", victim->on->short_descr); strcat(buf,message); } else if (IS_SET(victim->on->value[2],SLEEP_ON)) { sprintf(message,"&P is sleeping on %s.", victim->on->short_descr); strcat(buf,message); } else { sprintf(message, "&P is sleeping in %s.", victim->on->short_descr); strcat(buf,message); } } else { if (ch->position == POS_SITTING || ch->position == POS_RESTING ) strcat( buf, "&P is sleeping nearby.&G" ); else strcat( buf, "&P is deep in slumber here.&G" ) } break; case POS_RESTING: if (victim->on != NULL) { if (IS_SET(victim->on->value[2],REST_AT)) { sprintf(message,"&P is resting at %s.", victim->on->short_descr); strcat(buf,message); } else if (IS_SET(victim->on->value[2],REST_ON)) { sprintf(message,"&P is resting on %s.", victim->on->short_descr); strcat(buf,message); } else { sprintf(message, "&P is resting in %s.", victim->on->short_descr); strcat(buf,message); } } else { if (ch->position == POS_RESTING) strcat ( buf, "&P is sprawled out alongside you.&G" ); else if (ch->position == POS_MOUNTED) strcat ( buf, "&P is sprawled out at the foot of your mount.&G" ); else strcat (buf, "&P is sprawled out here.&G" ); } break; case POS_SITTING: if (victim->on != NULL) { if (IS_SET(victim->on->value[2],SIT_AT)) { sprintf(message,"&P is sitting at %s.", victim->on->short_descr); strcat(buf,message); } else if (IS_SET(victim->on->value[2],SIT_ON)) { sprintf(message,"&P is sitting on %s.", victim->on->short_descr); strcat(buf,message); } else { sprintf(message, "&P is sitting in %s.", victim->on->short_descr); strcat(buf,message); } } else strcat(buf, "&P is sitting here."); break; case POS_STANDING: if (victim->on != NULL) { if (IS_SET(victim->on->value[2],STAND_AT)) { sprintf(message,"&P is standing at %s.", victim->on->short_descr); strcat(buf,message); } else if (IS_SET(victim->on->value[2],STAND_ON)) { sprintf(message,"&P is standing on %s.", victim->on->short_descr); strcat(buf,message); } else { sprintf(message, "&P is standing in %s.", victim->on->short_descr); strcat(buf,message); } } else if ( IS_IMMORTAL(victim) ) strcat( buf, "&P is here before you.&G" ); else if ( ( victim->in_room->sector_type == SECT_UNDERWATER ) && !IS_AFFECTED(victim, AFF_AQUA_BREATH) && !IS_NPC(victim) ) strcat( buf, "&P is drowning here.&G" ); else if ( victim->in_room->sector_type == SECT_UNDERWATER ) strcat( buf, "&P is here in the water.&G" ); else if ( ( victim->in_room->sector_type == SECT_OCEANFLOOR ) && !IS_AFFECTED(victim, AFF_AQUA_BREATH) && !IS_NPC(victim) ) strcat( buf, "&P is drowning here.&G" ); else if ( victim->in_room->sector_type == SECT_OCEANFLOOR ) strcat( buf, "&P is standing here in the water.&G" ); else if ( IS_AFFECTED(victim, AFF_FLOATING) || IS_AFFECTED(victim, AFF_FLYING) ) strcat( buf, "&P is hovering here.&G" ); else strcat( buf, "&P is standing here.&G" ); break; ----------------------------------------------------------------------------------------------------------------------- act_move.c: [F]: do_stand, do_sit, do_rest, do_sleep [E]: remove all those functions [R/W]: void do_stand( CHAR_DATA *ch, char *argument ) { OBJ_DATA *obj = NULL; int aon = 0; if (ch->position == POS_FIGHTING) { send_to_char("Maybe you should finish this fight first?\n\r",ch); return; } if (ch->position == POS_MOUNTED) { send_to_char("You are already sitting - on your mount.\n\r",ch); return; } /* okay, now that we know we can sit, find an object to sit on */ if (argument[0] != '\0') { obj = get_obj_list(ch,argument,ch->in_room->first_content); if (obj == NULL) { send_to_char("You don't see that here.\n\r",ch); return; } if (obj->item_type != ITEM_FURNITURE) { send_to_char("It has to be furniture silly.\n\r", ch); return; } if (!IS_SET(obj->value[2],STAND_ON) && !IS_SET(obj->value[2],STAND_IN) && !IS_SET(obj->value[2],STAND_AT)) { send_to_char("You can't stand on that.\n\r",ch); return; } if (ch->on == obj) aon = 1; else ch->on = obj; } switch ( ch->position ) { case POS_SLEEPING: if ( IS_AFFECTED(ch, AFF_SLEEP) ) { send_to_char( "You can't wake up!\n\r", ch ); return; } if (obj == NULL) { send_to_char( "You wake and stand up.\n\r", ch ); act( AT_ACTION, "$n wakes and stands up.", ch, NULL, NULL, TO_ROOM ); ch->on = NULL; } else if (IS_SET(obj->value[2],STAND_AT)) { act( AT_ACTION, "You wake and stand at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n wakes and stands at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],STAND_ON)) { act( AT_ACTION, "You wake and stand on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n wakes and stands on $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You wake and stand in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n wakes and stands in $p.",ch,obj,NULL,TO_ROOM); } ch->position = POS_STANDING; do_look(ch,"auto"); break; case POS_RESTING: case POS_SITTING: if (obj == NULL) { send_to_char( "You stand up.\n\r", ch ); act( AT_ACTION, "$n stands up.", ch, NULL, NULL, TO_ROOM ); ch->on = NULL; } else if (IS_SET(obj->value[2],STAND_AT)) { act( AT_ACTION, "You stand at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n stands at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],STAND_ON)) { act( AT_ACTION, "You stand on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n stands on $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You stand in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n stands on $p.",ch,obj,NULL,TO_ROOM); } ch->position = POS_STANDING; break; case POS_STANDING: if (obj != NULL && aon != 1 ) { if (IS_SET(obj->value[2],STAND_AT)) { act( AT_ACTION, "You stand at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n stands at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],STAND_ON)) { act( AT_ACTION, "You stand on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n stands on $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You stand in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n stands on $p.",ch,obj,NULL,TO_ROOM); } } else if (aon == 1) { act( AT_ACTION, "You are already using $p for furniture.", ch, obj, NULL, TO_CHAR); } else if (ch->on != NULL && obj == NULL) { act( AT_ACTION, "You hop off of $p and stand on the ground.", ch, ch->on, NULL, TO_CHAR); act( AT_ACTION, "$n hops off of $p and stands on the ground.", ch, ch->on, NULL, TO_ROOM ); ch->on = NULL; } else send_to_char( "You are already standing.\n\r", ch ); break; } return; } void do_sit( CHAR_DATA *ch, char *argument ) { OBJ_DATA *obj = NULL; int aon = 0; if (ch->position == POS_FIGHTING) { send_to_char("Maybe you should finish this fight first?\n\r",ch); return; } if (ch->position == POS_MOUNTED) { send_to_char("You are already sitting - on your mount.\n\r",ch); return; } /* okay, now that we know we can sit, find an object to sit on */ if (argument[0] != '\0') { obj = get_obj_list(ch,argument,ch->in_room->first_content); if (obj == NULL) { send_to_char("You don't see that here.\n\r",ch); return; } if (obj->item_type != ITEM_FURNITURE) { send_to_char("It has to be furniture silly.\n\r", ch); return; } if (!IS_SET(obj->value[2],SIT_ON) && !IS_SET(obj->value[2],SIT_IN) && !IS_SET(obj->value[2],SIT_AT)) { send_to_char("You can't sit on that.\n\r",ch); return; } if (ch->on == obj) aon = 1; else ch->on = obj; } switch (ch->position) { case POS_SLEEPING: if (obj == NULL) { send_to_char( "You wake and sit up.\n\r", ch ); act( AT_ACTION, "$n wakes and sits up.", ch, NULL, NULL, TO_ROOM ); } else if (IS_SET(obj->value[2],SIT_AT)) { act( AT_ACTION, "You wake up and sit at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n wakes and sits at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],SIT_ON)) { act( AT_ACTION, "You wake and sit on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n wakes and sits at $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You wake and sit in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n wakes and sits in $p.",ch,obj,NULL,TO_ROOM); } ch->position = POS_SITTING; break; case POS_RESTING: if (obj == NULL) send_to_char("You stop resting.\n\r",ch); else if (IS_SET(obj->value[2],SIT_AT)) { act( AT_ACTION, "You sit at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sits at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],SIT_ON)) { act( AT_ACTION, "You sit on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sits on $p.",ch,obj,NULL,TO_ROOM); } ch->position = POS_SITTING; break; case POS_SITTING: if (obj != NULL && aon != 1 ) { if (IS_SET(obj->value[2],SIT_AT)) { act( AT_ACTION, "You sit at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sits at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],STAND_ON)) { act( AT_ACTION, "You sit on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sits on $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You sit in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sits on $p.",ch,obj,NULL,TO_ROOM); } } else if (aon == 1) { act( AT_ACTION, "You are already using $p for furniture.", ch, obj, NULL, TO_CHAR); } else if (ch->on != NULL && obj == NULL) { act( AT_ACTION, "You hop off of $p and sit on the ground.", ch, ch->on, NULL, TO_CHAR); act( AT_ACTION, "$n hops off of $p and sits on the ground.", ch, ch->on, NULL, TO_ROOM ); ch->on = NULL; } else send_to_char( "You are already sitting.\n\r", ch ); break; case POS_STANDING: if (obj == NULL) { send_to_char("You sit down.\n\r",ch); act( AT_ACTION, "$n sits down on the ground.",ch,NULL,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],SIT_AT)) { act( AT_ACTION, "You sit down at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sits down at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],SIT_ON)) { act( AT_ACTION, "You sit on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sits on $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You sit down in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sits down in $p.",ch,obj,NULL,TO_ROOM); } ch->position = POS_SITTING; break; } return; } void do_rest( CHAR_DATA *ch, char *argument ) { OBJ_DATA *obj = NULL; int aon = 0; if (ch->position == POS_FIGHTING) { send_to_char("Maybe you should finish this fight first?\n\r",ch); return; } if (ch->position == POS_MOUNTED) { send_to_char("You are already sitting - on your mount.\n\r",ch); return; } /* okay, now that we know we can sit, find an object to sit on */ if (argument[0] != '\0') { obj = get_obj_list(ch,argument,ch->in_room->first_content); if (obj == NULL) { send_to_char("You don't see that here.\n\r",ch); return; } if (obj->item_type != ITEM_FURNITURE) { send_to_char("It has to be furniture silly.\n\r", ch); return; } if (!IS_SET(obj->value[2],REST_ON) && !IS_SET(obj->value[2],REST_IN) && !IS_SET(obj->value[2],REST_AT)) { send_to_char("You can't rest on that.\n\r",ch); return; } if (ch->on == obj) aon = 1; else ch->on = obj; } switch ( ch->position ) { case POS_SLEEPING: if (obj == NULL) { send_to_char( "You wake up and start resting.\n\r", ch ); act ( AT_ACTION, "$n wakes up and starts resting.",ch,NULL,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],REST_AT)) { act( AT_ACTION, "You wake up and rest at $p.", ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n wakes up and rests at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],REST_ON)) { act( AT_ACTION, "You wake up and rest on $p.", ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n wakes up and rests on $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You wake up and rest in $p.", ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n wakes up and rests in $p.",ch,obj,NULL,TO_ROOM); } ch->position = POS_RESTING; break; case POS_RESTING: if (obj != NULL && aon != 1 ) { if (IS_SET(obj->value[2],REST_AT)) { act( AT_ACTION, "You rest at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n rests at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],REST_ON)) { act( AT_ACTION, "You rest on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n rests on $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You rest in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n rests on $p.",ch,obj,NULL,TO_ROOM); } } else if (aon == 1) { act( AT_ACTION, "You are already using $p for furniture.", ch, obj, NULL, TO_CHAR); } else if (ch->on != NULL && obj == NULL) { act( AT_ACTION, "You hop off of $p and start resting on the ground.", ch, ch->on, NULL, TO_CHAR); act( AT_ACTION, "$n hops off of $p and starts to rest on the ground.", ch, ch->on, NULL, TO_ROOM ); ch->on = NULL; } else send_to_char( "You are already resting.\n\r", ch ); break; case POS_STANDING: if (obj == NULL) { send_to_char( "You rest.\n\r", ch ); act( AT_ACTION, "$n sits down and rests.", ch, NULL, NULL, TO_ROOM ); } else if (IS_SET(obj->value[2],REST_AT)) { act( AT_ACTION, "You sit down at $p and rest.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sits down at $p and rests.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],REST_ON)) { act( AT_ACTION, "You sit on $p and rest.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sits on $p and rests.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You rest in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n rests in $p.",ch,obj,NULL,TO_ROOM); } ch->position = POS_RESTING; break; case POS_SITTING: if (obj == NULL) { send_to_char("You rest.\n\r",ch); act( AT_ACTION, "$n rests.",ch,NULL,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],REST_AT)) { act( AT_ACTION, "You rest at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n rests at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],REST_ON)) { act( AT_ACTION, "You rest on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n rests on $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You rest in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n rests in $p.",ch,obj,NULL,TO_ROOM); } ch->position = POS_RESTING; break; } rprog_rest_trigger( ch ); return; } void do_sleep( CHAR_DATA *ch, char *argument ) { OBJ_DATA *obj = NULL; int aon = 0; if (ch->position == POS_FIGHTING) { send_to_char("Maybe you should finish this fight first?\n\r",ch); return; } if (ch->position == POS_MOUNTED) { send_to_char("If you wish to go to sleep, get off of your mount first.n\r",ch); return; } /* okay, now that we know we can sit, find an object to sit on */ if (argument[0] != '\0') { obj = get_obj_list(ch,argument,ch->in_room->first_content); if (obj == NULL) { send_to_char("You don't see that here.\n\r",ch); return; } if (obj->item_type != ITEM_FURNITURE) { send_to_char("It has to be furniture silly.\n\r", ch); return; } if (!IS_SET(obj->value[2],SLEEP_ON) && !IS_SET(obj->value[2],SLEEP_IN) && !IS_SET(obj->value[2],SLEEP_AT)) { send_to_char("You can't sleep on that.\n\r",ch); return; } if (ch->on == obj) aon = 1; else ch->on = obj; } switch (ch->position) { case POS_SLEEPING: if (obj != NULL && aon != 1 ) { if (IS_SET(obj->value[2],SLEEP_AT)) { act( AT_ACTION, "You sleep at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sleeps at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],SLEEP_ON)) { act( AT_ACTION, "You sleep on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sleeps on $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You sleep in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sleeps on $p.",ch,obj,NULL,TO_ROOM); } } else if (aon == 1) { act( AT_ACTION, "You are already using $p for furniture.", ch, obj, NULL, TO_CHAR); } else if (ch->on != NULL && obj == NULL) { act( AT_ACTION, "You hop off of $p and try to sleep on the ground.", ch, ch->on, NULL, TO_CHAR); act( AT_ACTION, "$n hops off of $p and falls quickly asleep on the ground.", ch, ch->on, NULL, TO_ROOM ); ch->on = NULL; } else send_to_char( "You are already sleeping.\n\r", ch ); break; case POS_RESTING: if (obj == NULL) { send_to_char("You lean your head back more and go to sleep.\n\r",ch); act( AT_ACTION, "$n lies back and falls asleep on the ground.",ch,NULL,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],SLEEP_AT)) { act( AT_ACTION, "You sleep at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sleeps at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],SLEEP_ON)) { act( AT_ACTION, "You sleep on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sleeps on $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You sleep in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sleeps in $p.",ch,obj,NULL,TO_ROOM); } ch->position = POS_SLEEPING; break; case POS_SITTING: if (obj == NULL) { send_to_char("You lay down and go to sleep.\n\r", ch); act( AT_ACTION, "$n lies back and falls asleep on the ground.",ch,NULL,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],SLEEP_AT)) { act( AT_ACTION, "You sleep at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sleeps at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],SLEEP_ON)) { act( AT_ACTION, "You sleep on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sleeps on $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You sleep in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sleeps in $p.",ch,obj,NULL,TO_ROOM); } ch->position = POS_SLEEPING; break; case POS_STANDING: if (obj == NULL) { send_to_char("You drop down and fall asleep on the ground.\n\r",ch); act( AT_ACTION, "$n drops down and falls asleep on the ground.",ch,NULL,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],SLEEP_AT)) { act( AT_ACTION, "You sleep at $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sleeps at $p.",ch,obj,NULL,TO_ROOM); } else if (IS_SET(obj->value[2],SLEEP_ON)) { act( AT_ACTION, "You sleep on $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sleeps on $p.",ch,obj,NULL,TO_ROOM); } else { act( AT_ACTION, "You sleep down in $p.",ch,obj,NULL,TO_CHAR); act( AT_ACTION, "$n sleeps down in $p.",ch,obj,NULL,TO_ROOM); } ch->position = POS_SLEEPING; break; } rprog_sleep_trigger( ch ); return; } --------------------------------------------------------------------------------- act_wiz.c: [@]: do_transfer [F]: act( AT_MAGIC, "$n disappears in a cloud of swirling colors.", victim, NULL, NULL, TO_ROOM ); victim->retran = victim->in_room->vnum; char_from_room( victim ); char_to_room( victim, location ); [A]: if ( victim->on ) { victim->on = NULL; victim->position = POS_STANDING; } if (victim->position != POS_STANDING) { victim->position = POS_STANDING; } --------------------------------------------------------------------------------- build.c: [@]: do_goto [F]: ch->regoto = ch->in_room->vnum; char_from_room( ch ); if ( ch->mount ) { char_from_room( ch->mount ); char_to_room( ch->mount, location ); } char_to_room( ch, location ); [A]: if ( ch->on ) { ch->on = NULL; ch->position = POS_STANDING; } if (ch->position != POS_STANDING) { ch->position = POS_STANDING; } --------------------------------------------------------------------------------- skills.c: [@]: do_recall [F]: act( AT_ACTION, "$n disappears in a swirl of the Force.", ch, NULL, NULL, TO_ROOM ); char_from_room( ch ); char_to_room( ch, location ); if ( ch->mount ) { char_from_room( ch->mount ); char_to_room( ch->mount, location ); } [A]: if ( ch->on ) { ch->on = NULL; ch->position = POS_STANDING; } if (ch->position != POS_STANDING) { ch->position = POS_STANDING; } --------------------------------------------------------------------------------- mud_comm.c: [@]: do_mptransfer [F]: if(victim->fighting) stop_fighting(victim, TRUE); char_from_room(victim); [A]: if ( victim->on ) { victim->on = NULL; victim->position = POS_STANDING; } if (victim->position != POS_STANDING) { victim->position = POS_STANDING; } [@]: do_mpgoto [F]: if(victim->fighting) stop_fighting(victim, TRUE); char_from_room(victim); [A]: if ( victim->on ) { victim->on = NULL; victim->position = POS_STANDING; } if (victim->position != POS_STANDING) { victim->position = POS_STANDING; } --------------------------------------------------------------------------------- mud.h [F]: struct char_data [A]: OBJ_DATA *on; [B]: [A]: /* * Sitting/Standing/Sleeping/Sitting on/in/at Objects - Xerves * Used for furniture (value[2]) in the #OBJECTS Section */ #define SIT_ON BV00 #define SIT_IN BV01 #define SIT_AT BV02 #define STAND_ON BV03 #define STAND_IN BV04 #define STAND_AT BV05 #define SLEEP_ON BV06 #define SLEEP_IN BV07 #define SLEEP_AT BV08 #define REST_ON BV09 #define REST_IN BV10 #define REST_AT BV11 --------------------------------------------------------------------------------- once installed, do a clean make, reboot your mud. Once you are back in the mud create a help file called FURNITURE. and no, you dont have to capitalize it and remember, DO NOT ADD THE PERIOD!!!! In the help file please put this: Syntax: It is now possible to sit/stand/sleep/rest on/in/at properly created peices of furniture. All you have to do is find a peice of furniture that is working properly and just type sit chair if it was a chair. If you can sit on it, it will allow you to either sit on/in/at it. Furniture Code 1.01 provided by Xerves of Rafermand. Furniture Code 1.01 revamped by Lotuadm of EliteCS save the helpfile so that all may read it. then create another help file called FURNITUREVALUES for your builders to go by. In the help file please put this: It is now possible to sit/sleep/rest/stand on furniture. Here is how all of this works. value2 - sit/sleep/rest/stand on furniture (more below) As for value2, it uses bitvictors, and here are their numbers SIT ON: 1 STAND ON: 8 SLEEP ON: 64 REST ON: 512 SIT IN: 2 STAND IN: 16 SLEEP IN: 128 REST IN: 1024 SIT AT: 4 STAND AT: 32 SLEEP AT: 256 REST AT: 2048 Furniture is set using the v2 setting and through adding the values to make it work. Say you want SIT ON and STAND IN, you would add 1 and 16 and get 17. A quick note, you can only be on in at an object. If you set all 3 of them to lets say Sit, when type type sit object, they will sit at the object. So only select one. Furniture Code 1.01 provided by Xerves of Rafermand. Furniture Code 1.01 revamped by Lotuadm of EliteCS -------------------------------------------------------------------------------------------- Author Notes: Furniture code was put into a moderately modified SMAUG 1.4 source code and seemed to work without problems (or ones I can see at this moment). I cannot say that this code will fit exactly into 1.4a or 1.02, but if you look at the code a bit you should be able to figure most of it out (most of the checks above are places after the char is taken from the room). Also, if you have modified any of the stuff where I said just to put this whole chunk of text in, you might consider wanting to look at the orginal before just dropping it in there. I hope this release found most of the errors associated with 1.0, if not, my email address is above, and I would love to hear of any problems that are left. Thanks, and sorry about not releasing this any sooner. --Xerves I have installed this snippet into a moderately modified SWR 1.0 FULL source code and it seems to run awesome for me. If you have any problems or questions feel free to email me at lotuadm@gmail.com. Come visit my mud at mudhost.ath.cx on port 4422