generic builder #2

Parent #89Owner #361Flags programmer, read, fertileSource hellcore/hellcore.db

Aliases: generic builder

66 verbs · 192 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
@quotaany none nonerxd#211
@create @makeany any anyrxd#257
@recycleany none nonerxd#236
@recreateany as anyrxd#247
@digg @dig2 @dig-oldany any anyrxd#258
@auditany any anyrxd#217
@countany none nonerxd#215
@countDBany none nonerxd#217
@sort-owned*-objectsany none nonerxd#222
@add-ownedany none nonerxd#214
@verify-ownednone none nonerxd#212
@unlockany none nonerxd#211
@newmess*ageany any anyrxd#226
@unmess*ageany any anyrxd#218
_messagifythis none thisrxd#210
@kids @childrenany none nonerxd#215
@c*ontentsany none nonerxd#221
@par*entsany none nonerxd#212
@location*sany none nonerxd#29
_createthis none thisrxd#26
_recyclethis none thisrxd#22
@chparentany at/to anyrxd#233
@check-chp*arentany at/to anyrxd#226
@set*propany at/to anyrxd#251
build_optionthis none thisrxd#27
set_build_optionthis none thisrxd#219
@build-o*ptions @buildo*ptions @builder-o*ptions @buildero*ptionsany any anyrxd#229
@measureany any anyrxd#2119
init_for_corethis none thisrxd#28
@tree @treek @mytreeany any anyrxd#224
tell_treethis none thisrxd#274
tellthis none thisrxd#210
tell_linesthis none thisrxd#215
@s*tatany none nonerxd#25
?* help info*rmation @helpany any anyrxd#248
@digany any anyrxd#248
@featuresany any anyrxd#275
@make-cliff @make-ladderany none nonerxd#218
@make-doorany none nonerxd#29
@paranoidany any anyrxd#222
@ch*eck-fullany any anyrxd#262
erase_paranoid_datathis none thisrxd#26
homenone none nonerxd#249
@set-note-text @set-note-stringany none nonerxd#232
@w*h*oany any anyrxd#28
@addalias*# @add-alias*#any at/to anyrxd#2119
@rmalias*# @rm-alias*#any out of/from inside/from anyrxd#2100
@sendany any anyrxd#212
@edit edany any anyrxd#215
@noteditany none nonerxd#22
tell_mytreethis none thisrx#278
@answer @repl*yany any anyrxd#221
@Make-stairsany none nonerxd#231
@spawn @load @monsterany none nonerxd#259
@chmod*#any any anyrxd#297
@prop*erties @propsany none nonerxd#218
#*any any anyrxd#268
@d*isplayany none nonerxd#2212
@s*howany any anyrxd#226
@setstat @setskillany for/about anyrxd#247
@moveany any anyrxd#228
@make-holethis none thisrxd#29
@add-feature @addfeatureany none nonerxd#236
@make-doorwayany none nonerxd#27
@make-swingdoorsany none nonerxd#27
@reset-areanone none nonerxd#21

Properties

PropertyDefinerFlagsOwnerValue
build_options#2rc#361{}
who_visible#2rc#3610
join_msg#89rc#361<clear>
object_port_msg#89rc#361<clear>
victim_port_msg#89rc#361<clear>
thing_arrive_msg#89rc#361<clear>
othing_port_msg#89rc#361<clear>
thing_port_msg#89rc#361<clear>
player_arrive_msg#89rc#361<clear>
oplayer_port_msg#89rc#361<clear>
player_port_msg#89rc#361<clear>
self_arrive_msg#89rc#361<clear>
oself_port_msg#89rc#361<clear>
self_port_msg#89rc#361<clear>
real_name#89rc#361<clear>
real_aliases#89rc#361<clear>
zots#89rc#361<clear>
bedroom#89rc#361<clear>
chillmin#89rc#361<clear>
_mail_task#33rc#361<clear>
messages_going#33c#361<clear>
mail_lists#33rc#361<clear>
mail_notify#33r#362<clear>
mail_forward#33rc#361<clear>
mail_options#33rc#361{}
message_keep_date#33rc#361<clear>
messages_kept#33rc#361<clear>
current_message#33c#361<clear>
messages#33c#361<clear>
mail_hack#33rc#361<clear>
barcolor#33rc#361<clear>
autowield#33rc#361<clear>
bug#33rc#361<clear>
readied_weapon#33rc#361<clear>
unread_mail#33rc#361<clear>
features#6r#29<clear>
previous_connection#6#361<clear>
email_address#6#361<clear>
last_disconnect_time#6r#361<clear>
help#6rc#361#84
more_msg#6rc#361<clear>
linetask#6r#29<clear>
linesleft#6r#29<clear>
linebuffer#6#29<clear>
pagelen#6r#29<clear>
owned_objects#6r#361<clear>
linelen#6r#29<clear>
current_folder#6c#361<clear>
all_connect_places#6#361<clear>
last_connect_place#6#361<clear>
lines#6c#361<clear>
page_absent_msg#6rc#361<clear>
page_origin_msg#6rc#361<clear>
page_echo_msg#6rc#361<clear>
edit_options#6rc#361<clear>
last_connect_time#6r#361<clear>
ownership_quota#6#290
password#6#361<clear>
paranoid#6rc#361<clear>
display_options#6rc#361<clear>
verb_subs#6rc#361<clear>
first_connect_time#6r#361<clear>
size_quota#6#29<clear>
last_password_time#6#361<clear>
last_connect_attempt#6#361<clear>
prefs#6rc#361<clear>
ansi#6rc#361<clear>
last_hit_meter#6rc#361"~1b[1m~1b[37m[~1b[32m|||||||||||||||||||||||||||||~1b[31m*~1b[37m~1b[1m]~1b[0m"
doing_msg#6rc#361<clear>
xp_total#6rc#361<clear>
party#6rc#361<clear>
rooms#6r#361<clear>
client#6rc#361<clear>
last_death_time#6rc#361<clear>
default_weapon#6rc#361<clear>
thirst#6rc#361<clear>
may_chat#6rc#361<clear>
idlemsg#6rc#361<clear>
eula#6rc#361<clear>
birthdate#6rc#361<clear>
bad_words#6rc#361<clear>
char_start_time#6rc#361<clear>
rumors#6rc#361<clear>
last_broadcast#6rc#361<clear>
ansihack#6rc#361<clear>
last_death_callers#6rc#361<clear>
char_extra_epochs#6rc#361<clear>
code_name#6rc#361<clear>
code_plural#6rc#361<clear>
changeable_properties#6rc#361<clear>
out_of_band_session#6r#29<clear>
private_aliases#6rc#361<clear>
quests_open#6rc#361<clear>
quests#6rc#361<clear>
page_receive_msg#6rc#361<clear>
page_msg#6rc#361<clear>
focus_skills#6rc#361<clear>
skillpoints#100rc#361<clear>
xp#100rc#361<clear>
mutations#100rc#361<clear>
mutation_slots#100rc#361<clear>
char_start_age#100rc#361<clear>
char_extra_age#100rc#361<clear>
hands#107rc#361<clear>
wielding#107rc#361<clear>
health#107rc#361432
unarmed_weapon#107rc#361<clear>
size#107rc#361<clear>
posture#107rc#361"standing"
gender#107rc#361<clear>
respawn#107rc#361<clear>
corpse#107rc#361<clear>
has_proper_name#107rc#361<clear>
die_msg#107rc#361<clear>
body_parts#107rc#361<clear>
wearing#107rc#361<clear>
armor#107rc#361<clear>
last_swing_message#107rc#361<clear>
health_max#107rc#361<clear>
fighting#107rc#361{}
last_dodge_time#107rc#361<clear>
following#107rc#361<clear>
icon#107rc#361<clear>
say_msg#107rc#361<clear>
say_to_msg#107rc#361<clear>
afterlife#107rc#361<clear>
get_msg#107rc#361<clear>
drop_msg#107rc#361<clear>
blood#107rc#361<clear>
squeals#107rc#361<clear>
prc#107rc#361<clear>
ppc#107rc#361<clear>
poc#107rc#361<clear>
psc#107rc#361<clear>
pr#107rc#361<clear>
pp#107rc#361<clear>
po#107rc#361<clear>
ps#107rc#361<clear>
pq#107rc#361<clear>
pqc#107rc#361<clear>
brief#107rc#361<clear>
knockout#107rc#361<clear>
knockout_msg#107rc#361<clear>
body#107rc#361<clear>
wake_msg#107rc#361<clear>
owake_msg#107rc#361<clear>
oknockout_msg#107rc#361<clear>
friends#107rc#361<clear>
home#107rc#361<clear>
respawn_msg#107rc#361<clear>
move_action#107rc#361<clear>
heart#107rc#361-1
last_heartbeat#107rc#361<clear>
dead#107rc#361<clear>
_tohit_next#107rc#361<clear>
last_words_msg#107rc#361<clear>
attacked#107rc#361<clear>
opens_doors#107rc#361<clear>
movable_by_explosion#107rc#361<clear>
obscured#107rc#361<clear>
obscured_desc_msg#107rc#361<clear>
cooldowns#107rc#361<clear>
combat_rounds#107rc#361<clear>
encumbrance#107rc#361<clear>
respawn_handler#107rc#361<clear>
distant_form_msg#107rc#361<clear>
block_msg#107rc#361<clear>
attack_on_block#107rc#361<clear>
last_stunned#107rc#361<clear>
nude_descs#107rc#361<clear>
skills#107rc#361<clear>
explode_msg#107rc#361<clear>
death_listeners#107rc#361<clear>
queue#92r#361<clear>
preemptible#92r#361<clear>
executing#92r#361<clear>
process_queue#92r#361<clear>
help_msg#92rc#361<clear>
last_action#92r#361<clear>
article#92rc#361<clear>
last_last_action#92rc#361<clear>
action_count#92rc#361<clear>
aliases#1r#362{"generic builder"}
description#1rc#361"You see a player who should type '@describe me as ...'."
object_size#1r#29{93339, 1298433815}
hidden_verbs#1rc#361<clear>
phelp_msg#1rc#361<clear>
weight#1rc#361<clear>
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

Ancestors (nearest first): #89 generic immortal#33 generic normal player#6 generic player#100 generic RPG player#154 generic living creature#107 generic creature#92 generic actor#1 root

Children: #50 generic programmer

Call graph

