generic builder #4

Parent #90Owner #2Flags read, fertileSource RPG Core/rpgcore-patched.db

Aliases: generic builder

32 verbs · 119 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
@quotaany none nonerd#411
@createany any anyrd#449
@recycleany none nonerd#417
@recreateany as anyrd#447
@digany any anyrd#461
@auditany any anyrd#417
@countany none nonerd#415
@countDBany none nonerd#417
@sort-owned*-objectsany none nonerd#422
@add-ownedany none nonerd#414
@verify-ownednone none nonerd#412
@unlockany none nonerd#411
@lockany with/using anyrd#418
@newmess*ageany any anyrd#426
@unmess*ageany any anyrd#418
_messagifythis none thisrxd#410
@kidsany none nonerxd#411
@contentsany none nonerd#417
@par*entsany none nonerd#412
@location*sany none nonerd#49
@cl*assesany any anyrd#445
classes_2this none thisrxd#413
_createthis none thisrxd#46
_recyclethis none thisrxd#49
@chparentany at/to anyrd#428
@check-chp*arentany at/to anyrd#426
@set*propany at/to anyrd#441
build_optionthis none thisrxd#47
set_build_optionthis none thisrxd#419
@build-o*ptions @buildo*ptions @builder-o*ptions @buildero*ptionsany any anyrd#429
@measureany any anyrd#4119
init_for_corethis none thisrxd#48

Properties

PropertyDefinerFlagsOwnerValue
build_options#4rc#2{{"dig_room", #118}}
at_room_width#90rc#2<clear>
at_number#90rc#2<clear>
join_msg#90rc#2<clear>
object_port_msg#90rc#2<clear>
victim_port_msg#90rc#2<clear>
thing_arrive_msg#90rc#2<clear>
othing_port_msg#90rc#2<clear>
thing_port_msg#90rc#2<clear>
player_arrive_msg#90rc#2<clear>
oplayer_port_msg#90rc#2<clear>
player_port_msg#90rc#2<clear>
self_arrive_msg#90rc#2<clear>
oself_port_msg#90rc#2<clear>
self_port_msg#90rc#2<clear>
rooms#90r#36<clear>
refused_origins#90r#36<clear>
refused_extra#90r#36<clear>
default_refusal_time#90r#36<clear>
report_refusal#90r#36<clear>
refused_actions#90r#36<clear>
refused_until#90r#36<clear>
page_refused#90r#36<clear>
page_refused_msg#90rc#2<clear>
whisper_refused_msg#90rc#2<clear>
mail_refused_msg#90rc#2<clear>
death_msg#91rc#2<clear>
alive#91r#36<clear>
alert#91r#36<clear>
mobile#91r#36<clear>
wielded#91r#36<clear>
last_paged#91r#36<clear>
last_healed#91r#36<clear>
followed_by#91r#36<clear>
following#91r#36<clear>
free_points#91r#361.36249999999999
stats#91r#36{{"Strength", "Dexterity", "Intelligence", "Health"}, {20.0, 20.0, 20.0, 20.0}}
stats_current#91r#36{{"Strength", "Dexterity", "Intelligence", "Health"}, {20.0, 20.0, 20.0, 20.0}}
skills#91r#36{{"combat", "medical", "language"}, {5.0, 5.0, 5.0}}
race#91r#36<clear>
org#91r#36<clear>
money#91r#36<clear>
follow_msg#91rc#2<clear>
stopfollow_msg#91rc#2<clear>
searching#91r#36<clear>
languages#91r#36{{#142}, {2.0}}
speaking#91r#36<clear>
remembered_names#91r#36{}
short_desc_msg#91r#36""
_mail_task#40rc#2<clear>
messages_going#40c#2<clear>
mail_lists#40rc#2<clear>
mail_notify#40r#2<clear>
mail_forward#40rc#2<clear>
mail_options#40rc#2{}
message_keep_date#40rc#2<clear>
messages_kept#40rc#2<clear>
current_message#40c#2{0, -1300000000}
messages#40c#2<clear>
ansi_options#95r#36<clear>
replace_codes#95r#36<clear>
features#6r#36<clear>
previous_connection#6#2<clear>
email_address#6#2<clear>
last_disconnect_time#6r#2<clear>
help#6rc#2{#85, #106}
more_msg#6rc#2<clear>
linetask#6r#36<clear>
linesleft#6r#36<clear>
linebuffer#6#36<clear>
pagelen#6r#36<clear>
owned_objects#6r#2<clear>
linelen#6r#36<clear>
current_folder#6c#2<clear>
all_connect_places#6#2<clear>
last_connect_place#6#2<clear>
brief#6rc#2<clear>
lines#6c#2<clear>
page_absent_msg#6rc#2<clear>
pq#6rc#2<clear>
pqc#6rc#2<clear>
page_origin_msg#6rc#2<clear>
page_echo_msg#6rc#2<clear>
edit_options#6rc#2<clear>
last_connect_time#6r#2<clear>
ownership_quota#6#360
gender#6rc#2<clear>
prc#6rc#2<clear>
ppc#6rc#2<clear>
poc#6rc#2<clear>
psc#6rc#2<clear>
pr#6rc#2<clear>
pp#6rc#2<clear>
po#6rc#2<clear>
ps#6rc#2<clear>
home#6rc#2#62
password#6#2<clear>
gaglist#6rc#2<clear>
paranoid#6rc#2<clear>
display_options#6rc#2<clear>
verb_subs#6rc#2<clear>
first_connect_time#6r#2<clear>
size_quota#6#36<clear>
last_password_time#6#2<clear>
last_connect_attempt#6#2<clear>
page_count_start_time#6r#2<clear>
ping_task#6r#36<clear>
value_base#102r#2<clear>
damage_base#102r#2<clear>
x_loc#102r#36<clear>
y_loc#102r#36<clear>
ansi_title#102r#36<clear>
obvious#102r#36<clear>
build_help#102rc#2<clear>
key#1c#2<clear>
aliases#1r#2{"generic builder"}
description#1rc#2"You see a player who should type '@describe me as ...'."
object_size#1r#36{41330, -1090650497}
html#1rc#2<clear>

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

