generic builder #4
Aliases: generic builder
36 verbs · 132 properties · 1 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
@quota | any none none | rd | #4 | 11 |
@create | any any any | rd | #4 | 49 |
@recycle | any none none | rd | #4 | 17 |
@recreate | any as any | rd | #4 | 47 |
@dig | any any any | rd | #4 | 61 |
@audit | any any any | rd | #4 | 17 |
@count | any none none | rd | #4 | 15 |
@countDB | any none none | rd | #4 | 17 |
@sort-owned*-objects | any none none | rd | #4 | 22 |
@add-owned | any none none | rd | #4 | 14 |
@verify-owned | none none none | rd | #4 | 12 |
@unlock | any none none | rd | #4 | 11 |
@lock | any with/using any | rd | #4 | 18 |
@newmess*age | any any any | rd | #4 | 26 |
@unmess*age | any any any | rd | #4 | 18 |
_messagify | this none this | rxd | #4 | 10 |
@kids | any none none | rxd | #4 | 11 |
@contents | any none none | rd | #4 | 17 |
@par*ents | any none none | rd | #4 | 12 |
@location*s | any none none | rd | #4 | 9 |
@cl*asses | any any any | rd | #4 | 45 |
classes_2 | this none this | rxd | #4 | 13 |
_create | this none this | rxd | #4 | 6 |
_recycle | this none this | rxd | #4 | 9 |
@chparent | any at/to any | rd | #4 | 28 |
@check-chp*arent | any at/to any | rd | #4 | 26 |
@set*prop | any at/to any | rd | #4 | 41 |
build_option | this none this | rxd | #4 | 7 |
set_build_option | this none this | rxd | #4 | 19 |
@build-o*ptions @buildo*ptions @builder-o*ptions @buildero*ptions | any any any | rd | #4 | 29 |
@measure | any any any | rd | #4 | 119 |
init_for_core | this none this | rxd | #4 | 8 |
@botl*ock | any any any | rxd | #4 | 25 |
@retail | any any any | rxd | #4 | 11 |
@dark | any any any | rxd | #4 | 11 |
@sanc*tuary | any any any | rxd | #4 | 11 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
build_options | #4 | rc | #2 | {{"dig_room", #118}} |
at_room_width | #90 | rc | #2 | <clear> |
at_number | #90 | rc | #2 | <clear> |
join_msg | #90 | rc | #2 | <clear> |
object_port_msg | #90 | rc | #2 | <clear> |
victim_port_msg | #90 | rc | #2 | <clear> |
thing_arrive_msg | #90 | rc | #2 | <clear> |
othing_port_msg | #90 | rc | #2 | <clear> |
thing_port_msg | #90 | rc | #2 | <clear> |
player_arrive_msg | #90 | rc | #2 | <clear> |
oplayer_port_msg | #90 | rc | #2 | <clear> |
player_port_msg | #90 | rc | #2 | <clear> |
self_arrive_msg | #90 | rc | #2 | <clear> |
oself_port_msg | #90 | rc | #2 | <clear> |
self_port_msg | #90 | rc | #2 | <clear> |
rooms | #90 | r | #36 | <clear> |
refused_origins | #90 | r | #36 | <clear> |
refused_extra | #90 | r | #36 | <clear> |
default_refusal_time | #90 | r | #36 | <clear> |
report_refusal | #90 | r | #36 | <clear> |
refused_actions | #90 | r | #36 | <clear> |
refused_until | #90 | r | #36 | <clear> |
page_refused | #90 | r | #36 | <clear> |
page_refused_msg | #90 | rc | #2 | <clear> |
whisper_refused_msg | #90 | rc | #2 | <clear> |
mail_refused_msg | #90 | rc | #2 | <clear> |
death_msg | #91 | rc | #2 | <clear> |
alive | #91 | r | #36 | <clear> |
alert | #91 | r | #36 | <clear> |
mobile | #91 | r | #36 | <clear> |
wielded | #91 | r | #36 | <clear> |
last_paged | #91 | r | #36 | <clear> |
last_healed | #91 | r | #36 | <clear> |
followed_by | #91 | r | #36 | <clear> |
following | #91 | r | #36 | <clear> |
free_points | #91 | r | #36 | 1.36249999999999 |
stats | #91 | r | #36 | {{"Strength", "Dexterity", "Intelligence", "Health"}, {20.0, 20.0, 20.0, 20.0}} |
stats_current | #91 | r | #36 | {{"Strength", "Dexterity", "Intelligence", "Health"}, {20.0, 20.0, 20.0, 20.0}} |
skills | #91 | r | #36 | {{"combat", "medical", "language"}, {5.0, 5.0, 5.0}} |
race | #91 | r | #36 | <clear> |
org | #91 | r | #36 | <clear> |
money | #91 | r | #36 | <clear> |
follow_msg | #91 | rc | #2 | <clear> |
stopfollow_msg | #91 | rc | #2 | <clear> |
searching | #91 | r | #36 | <clear> |
languages | #91 | r | #36 | {{#142}, {2.0}} |
speaking | #91 | r | #36 | <clear> |
remembered_names | #91 | r | #36 | {} |
short_desc_msg | #91 | r | #36 | "" |
knowledge | #91 | rc | #2 | <clear> |
magic_immunity | #91 | rc | #2 | <clear> |
roomnum | #91 | rwc | #2 | <clear> |
killcount | #91 | rc | #2 | <clear> |
pkill | #91 | rc | #2 | <clear> |
level | #91 | rc | #2 | <clear> |
experience | #91 | rc | #2 | <clear> |
adv_points | #91 | rc | #2 | <clear> |
resets | #91 | rc | #2 | <clear> |
exp | #91 | rc | #2 | <clear> |
class | #91 | rc | #2 | <clear> |
map | #91 | rc | #2 | <clear> |
used_spells | #91 | rc | #2 | <clear> |
_mail_task | #40 | rc | #2 | <clear> |
messages_going | #40 | c | #2 | <clear> |
mail_lists | #40 | rc | #2 | <clear> |
mail_notify | #40 | r | #2 | <clear> |
mail_forward | #40 | rc | #2 | <clear> |
mail_options | #40 | rc | #2 | {} |
message_keep_date | #40 | rc | #2 | <clear> |
messages_kept | #40 | rc | #2 | <clear> |
current_message | #40 | c | #2 | {0, -1300000000} |
messages | #40 | c | #2 | <clear> |
ansi_options | #95 | r | #36 | <clear> |
replace_codes | #95 | r | #36 | <clear> |
features | #6 | r | #36 | <clear> |
previous_connection | #6 | | #2 | <clear> |
email_address | #6 | | #2 | <clear> |
last_disconnect_time | #6 | r | #2 | <clear> |
help | #6 | rc | #2 | {#85, #106} |
more_msg | #6 | rc | #2 | <clear> |
linetask | #6 | r | #36 | <clear> |
linesleft | #6 | r | #36 | <clear> |
linebuffer | #6 | | #36 | <clear> |
pagelen | #6 | r | #36 | <clear> |
owned_objects | #6 | r | #2 | <clear> |
linelen | #6 | r | #36 | <clear> |
current_folder | #6 | c | #2 | <clear> |
all_connect_places | #6 | | #2 | <clear> |
last_connect_place | #6 | | #2 | <clear> |
brief | #6 | rc | #2 | <clear> |
lines | #6 | c | #2 | <clear> |
page_absent_msg | #6 | rc | #2 | <clear> |
pq | #6 | rc | #2 | <clear> |
pqc | #6 | rc | #2 | <clear> |
page_origin_msg | #6 | rc | #2 | <clear> |
page_echo_msg | #6 | rc | #2 | <clear> |
edit_options | #6 | rc | #2 | <clear> |
last_connect_time | #6 | r | #2 | <clear> |
ownership_quota | #6 | | #36 | 0 |
gender | #6 | rc | #2 | <clear> |
prc | #6 | rc | #2 | <clear> |
ppc | #6 | rc | #2 | <clear> |
poc | #6 | rc | #2 | <clear> |
psc | #6 | rc | #2 | <clear> |
pr | #6 | rc | #2 | <clear> |
pp | #6 | rc | #2 | <clear> |
po | #6 | rc | #2 | <clear> |
ps | #6 | rc | #2 | <clear> |
home | #6 | rc | #2 | #62 |
password | #6 | | #2 | <clear> |
gaglist | #6 | rc | #2 | <clear> |
paranoid | #6 | rc | #2 | <clear> |
display_options | #6 | rc | #2 | <clear> |
verb_subs | #6 | rc | #2 | <clear> |
first_connect_time | #6 | r | #2 | <clear> |
size_quota | #6 | | #36 | <clear> |
last_password_time | #6 | | #2 | <clear> |
last_connect_attempt | #6 | | #2 | <clear> |
page_count_start_time | #6 | r | #2 | <clear> |
ping_task | #6 | r | #36 | <clear> |
infobar | #6 | rc | #2 | <clear> |
value_base | #102 | r | #2 | <clear> |
damage_base | #102 | r | #2 | <clear> |
x_loc | #102 | r | #36 | <clear> |
y_loc | #102 | r | #36 | <clear> |
ansi_title | #102 | r | #36 | <clear> |
obvious | #102 | r | #36 | <clear> |
build_help | #102 | rc | #2 | <clear> |
key | #1 | c | #2 | <clear> |
aliases | #1 | r | #2 | {"generic builder"} |
description | #1 | rc | #2 | "You see a player who should type '@describe me as ...'." |
object_size | #1 | r | #36 | {39044, 1539462952} |
Ancestry
Ancestors (nearest first): #90 Frand's administrator class → #91 generic gamer → #40 Generic Mail Receiving Player → #95 ANSI PC → #6 generic player → #102 subthing → #1 Root Class
Children: #58 generic programmer
Call graph
Showing 48 of 94 verbs; 46 not shown.
Source
@quota
Referenced by
none
Source
1set_task_perms(player); 2if (dobjstr == "") 3dobj = player; 4else 5dobj = $string_utils:match_player(dobjstr); 6endif 7if (!valid(dobj)) 8player:notify("Show whose quota?"); 9return; 10endif 11$quota_utils:display_quota(dobj);
@create
Referenced by
none
Source
1set_task_perms(player); 2nargs = length(args); 3pos = "named" in args; 4if ((pos <= 1) || (pos == nargs)) 5pos = "called" in args; 6endif 7if ((pos <= 1) || (pos == nargs)) 8player:notify("Usage: @create <parent-class> named [name:]alias,...,alias"); 9player:notify(" or: @create <parent-class> named name-and-alias,alias,...,alias"); 10player:notify(""); 11player:notify("where <parent-class> is one of the standard classes ($note, $letter, $thing, or $container) or an object number (e.g., #999), or the name of some object in the current room."); 12player:notify("You can use \"called\" instead of \"named\", if you wish."); 13return; 14endif 15parentstr = $string_utils:from_list(args[1..pos - 1], " "); 16namestr = $string_utils:from_list(args[pos + 1..$], " "); 17if (!namestr) 18player:notify("You must provide a name."); 19return; 20endif 21if (parentstr[1] == "$") 22parent = #0.(parentstr[2..$]); 23if (typeof(parent) != OBJ) 24player:notify(tostr("\"", parentstr, "\" does not name an object.")); 25return; 26endif 27else 28parent = player:my_match_object(parentstr); 29if ($command_utils:object_match_failed(parent, parentstr)) 30return; 31endif 32endif 33object = player:_create(parent); 34if (typeof(object) == ERR) 35player:notify(tostr(object)); 36return; 37endif 38for f in ($string_utils:char_list(player:build_option("create_flags") || "")) 39object.(f) = 1; 40endfor 41"move() shouldn't, but could bomb. Say if player has a stupid :accept"; 42`move(object, player) ! ANY'; 43$building_utils:set_names(object, namestr); 44if ((other_names = setremove(object.aliases, object.name)) != {}) 45aka = (" (aka " + $string_utils:english_list(other_names)) + ")"; 46else 47aka = ""; 48endif 49player:notify(tostr("You now have ", object.name, aka, " with object number ", object, " and parent ", parent.name, " (", parent, ")."));
@recycle
Referenced by
none
Source
1set_task_perms(player); 2dobj = player:my_match_object(dobjstr); 3if (dobj == $nothing) 4player:notify(tostr("Usage: ", verb, " <object>")); 5elseif ($command_utils:object_match_failed(dobj, dobjstr)) 6"...bogus object..."; 7elseif (player == dobj) 8player:notify($wiz_utils.suicide_string); 9else 10name = dobj.name; 11result = player:_recycle(dobj); 12if (typeof(result) == ERR) 13player:notify(tostr(result)); 14else 15player:notify(tostr(name, " (", dobj, ") recycled.")); 16endif 17endif
@recreate
Referenced by
none
Source
1"@recreate <object> as <parent-class> named [name:]alias,alias,..."; 2" effectively recycles and creates <object> all over again."; 3set_task_perms(player); 4as = prepstr in args; 5named = "named" in args; 6if ((named <= (as + 1)) || (named == length(args))) 7named = "called" in args; 8endif 9if ((named <= (as + 1)) || (named == length(args))) 10player:notify_lines({tostr("Usage: ", verb, " <object> as <parent-class> named [name:]alias,...,alias"), "", "where <parent-class> is one of the standard classes ($note, $letter, $thing, or $container) or an object number (e.g., #999), or the name of some object in the current room. The [name:]alias... specification is as in @create.", "", "You can use \"called\" instead of \"named\", if you wish."}); 11return; 12elseif ($command_utils:object_match_failed(dobj = player:my_match_object(dobjstr), dobjstr)) 13return; 14elseif (is_player(dobj)) 15player:notify("You really *don't* want to do that!"); 16return; 17endif 18parentstr = $string_utils:from_list(args[as + 1..named - 1], " "); 19namestr = $string_utils:from_list(args[named + 1..$], " "); 20if (parentstr[1] == "$") 21parent = #0.(parentstr[2..$]); 22if (typeof(parent) != OBJ) 23player:notify(tostr("\"", parentstr, "\" does not name an object.")); 24return; 25endif 26else 27parent = player:my_match_object(parentstr); 28if ($command_utils:object_match_failed(parent, parentstr)) 29return; 30endif 31endif 32if (!(e = $building_utils:recreate(dobj, parent))) 33player:notify(tostr(e)); 34return; 35endif 36for f in ($string_utils:char_list(player:build_option("create_flags") || "")) 37dobj.(f) = 1; 38endfor 39"move() shouldn't, but could, bomb. Say if player has a stupid :accept"; 40`move(dobj, player) ! ANY'; 41$building_utils:set_names(dobj, namestr); 42if ((other_names = setremove(dobj.aliases, dobj.name)) != {}) 43aka = (" (aka " + $string_utils:english_list(other_names)) + ")"; 44else 45aka = ""; 46endif 47player:notify(tostr("Object number ", dobj, " is now ", dobj.name, aka, " with parent ", parent.name, " (", parent, ")."));
@dig
Referenced by
none
Source
1set_task_perms(player); 2nargs = length(args); 3if (nargs == 1) 4room = args[1]; 5exit_spec = ""; 6elseif ((nargs >= 3) && (args[2] == "to")) 7exit_spec = args[1]; 8room = $string_utils:from_list(args[3..$], " "); 9elseif (argstr && (!prepstr)) 10room = argstr; 11exit_spec = ""; 12else 13player:notify(tostr("Usage: ", verb, " <new-room-name>")); 14player:notify(tostr(" or ", verb, " <exit-description> to <new-room-name-or-old-room-object-number>")); 15return; 16endif 17if (room != tostr(other_room = toobj(room))) 18room_kind = player:build_option("dig_room"); 19if (room_kind == 0) 20room_kind = $room; 21endif 22other_room = player:_create(room_kind); 23if (typeof(other_room) == ERR) 24player:notify(tostr("Cannot create new room as a child of ", $string_utils:nn(room_kind), ": ", other_room, ". See `help @build-options' for information on how to specify the kind of room this command tries to create.")); 25return; 26endif 27for f in ($string_utils:char_list(player:build_option("create_flags") || "")) 28other_room.(f) = 1; 29endfor 30other_room.name = room; 31other_room.aliases = {room}; 32move(other_room, $nothing); 33player:notify(tostr(other_room.name, " (", other_room, ") created.")); 34elseif (nargs == 1) 35player:notify("You can't dig a room that already exists!"); 36return; 37elseif ((!valid(player.location)) || (!($room in $object_utils:ancestors(player.location)))) 38player:notify(tostr("You may only use the ", verb, " command from inside a room.")); 39return; 40elseif ((!valid(other_room)) || (!($room in $object_utils:ancestors(other_room)))) 41player:notify(tostr(other_room, " doesn't look like a room to me...")); 42return; 43endif 44if (exit_spec) 45exit_kind = player:build_option("dig_exit"); 46if (exit_kind == 0) 47exit_kind = $exit; 48endif 49exits = $string_utils:explode(exit_spec, "|"); 50if ((length(exits) < 1) || (length(exits) > 2)) 51player:notify("The exit-description must have the form"); 52player:notify(" [name:]alias,...,alias"); 53player:notify("or [name:]alias,...,alias|[name:]alias,...,alias"); 54return; 55endif 56do_recreate = !player:build_option("bi_create"); 57to_ok = $building_utils:make_exit(exits[1], player.location, other_room, do_recreate, exit_kind); 58if (to_ok && (length(exits) == 2)) 59$building_utils:make_exit(exits[2], other_room, player.location, do_recreate, exit_kind); 60endif 61endif
@audit
Referenced by
none
Source
1"Usage: @audit [player] [from <start>] [to <end>] [for <matching string>]"; 2set_task_perms(player); 3dobj = $string_utils:match_player(dobjstr); 4if (!dobjstr) 5dobj = player; 6elseif ($command_utils:player_match_result(dobj, dobjstr)[1]) 7return; 8endif 9dobjwords = $string_utils:words(dobjstr); 10if (args[1..length(dobjwords)] == dobjwords) 11args = args[length(dobjwords) + 1..$]; 12endif 13if (!(parse_result = $code_utils:_parse_audit_args(@args))) 14player:notify(tostr("Usage: ", verb, " [player] [from <start>] [to <end>] [for <match>]")); 15return; 16endif 17return $building_utils:do_audit(dobj, @parse_result);
@count
Referenced by
none
Source
1if (!dobjstr) 2dobj = player; 3elseif ($command_utils:player_match_result(dobj = $string_utils:match_player(dobjstr), dobjstr)[1]) 4return; 5endif 6set_task_perms(player); 7if (typeof(dobj.owned_objects) == LIST) 8count = length(dobj.owned_objects); 9player:notify(tostr(dobj.name, " currently owns ", count, " object", (count == 1) ? "." | "s.")); 10if ($quota_utils.byte_based) 11player:notify(tostr("Total bytes consumed: ", $string_utils:group_number($quota_utils:get_size_quota(dobj)[2]), ".")); 12endif 13else 14player:notify(tostr(dobj.name, " is not enrolled in the object ownership system. Use @countDB instead.")); 15endif
@countDB
Referenced by
none
Source
1if (!dobjstr) 2dobj = player; 3elseif ($command_utils:player_match_result(dobj = $string_utils:match_player(dobjstr), dobjstr)[1]) 4return; 5endif 6set_task_perms(player); 7count = 0; 8for o in [#1..max_object()] 9if ($command_utils:running_out_of_time()) 10player:notify("Counting..."); 11suspend(5); 12endif 13if (valid(o) && (o.owner == dobj)) 14count = count + 1; 15endif 16endfor 17player:notify(tostr(dobj.name, " currently owns ", count, " object", (count == 1) ? "." | "s."));
@sort-owned*-objects
Referenced by
none
Source
1"$player:owned_objects -- sorts a players .owned_objects property in ascending"; 2"order so it looks nice on @audit."; 3if (player != this) 4return E_PERM; 5endif 6if (typeof(player.owned_objects) == LIST) 7if ((!dobjstr) || (index("object", dobjstr) == 1)) 8ret = $list_utils:sort_suspended(0, player.owned_objects); 9elseif (index("size", dobjstr) == 1) 10ret = $list_utils:reverse_suspended($list_utils:sort_suspended(0, player.owned_objects, $list_utils:slice($list_utils:map_prop(player.owned_objects, "object_size")))); 11endif 12if (typeof(ret) == LIST) 13player.owned_objects = ret; 14player:tell("Your .owned_objects list has been sorted."); 15return 1; 16else 17player:tell("Something went wrong. .owned_objects not sorted."); 18return 0; 19endif 20else 21player:tell("You are not enrolled in .owned_objects scheme, sorry."); 22endif
@add-owned
Referenced by
none
Source
1if (player != this) 2player:tell("Permission Denied"); 3return E_PERM; 4endif 5if (!valid(dobj)) 6player:tell("Don't understand `", dobjstr, "' as an object to add."); 7elseif (dobj.owner != player) 8player:tell("You don't own ", dobj.name, "."); 9elseif (dobj in player.owned_objects) 10player:tell(dobj.name, " is already recorded in your .owned_objects."); 11else 12player.owned_objects = setadd(player.owned_objects, dobj); 13player:tell("Added ", dobj, " to your .owned_objects."); 14endif
@verify-owned
Referenced by
none
Source
1for x in (player.owned_objects) 2if ((!valid(x)) || (x.owner != player)) 3player.owned_objects = setremove(player.owned_objects, x); 4if (valid(x)) 5player:tell("Removing ", x.name, "(", x, "), owned by ", valid(x.owner) ? x.owner.name | "<recycled player>", " from your .owned_objects property."); 6else 7player:tell("Removing invalid object ", x, " from your .owned_objects property."); 8endif 9endif 10$command_utils:suspend_if_needed(2, tostr("Suspending @verify-owned ... ", x)); 11endfor 12player:tell(".owned_objects property verified.");
@unlock
Referenced by
none
Source
1set_task_perms(player); 2dobj = player:my_match_object(dobjstr); 3if ($command_utils:object_match_failed(dobj, dobjstr)) 4return; 5endif 6try 7dobj.key = 0; 8player:notify(tostr("Unlocked ", dobj.name, ".")); 9except error (ANY) 10player:notify(error[2]); 11endtry
@lock
Referenced by
none
Source
1set_task_perms(player); 2dobj = player:my_match_object(dobjstr); 3if ($command_utils:object_match_failed(dobj, dobjstr)) 4return; 5endif 6key = $lock_utils:parse_keyexp(iobjstr, player); 7if (typeof(key) == STR) 8player:notify("That key expression is malformed:"); 9player:notify(tostr(" ", key)); 10else 11try 12dobj.key = key; 13player:notify(tostr("Locked ", dobj.name, " to this key:")); 14player:notify(tostr(" ", $lock_utils:unparse_key(key))); 15except error (ANY) 16player:notify(error[2]); 17endtry 18endif
@newmess*age
Referenced by
none
Source
1"Usage: @message <message-name> [<message>] [on <object>]"; 2"Add a message property to an object (default is player), and optionally"; 3"set its value. For use by non-programmers, who aren't allowed to add"; 4"properties generally."; 5"To undo the effects of this, use @unmessage."; 6set_task_perms(player); 7dobjwords = $string_utils:words(dobjstr); 8if (!dobjwords) 9player:notify(tostr("Usage: ", verb, " <message-name> [<message>] [on <object>]")); 10return; 11endif 12object = valid(iobj) ? iobj | player; 13name = this:_messagify(dobjwords[1]); 14value = dobjstr[length(dobjwords[1]) + 2..$]; 15nickname = "@" + name[1..$ - 4]; 16e = `add_property(object, name, value, {player, "rc"}) ! ANY'; 17if (typeof(e) != ERR) 18player:notify(tostr(nickname, " on ", object.name, " is now \"", object.(name), "\".")); 19elseif (e != E_INVARG) 20player:notify(tostr(e)); 21elseif ($object_utils:has_property(object, name)) 22"object already has property"; 23player:notify(tostr(object.name, " already has a ", nickname, " message.")); 24else 25player:notify(tostr("Unable to add ", nickname, " message to ", object.name, ": ", e)); 26endif
@unmess*age
Referenced by
none
Source
1"Usage: @unmessage <message-name> [from <object>]"; 2"Remove a message property from an object (default is player)."; 3set_task_perms(player); 4if ((!dobjstr) || (length($string_utils:words(dobjstr)) > 1)) 5player:notify(tostr("Usage: ", verb, " <message-name> [from <object>]")); 6return; 7endif 8object = valid(iobj) ? iobj | player; 9name = this:_messagify(dobjstr); 10nickname = "@" + name[1..$ - 4]; 11try 12delete_property(object, name); 13player:notify(tostr(nickname, " message removed from ", object.name, ".")); 14except (E_PROPNF) 15player:notify(tostr("No ", nickname, " message found on ", object.name, ".")); 16except error (ANY) 17player:notify(error[2]); 18endtry
_messagify
Referenced by
- #4:@newmess*age line 13:
this:_messagify - #4:@unmess*age line 9:
this:_messagify
Source
1"Given any of several formats people are likely to use for a @message"; 2"property, return the canonical form (\"foobar_msg\")."; 3name = args[1]; 4if (name[1] == "@") 5name = name[2..$]; 6endif 7if ((length(name) < 4) || (name[$ - 3..$] != "_msg")) 8name = name + "_msg"; 9endif 10return name;
@kids
Referenced by
none
Source
1"'@kids <obj>' - List the children of an object. This is handy for seeing whether anybody's actually using your carefully-wrought public objects."; 2thing = player:my_match_object(dobjstr); 3if (!$command_utils:object_match_failed(thing, dobjstr)) 4kids = children(thing); 5if (kids) 6player:notify(tostr(thing:title(), "(", thing, ") has ", length(kids), " kid", (length(kids) == 1) ? "" | "s", ".")); 7player:notify(tostr($string_utils:names_of(kids))); 8else 9player:notify(tostr(thing:title(), "(", thing, ") has no kids.")); 10endif 11endif
@contents
Referenced by
none
Source
1"'@contents <obj> - list the contents of an object, with object numbers. This verb is by yduJ."; 2set_task_perms(player); 3if (!dobjstr) 4dobj = player.location; 5else 6dobj = player:my_match_object(dobjstr); 7endif 8if ($command_utils:object_match_failed(dobj, dobjstr)) 9else 10contents = dobj.contents; 11if (contents) 12player:notify(tostr(dobj:title(), "(", dobj, ") contains:")); 13player:notify(tostr($string_utils:names_of(contents))); 14else 15player:notify(tostr(dobj:title(), "(", dobj, ") contains nothing.")); 16endif 17endif
@par*ents
Referenced by
none
Source
1"'@parents <thing>' - List <thing> and its ancestors, all the way back to the Root Class (#1)."; 2if (player != this) 3return player:notify("Permission denied: not a builder."); 4elseif (!dobjstr) 5player:notify(tostr("Usage: ", verb, " <object>")); 6return; 7endif 8set_task_perms(player); 9o = player:my_match_object(dobjstr); 10if (!$command_utils:object_match_failed(o, dobjstr)) 11player:notify($string_utils:names_of({o, @$object_utils:ancestors(o)})); 12endif
@location*s
Referenced by
none
Source
1"@locations <thing> - List <thing> and its containers, all the way back to the outermost one."; 2set_task_perms(player); 3if (!dobjstr) 4what = player; 5elseif ((!valid(what = player:my_match_object(dobjstr))) && (!valid(what = $string_utils:match_player(dobjstr)))) 6$command_utils:object_match_failed(dobj, dobjstr); 7return; 8endif 9player:notify($string_utils:names_of({what, @$object_utils:locations(what)}));
@cl*asses
Referenced by
none
Source
1"$class_registry is in the following format:"; 2" { {name, description, members}, ... }"; 3"where `name' is the name of a particular class of objects, `description' is a one-sentence description of the membership of the class, and `members' is a list of object numbers, the members of the class."; 4""; 5if (!$command_utils:yes_or_no("This command can be very spammy. Are you certain you need this information?")) 6return player:tell("OK, aborting. The lag thanks you."); 7endif 8if (args) 9members = {}; 10for name in (args) 11class = $list_utils:assoc_prefix(name, $class_registry); 12if (class) 13for o in (class[3]) 14members = setadd(members, o); 15endfor 16else 17player:tell("There is no defined class of objects named `", name, "'; type `@classes' to see a complete list of defined classes."); 18return; 19endif 20endfor 21printed = {}; 22for o in (members) 23what = o; 24while (valid(what)) 25printed = setadd(printed, what); 26what = parent(what); 27endwhile 28endfor 29player:tell("Members of the class", (length(args) > 1) ? "es" | "", " named ", $string_utils:english_list(args), ":"); 30player:tell(); 31set_task_perms(player); 32this:classes_2($root_class, "", members, printed); 33player:tell(); 34else 35"List all class names and descriptions"; 36player:tell("The following classes of objects have been defined:"); 37for class in ($class_registry) 38name = class[1]; 39description = class[2]; 40player:tell(); 41player:tell("-- ", name, ": ", description); 42endfor 43player:tell(); 44player:tell("Type `@classes <name>' to see the members of the class with the given <name>."); 45endif
classes_2
Referenced by
- #4:@cl*asses line 32:
this:classes_2 - #4:classes_2 line 12:
this:classes_2
Source
1{root, indent, members, printed} = args; 2if (root in members) 3player:tell(indent, root.name, " (", root, ")"); 4else 5player:tell(indent, "<", root.name, " (", root, ")>"); 6endif 7printed = setremove(printed, root); 8indent = indent + " "; 9set_task_perms(caller_perms()); 10for c in ($list_utils:sort_suspended(2, $set_utils:intersection(children(root), printed))) 11$command_utils:suspend_if_needed(10); 12this:classes_2(c, indent, members, printed); 13endfor
_create
Referenced by
none
Source
1set_task_perms(caller_perms()); 2if (this:build_option("bi_create")) 3return $quota_utils:bi_create(@args); 4else 5return $recycler:(verb)(@args); 6endif
_recycle
Referenced by
none
Source
1set_task_perms(caller_perms()); 2if (this:build_option("bi_create")) 3return recycle(@args); 4else 5if (this:build_option("recycle_warn") && (!$command_utils:yes_or_no(tostr("Do you really want to recycle ", $string_utils:nn(args[1]), "?")))) 6return player:notify("Recycling cancelled."); 7endif 8return $recycler:(verb)(@args); 9endif
@chparent
Referenced by
none
Source
1set_task_perms(player); 2if ($command_utils:object_match_failed(object = player:my_match_object(dobjstr), dobjstr)) 3"...bogus object..."; 4elseif ($command_utils:object_match_failed(parent = player:my_match_object(iobjstr), iobjstr)) 5"...bogus new parent..."; 6elseif ((this != player) && (!$object_utils:isa(player, $player))) 7"...They chparented to #1 and want to chparent back to $prog. Probably for some nefarious purpose..."; 8player:notify("You don't seem to already be a valid player class. Perhaps chparenting away from the $player hierarchy was not such a good idea. Permission denied."); 9elseif (is_player(object) && (!$object_utils:isa(parent, $player))) 10player:notify(tostr(object, " is a player and ", parent, " is not a player class.")); 11player:notify("You really *don't* want to do this. Trust me."); 12else 13try 14result = player:_chparent(object, parent); 15player:notify("Parent changed."); 16except (E_INVARG) 17if (valid(object) && valid(parent)) 18player:notify(tostr("Some property existing on ", parent, " is defined on ", object, " or one of its descendants.")); 19player:notify(tostr("Try @check-chparent ", dobjstr, " to ", iobjstr)); 20else 21player:notify("Either that is not a valid object or not a valid parent"); 22endif 23except (E_PERM) 24player:notify("Either you don't own the object, don't own the parent, or the parent is not fertile."); 25except (E_RECMOVE) 26player:notify("That parent object is a descendant of the object!"); 27endtry 28endif
@check-chp*arent
Referenced by
none
Source
1"Copied from generic programmer (#217):@check-chparent by ur-Rog (#6349) Sun Nov 8 22:13:53 1992 PST"; 2"@check-chparent object to newparent"; 3"checks for property name conflicts that would make @chparent bomb."; 4set_task_perms(player); 5if (!(dobjstr && iobjstr)) 6player:notify(tostr("Usage: ", verb, " <object> to <newparent>")); 7elseif ($command_utils:object_match_failed(object = player:my_match_object(dobjstr), dobjstr)) 8"...bogus object..."; 9elseif ($command_utils:object_match_failed(parent = player:my_match_object(iobjstr), iobjstr)) 10"...bogus new parent..."; 11elseif (player != this) 12player:notify(tostr(E_PERM)); 13elseif (typeof(result = $object_utils:property_conflicts(object, parent)) == ERR) 14player:notify(tostr(result)); 15elseif (result) 16su = $string_utils; 17player:notify(""); 18player:notify(su:left("Property", 30) + "Also Defined on"); 19player:notify(su:left("--------", 30) + "---------------"); 20for r in (result) 21player:notify(su:left(tostr(parent, ".", r[1]), 30) + su:from_list(listdelete(r, 1), " ")); 22$command_utils:suspend_if_needed(0); 23endfor 24else 25player:notify("No property conflicts found."); 26endif
@set*prop
Referenced by
none
Source
1"Syntax: @set <object>.<prop-name> to <value>"; 2""; 3"Changes the value of the specified object's property to the given value."; 4"You must have permission to modify the property, either because you own the property or if it is writable."; 5set_task_perms(player); 6if (this != player) 7return player:tell(E_PERM); 8endif 9l = $code_utils:parse_propref(dobjstr); 10if (l) 11dobj = player:my_match_object(l[1], player.location); 12if ($command_utils:object_match_failed(dobj, l[1])) 13return; 14endif 15prop = l[2]; 16to_i = "to" in args; 17at_i = "at" in args; 18i = (to_i && at_i) ? min(to_i, at_i) | (to_i || at_i); 19iobjstr = argstr[$string_utils:word_start(argstr)[i][2] + 1..$]; 20iobjstr = $string_utils:trim(iobjstr); 21if (!iobjstr) 22val = dobj.(prop) = ""; 23iobjstr = "\"\""; 24"elseif (iobjstr[1] == \"\\\"\")"; 25"val = dobj.(prop) = iobjstr;"; 26"iobjstr = \"\\\"\" + iobjstr + \"\\\"\";"; 27else 28val = $string_utils:to_value(iobjstr); 29if (!val[1]) 30player:tell("Could not parse: ", iobjstr); 31return; 32elseif (!$object_utils:has_property(dobj, prop)) 33player:tell("That object does not define that property."); 34return; 35endif 36val = dobj.(prop) = val[2]; 37endif 38player:tell("Property ", dobj, ".", prop, " set to ", $string_utils:print(val), "."); 39else 40player:tell("Property ", dobjstr, " not found."); 41endif
build_option
Referenced by
- #4:_create line 2:
this:build_option - #4:_recycle line 2:
this:build_option - #4:_recycle line 5:
this:build_option
Source
1":build_option(name)"; 2"Returns the value of the specified builder option"; 3if ((caller == this) || $perm_utils:controls(caller_perms(), this)) 4return $build_options:get(this.build_options, args[1]); 5else 6return E_PERM; 7endif
set_build_option
Referenced by
none
Source
1":set_build_option(oname,value)"; 2"Changes the value of the named option."; 3"Returns a string error if something goes wrong."; 4if (!((caller == this) || $perm_utils:controls(caller_perms(), this))) 5return tostr(E_PERM); 6endif 7"...this is kludgy, but it saves me from writing the same verb n times."; 8"...there's got to be a better way to do this..."; 9verb[1..4] = ""; 10foo_options = verb + "s"; 11"..."; 12if (typeof(s = #0.(foo_options):set(this.(foo_options), @args)) == STR) 13return s; 14elseif (s == this.(foo_options)) 15return 0; 16else 17this.(foo_options) = s; 18return 1; 19endif
@build-o*ptions @buildo*ptions @builder-o*ptions @buildero*ptions
Referenced by
none
Source
1"@<what>-option <option> [is] <value> sets <option> to <value>"; 2"@<what>-option <option>=<value> sets <option> to <value>"; 3"@<what>-option +<option> sets <option> (usually equiv. to <option>=1"; 4"@<what>-option -<option> resets <option> (equiv. to <option>=0)"; 5"@<what>-option !<option> resets <option> (equiv. to <option>=0)"; 6"@<what>-option <option> displays value of <option>"; 7set_task_perms(player); 8what = "build"; 9options = what + "_options"; 10option_pkg = #0.(options); 11set_option = ("set_" + what) + "_option"; 12if (!args) 13player:notify_lines({("Current " + what) + " options:", "", @option_pkg:show(this.(options), option_pkg.names)}); 14return; 15elseif (typeof(presult = option_pkg:parse(args)) == STR) 16player:notify(presult); 17return; 18else 19if (length(presult) > 1) 20if (typeof(sresult = this:(set_option)(@presult)) == STR) 21player:notify(sresult); 22return; 23elseif (!sresult) 24player:notify("No change."); 25return; 26endif 27endif 28player:notify_lines(option_pkg:show(this.(options), presult[1])); 29endif
@measure
Referenced by
none
Source
1"Syntax:"; 2" @measure object <object name>"; 3" @measure summary [player]"; 4" @measure new [player]"; 5" @measure breakdown <object name>"; 6" @measure recent [number of days] [player]"; 7if (length(args) < 1) 8player:tell_lines($code_utils:verb_documentation()); 9return; 10endif 11if (index("object", args[1]) == 1) 12"Object."; 13what = player.location:match_object(name = $string_utils:from_list(args[2..$], " ")); 14if (!valid(what)) 15player:tell("Sorry, I didn't understand `", name, "'"); 16elseif ((((($object_utils:has_property(what, "object_size") && (what.object_size[1] > $byte_quota_utils.too_large)) && (!player.wizard)) && (player != $byte_quota_utils.owner)) && (player != $hacker)) && (player != what.owner)) 17player:tell($string_utils:nn(what), " when last measured was ", $string_utils:group_number(what.object_size[1]), " bytes. To reduce lag induced by multiple players re-measuring large objects multiple times, you may not measure that object."); 18elseif ((`what.object_size[2] ! ANY => 0' > (time() - 86400)) && (!$command_utils:yes_or_no(tostr("That object was measured only ", $string_utils:from_seconds(time() - what.object_size[2]), " ago. Please don't lag the MOO by remeasuring things frequently. Are you sure you want to remeasure it?")))) 19return player:tell("Not measuring. It was ", $string_utils:group_number(what.object_size[1]), " bytes when last measured."); 20else 21player:tell("Checking size of ", what.name, " (", what, ")..."); 22player:tell("Size of ", what.name, " (", what, ") is ", $byte_quota_utils:object_bytes(what), " bytes."); 23endif 24elseif (index("summary", args[1]) == 1) 25"Summarize player."; 26if (length(args) == 1) 27what = player; 28else 29what = $string_utils:match_player(name = $string_utils:from_list(args[2..$], " ")); 30endif 31if (!valid(what)) 32player:tell("Sorry, I don't know who you mean by `", name, "'"); 33else 34$byte_quota_utils:do_summary(what); 35endif 36elseif (index("new", args[1]) == 1) 37if (length(args) == 1) 38what = player; 39elseif (!valid(what = $string_utils:match_player(name = $string_utils:from_list(args[2..$], " ")))) 40return $command_utils:player_match_failed(what, name); 41endif 42player:tell("Measuring the sizes of ", what.name, "'s recently created objects..."); 43total = 0; 44unmeasured_index = 4; 45unmeasured_multiplier = 100; 46nunmeasured = 0; 47if (typeof(what.owned_objects) == LIST) 48for x in (what.owned_objects) 49if (!$object_utils:has_property(x, "object_size")) 50nunmeasured = nunmeasured + 1; 51elseif (!x.object_size[1]) 52player:tell("Measured ", $string_utils:nn(x), ": ", size = $byte_quota_utils:object_bytes(x), " bytes."); 53total = total + size; 54endif 55$command_utils:suspend_if_needed(5); 56endfor 57if (nunmeasured && (what.size_quota[unmeasured_index] < (unmeasured_multiplier * nunmeasured))) 58what.size_quota[unmeasured_index] = (what.size_quota[unmeasured_index] % unmeasured_multiplier) + (nunmeasured * unmeasured_multiplier); 59endif 60player:tell("Total bytes used in new creations: ", total, ".", nunmeasured ? tostr("There were a total of ", nunmeasured, " object(s) found with no .object_size property. This will prevent additional building.") | ""); 61else 62player:tell("Sorry, ", what.name, " is not enrolled in the object measurement scheme."); 63endif 64elseif (index("recent", args[1]) == 1) 65"@measure recent days player"; 66if (length(args) > 1) 67days = $code_utils:toint(args[2]); 68else 69days = $byte_quota_utils.cycle_days; 70endif 71if (!days) 72return player:tell("Couldn't understand `", args[2], "' as a positive integer."); 73endif 74if (length(args) > 2) 75if (!valid(who = $string_utils:match_player(name = $string_utils:from_list(args[3..$], " ")))) 76return $command_utils:player_match_failed(who, name); 77endif 78else 79who = player; 80endif 81if (typeof(who.owned_objects) == LIST) 82player:tell("Re-measuring objects of ", $string_utils:nn(who), " which have not been measured in the past ", days, " days."); 83when = time() - (days * 86400); 84which = {}; 85for x in (who.owned_objects) 86if (x.object_size[2] < when) 87$byte_quota_utils:object_size(x); 88which = setadd(which, x); 89$command_utils:suspend_if_needed(3, "...measuring"); 90endif 91endfor 92player:tell("Done, re-measured ", length(which), " objects.", (length(which) > 0) ? " Recommend you use @measure summary to update the display of @quota." | ""); 93else 94player:tell("Sorry, ", who.name, " is not enrolled in the object measurement scheme."); 95endif 96elseif (index("breakdown", args[1]) == 1) 97what = player.location:match_object(name = $string_utils:from_list(args[2..$], " ")); 98if (!valid(what)) 99player:tell("Sorry, I didn't understand `", name, "'"); 100elseif (!$byte_quota_utils:can_peek(player, what.owner)) 101return player:tell("Sorry, you don't control ", what.name, " (", what, ")"); 102else 103if (mail = $command_utils:yes_or_no("This might be kinda long. Want me to mail you the result?")) 104player:tell("Result will be mailed."); 105endif 106info = $byte_quota_utils:do_breakdown(what); 107if (typeof(info) == ERR) 108player:tell(info); 109endif 110if (mail) 111$mail_agent:send_message($byte_quota_utils.owner, {player}, tostr("Object breakdown of ", what.name, " (", what, ")"), info); 112else 113player:tell_lines_suspended(info); 114endif 115endif 116else 117player:tell("Not a sub-command of @measure: ", args[1]); 118player:tell_lines($code_utils:verb_documentation()); 119endif
init_for_core
Referenced by
- #36:init_for_core line 2:
pass( - #71:init_for_core line 18:
pass(
Source
1if (caller_perms().wizard) 2if (this == $builder) 3this.build_options = `toint($veroom) ! E_PROPNF' ? {{"dig_room", $veroom}} | {}; 4else 5clear_property(this, "build_options"); 6endif 7return pass(@args); 8endif
@botl*ock
Referenced by
none
Source
1if (!argstr) 2player:tell("Usage: @botlock <on|off>"); 3player:tell(); 4player:tell("Sets the current room's .bot_locked property to 1 or 0, respectively."); 5player:tell("Bot-locked rooms cannot receive or contain monsters or sales bots."); 6return; 7elseif ((argstr == "on") && (player.location.bot_locked == 1)) 8player:tell("This room is already bot-locked."); 9return; 10elseif ((argstr == "off") && (player.location.bot_locked == 0)) 11player:tell("This room is not bot-locked."); 12return; 13endif 14if (argstr == "on") 15player.location.bot_locked = 1; 16player:tell("This room is now bot-locked."); 17return; 18elseif (argstr == "off") 19player.location.bot_locked = 0; 20player:tell("This room is no longer bot-locked."); 21return; 22else 23player:tell("Use '@botlock on' or '@botlock off'."); 24return; 25endif
@retail
Referenced by
none
Source
1if ((!player.location.retail) && (argstr == "on")) 2player.location.retail = 1; 3player:tell("Retail set to on."); 4return; 5elseif (player.location.retail && (argstr == "off")) 6player.location.retail = 0; 7player:tell("Retail set to off."); 8return; 9else 10return player:tell("Property unchanged."); 11endif
@dark
Referenced by
none
Source
1if ((!player.location.dark) && (argstr == "on")) 2player.location.dark = 1; 3player:tell("Dark set to on."); 4return; 5elseif (player.location.dark && (argstr == "off")) 6player.location.dark = 0; 7player:tell("Dark set to off."); 8return; 9else 10return player:tell("Property unchanged."); 11endif
@sanc*tuary
Referenced by
none
Source
1if ((!player.location.sanctuary) && (argstr == "on")) 2player.location.sanctuary = 1; 3player:tell("Sanctuary set to on."); 4return; 5elseif (player.location.sanctuary && (argstr == "off")) 6player.location.sanctuary = 0; 7player:tell("Sanctuary set to off."); 8return; 9else 10return player:tell("Property unchanged."); 11endif