calls n2_0 #2:@quota n20_20 #20:match_player n2_0->n20_20 n6_9 #6:notify n2_0->n6_9 n73_6 #73:display_quota n2_0->n73_6 n2_1 #2:@create n2_1->n6_9 n20_5 #20:from_list n2_1->n20_5 n6_6 #6:my_match_object n2_1->n6_6 n48_0 #48:object_match_failed n2_1->n48_0 n107_43 #107:tell n2_1->n107_43 n20_50 #20:char_list n2_1->n20_50 n21_1 #21:set_names n2_1->n21_1 n20_6 #20:english_list n2_1->n20_6 n2_2 #2:@recycle n2_2->n6_9 n2_2->n6_6 n2_2->n48_0 n48_4 #48:yes_or_no n2_2->n48_4 n20_59 #20:name_and_number n2_2->n20_59 n42_0 #42:controls n2_2->n42_0 n2_3 #2:@recreate n2_3->n6_9 n2_3->n20_5 n2_3->n6_6 n2_3->n48_0 n2_3->n20_50 n2_3->n21_1 n2_3->n20_6 n6_10 #6:notify_lines n2_3->n6_10 n21_2 #21:recreate n2_3->n21_2 n2_4 #2:@digg n2_4->n6_9 n2_4->n20_5 n2_4->n20_50 n2_4->n20_59 n45_6 #45:ancestors n2_4->n45_6 n20_38 #20:explode n2_4->n20_38 n21_14 #21:make_exit_pair n2_4->n21_14 n2_5 #2:@audit n2_5->n20_20 n2_5->n6_9 n48_1 #48:player_match_result n2_5->n48_1 n20_39 #20:words n2_5->n20_39 n51_31 #51:_parse_audit_args n2_5->n51_31 n21_7 #21:do_audit n2_5->n21_7 n2_6 #2:@count n2_6->n20_20 n2_6->n6_9 n2_6->n48_1 n20_26 #20:group_number n2_6->n20_26 n2_7 #2:@countDB n2_7->n20_20 n2_7->n6_9 n2_7->n48_1 n48_7 #48:running_out_of_time n2_7->n48_7 n2_8 #2:@sort-owned*-objects n2_8->n107_43 n47_15 #47:sort_suspended n2_8->n47_15 n47_30 #47:reverse_suspended n2_8->n47_30 n47_16 #47:slice n2_8->n47_16 n2_9 #2:@add-owned n2_9->n107_43 n2_10 #2:@verify-owned n2_10->n107_43 n48_8 #48:suspend_if_needed n2_10->n48_8 n2_11 #2:@unlock n2_11->n6_9 n2_11->n6_6 n2_11->n48_0 n2_12 #2:@newmess*age n2_12->n6_9 n2_12->n20_39 n2_14 #2:_messagify n2_12->n2_14 n45_0 #45:has_property n2_12->n45_0 n2_13 #2:@unmess*age n2_13->n6_9 n2_13->n20_39 n2_13->n2_14 n2_15 #2:@kids n2_15->n6_9 n2_15->n6_6 n2_15->n48_0 n2_15->n107_43 n20_7 #20:names_of n2_15->n20_7 n2_16 #2:@c*ontents n2_16->n6_9 n2_16->n6_6 n2_16->n48_0 n2_16->n107_43 n2_16->n20_7 n2_17 #2:@par*ents n2_17->n6_9 n2_17->n6_6 n2_17->n48_0 n2_17->n45_6 n2_17->n20_7

Showing 48 of 189 verbs; 141 not shown.

Source

@quota

Spec any none noneFlags rxdOwner #361Definer #2

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 @make