calls n4_0 #4:@quota n20_20 #20:match_player n4_0->n20_20 n6_10 #6:notify n4_0->n6_10 n80_9 #80:display_quota n4_0->n80_9 n4_1 #4:@create n4_1->n6_10 n20_5 #20:from_list n4_1->n20_5 n6_7 #6:my_match_object n4_1->n6_7 n56_0 #56:object_match_failed n4_1->n56_0 n20_50 #20:char_list n4_1->n20_50 n21_1 #21:set_names n4_1->n21_1 n20_6 #20:english_list n4_1->n20_6 n4_2 #4:@recycle n4_2->n6_10 n4_2->n6_7 n4_2->n56_0 n4_3 #4:@recreate n4_3->n6_10 n4_3->n20_5 n4_3->n6_7 n4_3->n56_0 n4_3->n20_50 n4_3->n21_1 n4_3->n20_6 n6_11 #6:notify_lines n4_3->n6_11 n21_2 #21:recreate n4_3->n21_2 n4_4 #4:@dig n4_4->n6_10 n4_4->n20_5 n4_4->n20_50 n20_59 #20:name_and_number n4_4->n20_59 n52_6 #52:ancestors n4_4->n52_6 n20_38 #20:explode n4_4->n20_38 n21_0 #21:make_exit n4_4->n21_0 n4_5 #4:@audit n4_5->n20_20 n4_5->n6_10 n56_1 #56:player_match_result n4_5->n56_1 n20_39 #20:words n4_5->n20_39 n59_31 #59:_parse_audit_args n4_5->n59_31 n21_6 #21:do_audit n4_5->n21_6 n4_6 #4:@count n4_6->n20_20 n4_6->n6_10 n4_6->n56_1 n20_26 #20:group_number n4_6->n20_26 n80_14 #80:get_size_quota n4_6->n80_14 n4_7 #4:@countDB n4_7->n20_20 n4_7->n6_10 n4_7->n56_1 n56_7 #56:running_out_of_time n4_7->n56_7 n4_8 #4:@sort-owned*-objects n55_15 #55:sort_suspended n4_8->n55_15 n55_30 #55:reverse_suspended n4_8->n55_30 n55_16 #55:slice n4_8->n55_16 n6_18 #6:tell n4_8->n6_18 n4_9 #4:@add-owned n4_9->n6_18 n4_10 #4:@verify-owned n4_10->n6_18 n56_8 #56:suspend_if_needed n4_10->n56_8 n4_11 #4:@unlock n4_11->n6_10 n4_11->n6_7 n4_11->n56_0 n4_12 #4:@lock n4_12->n6_10 n4_12->n6_7 n4_12->n56_0 n53_3 #53:parse_keyexp n4_12->n53_3 n53_8 #53:unparse_key n4_12->n53_8 n4_13 #4:@newmess*age n4_13->n6_10 n4_13->n20_39 n4_15 #4:_messagify n4_13->n4_15 n52_0 #52:has_property n4_13->n52_0 n4_14 #4:@unmess*age n4_14->n6_10 n4_14->n20_39 n4_14->n4_15 n4_16 #4:@kids n4_16->n6_10 n4_16->n6_7 n4_16->n56_0 n20_7 #20:names_of n4_16->n20_7

