@verb #3309:"@addseat @add-seat" any none none rxdo #8438 @program #3309:"@addseat @add-seat" any none none "Syntax: @addseat - adds the seat to the room you're in." if (!this:controlled_by(player)) player:tell("You don't own the room, and can't do any interior decorating - sorry!") return endif for name in (seatname = $string_utils:explode(dobjstr, ",")) if ((ms = this:match_seat(name)) && (typeof(check = this:seatlist()[ms][1]) == $LIST && name in check || check == name)) player:tell("There's already a seat named \"", name, "\" - pick another name.") return endif endfor if (!seatname) player:tell("Syntax: @addseat <any>") return endif dobjstr = toliteral(seatname) player:tell("Type in the maximum number of occupants for " + dobjstr + ".") player:tell("To use the default setting, just hit RETURN or enter a '.' by itself. The default is 10.") x = toint($command_utils:read()) x = x == 0 ? 10 | x if (x > 99 || x < 1) player:tell("Must be a number between 1 and 99 - command ABORTED") return endif player:tell("Type in a message for the room's description when people are sitting here. To use the default setting, just hit RETURN or enter a '. 'by itself. The default is '", def = "sitting in the " + seatname[1] + ".", "' (No pronoun substitution.)") seated = $command_utils:read() seated = length(seated) && seated != "." ? seated | def if (index($string_utils.alphabet, seated[length(seated)])) seated = seated + "." endif player:tell("Type in a self-message for when the player stands up. To use the default setting, just hit RETURN or enter a '.' by itself. The default is '", def = "You stand up.", "' (No pronoun substitution.)") stand = $command_utils:read() stand = length(stand) && stand != "." ? stand | def if (index($string_utils.alphabet, stand[length(stand)])) stand = stand + "." endif player:tell("Type in an o-message for when the player stands up. To use the default setting just hit RETURN or enter a '.' by itself. The default is '", def = "gets up from the " + seatname[1] + ".", "' (Pronouns okay.)") ostand = $command_utils:read() ostand = length(ostand) && ostand != "." ? ostand | def if (index($string_utils.alphabet, ostand[length(ostand)])) ostand = ostand + "." endif player:tell("Type in a self-message for when the player sits down. To use the default setting, just hit RETURN or enter a '.' by itself. The default is '", def = "You sit down on the " + seatname[1] + ".", "' (No pronoun substitution.)") sit = $command_utils:read() sit = length(sit) && sit != "." ? sit | def if (index($string_utils.alphabet, sit[length(sit)])) sit = sit + "." endif player:tell("Type in an o-message for when the player sits down. To use the default setting, just hit RETURN or enter a . by itself. The default is '", def = "sits down on the " + seatname[1] + ".", "' (Pronouns okay.)") osit = $command_utils:read() osit = length(osit) && osit != "." ? osit | def if (index($string_utils.alphabet, osit[length(osit)])) osit = osit + "." endif this:set_seatedlist_msgs({seated, @this:seatedlist_msgs()}) this:set_standlist_msgs({stand, @this:standlist_msgs()}) this:set_ostandlist_msgs({ostand, @this:ostandlist_msgs()}) this:set_ositlist_msgs({osit, @this:ositlist_msgs()}) this:set_sitlist_msgs({sit, @this:sitlist_msgs()}) this:set_seatlist({{length(seatname) == 1 ? seatname[1] | seatname, x}, @this:seatlist()}) player:tell(dobjstr, " added to ", this.name, "'s seat list.") this:seat_update() "Last modified by Dax (#789) on Tue May 3 14:09:34 2005 MDT." .