Spec any any anyFlags rxdOwner #361Definer #2

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 = $su:from_list(args[1..pos - 1], " ");
16namestr = $su: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 ($cu:object_match_failed(parent, parentstr))
30return;
31endif
32endif
33try
34object = player:_create(parent);
35except e (E_PERM)
36player:tell("Permission denied. The object you're trying to create a child of is not +f.");
37return;
38except e (ANY)
39player:tell("Unable to create object: ", e[2]);
40return;
41endtry
42if (typeof(object) == ERR)
43player:notify(tostr(object));
44return;
45endif
46for f in ($su:char_list(player:build_option("create_flags") || ""))
47object.(f) = 1;
48endfor
49"move() shouldn't, but could bomb. Say if player has a stupid :accept";
50`move(object, player) ! ANY';
51$bu:set_names(object, namestr);
52if ((other_names = setremove(object.aliases, object.name)) != {})
53aka = (" (aka " + $su:english_list(other_names)) + ")";
54else
55aka = "";
56endif
57player:notify(tostr("You now have ", object.name, aka, " with object number ", object, " and parent ", parent.name, " (", parent, ")."));

@recycle

Spec any none noneFlags rxdOwner #361Definer #2

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
10if (!$cu:yes_or_no(tostr("Recycle ", $su:nn(dobj), "?")))
11player:notify(tostr($su:nn(dobj), " not recycled."));
12return;
13endif
14if (player.wizard && (dobj.owner != player))
15if (!$command_utils:yes_or_no((($su:nn(dobj) + " is owned by ") + $su:nn(dobj.owner)) + ".  Are you sure you want to recycle it?"))
16player:notify(tostr($su:nn(dobj), " not recycled."));
17return;
18endif
19endif
20if (!$perm_utils:controls(player, dobj))
21player:notify(tostr("You don't control ", $su:nn(dobj), ", so you can't recycle it."));
22return;
23endif
24name = dobj.name;
25try
26result = player:_recycle(dobj);
27except e (ANY)
28player:notify(tostr("Error in recycle: ", result));
29return;
30endtry
31if (typeof(result) == ERR)
32player:notify(tostr(result));
33else
34player:notify(tostr(name, " (", dobj, ") recycled."));
35endif
36endif

@recreate

Spec any as anyFlags rxdOwner #361Definer #2

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, ")."));

@digg @dig2 @dig-old

Spec any any anyFlags rxdOwner #361Definer #2

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_pair(player.location, other_room, exit_kind);
58endif

@audit

Spec any any anyFlags rxdOwner #361Definer #2

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 rxdOwner #361Definer #2

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 rxdOwner #361Definer #2

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 rxdOwner #361Definer #2

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 rxdOwner #361Definer #2

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 rxdOwner #361Definer #2

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 rxdOwner #361Definer #2

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

@newmess*age

Spec any any anyFlags rxdOwner #361Definer #2

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 rxdOwner #361Definer #2

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 #361Definer #2

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 @children

Spec any none noneFlags rxdOwner #361Definer #2

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.";
2if (player != this)
3player:tell("What exactly were you hoping to accomplish by peeking under that veil?  I hope it was worth it because NOW YOU'RE DEAD!!!  Well, okay, not really, but you could have been, so stop trying stupid shit like this.");
4return;
5endif
6thing = player:my_match_object(dobjstr);
7if (!$command_utils:object_match_failed(thing, dobjstr))
8kids = children(thing);
9if (kids)
10player:notify(tostr(thing:title(), "(", thing, ") has ", length(kids), " kid", (length(kids) == 1) ? "" | "s", "."));
11player:notify(tostr($string_utils:names_of(kids)));
12else
13player:notify(tostr(thing:title(), "(", thing, ") has no kids."));
14endif
15endif

@c*ontents

Spec any none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"'@contents <obj> - list the contents of an object, with object numbers.";
2if (player != this)
3player:tell("You are like some kind of bag that is full of scum.  Please lift yourself up from this pathetic space you're inhabiting and become a real human being.");
4return;
5endif
6set_task_perms(player);
7if (!dobjstr)
8dobj = player.location;
9else
10dobj = player:my_match_object(dobjstr);
11endif
12if ($command_utils:object_match_failed(dobj, dobjstr))
13else
14contents = dobj.contents;
15if (contents)
16player:notify(tostr(dobj:title(), "(", dobj, ") contains:"));
17player:notify(tostr($string_utils:names_of(contents)));
18else
19player:notify(tostr(dobj:title(), "(", dobj, ") contains nothing."));
20endif
21endif

@par*ents

Spec any none noneFlags rxdOwner #361Definer #2

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 rxdOwner #361Definer #2

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)}));

_create

Spec this none thisFlags rxdOwner #361Definer #2

Referenced by

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 #361Definer #2

Referenced by

none

Source

1set_task_perms(caller_perms());
2return $recycler:(verb)(@args);

@chparent

Spec any at/to anyFlags rxdOwner #361Definer #2

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
13if ($object_utils:isa(object, $mail_recipient))
14if (!$command_utils:yes_or_no("Chparenting a mailing list is usually a really bad idea.  Do you really want to do it?  (If you don't know why we're asking this question, please say 'no'.)"))
15return player:tell("Aborted.");
16endif
17endif
18try
19result = player:_chparent(object, parent);
20player:notify("Parent changed.");
21except (E_INVARG)
22if (valid(object) && valid(parent))
23player:notify(tostr("Some property existing on ", parent, " is defined on ", object, " or one of its descendants."));
24player:notify(tostr("Try @check-chparent ", dobjstr, " to ", iobjstr));
25else
26player:notify("Either that is not a valid object or not a valid parent");
27endif
28except (E_PERM)
29player:notify("Either you don't own the object, don't own the parent, or the parent is not fertile.");
30except (E_RECMOVE)
31player:notify("That parent object is a descendant of the object!");
32endtry
33endif

@check-chp*arent

Spec any at/to anyFlags rxdOwner #361Definer #2

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 rxdOwner #361Definer #2

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)
22try
23val = dobj.(prop) = "";
24except e (ANY)
25player:tell("Unable to set ", dobj, ".", prop, ": ", e[2]);
26return;
27endtry
28iobjstr = "\"\"";
29"elseif (iobjstr[1] == \"\\\"\")";
30"val = dobj.(prop) = iobjstr;";
31"iobjstr = \"\\\"\" + iobjstr + \"\\\"\";";
32else
33val = $string_utils:to_value(iobjstr);
34if (!val[1])
35player:tell("Could not parse: ", iobjstr);
36return;
37elseif (!$object_utils:has_property(dobj, prop))
38player:tell("That object does not define that property.");
39return;
40endif
41try
42val = dobj.(prop) = val[2];
43except e (ANY)
44player:tell("Unable to set ", dobj, ".", prop, ": ", e[2]);
45return;
46endtry
47endif
48player:tell("Property ", dobj, ".", prop, " set to ", $string_utils:print(val), ".");
49else
50player:tell("Property ", dobjstr, " not found.");
51endif

build_option

Spec this none thisFlags rxdOwner #361Definer #2

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 #361Definer #2

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 rxdOwner #361Definer #2

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 rxdOwner #29Definer #2

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 #361Definer #2

Referenced by

Source

1if (caller_perms().wizard)
2if (this == $builder)
3this.build_options = {};
4else
5clear_property(this, "build_options");
6endif
7return pass(@args);
8endif

@tree @treek @mytree

Spec any any anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"@tree <object>";
2"This verb returns a diagram of the lineage of <object>";
3if (!args)
4player:tell("Usage:  ", verb, " <generic>");
5return;
6endif
7what = $match_utils:match(args[1], this.contents);
8opt = strsub(verb, "@tree", "");
9withkids = index(opt, "k") ? 1 | 0;
10if (!valid(what))
11player:tell("@tree what?");
12player:tell("Usage: @tree <thing> <depth>");
13return;
14endif
15depth = (length(args) > 1) ? tonum(args[2]) | 6;
16withgeneric = 0;
17prop = "";
18player:tell("Showing tree under ", $su:nn(what), " ", withgeneric ? " generics-only:" | "");
19if (verb != "@mytree")
20this:tell_tree(what, "", "  ", withkids, prop, withgeneric, depth);
21else
22this:tell_mytree(what, "", "  ", withkids, prop, withgeneric, depth);
23endif
24player:tell("-- end of tree --");

tell_tree

Spec this none thisFlags rxdOwner #361Definer #2

Referenced by

Source

1{what, prefix, kidprefix, withkids, prop, withgeneric, depth, ?fullcount = 0} = args;
2if (depth < 0)
3return;
4endif
5if (withgeneric)
6if (what != #1)
7if (!index(what.name, "generic"))
8return;
9endif
10endif
11endif
12name = what.name;
13is_generic = 0;
14if (index(name, "generic"))
15is_generic = 1;
16name = strsub(name, "generic", "g");
17endif
18name = (((what.f ? $ansi.bold_on | "") + (is_generic ? $ansi.yellow | "")) + $su:left(name, -30 + length(prefix))) + $ansi.reset;
19numstr = $su:left(tostr(what), -7);
20if (fullcount)
21nkids = length($ou:descendants_suspended(what));
22else
23nkids = length(children(what));
24endif
25leftstr = "";
26leftcolor = "";
27if (nkids)
28leftcolor = $ansi.yellow;
29leftstr = tostr(nkids);
30elseif (is_a(what, $thing))
31gowner = $gamecheck:game_owner(what);
32if (valid(gowner))
33if (is_a(gowner, $biz))
34leftcolor = $ansi.brightyellow;
35leftstr = gowner.symbol;
36elseif (is_a(gowner, $player))
37leftcolor = `gowner.programmer ! ANY' ? $ansi.brightblue | $ansi.brightwhite;
38leftstr = gowner:name();
39else
40leftcolor = $ansi.green;
41leftstr = tostr(#317:extypeof(gowner), " ", gowner);
42endif
43endif
44endif
45leftstr = (leftcolor + $su:right(leftstr, -14)) + $ansi.reset;
46player:tell(" ", leftstr, " ", numstr, ($ansi.yellow + $ansi.bold_on) + prefix, "+-" + $ansi.reset, name, " ", `what:tree_tag() ! E_VERBNF => ""');
47if (depth == 0)
48return;
49endif
50if (withkids)
51kids = children(what);
52else
53kids = $ou:fertile_kids_suspended(what);
54endif
55if (kids)
56if (is_a(what, $thing))
57kids = $lu:sort_prop(kids, "value");
58elseif (is_a(what, $creature))
59kids = $lu:sort_prop(kids, "health_max");
60if (player == #142)
61#142.blah = kids;
62endif
63endif
64for x in (kids)
65if (!$ou:is_in_a(x, $blueprint))
66if (x == kids[$])
67this:tell_tree(x, kidprefix, kidprefix + "  ", withkids, prop, withgeneric, depth - 1, fullcount);
68else
69this:tell_tree(x, kidprefix, kidprefix + "| ", withkids, prop, withgeneric, depth - 1, fullcount);
70endif
71endif
72yield;
73endfor
74endif

tell

Spec this none thisFlags rxdOwner #361Definer #2

Referenced by

Source

1"Copied from generic player (#6):tell by Satan (#2) Thu Feb 19 15:11:36 2004 PST";
2if (this.paranoid)
3if (this.paranoid == 1)
4$paranoid_db:add_data(this, {{@callers(1), {player, "<cmd-line>", player}}, args});
5elseif (this.paranoid == 2)
6z = this:whodunnit({@callers(), {player, "", player}}, {this, $no_one}, {})[3];
7args = {"(", `z.name ! ANY => tostr(z)', " ", z, ") ", @args};
8endif
9endif
10pass(@args);

tell_lines

Spec this none thisFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from generic player (#6):tell_lines by Satan (#2) Thu Feb 19 15:14:53 2004 PST";
2lines = args[1];
3if (typeof(lines) != LIST)
4lines = {lines};
5endif
6if (this.paranoid)
7if (this.paranoid == 2)
8z = this:whodunnit({@callers(1), {player, "", player}}, {this, $no_one}, {})[3];
9lines = {((("[start text by " + z.name) + " (") + tostr(z)) + ")]", @lines, ((("[end text by " + z.name) + " (") + tostr(z)) + ")]"};
10elseif (this.paranoid == 1)
11$paranoid_db:add_data(this, {{@callers(1), {player, "<cmd-line>", player}}, lines});
12endif
13endif
14"don't gather stats for now: $list_utils:check_nonstring_tell_lines(lines)";
15this:notify_lines(lines);

@s*tat

Spec any none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1if ($object_utils:has_verb(dobj, "tell_stat"))
2dobj:tell_stat();
3else
4player:tell("You can't stat that.");
5endif

?* help info*rmation @help

Spec any any anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from generic player (#6):help by Satan (#2) Wed Feb 25 15:23:59 2004 PST";
2set_task_perms(callers() ? caller_perms() | player);
3"...this code explicitly relies on being !d in several places...";
4if ((index(verb, "?") != 1) || (length(verb) <= 1))
5what = $string_utils:trimr(argstr);
6elseif (argstr)
7what = tostr(verb[2..$], " ", $string_utils:trimr(argstr));
8else
9what = verb[2..$];
10endif
11"...find a db that claims to know about `what'...";
12dblist = $code_utils:help_db_list();
13result = $code_utils:help_db_search(what, dblist);
14if (!result)
15"... note: all of the last-resort stuff...";
16"... is now located on $help:find_topics/get_topic...";
17$wiz_utils:missed_help(what, result);
18player:notify(tostr("Sorry, but no help is available on `", what, "'."));
19elseif (result[1] == $ambiguous_match)
20$wiz_utils:missed_help(what, result);
21player:notify_lines(tostr("Sorry, but the topic-name `", what, "' is ambiguous.  I don't know which of the following topics you mean:"));
22for x in ($help:columnize(@$help:sort_topics(result[2])))
23player:notify(tostr("   ", x));
24endfor
25else
26{help, topic} = result;
27if (topic != what)
28player:notify(tostr("Showing help on `", topic, "':"));
29player:notify("----");
30endif
31dblist = dblist[1 + (help in dblist)..$];
32if (1 == (text = help:get_topic(topic, dblist)))
33"...get_topic took matters into its own hands...";
34elseif (text)
35"...these can get long...";
36for line in ((typeof(text) == LIST) ? text | {text})
37if (typeof(line) != STR)
38player:notify("Odd results from help -- complain to a wizard.");
39else
40player:notify(line);
41endif
42$command_utils:suspend_if_needed(0);
43endfor
44else
45player:notify(tostr("Help DB ", help, " thinks it knows about `", what, "' but something's messed up."));
46player:notify(tostr("Tell ", help.owner.wizard ? "" | tostr(help.owner.name, " (", help.owner, ") or "), "a wizard."));
47endif
48endif

@dig

Spec any any anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1if (player != this)
2player:tell("Haw haw, very funny, like taking a shit in your own living room.  Wait, that's not funny at all, is it?");
3return;
4endif
5dir = dobjstr;
6if (!(cdir = $building_utils:match_cardinal_dir(dir)))
7room = player:_create($indoor_room);
8$wiz_utils:set_owner(room, player);
9room.name = dobjstr;
10player:tell("@dug ", $su:nn(room), ".");
11room:moveto(player:area());
12player:teleport(player, room);
13elseif (valid(existing = player.location:match_exit(dir)))
14player:tell("There's already an exit ", $su:nn(existing), " from here.");
15else
16opposite = $building_utils:opposite_dir(dir);
17dest = iobj;
18if (valid(dest))
19if (valid(oexisting = dest:match_exit(opposite)))
20player:tell("There's already an exit ", $su:nn(oexisting), " leading back ", opposite, " out of ", $su:nn(dest), ".");
21return;
22endif
23else
24player:tell("Creating destination room '", iobjstr, "'.");
25dest = player:_create(parent(player.location));
26if (dest.exits != {})
27dest.exits = {};
28endif
29$wiz_utils:set_owner(dest, player);
30dest:moveto(player.location:area());
31dest:set_name(iobjstr);
32dest.x = dest.y = dest.z = 9999;
33player:tell("Created '", $su:nn(dest), "' destination room.");
34endif
35{exit1, exit2} = $building_utils:make_exit_pair(player.location, dest);
36exit1:set_name(cdir);
37exit1.direction = cdir;
38exit1:set_aliases({cdir, @$building_utils:exit_aka(cdir)});
39player:tell("Created '", $su:nn(exit1), "'as an exit.");
40player.location:add_exit(exit1);
41exit2:set_name(opposite);
42exit2.direction = opposite;
43exit2:set_aliases({opposite, @$building_utils:exit_aka(opposite)});
44player:tell("Created '", $su:nn(exit2), "' as an exit.");
45dest:add_exit(exit2);
46player.location:set_xyz_rec();
47player:tell("Exit fully linked!");
48endif

@features

Spec any any anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from Necanthrope (#142):@features Mon Apr 24 15:40:49 2006 PDT";
2if (!iobjstr)
3whose = player;
4elseif ($command_utils:player_match_failed(whose = $string_utils:match_player(iobjstr), iobjstr))
5return;
6endif
7features = {};
8broadcast = {};
9business = {};
10blueprint = {};
11extension = {};
12for feature in (whose.features)
13if (!$ou:has_property(feature, "feature_ok"))
14whose:remove_feature(feature);
15elseif ((!dobjstr) || ((dobjstr in feature.aliases) || ((pref = $string_utils:find_prefix(dobjstr, feature.aliases)) || (pref == $ambiguous_match))))
16if (is_a(feature, #118))
17broadcast = listappend(broadcast, feature);
18elseif (is_a(feature, #41553))
19business = listappend(business, feature);
20elseif (is_a(feature, $blueprint))
21blueprint = listappend(blueprint, feature);
22elseif (is_a(feature, $extension))
23extension = listappend(extension, feature);
24else
25features = listappend(features, feature);
26endif
27endif
28endfor
29if (features)
30len = max(length("Feature"), length(tostr(max_object()))) + 1;
31if (broadcast != {})
32player:tell((($ansi.yellow + $ansi.bold_on) + "Broadcasters:") + $ansi.reset);
33endif
34for broad in (broadcast)
35player:tell($string_utils:left(tostr(broad), len), broad.name);
36endfor
37if (business != {})
38player:tell((($ansi.yellow + $ansi.bold_on) + "Businesses:") + $ansi.reset);
39endif
40for biz in (business)
41player:tell($string_utils:left(tostr(biz), len), biz.name);
42endfor
43if (blueprint != {})
44player:tell((($ansi.yellow + $ansi.bold_on) + "Blueprints:") + $ansi.reset);
45endif
46for blue in (blueprint)
47player:tell($string_utils:left(tostr(blue), len), blue.name);
48endfor
49if (extension != {})
50player:tell((($ansi.yellow + $ansi.bold_on) + "Extensions:") + $ansi.reset);
51endif
52for ext in (extension)
53player:tell($string_utils:left(tostr(ext), len), ext.name);
54endfor
55player:tell("");
56if (features != {})
57player:tell((($ansi.yellow + $ansi.bold_on) + "Regular Features:") + $ansi.reset);
58endif
59for feature in (features)
60player:tell($string_utils:left(tostr(feature), len), feature.name);
61endfor
62cstr = ((tostr(length(features)) + " feature") + ((length(features) > 1) ? "s" | "")) + " found";
63if (whose != this)
64cstr = ((((cstr + " on ") + whose.name) + " (") + tostr(whose)) + ")";
65endif
66if (dobjstr)
67cstr = ((cstr + " matching \"") + dobjstr) + "\"";
68endif
69cstr = cstr + ".";
70player:tell(cstr);
71elseif (dobjstr)
72player:tell("No features found on ", whose.name, " (", whose, ") matching \"", dobjstr, "\".");
73else
74player:tell("No features found on ", whose.name, " (", whose, ").");
75endif

@make-cliff @make-ladder

Spec any none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1if (!valid(exit = this.location:match_exit(dobjstr)))
2player:tell("There is no exit here called '", dobjstr, "'.");
3else
4if (verb == "@make-cliff")
5prompt = ("This will create a cliff to the " + exit.name) + ", with this room at the base of the cliff.  Is that okay?";
6post = $su:nn(exit) + " is now a cliff.";
7next_verb = "make_cliff";
8elseif (verb == "@make-ladder")
9prompt = ("This will create a laddeer leading " + exit.name) + ", with this room at the bottom of the ladder.  Is that okay?";
10post = $su:nn(exit) + " is now a ladder.";
11next_verb = "make_ladder";
12endif
13player:tell(prompt);
14if ($command_utils:yes_or_no())
15$building_utils:(next_verb)(exit);
16player:tell(post);
17endif
18endif

@make-door

Spec any none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1if (!valid(exit = this.location:match_exit(dobjstr)))
2player:tell("There is no exit here called '", dobjstr, "'.");
3else
4player:tell("This will create a door to the ", exit.name, ".  Is that okay?");
5if ($command_utils:yes_or_no())
6$building_utils:make_door(exit);
7player:tell($su:nn(exit), " is now a door.  Be sure to set its messages appropriately.");
8endif
9endif

@paranoid

Spec any any anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from generic player (#6):@paranoid by Satan (#2) Thu Mar 18 23:55:23 2004 PST";
2if ((args == {}) || ((typ = args[1]) == ""))
3$paranoid_db:set_kept_lines(this, 10);
4this.paranoid = 1;
5this:notify("Anti-spoofer on and keeping 10 lines.");
6elseif (index("immediate", typ))
7$paranoid_db:set_kept_lines(this, 0);
8this.paranoid = 2;
9this:notify("Anti-spoofer now in immediate mode.");
10elseif (index("off", typ) || (typ == "0"))
11this.paranoid = 0;
12$paranoid_db:set_kept_lines(this, 0);
13this:notify("Anti-spoofer off.");
14elseif ((tostr(y = toint(typ)) != typ) || (y < 0))
15this:notify(tostr("Usage: ", verb, " <lines to be kept>     to turn on your anti-spoofer."));
16this:notify(tostr("       ", verb, " off                    to turn it off."));
17this:notify(tostr("       ", verb, " immediate              to use immediate mode."));
18else
19this.paranoid = 1;
20$paranoid_db:set_kept_lines(this, y = min(y, 30));
21this:notify(tostr("Anti-spoofer on and keeping ", y, " lines."));
22endif

@ch*eck-full

Spec any any anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1responsible = $paranoid_db:get_data(this);
2if (length(verb) <= 6)
3"@check, not @check-full";
4n = 5;
5trust = {this, $no_one};
6"... trust no one, my friend.... no one....  --Herod";
7mistrust = {};
8for k in (args)
9if (z = $code_utils:toint(k))
10n = z;
11elseif (k[1] == "!")
12mistrust = listappend(mistrust, $string_utils:match_player(k[2..$]));
13else
14trust = listappend(trust, $string_utils:match_player(k));
15endif
16endfor
17msg_width = player:linelen() - 60;
18for q in ((n > (y = length(responsible))) ? responsible | responsible[(y - n) + 1..y])
19msg = tostr(@q[2]);
20if (length(msg) > msg_width)
21msg = msg[1..msg_width];
22endif
23s = this:whodunnit(q[1], trust, mistrust);
24text = valid(s[1]) ? s[1].name | "** NONE **";
25this:notify(tostr($string_utils:left(tostr((length(text) > 13) ? text[1..13] | text, " (", s[1], ")"), 20), $string_utils:left(s[2], 15), $string_utils:left(tostr((length(s[3].name) > 13) ? s[3].name[1..13] | s[3].name, " (", s[3], ")"), 20), msg));
26endfor
27this:notify("*** finished ***");
28else
29"@check-full, from @traceback by APHiD";
30"s_i_n's by Ho_Yan 10/18/94";
31matches = {};
32if (length(match = argstr) == 0)
33player:notify(tostr("Usage: ", verb, " <string> --or-- ", verb, " <number>"));
34return;
35endif
36if (!responsible)
37player:notify("No text has been saved by the monitor.  (See `help @paranoid').");
38else
39if (typeof(x = $code_utils:toint(argstr)) == ERR)
40for line in (responsible)
41if (index(tostr(@line[$]), argstr))
42matches = {@matches, line};
43endif
44endfor
45else
46matches = responsible[($ - x) + 1..$];
47endif
48if (matches)
49for match in (matches)
50$command_utils:suspend_if_needed(3);
51text = tostr(@match[$]);
52player:notify("Traceback for:");
53player:notify(text);
54"Moved cool display code to $code_utils, 3/29/95, Ho_Yan";
55$code_utils:display_callers(listdelete(mm = match[1], length(mm)));
56endfor
57player:notify("**** finished ****");
58else
59player:notify(tostr("No matches for \"", argstr, "\" found."));
60endif
61endif
62endif

erase_paranoid_data

Spec this none thisFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from generic player (#6):erase_paranoid_data by Satan (#2) Thu Mar 18 23:58:37 2004 PST";
2if (!($perm_utils:controls(caller_perms(), this) || (this == caller)))
3return E_PERM;
4else
5$paranoid_db:erase_data(this);
6endif

home

Spec none none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1this:_teleport(this.home);
2return;
3start = this.location;
4witnesses = this.location:occupants($player);
5names = {};
6for dude in (witnesses)
7if ((dude.programmer == 1) || (dude.wizard == 1))
8witnesses = setremove(witnesses, dude);
9else
10names = setadd(names, dude.name);
11endif
12endfor
13if (witnesses != {})
14player:tell("You are being witnessed by ", $su:english_list(names), ".  Find someplace sneaker.");
15return;
16endif
17if (start == this.home)
18player:tell("You're already home!");
19return;
20elseif (typeof(this.home) != OBJ)
21player:tell("You've got a weird home, pal.  I've reset it to the default one.");
22this.home = $player_start;
23elseif (!valid(this.home))
24player:tell("Oh no!  Your home's been recycled.  Time to look around for a new one.");
25this.home = $player_start;
26else
27player:tell("You click your heels three times.");
28endif
29this:moveto(this.home);
30if (!valid(start))
31elseif (start == this.location)
32start:announce(player:name(), " ", $gender_utils:get_conj("learns", player), " that you can never go home...");
33else
34try
35start:announce(player:name(), " ", $gender_utils:get_conj("phones", player), " home.");
36except e (E_VERBNF)
37"start did not support announce";
38endtry
39endif
40if (this.location == this.home)
41this.location:announce(player:name(), " ", $gender_utils:get_conj("comes", player), " home.");
42elseif (this.location == start)
43player:tell("Either home doesn't want you, or you don't really want to go.");
44else
45player:tell("Wait a minute!  This isn't your home...");
46if (valid(this.location))
47this.location:announce(player:name(), " ", $gender_utils:get_conj("arrives", player), ", looking quite bewildered.");
48endif
49endif

@set-note-text @set-note-string

Spec any none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1set_task_perms(player);
2text = $command_utils:read_lines_escape((active = player in $note_editor.active) ? {} | {"@edit"}, {tostr("Changing ", argstr, "."), @active ? {} | {"Type `@edit' to take this into the note editor."}});
3if (text && (text[1] == "@edit"))
4$note_editor:invoke(argstr, verb);
5who = $note_editor:loaded(player);
6$note_editor.texts[who] = text[2];
7return;
8endif
9text = text[2];
10if ((verb == "@set-note-string") && (length(text) <= 1))
11text = text ? text[1] | "";
12endif
13if (spec = $code_utils:parse_propref(argstr))
14o = player:my_match_object(spec[1]);
15p = spec[2];
16if ($object_utils:has_verb(o, vb = "set_" + p) && (typeof(e = o:(vb)(text)) != ERR))
17player:tell("Set ", p, " property of ", o.name, " (", o, ") via :", vb, ".");
18elseif (text != (e = `o.(p) = text ! ANY'))
19player:tell("Error:  ", e);
20else
21player:tell("Set ", p, " property of ", o.name, " (", o, ").");
22endif
23elseif (typeof(note = $code_utils:toobj(argstr)) == OBJ)
24e = note:set_text(text);
25if (typeof(e) == ERR)
26player:tell("Error:  ", e);
27else
28player:tell("Set text of ", note.name, " (", note, ").");
29endif
30else
31player:tell("Error:  Malformed argument to ", verb, ": ", argstr);
32endif

@w*h*o

Spec any any anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1if (caller != player)
2return E_PERM;
3endif
4plyrs = args ? listdelete($command_utils:player_match_result($string_utils:match_player(args), args), 1) | connected_players();
5if (!plyrs)
6return;
7endif
8$code_utils:show_who_listing(plyrs);

@addalias*# @add-alias*#

Spec any at/to anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from generic player (#6):@addalias by Satan (#2) Fri Aug 25 23:46:25 2006 PDT";
2"Syntax: @addalias <alias>[,...,<alias>] to <object>";
3"        @addalias <alias>[,...,<alias>] to <object>:<verb>";
4"";
5"The first form is used to add aliases to an object's list of aliases.  You can separate multiple aliases with commas.  The aliases will be checked against the object's current aliases and all aliases not already in the object's list of aliases will be added.";
6"";
7"Example:";
8"Muchkin wants to add new aliases to Rover the Wonder Dog:";
9"  @addalias Dog,Wonder Dog to Rover";
10"Since Rover the Wonder Dog already has the alias \"Dog\" but does not have the alias \"Wonder Dog\", Munchkin sees:";
11"  Rover the Wonder Dog(#4237) already has the alias Dog.";
12"  Alias Wonder Dog added to Rover the Wonder Dog(#4237).";
13"";
14"If the object is a player, spaces will also be assumed to be separations between aliases and each alias will be checked against the Player Name Database to make sure no one else is using it. Any already used aliases will be identified.";
15"";
16"Example:";
17"Munchkin wants to add his nicknames to his own list of aliases:";
18"  @addalias Foobar Davey to me";
19"@Addalias recognizes that Munchkin is trying to add an alias to a valid player and checks the aliases against the Player Name Database.  Unfortunately, DaveTheMan is already using the alias \"Davey\" so Munchkin sees:";
20"  DaveTheMan(#5432) is already using the alias Davey";
21"  Alias Foobar added to Munchkin(#1523).";
22"";
23"The second form of the @addalias command is for use by programmers, to add aliases to a verb they own.  All commas and spaces are assumed to be separations between aliases.";
24if (player != this)
25return;
26endif
27if (!player.programmer)
28set_task_perms(player);
29endif
30bynumber = verb[$] == "#";
31spec = $code_utils:parse_verbref(iobjstr);
32if (spec)
33if (!player.programmer)
34return player:notify(tostr(E_PERM));
35endif
36object = player:my_match_object(spec[1]);
37if (!$command_utils:object_match_failed(object, spec[1]))
38vname = spec[2];
39if (bynumber)
40if ((vname = $code_utils:toint(vname)) == E_TYPE)
41return player:notify("Verb number expected.");
42elseif ((vname < 1) || `vname > length(verbs(object)) ! E_PERM => 0')
43return player:notify("Verb number out of range.");
44endif
45endif
46try
47info = verb_info(object, vname);
48old_aliases = $string_utils:explode(info[3]);
49used = {};
50for alias in (new_aliases = $list_utils:remove_duplicates($string_utils:explode(strsub(dobjstr, ",", " "))))
51if (alias in old_aliases)
52used = {@used, alias};
53new_aliases = setremove(new_aliases, alias);
54endif
55endfor
56if (used)
57player:notify(tostr(object.name, "(", object, "):", vname, " already has the alias", (length(used) > 1) ? "es" | "", " ", $string_utils:english_list(used), "."));
58endif
59if (new_aliases)
60info = listset(info, aliases = $string_utils:from_list({@old_aliases, @new_aliases}, " "), 3);
61try
62result = set_verb_info(object, vname, info);
63player:notify(tostr("Alias", (length(new_aliases) > 1) ? "es" | "", " ", $string_utils:english_list(new_aliases), " added to verb ", object.name, "(", object, "):", vname));
64player:notify(tostr("Verbname is now ", object.name, "(", object, "):\"", aliases, "\""));
65except e (ANY)
66player:notify(e[2]);
67endtry
68endif
69except (E_VERBNF)
70player:notify("That object does not define that verb.");
71except e (ANY)
72player:notify(e[2]);
73endtry
74endif
75elseif (bynumber)
76player:notify(tostr(verb, " can only be used with verbs."));
77else
78object = player:my_match_object(iobjstr);
79if (!$command_utils:object_match_failed(object, iobjstr))
80old_aliases = object.aliases;
81used = {};
82for alias in (new_aliases = $list_utils:remove_duplicates($list_utils:map_arg($string_utils, "trim", $string_utils:explode(is_player(object) ? strsub(dobjstr, " ", ",") | dobjstr, ","))))
83if (alias in old_aliases)
84used = {@used, alias};
85new_aliases = setremove(new_aliases, alias);
86elseif (is_player(object) && valid(someone = $player_db:find_exact(alias)))
87player:notify(tostr(someone.name, "(", someone, ") is already using the alias ", alias, "."));
88new_aliases = setremove(new_aliases, alias);
89endif
90endfor
91if (used)
92player:notify(tostr(object.name, "(", object, ") already has the alias", (length(used) > 1) ? "es" | "", " ", $string_utils:english_list(used), "."));
93endif
94if (new_aliases)
95if ((e = object:set_aliases(aliases = {@old_aliases, @new_aliases})) && (object.aliases == aliases))
96player:notify(tostr("Alias", (length(new_aliases) > 1) ? "es" | "", " ", $string_utils:english_list(new_aliases), " added to ", object.name, "(", object, ")."));
97player:notify(tostr("Aliases for ", $string_utils:nn(object), " are now ", $string_utils:from_value(aliases, 1)));
98elseif (e)
99player:notify("That particular name change not allowed (see help @rename or help @addalias).");
100elseif (e == E_INVARG)
101if ($object_utils:has_property(#0, "local"))
102if ($object_utils:has_property($local, "max_player_aliases"))
103max = $local.max_player_aliases;
104player:notify(("You are not allowed more than " + tostr(max)) + " aliases.");
105endif
106else
107player:notify("You are not allowed any more aliases.");
108endif
109elseif (e == E_NACC)
110player:notify("Oops.  You can't update that object's aliases right now; try again in a few minutes.");
111elseif (e == 0)
112player:notify("Aliases not changed as expected!");
113player:notify(tostr("Aliases for ", $string_utils:nn(object), " are now ", $string_utils:from_value(object.aliases, 1)));
114else
115player:notify(tostr(e));
116endif
117endif
118endif
119endif

@rmalias*# @rm-alias*#

Spec any out of/from inside/from anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from generic player (#6):@rmalias by Satan (#2) Fri Aug 25 23:46:32 2006 PDT";
2"Syntax: @rmalias <alias>[,...,<alias>] from <object>";
3"        @rmalias <alias>[,...,<alias>] from <object>:<verb>";
4"";
5"The first form is used to remove aliases from an object.  If the object is a valid player, space and commas will be assumed to be separations between unwanted aliases.  Otherwise, only commas will be assumed to be separations.";
6"[5/10/93 Nosredna: flushed above is_player feature";
7"Note that @rmalias will not affect the object's name, only its aliases.";
8"";
9"The second form is for use by programmers, to remove aliases from a verb they own.  All spaces and commas are assumed to be separations between unwanted aliases.";
10if (player != this)
11return;
12endif
13if (!player.programmer)
14set_task_perms(player);
15endif
16bynumber = verb[$] == "#";
17spec = $code_utils:parse_verbref(iobjstr);
18if (spec)
19if (!player.programmer)
20player:notify(tostr(E_PERM));
21endif
22object = player:my_match_object(spec[1]);
23if (!$command_utils:object_match_failed(object, spec[1]))
24vname = spec[2];
25if (bynumber)
26if ((vname = $code_utils:toint(vname)) == E_TYPE)
27return player:notify("Verb number expected.");
28elseif ((vname < 1) || `vname > length(verbs(object)) ! E_PERM => 0')
29return player:notify("Verb number out of range.");
30endif
31endif
32try
33info = verb_info(object, vname);
34old_aliases = $string_utils:explode(info[3]);
35not_used = {};
36for alias in (bad_aliases = $list_utils:remove_duplicates($string_utils:explode(strsub(dobjstr, ",", " "))))
37if (!(alias in old_aliases))
38not_used = {@not_used, alias};
39bad_aliases = setremove(bad_aliases, alias);
40else
41old_aliases = setremove(old_aliases, alias);
42endif
43endfor
44if (not_used)
45player:notify(tostr(object.name, "(", object, "):", vname, " does not have the alias", (length(not_used) > 1) ? "es" | "", " ", $string_utils:english_list(not_used), "."));
46endif
47if (bad_aliases && old_aliases)
48info = listset(info, aliases = $string_utils:from_list(old_aliases, " "), 3);
49try
50result = set_verb_info(object, vname, info);
51player:notify(tostr("Alias", (length(bad_aliases) > 1) ? "es" | "", " ", $string_utils:english_list(bad_aliases), " removed from verb ", object.name, "(", object, "):", vname));
52player:notify(tostr("Verbname is now ", object.name, "(", object, "):\"", aliases, "\""));
53except e (ANY)
54player:notify(e[2]);
55endtry
56elseif (!old_aliases)
57player:notify("You have to leave a verb with at least one alias.");
58endif
59except (E_VERBNF)
60player:notify("That object does not define that verb.");
61except e (ANY)
62player:notify(e[2]);
63endtry
64endif
65elseif (bynumber)
66player:notify(tostr(verb, " can only be used with verbs."));
67else
68object = player:my_match_object(iobjstr);
69if (!$command_utils:object_match_failed(object, iobjstr))
70old_aliases = object.aliases;
71not_used = {};
72for alias in (bad_aliases = $list_utils:remove_duplicates($list_utils:map_arg($string_utils, "trim", $string_utils:explode(dobjstr, ","))))
73"removed is_player(object) ? strsub(dobjstr, \" \", \",\") | --Nosredna";
74if (!(alias in old_aliases))
75not_used = {@not_used, alias};
76bad_aliases = setremove(bad_aliases, alias);
77else
78old_aliases = setremove(old_aliases, alias);
79endif
80endfor
81if (not_used)
82player:notify(tostr(object.name, "(", object, ") does not have the alias", (length(not_used) > 1) ? "es" | "", " ", $string_utils:english_list(not_used), "."));
83endif
84if (bad_aliases)
85if (e = object:set_aliases(old_aliases))
86player:notify(tostr("Alias", (length(bad_aliases) > 1) ? "es" | "", " ", $string_utils:english_list(bad_aliases), " removed from ", object.name, "(", object, ")."));
87player:notify(tostr("Aliases for ", object.name, "(", object, ") are now ", $string_utils:from_value(old_aliases, 1)));
88elseif (e == E_INVARG)
89player:notify("That particular name change not allowed (see help @rename or help @rmalias).");
90elseif (e == E_NACC)
91player:notify("Oops.  You can't update that object's aliases right now; try again in a few minutes.");
92elseif (e == 0)
93player:notify("Aliases not changed as expected!");
94player:notify(tostr("Aliases for ", $string_utils:nn(object), " are ", $string_utils:from_value(object.aliases, 1)));
95else
96player:notify(tostr(e));
97endif
98endif
99endif
100endif

@send

Spec any any anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1if (args && (args[1] == "to"))
2args = listdelete(args, 1);
3endif
4subject = {};
5for a in (args)
6if (((i = index(a, "=")) > 3) && (index("subject", a[1..i - 1]) == 1))
7args = setremove(args, a);
8a[1..i] = "";
9subject = {a};
10endif
11endfor
12$mail_editor:invoke(args, verb, @subject);

@edit ed

Spec any any anyFlags rxdOwner #29Definer #2

Referenced by

none

Source

1"Copied from generic player (#6):@edit by Hacker (#36) Mon Dec  4 15:26:37 2006 PST";
2"Calls the verb editor on verbs, the note editor on properties, and on anything else assumes it's an object for which you want to edit the .description.";
3if (!args)
4((player in $note_editor.active) ? $note_editor | $verb_editor):invoke(dobjstr, verb);
5elseif ($code_utils:parse_verbref(args[1]))
6if (player.programmer)
7$verb_editor:invoke(argstr, verb);
8else
9player:notify("You need to be a programmer to do this.");
10player:notify("If you want to become a programmer, talk to a wizard.");
11return;
12endif
13else
14$note_editor:invoke(dobjstr, verb);
15endif

@notedit

Spec any none noneFlags rxdOwner #29Definer #2

Referenced by

none

Source

1"Copied from generic player (#6):@notedit by Hacker (#36) Mon Dec  4 15:26:51 2006 PST";
2$note_editor:invoke(dobjstr, verb);

tell_mytree

Spec this none thisFlags rxOwner #361Definer #2

Referenced by

Source

1"Copied from Necanthrope (#142):tell_mytree Fri Jan 29 15:52:57 2010 CST";
2"Copied from generic builder (#4):tell_mytree by Satan (#2) Fri Jan 29 12:50:57 2010 CST";
3what = args[1];
4prefix = args[2];
5kidprefix = args[3];
6withkids = args[4];
7prop = args[5];
8withgeneric = args[6];
9depth = args[7];
10fullcount = (length(args) > 7) ? args[8] | 0;
11if (depth < 0)
12return;
13endif
14if (withgeneric)
15if (what != #1)
16if (!index(what.name, "generic"))
17return;
18endif
19endif
20endif
21name = what.name;
22is_generic = 0;
23if (index(name, "generic"))
24is_generic = 1;
25name = strsub(name, "generic", "g");
26endif
27if (what.owner == this)
28name = (((what.f ? $ansi.bold_on | "") + (is_generic ? $ansi.green | "")) + $su:left(name, -30 + length(prefix))) + $ansi.reset;
29else
30name = (((what.f ? $ansi.bold_on | "") + (is_generic ? $ansi.yellow | "")) + $su:left(name, -30 + length(prefix))) + $ansi.reset;
31endif
32numstr = $su:left(tostr(what), -7);
33kidstr = $su:space(7);
34if (fullcount)
35nkids = length($ou:descendants_suspended(what));
36else
37nkids = length(children(what));
38endif
39if (withkids)
40kids = children(what);
41suspend(0);
42else
43kids = $ou:fertile_kids_suspended(what);
44endif
45owncount = 0;
46for owned in (kids)
47if (owned.owner == player)
48owncount = owncount + 1;
49endif
50endfor
51if (nkids)
52kidstr = ($ansi.yellow + $su:right(tostr(nkids), -7)) + $ansi.reset;
53endif
54if ((what.owner == player) || owncount)
55player:tell(kidstr, " ", numstr, ($ansi.yellow + $ansi.bold_on) + prefix, "+-" + $ansi.reset, name, " ", what:tree_tag());
56endif
57$cu:sin(0);
58if (depth == 0)
59return;
60endif
61if (kids)
62if (is_a(what, $thing))
63kids = $lu:sort_prop(kids, "value");
64elseif (is_a(what, $creature))
65#142.blah = kids;
66kids = $lu:sort_prop(kids, "health_max");
67endif
68for x in (kids)
69if ((!is_a(x.location, $blueprint)) && (!is_a(x.location.location, $blueprint)))
70if (x == kids[$])
71this:tell_mytree(x, kidprefix, kidprefix + "  ", withkids, prop, withgeneric, depth - 1, fullcount);
72else
73this:tell_mytree(x, kidprefix, kidprefix + "| ", withkids, prop, withgeneric, depth - 1, fullcount);
74endif
75endif
76$cu:sin(1);
77endfor
78endif

@answer @repl*y

Spec any any anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from generic normal player (#40):@reply by Satan (#2) Mon Dec 10 16:05:26 2007 CST";
2"@answer <msg> [on *<recipient>] [<flags>...]";
3if (player.fighting != {})
4player:tell("You're too busy killing things to send a nice postcard right now, pal.");
5return;
6endif
7if (player:is_in_afterlife())
8player:tell("The dead send no mail.");
9return;
10endif
11set_task_perms(who = valid(caller_perms()) ? caller_perms() | player);
12if (p = this:parse_mailread_cmd(verb, args, "cur", "on", 1))
13if ($seq_utils:size(p[2]) != 1)
14player:notify("You can only answer *one* message at a time.");
15elseif (LIST != typeof(flags_replytos = $mail_editor:check_answer_flags(@p[4])))
16player:notify_lines({tostr("Usage:  ", verb, " [message-# [on <recipient>]] [flags...]"), "where flags include any of:", "  all        reply to everyone", "  sender     reply to sender only", "  include    include the original message in your reply", "  noinclude  don't include the original in your reply"});
17else
18this:set_current_folder(p[1]);
19$mail_editor:invoke(2, verb, p[1]:messages_in_seq(p[2])[1][2], @flags_replytos);
20endif
21endif

@Make-stairs

Spec any none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1if (!valid(exit = this.location:match_exit(dobjstr)))
2player:tell("There is no exit here called '", dobjstr, "'.");
3else
4exits = {exit, exit.otherside};
5up = #-1;
6down = #-1;
7for x in (exits)
8if (((x.direction == "up") || ("up" in x.aliases)) || ("u" in x.aliases))
9up = x;
10elseif (((x.direction == "down") || ("down" in x.aliases)) || ("d" in x.aliases))
11down = x;
12endif
13endfor
14if ((!valid(up)) && valid(down))
15up = setremove(exits, down);
16elseif (!valid(up))
17up = exits[1];
18endif
19if (!valid(down))
20down = up.otherside;
21endif
22if (up.location == player.location)
23player:tell("This will create stairs going up to ", up.name, ".  Is that okay?");
24else
25player:tell("This will create stairs going down to ", down.name, ".  Is that okay?");
26endif
27if ($command_utils:yes_or_no())
28$building_utils:make_stairs(up);
29player:tell($su:nn(exit), " is now a staircase.  Be sure to set its messages appropriately.");
30endif
31endif

@spawn @load @monster

Spec any none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1if (player != this)
2player:tell("Nice try.  You would probably steal the air from people's lungs if there were a command for that too, wouldn't you?  What a waste.");
3return;
4endif
5if (!dobjstr)
6player:tell("Try ", verb, " <what you want to spawn>.");
7return;
8endif
9if (!valid(dobj))
10if (verb == "@monster")
11dobj = $gamecheck:monster_for_spawn(dobjstr);
12else
13dobj = $gamecheck:match_for_spawn(dobjstr);
14endif
15endif
16what = dobj;
17if (!valid(what))
18player:tell(verb, " what?");
19return;
20endif
21if (!what.f)
22what = parent(what);
23endif
24if (!what.f)
25player:tell($su:nn(what), " isn't fertile.");
26return;
27endif
28if (what.location == player)
29player:tell("Moving generic ", $su:nn(what), " to Generics Repository ($generics).");
30what:moveto(#290);
31endif
32if (!is_a(player, $prog))
33#205120:announce_admins("[spy] ", $su:nn(player), " just spawned a ", $su:nn(what), ".");
34endif
35if (is_a(what, $thing))
36spawn = $rpg:spawn(what);
37spawn:moveto(player);
38player:tell("Spawned you a new ", $su:nn(spawn), ", child of ", $su:nn(what), ".");
39elseif (is_a(what, $room))
40spawn = $rpg:spawn(what);
41spawn:moveto(player.location.location);
42player:tell("Spawned you a new ", $su:nn(spawn), ", child of ", $su:nn(what), ".");
43"elseif (is_a(what, $npc))";
44elseif (is_a(what, $decal))
45spawn = $rpg:spawn(what);
46spawn:moveto(player.location);
47player:tell("Spawned you a new ", $su:nn(spawn), ", child of ", $su:nn(what), ".");
48elseif (is_a(what, $monster))
49spawn = what:_spawn();
50spawn:moveto(player.location);
51if (!((a = player.location:area()) in spawn.areas))
52spawn.areas = {a};
53player:tell("Setting area to ", $su:nn(a), ".");
54endif
55player:tell("Spawned you a new ", $su:nn(spawn), ", child of ", $su:nn(what), ".");
56spawn.location:announce_all(spawn:inamec(), " crawls out of a demonic portal.");
57else
58player:tell("You can only spawn $decals, $things and $monsters.");
59endif

@chmod*#

Spec any any anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from generic programmer (#58):@chmod by Satan (#2) Tue Aug 19 02:15:49 2008 CDT";
2set_task_perms(player);
3bynumber = verb == "@chmod#";
4if (length(args) != 2)
5player:notify(tostr("Usage:  ", verb, " <object-or-property-or-verb> <permissions>"));
6return;
7endif
8{what, perms} = args;
9if (spec = $code_utils:parse_verbref(what))
10if (!is_a(player, $immortal))
11player:notify("You need to be a programmer to do this.");
12player:notify("If you want to become a programmer, talk to a wizard.");
13return;
14endif
15if (valid(object = player:my_match_object(spec[1])))
16vname = spec[2];
17if (bynumber)
18vname = $code_utils:toint(vname);
19if (vname == E_TYPE)
20return player:notify("Verb number expected.");
21elseif ((vname < 1) || `vname > length(verbs(object)) ! E_PERM => 0')
22return player:notify("Verb number out of range.");
23endif
24endif
25try
26info = verb_info(object, vname);
27if (!valid(owner = info[1]))
28player:notify(tostr("That verb is owned by an invalid object (", owner, "); it needs to be @chowned."));
29elseif (!is_player(owner))
30player:notify(tostr("That verb is owned by a non-player object (", owner.name, ", ", owner, "); it needs to be @chowned."));
31else
32info[2] = perms = $perm_utils:apply(info[2], perms);
33try
34result = set_verb_info(object, vname, info);
35player:notify(tostr("Verb permissions set to \"", perms, "\"."));
36except (E_INVARG)
37player:notify(tostr("\"", perms, "\" is not a valid permissions string for a verb."));
38except e (ANY)
39player:notify(e[2]);
40endtry
41endif
42except (E_VERBNF)
43player:notify("That object does not define that verb.");
44except error (ANY)
45player:notify(error[2]);
46endtry
47return;
48endif
49elseif (bynumber)
50return player:notify("@chmod# can only be used for verbs.");
51elseif (index(what, ".") && (spec = $code_utils:parse_propref(what)))
52if (valid(object = player:my_match_object(spec[1])))
53pname = spec[2];
54try
55info = property_info(object, pname);
56info[2] = perms = $perm_utils:apply(info[2], perms);
57try
58result = set_property_info(object, pname, info);
59player:notify(tostr("Property permissions set to \"", perms, "\"."));
60except (E_INVARG)
61player:notify(tostr("\"", perms, "\" is not a valid permissions string for a property."));
62except error (ANY)
63player:notify(error[2]);
64endtry
65except (E_PROPNF)
66player:notify("That object does not have that property.");
67except error (ANY)
68player:notify(error[2]);
69endtry
70return;
71endif
72elseif (valid(object = player:my_match_object(what)))
73perms = $perm_utils:apply(((object.r ? "r" | "") + (object.w ? "w" | "")) + (object.f ? "f" | ""), perms);
74r = w = f = 0;
75for i in [1..length(perms)]
76if (perms[i] == "r")
77r = 1;
78elseif (perms[i] == "w")
79w = 1;
80elseif (perms[i] == "f")
81f = 1;
82else
83player:notify(tostr("\"", perms, "\" is not a valid permissions string for an object."));
84return;
85endif
86endfor
87try
88object.r = r;
89object.w = w;
90object.f = f;
91player:notify(tostr("Object permissions set to \"", perms, "\"."));
92except (E_PERM)
93player:notify("Permission denied.");
94endtry
95return;
96endif
97$command_utils:object_match_failed(object, what);

@prop*erties @props

Spec any none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from generic programmer (#58):@props by Spunky (#97) Tue Aug 19 02:51:47 2008 CDT";
2if (!dobjstr)
3player:tell("@props <obj>");
4return;
5endif
6if (valid(dobj))
7object = dobj;
8elseif ((dobjstr[1] == "$") && $object_utils:has_property(#0, dobjstr[2..$]))
9object = #0.(dobjstr[2..$]);
10else
11object = toobj(dobjstr);
12endif
13if (object == #0)
14player:tell("Couldn't match \"", dobjstr, "\".");
15return;
16else
17player:tell(";properties(", tostr(object), ") => ", $string_utils:from_value(properties(object), "\""));
18endif

#*

Spec any any anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from generic programmer (#58):# by Satan (#2) Tue Aug 19 02:52:48 2008 CDT";
2"Copied from Player Class hacked with eval that does substitutions and assorted stuff (#8855):# by Geust (#24442) Sun May  9 20:19:05 1993 PDT";
3"#<string>[.<property>|.parent] [exit|player|inventory] [for <code>] returns information about the object (we'll call it <thing>) named by string.  String is matched in the current room unless one of exit|player|inventory is given.";
4"If neither .<property>|.parent nor <code> is specified, just return <thing>.";
5"If .<property> is named, return <thing>.<property>.  .parent returns parent(<thing>).";
6"If <code> is given, it is evaluated, with the value returned by the first part being substituted for %# in <code>.";
7"For example, the command";
8"  #JoeFeedback.parent player for toint(%#)";
9"will return 26026 (unless Joe has chparented since writing this).";
10set_task_perms(player);
11if (!(whatstr = verb[2..dot = min(index(verb + ".", "."), index(verb + ":", ":")) - 1]))
12player:notify("Usage:  #string [exit|player|inventory]");
13return;
14elseif (!args)
15what = player:my_match_object(whatstr);
16elseif (index("exits", args[1]) == 1)
17what = player.location:match_exit(whatstr);
18elseif (index("inventory", args[1]) == 1)
19what = player:match(whatstr);
20elseif (index("players", args[1]) == 1)
21what = $string_utils:match_player(whatstr);
22if ($command_utils:player_match_failed(what, whatstr))
23return;
24endif
25else
26what = player:my_match_object(whatstr);
27endif
28if ((!valid(what)) && match(whatstr, "^[0-9]+$"))
29what = toobj(whatstr);
30endif
31if ($command_utils:object_match_failed(what, whatstr))
32return;
33endif
34while (index(verb, ".parent") == (dot + 1))
35what = parent(what);
36dot = dot + 7;
37endwhile
38if (dot >= length(verb))
39val = what;
40elseif ((value = $code_utils:eval_d(tostr("return ", what, verb[dot + 1..$], ";")))[1])
41val = value[2];
42else
43player:notify_lines(value[2]);
44return;
45endif
46if (prepstr)
47program = strsub(iobjstr + ";", "%#", toliteral(val));
48end = 1;
49"while (\"A\" <= (l = argstr[end]) && l <= \"Z\")";
50while (("A" <= (l = program[end])) && (l <= "Z"))
51end = end + 1;
52endwhile
53if ((program[1] == ";") || (program[1..end - 1] in {"if", "for", "fork", "return", "while", "try"}))
54program = $code_utils:substitute(program, this.eval_subs);
55else
56program = $code_utils:substitute("return " + program, this.eval_subs);
57endif
58program = this.eval_env + program;
59if ((value = eval(program))[1])
60player:notify(this:eval_value_to_string(value[2]));
61else
62player:notify_lines(value[2]);
63nerrors = length(value[2]);
64player:notify(tostr(nerrors, " error", (nerrors == 1) ? "." | "s."));
65endif
66else
67player:notify(this:eval_value_to_string(val));
68endif

@d*isplay

Spec any none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"@display <object>[.[property]]*[,[inherited_property]]*[:[verb]]*[;[inherited_verb]]*";
2if (player != this)
3player:notify(tostr("Sorry, you can't use ", this:title(), "'s `", verb, "' command."));
4return E_PERM;
5endif
6"null names for properties and verbs are interpreted as meaning all of them.";
7opivu = {{}, {}, {}, {}, {}};
8string = "";
9punc = 1;
10literal = 0;
11set_task_perms(player);
12for jj in [1..length(argstr)]
13j = argstr[jj];
14if (literal)
15string = string + j;
16literal = 0;
17elseif (j == "\\")
18literal = 1;
19elseif (y = index(".,:;", j))
20opivu[punc] = {@opivu[punc], string};
21punc = 1 + y;
22string = "";
23else
24string = string + j;
25endif
26endfor
27opivu[punc] = {@opivu[punc], string};
28objname = opivu[1][1];
29it = this:my_match_object(objname);
30if ($command_utils:object_match_failed(it, objname))
31return;
32endif
33readable = (it.owner == this) || (it.r || this.wizard);
34cant = {};
35if ("" in opivu[2])
36if (readable)
37prop = properties(it);
38else
39prop = {};
40cant = setadd(cant, it);
41endif
42if (this:display_option("changedprops"))
43what = it;
44while (valid(what = parent(what)))
45if ((what.owner == this) || (what.r || this.wizard))
46for p in (properties(what))
47if ((!is_clear_property(it, p)) && (what.(p) != it.(p)))
48prop = {@prop, p};
49endif
50endfor
51else
52cant = setadd(cant, what);
53endif
54endwhile
55elseif (!this:display_option("thisonly"))
56what = it;
57while ((!prop) && valid(what = parent(what)))
58if ((what.owner == this) || (what.r || this.wizard))
59prop = properties(what);
60else
61cant = setadd(cant, what);
62endif
63endwhile
64endif
65else
66prop = opivu[2];
67endif
68if ("" in opivu[3])
69inh = {};
70for what in ({it, @$object_utils:ancestors(it)})
71if (((what.owner == this) || what.r) || this.wizard)
72inh = {@inh, @properties(what)};
73else
74cant = setadd(cant, what);
75endif
76endfor
77else
78inh = opivu[3];
79endif
80for q in (inh)
81if (q in `properties(it) ! ANY => {}')
82prop = setadd(prop, q);
83inh = setremove(inh, q);
84endif
85endfor
86vrb = {};
87if ("" in opivu[4])
88if (readable)
89vrbs = verbs(it);
90else
91vrbs = $object_utils:accessible_verbs(it);
92cant = setadd(cant, it);
93endif
94what = it;
95if (!this:display_option("thisonly"))
96while ((!vrbs) && valid(what = parent(what)))
97if ((what.owner == this) || (what.r || this.wizard))
98vrbs = verbs(what);
99else
100cant = setadd(cant, what);
101endif
102endwhile
103endif
104for n in [1..length(vrbs)]
105vrb = setadd(vrb, {what, n});
106endfor
107else
108for w in (opivu[4])
109if (y = $object_utils:has_verb(it, w))
110vrb = setadd(vrb, {y[1], w});
111else
112this:notify(tostr("No such verb, \"", w, "\""));
113endif
114endfor
115endif
116if ("" in opivu[5])
117for z in ({it, @$object_utils:ancestors(it)})
118if (((this == z.owner) || z.r) || this.wizard)
119for n in [1..length(verbs(z))]
120vrb = setadd(vrb, {z, n});
121endfor
122else
123cant = setadd(cant, z);
124endif
125endfor
126else
127for w in (opivu[5])
128if (typeof(y = $object_utils:has_verb(it, w)) == LIST)
129vrb = setadd(vrb, {y[1], w});
130else
131this:notify(tostr("No such verb, \"", w, "\""));
132endif
133endfor
134endif
135if (({""} in opivu) || (opivu[2..5] == {{}, {}, {}, {}}))
136this:notify(tostr(it.name, " (", it, ") [ ", it.r ? "readable " | "", it.w ? "writeable " | "", it.f ? "fertile " | "", is_player(it) ? "(player) " | "", it.programmer ? "programmer " | "", it.wizard ? "wizard " | "", "]"));
137if (it.owner != (is_player(it) ? it | this))
138this:notify(tostr("  Owned by ", valid(p = it.owner) ? p.name | "** extinct **", " (", p, ")."));
139endif
140this:notify(tostr("  Child of ", valid(p = parent(it)) ? p.name | "** none **", " (", p, ")."));
141if (it.location != $nothing)
142this:notify(tostr("  Location ", valid(p = it.location) ? p.name | "** unplace (tell a wizard, fast!) **", " (", p, ")."));
143endif
144if ($quota_utils.byte_based && $object_utils:has_property(it, "object_size"))
145this:notify(tostr("  Size: ", $string_utils:group_number(it.object_size[1]), " bytes at ", this:ctime(it.object_size[2])));
146endif
147endif
148blankargs = this:display_option("blank_tnt") ? {"this", "none", "this"} | #-1;
149for b in (vrb)
150$command_utils:suspend_if_needed(0);
151where = b[1];
152q = b[2];
153short = (typeof(q) == INT) ? q | strsub(y = index(q, " ") ? q[1..y - 1] | q, "*", "");
154inf = `verb_info(where, short) ! ANY';
155if ((typeof(inf) == LIST) || (inf == E_PERM))
156name = (typeof(inf) == LIST) ? index(inf[3], " ") ? ("\"" + inf[3]) + "\"" | inf[3] | q;
157line = $string_utils:left(tostr($string_utils:right(tostr(where), 6), ":", name, " "), 32);
158if (inf == E_PERM)
159line = line + "   ** unreadable **";
160else
161line = $string_utils:left(tostr(line, inf[1].name, " (", inf[1], ") "), 53) + ((i = inf[2] in {"x", "xd", "d", "rd"}) ? {" x", " xd", "  d", "r d"}[i] | inf[2]);
162vargs = `verb_args(where, short) ! ANY';
163if (vargs != blankargs)
164if (this:display_option("shortprep") && (!(vargs[2] in {"any", "none"})))
165vargs[2] = $code_utils:short_prep(vargs[2]);
166endif
167line = $string_utils:left(line + " ", 60) + $string_utils:from_list(vargs, " ");
168endif
169endif
170this:notify(line);
171elseif (inf == E_VERBNF)
172this:notify(tostr(inf));
173this:notify(tostr("  ** no such verb, \"", short, "\" **"));
174else
175this:notify("This shouldn't ever happen. @display is buggy.");
176endif
177endfor
178all = {@prop, @inh};
179max = (length(all) < 4) ? 999 | (this:linelen() - 56);
180depth = (length(all) < 4) ? -1 | 1;
181truncate_owner_names = length(all) > 1;
182for q in (all)
183$command_utils:suspend_if_needed(0);
184inf = `property_info(it, q) ! ANY';
185if (inf == E_PROPNF)
186if (q in $code_utils.builtin_props)
187this:notify(tostr($string_utils:left("," + q, 25), "Built in property            ", $string_utils:abbreviated_value(it.(q), max, depth)));
188else
189this:notify(tostr("  ** property not found, \"", q, "\" **"));
190endif
191else
192pname = $string_utils:left(tostr((q in `properties(it) ! ANY => {}') ? "." | (`is_clear_property(it, q) ! ANY' ? " " | ","), q, " "), 25);
193if (inf == E_PERM)
194this:notify(pname + "   ** unreadable **");
195else
196oname = inf[1].name;
197truncate_owner_names && ((length(oname) > 12) && (oname = oname[1..12]));
198`inf[2][1] != "r" ! E_RANGE => 1' && (inf[2][1..0] = " ");
199`inf[2][2] != "w" ! E_RANGE => 1' && (inf[2][2..1] = " ");
200this:notify(($string_utils:left(tostr($string_utils:left(tostr(pname, oname, " (", inf[1], ") "), 47), inf[2], " "), 54) + $string_utils:abbreviated_value(it.(q), max, depth)) + $ansi.reset);
201endif
202endif
203endfor
204if (cant)
205failed = {};
206for k in (cant)
207failed = listappend(failed, tostr(k.name, " (", k, ")"));
208endfor
209this:notify($string_utils:centre(tostr(" no permission to read ", $string_utils:english_list(failed, ", ", " or ", " or "), ". "), 75, "-"));
210else
211this:notify($string_utils:centre(" finished ", 75, "-"));
212endif

@s*how

Spec any any anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from generic programmer (#58):@show by Satan (#2) Fri Aug 22 17:55:52 2008 CDT";
2set_task_perms(player);
3if (dobjstr == "")
4player:notify(tostr("Usage:  ", verb, " <object-or-property-or-verb>"));
5return;
6endif
7if (index(dobjstr, ".") && (spec = $code_utils:parse_propref(dobjstr)))
8if (valid(object = player:my_match_object(spec[1])))
9return $code_utils:show_property(object, spec[2]);
10endif
11elseif (spec = $code_utils:parse_verbref(dobjstr))
12if (valid(object = player:my_match_object(spec[1])))
13return $code_utils:show_verbdef(object, spec[2]);
14endif
15elseif (((dobjstr[1] == "$") && ((pname = dobjstr[2..$]) in properties(#0))) && (typeof(#0.(pname)) == OBJ))
16if (valid(object = #0.(pname)))
17return $code_utils:show_object(object);
18endif
19elseif ((dobjstr[1] == "$") && (spec = $code_utils:parse_propref(dobjstr)))
20return $code_utils:show_property(#0, spec[2]);
21else
22if (valid(object = player:my_match_object(dobjstr)))
23return $code_utils:show_object(object);
24endif
25endif
26$command_utils:object_match_failed(object, dobjstr);

@setstat @setskill

Spec any for/about anyFlags rxdOwner #361Definer #2

Referenced by

none

Source

1if (!player.programmer)
2player:tell("I don't understand that.");
3return;
4endif
5if (player != this)
6raise(E_PERM);
7return;
8endif
9skill = $skills:match(dobjstr);
10if (!valid(skill))
11player:tell("I don't know what '", dobjstr, "' is. [Check @tree $skill for a list.]");
12return;
13endif
14if (!valid(iobj))
15player:tell("I don't know what '", iobjstr, "' is.");
16return;
17endif
18if ((iobj.owner != player) && (!player.wizard))
19player:tell("You don't own ", $su:nn(iobj), ".");
20return;
21endif
22if (!is_a(iobj, $creature))
23player:tell($su:nn(iobj), " isn't a $creature.");
24return;
25endif
26now = {skill:raw(iobj), skill:ip(iobj), 0, 0};
27nowstr = tostr(now[1], ".", now[2]);
28player:tell($ansi.cyan, $ansi.bold_on, "[ ", iobj.name, ": ", skill.name, " = ", nowstr, "  (enter new value) ]", $ansi.reset);
29new_val = {};
30while (!new_val)
31line = read();
32if (line == "")
33new_val = now;
34elseif (!line)
35player:tell("Aborting.");
36return;
37elseif ((tostr(tofloat(line)) != line) && (tostr(toint(line)) != line))
38player:tell("'", line, "' isn't a number...");
39else
40raw = toint(tofloat(line));
41ip = toint((tofloat(line) - tofloat(raw)) * 100.0);
42new_val = {raw, ip, 0, 0};
43endif
44endwhile
45iobj.skills[skill.name] = new_val;
46newstr = tostr(new_val[1], ".", new_val[2]);
47player:tell($ansi.cyan, " = ", newstr, $ansi.reset);

@move

Spec any any anyFlags rxdOwner #29Definer #2

Referenced by

none

Source

1"'@move <object> to <place>' - Teleport an object. Example: '@move trash to #11' to move trash to the closet.";
2here = player.location;
3if ((prepstr != "to") || (!iobjstr))
4player:tell("Usage: @move <object> to <location>");
5return;
6endif
7if ((!dobjstr) || (dobjstr == "me"))
8thing = this;
9else
10thing = $match_utils:match(dobjstr, {@this.contents, @this.location.contents});
11if (!valid(thing))
12player:tell("You don't see any \"", dobjstr, "\" to move.");
13return;
14endif
15endif
16if ((!is_a(player, $prog)) && ((thing.owner != player) && (thing != player)))
17player:tell("You can only move your own objects.");
18return;
19endif
20dest = this:lookup_room(iobjstr);
21if ((dest == #-1) || (!$command_utils:object_match_failed(dest, iobjstr)))
22if (!is_a(player, $prog))
23#205120:announce_admins("[spy] ", $su:nn(player), " just moved ", $su:nn(thing), " to ", $su:nn(dest), ".");
24endif
25oldloc = thing.location;
26this:teleport(thing, dest);
27player:tell("Moved ", $su:nn(thing), " from ", $su:nn(oldloc), " to ", $su:nn(dest), ".");
28endif

@make-hole

Spec this none thisFlags rxdOwner #361Definer #2

Referenced by

none

Source

1if (!valid(exit = this.location:match_exit(dobjstr)))
2player:tell("There is no exit here called '", dobjstr, "'.");
3else
4player:tell("This will create a door to the ", exit.name, ".  Is that okay?");
5if ($command_utils:yes_or_no())
6$building_utils:make_door(exit);
7player:tell($su:nn(exit), " is now a door.  Be sure to set its messages appropriately.");
8endif
9endif

@add-feature @addfeature

Spec any none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1"Copied from generic programmer (#58):@addfeature by Satan (#2) Tue Jan 27 01:04:19 2009 CST";
2"Copied from generic builder (#4):@addfeature by Satan (#2) Sat Aug 30 22:30:10 2008 CDT";
3"Copied from generic player (#6):@add-feature by Satan (#2) Sat Mar  6 01:28:58 2004 PST";
4"Usage:";
5"  @add-feature";
6"  @add-feature <feature object>";
7"Modified 10 Oct 94, by Michele, to check the warehouse and match.";
8"Lists all features or adds an object to your features list.";
9set_task_perms(player);
10if (dobjstr)
11if (dobj == $failed_match)
12dobj = $feature.warehouse:match_object(dobjstr);
13endif
14if (!$command_utils:object_match_failed(dobj, dobjstr))
15if (dobj in player.features)
16player:tell(dobjstr, " is already one of your features.");
17elseif (player:add_feature(dobj))
18player:tell(dobj, " (", dobj.name, ") added as a feature.");
19else
20player:tell("You can't seem to add ", dobj, " (", dobj.name, ") to your features list.");
21endif
22endif
23else
24player:tell("Usage:  @add-feature <object>");
25if (length($feature.warehouse.contents) < 20)
26player:tell("Available features include:");
27player:tell("--------------------------");
28fe = {};
29for c in ($feature.warehouse.contents)
30fe = {(c in player.features) ? c:title() + " (*)" | c:title()};
31player:tell("  " + $string_utils:english_list(fe));
32endfor
33player:tell("--------------------------");
34player:tell("A * after the feature name means that you already have that feature.");
35endif
36endif

@make-doorway

Spec any none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1if (!valid(exit = this.location:match_exit(dobjstr)))
2player:tell("There is no exit here called '", dobjstr, "'.");
3else
4#98:_chparent(exit, #256151);
5#98:_chparent(exit.otherside, #256151);
6player:tell($su:nn(exit), " is now a doorway.  Be sure to set its messages appropriately.");
7endif

@make-swingdoors

Spec any none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1if (!valid(exit = this.location:match_exit(dobjstr)))
2player:tell("There is no exit here called '", dobjstr, "'.");
3else
4#98:_chparent(exit, #329596);
5#98:_chparent(exit.otherside, #329596);
6player:tell($su:nn(exit), " is now swinging doors.  Be sure to set its messages appropriately.");
7endif

@reset-area

Spec none none noneFlags rxdOwner #361Definer #2

Referenced by

none

Source

1player:area():("@reset")();