Showing 48 of 90 verbs; 42 not shown.

Source

@quota

Spec any none noneFlags rdOwner #2Definer #4

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

Spec any any anyFlags rdOwner #2Definer #4

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

Spec any none noneFlags rdOwner #2Definer #4

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

Spec any as anyFlags rdOwner #2Definer #4

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

Spec any any anyFlags rdOwner #2Definer #4

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

Spec any any anyFlags rdOwner #2Definer #4

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

Spec any none noneFlags rdOwner #2Definer #4

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

Spec any none noneFlags rdOwner #2Definer #4

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

Spec any none noneFlags rdOwner #2Definer #4

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

Spec any none noneFlags rdOwner #2Definer #4

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

Spec none none noneFlags rdOwner #2Definer #4

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

Spec any none noneFlags rdOwner #2Definer #4

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

Spec any with/using anyFlags rdOwner #2Definer #4

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

Spec any any anyFlags rdOwner #2Definer #4

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

Spec any any anyFlags rdOwner #2Definer #4

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

Spec this none thisFlags rxdOwner #2Definer #4

Referenced by

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

Spec any none noneFlags rxdOwner #2Definer #4

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

Spec any none noneFlags rdOwner #2Definer #4

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

Spec any none noneFlags rdOwner #2Definer #4

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

Spec any none noneFlags rdOwner #2Definer #4

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

Spec any any anyFlags rdOwner #2Definer #4

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

Spec this none thisFlags rxdOwner #2Definer #4

Referenced by

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

Spec this none thisFlags rxdOwner #2Definer #4

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

Spec this none thisFlags rxdOwner #2Definer #4

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

Spec any at/to anyFlags rdOwner #2Definer #4

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

Spec any at/to anyFlags rdOwner #2Definer #4

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

Spec any at/to anyFlags rdOwner #2Definer #4

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

Spec this none thisFlags rxdOwner #2Definer #4

Referenced by

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

Spec this none thisFlags rxdOwner #2Definer #4

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

Spec any any anyFlags rdOwner #2Definer #4

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

Spec any any anyFlags rdOwner #36Definer #4

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

Spec this none thisFlags rxdOwner #2Definer #4

Referenced by

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