View/Edit #3310:@room-o*ptions @roomo*ptions

Switch to edit mode.

Name(s): @room-o*ptions @roomo*ptions
1:  "Toggles the room's options."
2:  "[1] - shows the open/closed suffix when @who/@where is done."
3:  "[2] - calls the greeting voice when a player enters."
4:  "[3] - shoes obvious exits."
5:  "[4] - allows residents to invite people and (un)lock the room."
6:  if (player != this.owner)
7:    return player:tell(E_PERM, "; only ", $string_utils:nn(this.owner), " can toggle the room-options.")
8:  endif
9:  player:tell("[1] Title Suffixes          [Currently ", this:get_room_option("show_title") ? "ON" | "OFF", "]")
10: player:tell("[2] Greeting Voice          [Currently ", this:get_room_option("greet") ? "ON" | "OFF", "]")
11: player:tell("[3] Show Exits              [Currently ", this:get_room_option("show_exits") ? "ON" | "OFF", "]")
12: player:tell("[4] Resident Control        [Currently ", this:get_room_option("allow_residents") ? "ON" | "OFF", "]")
13: player:tell("[0] Help")
14: com = $command_utils:read("your choice")
15: if (com == "1")
16:   if ($command_utils:yes_or_no(tostr("Would you like to turn ", this:get_room_option("show_title") ? "off" | "on", " the title suffixes?")))
17:     this:get_room_option("show_title") ? this:set_room_option("show_title", 0) | this:set_room_option("show_title", 1)
18:   endif
19:   if ($command_utils:yes_or_no(tostr("Would you like to set the title suffixes?")))
20:     player:tell("The OPEN suffix is currently '", this.open_suffix, "'.")
21:     this.open_suffix = $command_utils:read("your new open suffix")
22:     player:tell("The CLOSED suffix is currently '", this.closed_suffix, "'.")
23:     this.closed_suffix = $command_utils:read("your new closed suffix")
24:     return player:tell("Set.")
25:   else
26:     return player:tell()
27:   endif
28: elseif (com == "2")
29:   if ($command_utils:yes_or_no(tostr("Would you like to turn ", this:get_room_option("greet") ? "off" | "on", " the greeting voice?")))
30:     this:get_room_option("greet") ? this:set_room_option("greet", 0) | this:set_room_option("greet", 1)
31:     return player:tell("Set.")
32:   else
33:     return player:tell()
34:   endif
35: elseif (com == "3")
36:   if ($command_utils:yes_or_no(tostr("Would you like to turn ", this:get_room_option("show_exits") ? "off" | "on", " the showing of exits?")))
37:     this:get_room_option("show_exits") ? this:set_room_option("show_exits", 0) | this:set_room_option("show_exits", 1)
38:     return player:tell("Set.")
39:   else
40:     return player:tell()
41:   endif
42: elseif (com == "4")
43:   if ($command_utils:yes_or_no(tostr("Would you like to turn ", this:get_room_option("allow_residents") ? "off" | "on", " residental control?")))
44:     this:get_room_option("allow_residents") ? this:set_room_option("allow_residents", 0) | this:set_room_option("allow_residents", 1)
45:     return player:tell("Set.")
46:   else
47:     return player:tell()
48:   endif
49: elseif (com == "0")
50:   player:tell(verb_code(#3310, "@roomoptions")[2..5])
51:   return this:("@roomoptions")()
52: endif

Verb arguments: this none none
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Jay (#8438)

You are not logged in.

[home | help | who | search | setup | code]