generic player #6

Parent #100Owner #361Flags obsolete1, read, fertileSource hellcore/hellcore.db

Aliases: generic player

214 verbs · 157 properties · 2 children

Verbs

VerbSpecFlagsDefinerLines
confuncthis none thisrxd#627
disfuncthis none thisrxd#618
initializethis none thisrxd#67
acceptablethis none thisrxd#61
my_huhthis none thisrxd#647
last_huhthis none thisrxd#660
my_match_objectthis none thisrxd#62
tell_contentsthis none thisrxd#645
titlecthis none thisrxd#61
notifythis none thisrxd#665
notify_linesthis none thisrxd#68
linesplitthis none thisrxd#613
linelenthis none thisrxd#61
@more @many none nonerxd#631
@wrapnone any nonerxd#614
@linelen*gthany none nonerxd#625
@pagelen*gthany none nonerxd#635
whodunnitthis none thisrxd#610
wh*isperany at/to thisrxd#63
receive_pagethis none thisrxd#614
page_origin_msg page_echo_msg page_absent_msgthis none thisrxd#62
i inv*entorynone none nonerxd#69
display_optionthis none thisrxd#66
edit_optionthis none thisrxd#66
set_mail_option set_edit_option set_display_optionthis none thisrxd#621
@mailo*ptions @mail-o*ptions @edito*ptions @edit-o*ptions @displayo*ptions @display-o*ptionsany any anyrxd#629
set_namethis none thisrxd#626
set_aliasesthis none thisrxd#649
@rename*#any at/to anyrxd#692
@desc*ribeany as anyrxd#614
@mess*agesany none nonerxd#657
@genderany none nonerxd#640
ex*amine xany none nonerxd#614
add_featurethis none thisrxd#631
remove_featurethis none thisrxd#617
@quitnone none nonerxd#615
examine_commands_okthis none thisrxd#61
is_listeningthis none thisrxd#62
announce announce_all_but announce_allthis none thisrxd#69
linewrapthis none thisrxd#63
ownership_quotathis none thisrxd#65
set_linelengththis none thisrxd#615
set_pagelengththis none thisrxd#616
set_homethis none thisrxd#619
@registermeany any anyrxd#664
ctimethis none thisrxd#63
newsany none nonerxd#646
notify_lines_suspendedthis none thisrxd#69
_chparentthis none thisrxd#62
@passwordany any anyrxd#625
recyclethis none thisrxd#614
email_addressthis none thisrxd#62
set_email_addressthis none thisrxd#62
reconfuncthis none thisrxd#64
check_prefthis none thisrxd#612
@pref @prefsany any anyrxd#634
list_prefsthis none thisrxd#620
parse_commandthis none thisrxd#694
_walktothis none thisrxd#633
match_verbthis none thisrxd#60
ansi_subthis none thisrx#632
take_damagethis none thisrxd#617
page pgae pgageany any anyrxd#631
'*any any anyrxd#66
_wakethis none thisrxd#65
respawnthis none thisrxd#64
award_xpthis none thisrxd#638
hostnamethis none thisrxd#64
friend*sany none nonerxd#652
allow refuse deny unallow disallow permitany out of/from inside/from anyrxd#675
allows refuses refusalsany none nonerxd#634
idle_secondsthis none thisrxd#61
goany any anyrxd#616
tell_contents_backupthis none thisrxd#624
area_namethis none thisrxd#61
_hearthis none thisrxd#61
wornnone none nonerxd#629
pinchthis none nonerxd#625
diethis none thisrxd#66
repair fixany none nonerxd#610
start_fightingthis none thisrxd#637
new_tell_contentsthis none thisrxd#6122
journal*s achievement*s kills travel*s exploredany none anyrxd#667
heartbeatthis none thisrxd#622
hear_event_arrivethis none thisrxd#65
lose_stressthis none thisrxd#65
gain_stressthis none thisrxd#65
_fightthis none thisrxd#610
@sethomenone none nonerxd#610
show_score_fullthis none thisrxd#62
is_restrainingthis none thisrxd#67
movetothis none thisrxd#68
wakenone none nonerxd#620
chatnet_BACKUPthis none thisrxd#653
gearany none nonerxd#6133
teachany any anyrxd#636
recip*esnone none nonerxd#60
@briefany any anyrxd#624
@addr*oomany none nonerxd#619
@roomsnone none nonerxd#67
@rmr*oomany none nonerxd#615
enemyany none nonerxd#638
client_tellthis none thisrxd#63
@clientany any anyrxd#610
client_inventorythis none thisrxd#68
enterfuncthis none thisrxd#66
exitfuncthis none thisrxd#66
is_hardcorethis none thisrxd#611
su*mnone none nonerxd#65
resign_backupthis none thisrxd#612
killed_bythis none thisrxd#630
@nudeany is anyrxd#648
wearany none nonerxd#619
on_movethis none thisrxd#67
gain_thirstthis none thisrxd#610
lose_thirstthis none thisrxd#69
dodge_or_parrythis none thisrxd#616
tell_contents_oldthis none thisrxd#652
tell_contents_subthis none thisrxd#648
trackany none nonerxd#69
jailnet_BACKUPthis none thisrxd#611
tell_item_listthis none thisrxd#615
newtellthis none thisrxd#64
@sendany any anyrxd#61
idleany none nonerxd#628
idlemsgany any anyrxd#612
internet_BACKUPthis none thisrxd#614
_pvp_recordthis none thisrxd#622
_gain_stressthis none thisrxd#624
_lose_stressthis none thisrxd#618
debug_tellthis none thisrxd#60
who_doing_msgthis none thisrxd#61
who_duck_msgthis none thisrxd#64
_brainscanthis none thisrxd#621
removeany none nonerxd#628
who_doing_msg_oldthis none thisrxd#65
tard_subthis none thisrxd#616
say_backupthis none thisrxd#614
char_agethis none thisrxd#631
tell_agethis none thisrxd#64
hear_rumorthis none thisrxd#64
leet_subthis none thisrxd#68
avatar_namethis none thisrxd#610
inventory_tagthis none thisrxd#612
@ageany none nonerxd#640
index_roomthis none thisrxd#615
fetishes_fedthis none thisrxd#67
suck_subthis none thisrxd#68
set_pref_oldthis none thisrxd#69
mxp_tellthis none thisrxd#63
tell_reclonethis none thisrxd#63
namethis none thisrxd#64
real_namethis none thisrxd#66
pname plural_namethis none thisrxd#612
revert_code_namethis none thisrxd#619
set_code_namethis none thisrxd#617
default_respawnthis none thisrxd#61
descriptionthis none thisrxd#64
pee pissnone any anyrxd#632
quest_xpthis none thisrxd#69
show_xpthis none thisrxd#67
_heartbeat_agethis none thisrxd#623
_heartbeat_hornythis none thisrxd#69
_heartbeat_hungerthis none thisrxd#624
effective_xpthis none thisrxd#61
ip_totalthis none thisrxd#611
tell_standingsthis none thisrxd#620
learnany any anyrxd#611
enter_roomthis none thisrxd#66
dnamecthis none thisrxd#65
tell_wantedthis none thisrxd#615
corpse_meatsthis none thisrxd#62
lm*ap localmapany none nonerxd#6157
xyzzynone none nonerxd#61
rollnone none nonerxd#65
posenone with/using anyrxd#66
cool*downsnone none nonerxd#614
tauntany any anyrxd#629
may_chatthis none thisrxd#62
record_pvpthis none thisrxd#62
systellthis none thisrxd#68
job*sany any anyrxd#6136
hear_event_movethis none thisrxd#614
afterlifethis none thisrxd#613
@comment @vote @yes @noany any anyrd#615
@top @bottomany any anyrd#655
room_smell_msgthis none thisrxd#65
@attachany any anyrxd#636
bigmap medmap widemap hugemapnone none nonerxd#632
@homenone none nonerxd#66
lush_subthis none thisrxd#625
reverse_lightthis none thisrxd#66
complimentany none nonerxd#614
scam conthis none nonerxd#612
@typeany any anyrxd#611
sleepnone none nonerxd#613
net_receivethis none thisrxd#61
hintnone none nonerxd#61
hear_noisethis none thisrxd#614
gen_rep_msgthis none thisrxd#653
list_pref_categoriesthis none thisrxd#623
inamecthis none thisrxd#61
hints rumorsany any anyrxd#635
tree_tagthis none thisrxd#65
ip_dailythis none thisrxd#613
set_prefthis none thisrxd#626
on_pref_blindthis none thisrxd#636
on_pref_ansithis none thisrxd#68
post_peethis none thisrxd#611
@register-altany any anyrxd#638
can_pvpthis none thisrxd#615
blind_gearthis none thisrxd#6128
_pagethis none thisrxd#622
_receivethis none thisrxd#624

Properties

PropertyDefinerFlagsOwnerValue
features#6r#29{#84, #149, #310, #260, #318}
previous_connection#6#3610
email_address#6#361""
last_disconnect_time#6r#3610
help#6rc#361#60
more_msg#6rc#361"*** More *** %n lines left. Do @more [rest|flush] for more."
linetask#6r#29{0, 0}
linesleft#6r#290
linebuffer#6#29{}
pagelen#6r#290
owned_objects#6r#361{}
linelen#6r#29-79
current_folder#6c#3611
all_connect_places#6#361{}
last_connect_place#6#361"?"
lines#6c#3610
page_absent_msg#6rc#361"%N is not currently logged in."
page_origin_msg#6rc#361"Your wristpad beeps with a text from %n."
page_echo_msg#6rc#361"You tap your text in on your wristpad."
edit_options#6rc#361{}
last_connect_time#6r#3610
ownership_quota#6#290
password#6#361"impossible password to type"
paranoid#6rc#3610
display_options#6rc#361{}
verb_subs#6rc#361{}
first_connect_time#6r#3612147483647
size_quota#6#29{}
last_password_time#6#3610
last_connect_attempt#6#3610
prefs#6rc#361
list of 17{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
ansi#6rc#3611
last_hit_meter#6rc#361"~1b[1m~1b[37m[~1b[32m******************************~1b[37m~1b[1m]~1b[0m"
doing_msg#6rc#361""
xp_total#6rc#3610
party#6rc#361#-1
rooms#6r#361{}
client#6rc#3610
last_death_time#6rc#3610
default_weapon#6rc#361#-1
thirst#6rc#3610.0
may_chat#6rc#3611
idlemsg#6r#361""
eula#6rc#3610
birthdate#6rc#361{}
bad_words#6rc#361{}
char_start_time#6rc#3610
rumors#6rc#361{}
last_broadcast#6c#361{"", 0, 0, #-1}
ansihack#6rc#3610
last_death_callers#6rc#361{{{#364606, "old-die", #364606, #364606, #364606}}, {}}
char_extra_epochs#6rc#3610
code_name#6rc#361""
code_plural#6rc#361""
changeable_properties#6rc#361{"doing_msg"}
out_of_band_session#6r#29#-1
private_aliases#6rc#361
list of 17{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
quests_open#6rc#361
list of 17{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
quests#6rc#361
list of 17{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
page_receive_msg#6rc#361"From your wristpad: %n pages, '%message'"
page_msg#6rc#361"%N taps on %p wristpad."
focus_skills#6rc#361{}
skillpoints#100rc#361<clear>
xp#100rc#3610
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#36130
unarmed_weapon#107rc#361#193
size#107rc#361<clear>
posture#107rc#361"standing"
gender#107rc#361"unset"
respawn#107rc#361#192877
corpse#107rc#361#245
has_proper_name#107rc#3611
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#36130
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{}
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#339
respawn_msg#107rc#361<clear>
move_action#107rc#361<clear>
heart#107rc#3610
last_heartbeat#107rc#361<clear>
dead#107rc#3611259950737
_tohit_next#107rc#361<clear>
last_words_msg#107rc#361<clear>
attacked#107rc#361{}
opens_doors#107rc#361<clear>
movable_by_explosion#107rc#361<clear>
obscured#107rc#361<clear>
obscured_desc_msg#107rc#361""
cooldowns#107rc#361<clear>
combat_rounds#107rc#361<clear>
encumbrance#107rc#361{0, 1297659611}
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{}
preemptible#92r#3611
executing#92r#361{}
process_queue#92r#361715554807
help_msg#92rc#361"A player. Generally you shouldn't be messing with them. If you need help on them, look at other creatures or ask someone smart."
last_action#92r#361{#14836, {}, 0, "paralyzed Necanthrope"}
article#92rc#361<clear>
last_last_action#92rc#361<clear>
action_count#92rc#361<clear>
aliases#1r#362{"generic player"}
description#1rc#361""
object_size#1r#29{227911, 1298433815}
hidden_verbs#1rc#361{"g*et take", "@setup", "@possess"}
phelp_msg#1rc#361{"This is a player. We can't help you out with him, her, or it. Sorry."}
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): #100 generic RPG player#154 generic living creature#107 generic creature#92 generic actor#1 root

Children: #33 generic normal player, #140 generic clone

Call graph

calls n6_0 #6:confunc n150_0 #150:register n6_0->n150_0 n42_0 #42:controls n6_0->n42_0 n53_10 #53:check n6_0->n53_10 n6_152 #6:real_name n6_0->n6_152 n6_54 #6:check_pref n6_0->n6_54 n212_1 #212:activate n6_0->n212_1 n6_1 #6:disfunc n6_1->n6_152 n107_162 #107:is_in_afterlife n6_1->n107_162 n1_66 #1:announce_action_text n6_1->n1_66 n6_58 #6:_walkto n6_1->n6_58 n118_0 #118:announce n6_1->n118_0 n6_58->n1_66 n6_151 #6:name n6_58->n6_151 n6_2 #6:initialize n6_2->n42_0 n6_33 #6:add_feature n6_2->n6_33 n107_75 #107:initialize n6_2->n107_75 n6_33->n42_0 n6_4 #6:my_huh n6_4->n42_0 n51_1 #51:toint n6_4->n51_1 n51_18 #51:full_prep n6_4->n51_18 n107_87 #107:sitting_on n6_4->n107_87 n107_88 #107:reclining_on n6_4->n107_88 n48_7 #48:running_out_of_time n6_4->n48_7 n107_43 #107:tell n6_4->n107_43 n6_5 #6:last_huh n6_5->n51_18 n6_5->n107_43 n44_0 #44:match n6_5->n44_0 n6_6 #6:my_match_object n6_6->n44_0 n6_7 #6:tell_contents n6_7->n6_54 n6_7->n107_43 n254_5 #254:plurals n6_7->n254_5 n254_6 #254:group_by_type n6_7->n254_6 n6_118 #6:tell_contents_sub n6_7->n6_118 n47_16 #47:slice n6_7->n47_16 n20_85 #20:english_weight_short n6_7->n20_85 n107_21 #107:max_carry n6_7->n107_21 n6_118->n6_54 n6_118->n47_16 n6_118->n20_85 n6_8 #6:titlec n107_139 #107:title n6_8->n107_139 n6_9 #6:notify n6_9->n42_0 n6_60 #6:ansi_sub n6_9->n6_60 n6_11 #6:linesplit n6_9->n6_11 n122_8 #122:strip n6_9->n122_8 n20_95 #20:word_wrap n6_9->n20_95 n6_60->n47_16 n6_11->n122_8 n48_8 #48:suspend_if_needed n6_11->n48_8 n6_10 #6:notify_lines n6_10->n42_0 n6_10->n6_9 n6_14 #6:@wrap n6_14->n6_9 n6_15 #6:@linelen*gth n6_15->n42_0 n6_15->n6_9 n6_41 #6:set_linelength n6_15->n6_41 n6_41->n42_0 n6_16 #6:@pagelen*gth n6_16->n6_10 n6_18 #6:wh*isper n6_18->n107_43 n107_167 #107:text_sub n6_18->n107_167 n6_18->n6_151

Showing 48 of 350 verbs; 302 not shown.

Source

confunc

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1if (length(connected_players()) < 6)
2f5 = 1;
3for x in (connected_players())
4if ((!x.programmer) && (x != this))
5f5 = 0;
6endif
7endfor
8endif
9if (!this.heart)
10$heart:register(this);
11endif
12if (((valid(cp = caller_perms()) && (caller != this)) && (!$perm_utils:controls(cp, this))) && (caller != #0))
13return E_PERM;
14endif
15$news:check();
16$nets.sysnet:announce(this, this.name + " connected", 1);
17if (is_a(this.party, $party))
18this.party:announce(this:real_name() + " has connected.");
19endif
20this.location:update_watch(1);
21if (this:check_pref("mxp"))
22$mxp:activate(this);
23endif
24if ((total = length(connected_players())) > $login.highest_connected_players)
25$login.highest_connected_players = total;
26$nets.prognet:announce($archwiz, tostr(total, " -- all time high!"));
27endif

disfunc

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1this.client = 0;
2this:expunge_rmm();
3if (this.location != this.home)
4if (area(this) == area(this.home))
5fork (120)
6if ((is_in_a(this, $room) && (!is_connected(this))) && (!this:is_in_afterlife()))
7this:aat(this.name, " stumbles away in a daze, headed home.");
8this:_walkto(this.home, 2);
9endif
10endfork
11endif
12endif
13$sysnet:announce(this, this.name + " disconnected", 1);
14if (is_a(this.party, $party))
15this.party:announce(this:real_name() + " has disconnected.");
16endif
17`this.location:update_watch(-1) ! E_VERBNF';
18return;

initialize

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if ((caller == this) || $perm_utils:controls(caller_perms(), this))
2this.help = 0;
3this:add_feature($nets.chatnet);
4return pass(@args);
5else
6return E_PERM;
7endif

acceptable

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1return !is_player(args[1]);

my_huh

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1"Extra parsing of player commands.  Called by $command_utils:do_huh.";
2permissions = ((caller == this) || $perm_utils:controls(caller_perms(), this)) ? this | $no_one;
3"verb - obvious                 pass - would be args";
4"plist - list of prepspecs that this command matches";
5"dlist and ilist - likewise for dobjspecs, iobjspecs";
6verb = args[1];
7if ($code_utils:toint(verb))
8return;
9endif
10pass = args[2];
11plist = {"any", prepstr ? $code_utils:full_prep(prepstr) | "none"};
12dlist = dobjstr ? {"any"} | {"none", "any"};
13ilist = iobjstr ? {"any"} | {"none", "any"};
14fobjlist = {@this.wielding, @$rpg.features_for_everyone, @is_a(this, $prog) ? $rpg.features_for_programmers | {}, @this.features};
15for x in (this.location.contents)
16if (`x.feature_ok ! ANY')
17fobjlist = {@fobjlist, x};
18endif
19endfor
20area = area(this);
21"if (is_a(area, $real_area))";
22"  fobjlist = {@fobjlist, @this.implants};";
23"endif";
24if (valid(seat = this:sitting_on()))
25fobjlist = listappend(fobjlist, seat);
26elseif (valid(seat = this:reclining_on()))
27fobjlist = listappend(fobjlist, seat);
28endif
29for fobj in (fobjlist)
30if (valid(fobj) && `valid(loc = has_callable_verb(fobj, verb)[1]) ! ANY => 0')
31vargs = verb_args(loc, verb);
32if ((vargs[2] in plist) && ((vargs[1] in dlist) && (vargs[3] in ilist)))
33"(got rid of notify_huh - should write a @which command)";
34"if (this.notify_huh)";
35"player:notify(tostr(\"Using \", what.name, \" (\", what, \")\"));";
36"endif";
37set_task_perms(permissions);
38fobj:(verb)(@pass);
39"Problem with verbs of the same name. If we use which=vrb in the loop instead, we have a problem with verbs that use the variable verb.";
40return 1;
41endif
42endif
43if ($command_utils:running_out_of_time())
44player:tell("You have too many features.  Parsing your command runs out of ticks while checking ", fobj.name, " (", fobj, ").");
45return 1;
46endif
47endfor

last_huh

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1":last_huh(verb,args)  final attempt to parse a command...";
2verb = args[1];
3pass = args[2];
4"try to match ordinals, etc";
5if (player.location == #742)
6"in limbo, there is too much crap.";
7candidates = player.contents;
8else
9candidates = {@player.contents, @player.location.contents};
10endif
11if (dobjstr && (!valid(dobj)))
12dobj = $match_utils:match(dobjstr, candidates);
13endif
14if (iobjstr && (!valid(iobj)))
15iobj = $match_utils:match(iobjstr, candidates);
16endif
17"now that we may have an iobj or dobj that we didn't before, we need to reconsider all of the objects in question for verb matching";
18plist = {"any", prepstr ? $code_utils:full_prep(prepstr) | "none"};
19dlist = dobjstr ? {"any", "this"} | {"none", "any"};
20ilist = iobjstr ? {"any", "this"} | {"none", "any"};
21if (valid(dobj))
22candidates = setadd(candidates, dobj);
23endif
24if (valid(iobj))
25candidates = setadd(candidates, iobj);
26endif
27for cobj in (candidates)
28"look for the verb in question";
29if (valid(cobj) && `valid(loc = has_callable_verb(cobj, verb)[1]) ! ANY => 0')
30vargs = verb_args(loc, verb);
31if (((vargs[2] in plist) && (vargs[1] in dlist)) && (vargs[3] in ilist))
32if ((dobjstr && (vargs[1] == "this")) && (cobj != dobj))
33continue;
34elseif ((iobjstr && (vargs[3] == "this")) && (cobj != iobj))
35continue;
36elseif (!("this" in vargs))
37continue;
38endif
39"it's a match... call it";
40set_task_perms(caller_perms());
41cobj:(verb)(@pass);
42return 1;
43endif
44endif
45endfor
46set_task_perms(caller_perms());
47{verb, args} = args;
48if ((verb[1] == "@") && (prepstr in {"is", "as"}))
49"... set or show _msg property ...";
50if (!is_a(player, $immortal))
51if (verb != "@doing")
52player:tell("Sorry.  The ability to set your own custom messages was disabled.  I bet you can guess why if you really think about it.  Then again, if you were the thinking type, you probably wouldn't be trying to set that stupid message in the first place.  Have a cookie.");
53return;
54endif
55endif
56$last_huh:(verb)(@pass);
57return 1;
58else
59return 0;
60endif

my_match_object

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1":my_match_object(string [,location])";
2return $match_utils:match(args[1], {@this.contents, @this.location.contents});

tell_contents

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1{?c = this.contents} = args;
2names = {@$iu:pluralsc(), "Misc"};
3show_nonthings = 0;
4if (is_a(player, $prog))
5names = {@names, "Non-things"};
6show_nonthings = 1;
7nonthings = {};
8endif
9things = {};
10total_weight = 0;
11for x in (c)
12if (!is_a(x, $thing))
13if (show_nonthings && (!is_a(x, $decal)))
14nonthings = {@nonthings, x};
15endif
16else
17things = {@things, x};
18endif
19weight = x:weight();
20if (weight > 0)
21total_weight = total_weight + weight;
22endif
23endfor
24buckets = $iu:group_by_type(things);
25if (show_nonthings)
26buckets = {@buckets, nonthings};
27endif
28for x in [1..length(buckets)]
29if (buckets[x])
30player:tell($ansi.bold_on, names[x], ":", $ansi.reset);
31this:tell_contents_sub(buckets[x]);
32endif
33endfor
34weights = player:check_pref("weights");
35if (#594466 in $lu:slice(callers(), 1))
36weights = 0;
37endif
38if (weights)
39wtstr = tostr($ansi.cyan, "[ Total Load: ", $ansi.bold_on, $su:english_weight_short(total_weight), $ansi.bold_off, " (max ");
40wtstr = wtstr + tostr($su:english_weight_short((this:max_carry() * 4) / 7), ") ]", $ansi.reset);
41player:tell(wtstr);
42if ((is_a(this.location, #1034) || is_a(this.location, #1047)) && this.wearing)
43player:tell($ansi.cyan, "Your sopping wet clothes have gotten heavier!", $ansi.reset);
44endif
45endif

titlec

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1return `this.namec ! E_PROPNF => this:title()';

notify

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1line = args[1];
2line = this:ansi_sub(line);
3if (this.pagelen)
4if (!is_connected(this))
5"...drop it on the floor...";
6return 0;
7elseif ((caller != this) && (!$perm_utils:controls(caller_perms(), this)))
8return E_PERM;
9endif
10"...need wizard perms if this and this.owner are different, since...";
11"...only this can notify() and only this.owner can read .linebuffer...";
12if ((player == this) && (this.linetask[2] != task_id()))
13"...player has started a new task...";
14"....linetask[2] is the taskid of the most recent player task...";
15if (this.linetask[2] != this.linetask[1])
16this.linesleft = this.pagelen - 2;
17endif
18this.linetask[2] = task_id();
19endif
20"... digest the current line...";
21if (this.linelen > 0)
22lbuf = {@this.linebuffer, @this:linesplit(line, this.linelen)};
23else
24lbuf = {@this.linebuffer, line};
25endif
26"... print out what we can...";
27if (this.linesleft)
28howmany = min(this.linesleft, length(lbuf));
29for l in (lbuf[1..howmany])
30notify(this, l);
31endfor
32this.linesleft = this.linesleft - howmany;
33lbuf[1..howmany] = {};
34endif
35if (lbuf)
36"...see if we need to say ***More***";
37if (this.linetask[1] != this.linetask[2])
38"....linetask[1] is the taskid of the most recent player task";
39"...   for which ***More*** was printed...";
40this.linetask[1] = this.linetask[2];
41fork (0)
42if (lb = this.linebuffer)
43notify(this, strsub(this.more_msg, "%n", tostr(length(lb))));
44endif
45endfork
46endif
47llen = length(lbuf);
48if (llen > 500)
49"...way too much saved text, flush some of it...";
50lbuf[1..llen - 100] = {"*** buffer overflow, lines flushed ***"};
51endif
52endif
53this.linebuffer = lbuf;
54else
55if (caller != this)
56set_task_perms(caller_perms());
57endif
58if ((this.linelen > 0) && (length($ansi:strip(line)) > this.linelen))
59for l in ($su:word_wrap({line}, this.linelen))
60notify(this, l);
61endfor
62else
63notify(this, line);
64endif
65endif

notify_lines

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1if (($perm_utils:controls(caller_perms(), this) || (caller == this)) || (caller_perms() == this))
2set_task_perms(caller_perms());
3for line in ((typeof(lines = args[1]) != LIST) ? {lines} | lines)
4this:notify(tostr(line));
5endfor
6else
7return E_PERM;
8endif

linesplit

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1{line, len} = args;
2cline = {};
3while (length($ansi:strip(line)) > len)
4$cu:sin();
5cutoff = rindex(line[1..len], " ");
6if (nospace = cutoff < ((4 * len) / 5))
7cutoff = len + 1;
8nospace = line[cutoff] != " ";
9endif
10cline = {@cline, line[1..cutoff - 1]};
11line = (nospace ? " " | "") + line[cutoff..$];
12endwhile
13return {@cline, line};

linelen

Spec this none thisFlags rxdOwner #29Definer #6

Referenced by

Source

1return abs(this.linelen);

@more @m

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (player != this)
2"... somebody's being sneaky...";
3"... Can't do set_task_perms(player) since we need to be `this'...";
4"... to notify and `this.owner' to change +c properties...";
5return;
6elseif (!(lbuf = this.linebuffer))
7this.linesleft = this.pagelen - 2;
8notify(this, "*** No more ***");
9elseif (index("flush", dobjstr || "x") == 1)
10this.linesleft = this.pagelen - 2;
11notify(this, tostr("*** Flushed ***  ", length(lbuf), " lines"));
12this.linebuffer = {};
13elseif ((index("rest", dobjstr || "x") == 1) || (!this.pagelen))
14this.linesleft = this.pagelen - 2;
15for l in (lbuf)
16notify(this, l);
17endfor
18this.linebuffer = {};
19else
20howmany = min(this.pagelen - 2, llen = length(lbuf = this.linebuffer));
21for l in (lbuf[1..howmany])
22notify(this, l);
23endfor
24this.linesleft = (this.pagelen - 2) - howmany;
25this.linebuffer = lbuf[howmany + 1..llen];
26if (howmany < llen)
27notify(this, strsub(this.more_msg, "%n", tostr(llen - howmany)));
28this.linetask[1] = task_id();
29endif
30endif
31this.linetask[2] = task_id();

@wrap

Spec none any noneFlags rxdOwner #29Definer #6

Referenced by

none

Source

1if (player != this)
2"... someone is being sneaky...";
3"... Can't do set_task_perms(player) since we need to be `this'...";
4"... to notify and `this.owner' to change +c properties...";
5return;
6endif
7linelen = player.linelen;
8if (!(prepstr in {"on", "off"}))
9player:notify("Usage:  @wrap on|off");
10player:notify(tostr("Word wrap is currently ", (linelen > 0) ? "on" | "off", "."));
11return;
12endif
13player.linelen = abs(linelen) * ((prepstr == "on") ? 1 | -1);
14player:notify(tostr("Word wrap is now ", prepstr, "."));

@linelen*gth

Spec any none noneFlags rxdOwner #29Definer #6

Referenced by

none

Source

1if (callers() ? (caller != this) && (!$perm_utils:controls(caller_perms(), this)) | (player != this))
2"... somebody is being sneaky ...";
3return;
4endif
5curlen = player.linelen;
6wrap = curlen > 0;
7wrapstr = wrap ? "on" | "off";
8if (!dobjstr)
9player:notify(tostr("Usage:  ", verb, " <number>"));
10player:notify(tostr("Current line length is ", abs(curlen), ".  Word wrapping is ", wrapstr, "."));
11return;
12endif
13newlen = toint(dobjstr);
14if (newlen < 0)
15player:notify("Line length can't be a negative number.");
16return;
17elseif (newlen < 10)
18player:notify("You don't want your linelength that small.  Setting it to 10.");
19newlen = 10;
20endif
21this:set_linelength(newlen);
22player:notify(tostr("Line length is now ", abs(player.linelen), ".  Word wrapping is ", wrapstr, "."));
23if (!wrap)
24player:notify("To enable word wrapping, type `@wrap on'.");
25endif

@pagelen*gth

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"@pagelength number  -- sets page buffering to that many lines (or 0 to turn off page buffering)";
2if (player != this)
3"... somebody is being sneaky ...";
4"... Can't do set_task_perms(player) since we need to be `this'...";
5"... to notify and `this.owner' to change +c properties...";
6return;
7elseif (!dobjstr)
8notify(player, tostr("Usage:  ", verb, " <number>"));
9notify(player, tostr("Current page length is ", player.pagelen, "."));
10return;
11elseif (0 > (newlen = toint(dobjstr)))
12notify(player, "Page length can't be a negative number.");
13return;
14elseif (newlen == 0)
15player.pagelen = 0;
16notify(player, "Page buffering off.");
17if (lb = this.linebuffer)
18"queued text remains";
19this:notify_lines(lb);
20clear_property(this, "linebuffer");
21endif
22elseif (newlen < 5)
23player.pagelen = 5;
24notify(player, "Too small.  Setting it to 5.");
25else
26notify(player, tostr("Page length is now ", player.pagelen = newlen, "."));
27endif
28if (this.linebuffer)
29notify(this, strsub(this.more_msg, "%n", tostr(length(this.linebuffer))));
30player.linetask = {task_id(), task_id()};
31player.linesleft = 0;
32else
33player.linetask = {0, task_id()};
34player.linesleft = player.pagelen - 2;
35endif

whodunnit

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1{record, trust, mistrust} = args;
2s = {this, "???", this};
3for w in (record)
4if (((((!valid(s[3])) || s[3].wizard) || (s[3] in trust)) && (!(s[3] in mistrust))) || (s[1] == this))
5s = w;
6else
7return s;
8endif
9endfor
10return s;

wh*isper

Spec any at/to thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1msg = player:text_sub(dobjstr);
2this:tell(player:name(), " whispers, \"", dobjstr, "\"");
3player:tell("You whisper, \"", dobjstr, "\" to ", this:name(), ".");

receive_page

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"called by $player:page.  Two args, the page header and the text, all pre-processed by the page command.  Could be extended to provide haven abilities, multiline pages, etc.  Indeed, at the moment it just does :tell_lines, so we already do have multiline pages, if someone wants to take advantage of it.";
2"Return codes:";
3"  1:  page was received";
4"  2:  player is not connected";
5"  0:  page refused";
6"If a specialization wants to refuse a page, it should return 0 to say it was refused.  If it uses pass(@args) it should propagate back up the return value.  It is possible that this code should interact with gagging and return 0 if the page was gagged.";
7if (this:is_listening())
8for x in (args)
9this:tell($ansi:page(x));
10endfor
11return 1;
12else
13return 2;
14endif

page_origin_msg page_echo_msg page_absent_msg

Spec this none thisFlags rxdOwner #29Definer #6

Referenced by

none

Source

1"set_task_perms(this.owner)";
2return (msg = `this.(verb) ! ANY') ? $string_utils:pronoun_sub(this.(verb), this) | "";

i inv*entory

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (player.client)
2player:notify("#$# inventory");
3endif
4if (c = player:contents())
5this:tell_contents(c);
6this:tell_encumbrance();
7else
8player:tell("You are empty-handed.");
9endif

display_option

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1":display_option(name) => returns the value of the specified @display option";
2if ((caller == this) || $perm_utils:controls(caller_perms(), this))
3return $display_options:get(this.display_options, args[1]);
4else
5return E_PERM;
6endif

edit_option

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1":edit_option(name) => returns the value of the specified edit option";
2if ((caller == this) || ($object_utils:isa(caller, $generic_editor) || $perm_utils:controls(caller_perms(), this)))
3return $edit_options:get(this.edit_options, args[1]);
4else
5return E_PERM;
6endif

set_mail_option set_edit_option set_display_option

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1":set_edit_option(oname,value)";
2":set_display_option(oname,value)";
3":set_mail_option(oname,value)";
4"Changes the value of the named option.";
5"Returns a string error if something goes wrong.";
6if (!((caller == this) || $perm_utils:controls(caller_perms(), this)))
7return tostr(E_PERM);
8endif
9"...this is kludgy, but it saves me from writing the same verb 3 times.";
10"...there's got to be a better way to do this...";
11verb[1..4] = "";
12foo_options = verb + "s";
13"...";
14if (typeof(s = #0.(foo_options):set(this.(foo_options), @args)) == STR)
15return s;
16elseif (s == this.(foo_options))
17return 0;
18else
19this.(foo_options) = s;
20return 1;
21endif

@mailo*ptions @mail-o*ptions @edito*ptions @edit-o*ptions @displayo*ptions @display-o*ptions

Spec any any anyFlags rxdOwner #361Definer #6

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 = {"mail", "edit", "display"}[index("med", verb[2])];
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

set_name

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1"set_name(newname) attempts to change this.name to newname";
2"  => E_PERM   if you don't own this";
3"  => E_INVARG if the name is already taken or prohibited for some reason";
4"  => E_NACC   if the player database is not taking new names right now.";
5"  => E_ARGS   if the name is too long (controlled by $login.max_player_name)";
6if (!($perm_utils:controls(caller_perms(), this) || (this == caller)))
7return E_PERM;
8elseif (!is_player(this))
9"we don't worry about the names of player classes.";
10set_task_perms(caller_perms());
11return pass(@args);
12elseif ($player_db.frozen)
13return E_NACC;
14elseif (length(name = args[1]) > $login.max_player_name)
15return E_ARGS;
16elseif (!($player_db:available(name, this) in {this, 1}))
17return E_INVARG;
18else
19old = this.name;
20this.name = name;
21if ((name != old) && (!(old in this.aliases)))
22$player_db:delete(old);
23endif
24$player_db:insert(name, this);
25return 1;
26endif

set_aliases

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1"set_aliases(alias_list)";
2"For changing player aliases, we check to make sure that none of the aliases match existing player names/aliases.  Aliases containing spaces are not entered in the $player_db and so are not subject to this restriction ($string_utils:match_player will not match on them, however, so they only match if used in the immediate room, e.g., with match_object() or somesuch).";
3"Also we make sure that the .name is included in the .alias list.  In any situation where .name and .aliases are both being changed, do the name change first.";
4"  => 1        if successful, and aliases changed from previous setting.";
5"  => 0        if resulting work didn't change aliases from previous.";
6"  => E_PERM   if you don't own this";
7"  => E_NACC   if the player database is not taking new aliases right now.";
8"  => E_TYPE   if alias_list is not a list";
9"  => E_INVARG if any element of alias_list is not a string";
10if (!($perm_utils:controls(caller_perms(), this) || (this == caller)))
11return E_PERM;
12elseif (!is_player(this))
13"we don't worry about the names of player classes.";
14return pass(@args);
15elseif ($player_db.frozen)
16return E_NACC;
17elseif (typeof(aliases = args[1]) != LIST)
18return E_TYPE;
19elseif ((length(aliases = setadd(aliases, this.name)) > ($object_utils:has_property($local, "max_player_aliases") ? $local.max_player_aliases | $maxint)) && (length(aliases) >= length(this.aliases)))
20return E_INVARG;
21else
22for a in (aliases)
23if (typeof(a) != STR)
24return E_INVARG;
25endif
26if ((!(index(a, " ") || index(a, "	"))) && (!($player_db:available(a, this) in {this, 1})))
27aliases = setremove(aliases, a);
28endif
29endfor
30changed = 0;
31old = this.aliases;
32this.aliases = aliases;
33for a in (old)
34yield;
35if (!(a in aliases))
36$player_db:delete2(a, this);
37changed = 1;
38endif
39endfor
40for a in (aliases)
41if (!(index(a, " ") || index(a, "	")))
42$player_db:insert(a, this);
43if (!(a in old))
44changed = 1;
45endif
46endif
47endfor
48return changed;
49endif

@rename*#

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

Referenced by

none

Source

1if ((player != caller) || (player != this))
2return;
3endif
4if (!player.programmer)
5return player:notify(tostr(E_PERM));
6endif
7set_task_perms(player);
8bynumber = verb == "@rename#";
9spec = $code_utils:parse_verbref(dobjstr);
10if (spec)
11object = this:my_match_object(spec[1]);
12if (!$command_utils:object_match_failed(object, spec[1]))
13vname = spec[2];
14if (bynumber)
15vname = $code_utils:toint(vname);
16if (vname == E_TYPE)
17return player:notify("Verb number expected.");
18elseif ((vname < 1) || `vname > length(verbs(object)) ! E_PERM => 0')
19return player:notify("Verb number out of range.");
20endif
21endif
22try
23info = verb_info(object, vname);
24try
25result = set_verb_info(object, vname, listset(info, iobjstr, 3));
26player:notify("Verb name changed.");
27except e (ANY)
28player:notify(e[2]);
29endtry
30except (E_VERBNF)
31player:notify("That object does not define that verb.");
32except e (ANY)
33player:notify(e[2]);
34endtry
35endif
36elseif (bynumber)
37player:notify("@rename# can only be used with verbs.");
38elseif (pspec = $code_utils:parse_propref(dobjstr))
39if (!player.programmer)
40return player:notify(tostr(E_PERM));
41endif
42object = this:my_match_object(pspec[1]);
43if (!$command_utils:object_match_failed(object, pspec[1]))
44pname = pspec[2];
45try
46info = property_info(object, pname);
47try
48result = set_property_info(object, pname, {@info, iobjstr});
49player:notify("Property name changed.");
50except e (ANY)
51player:notify(e[2]);
52endtry
53except (E_PROPNF)
54player:notify("That object does not define that property.");
55except e (ANY)
56player:notify(e[2]);
57endtry
58endif
59else
60object = this:my_match_object(dobjstr);
61if (!$command_utils:object_match_failed(object, dobjstr))
62old_name = object.name;
63old_aliases = object.aliases;
64if (e = $building_utils:set_names(object, iobjstr))
65if (strcmp(object.name, old_name) == 0)
66name_message = tostr("Name of ", object, " (", old_name, ") is unchanged");
67else
68name_message = tostr("Name of ", object, " changed to \"", object.name, "\"");
69endif
70aliases = $string_utils:from_value(object.aliases, 1);
71if (object.aliases == old_aliases)
72alias_message = tostr(".  Aliases are unchanged (", aliases, ").");
73else
74alias_message = tostr(", with aliases ", aliases, ".");
75endif
76player:notify(name_message + alias_message);
77elseif (e == E_INVARG)
78player:notify("That particular name change not allowed (see help @rename).");
79if (object == player)
80player:notify($player_db:why_bad_name(player, iobjstr));
81endif
82elseif (e == E_NACC)
83player:notify("Oops.  You can't update that name right now; try again in a few minutes.");
84elseif (e == E_ARGS)
85player:notify(tostr("Sorry, name too long.  Maximum number of characters in a name:  ", $login.max_player_name));
86elseif (e == 0)
87player:notify("Name and aliases remain unchanged.");
88else
89player:notify(tostr(e));
90endif
91endif
92endif

@desc*ribe

Spec any as anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1set_task_perms(player);
2dobj = player:my_match_object(dobjstr);
3if ($command_utils:object_match_failed(dobj, dobjstr))
4"...lose...";
5elseif (dobj != player)
6player:tell("You can only set your own description.");
7elseif (index(iobjstr, "~"))
8player:notify("Invalid characters included.");
9elseif (e = dobj:set_description(iobjstr))
10player:notify("Description set.");
11"$skills.cool:flush(this);";
12else
13player:notify(tostr(e));
14endif

@mess*ages

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1set_task_perms(player);
2if (dobjstr == "")
3player:notify(tostr("Usage:  ", verb, " <object>"));
4return;
5endif
6dobj = player:my_match_object(dobjstr);
7if ($command_utils:object_match_failed(dobj, dobjstr))
8return;
9endif
10found_one = 0;
11if ((!is_a(player, $builder)) && (dobj.owner != player))
12player:notify("Try something you own instead.");
13return;
14endif
15props = $object_utils:all_properties(dobj);
16if (typeof(props) == ERR)
17player:notify("You can't read the messages on that.");
18return;
19endif
20player:tell((($ansi.bg_blue + $ansi.white) + $ansi.bold_on) + $ansi.underline_on, "Messages on ", $su:nn(dobj), "   ", $ansi.reset);
21mp = {};
22for pname in (props)
23if (!(pname in {"help_msg", "phelp_msg"}))
24len = length(pname);
25if ((len > 4) && (pname[len - 3..len] == "_msg"))
26found_one = 1;
27msg = `dobj.(pname) ! ANY';
28if (msg == E_PERM)
29value = "isn't readable by you.";
30elseif (!msg)
31value = "isn't set.";
32elseif (typeof(msg) == LIST)
33value = $su:from_list(msg, " | ");
34value = ("{" + value) + "}";
35elseif (typeof(msg) != STR)
36value = "is corrupted! **";
37else
38value = msg;
39endif
40mp = {@mp, {pname[1..len - 4], value}};
41endif
42endif
43endfor
44longest = 0;
45for x in (mp)
46if ((l = length(x[1])) > longest)
47longest = l;
48endif
49endfor
50mp = $lu:sort_alist(mp, 1);
51for x in (mp)
52player:tell($ansi.yellow, $ansi.bold_on, $su:left(x[1], 0 - (longest + 2)), $ansi.bold_off, x[2], $ansi.reset);
53endfor
54if (!player.programmer)
55player:tell("(To set a message: @message ", dobj.name, " is \"Something something.\")");
56player:tell("(What are all those percents?  'help pronouns' to learn more.)");
57endif

@gender

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1set_task_perms(valid(caller_perms()) ? caller_perms() | player);
2if (!args)
3player:notify(tostr("Your gender is currently ", this.gender, "."));
4player:notify($string_utils:pronoun_sub("Your pronouns:  %s,%o,%p,%q,%r,%S,%O,%P,%Q,%R"));
5player:notify("Available genders:  male, female, neuter.");
6elseif (!(args[1] in {"male", "female", "neuter"}))
7player:notify("Sorry, you can only pick from male, female, and neuter for your gender.  To set your gender, just type '@gender <gender>'.");
8else
9if ((this.gender == "unset") || is_a(this, $immortal))
10if (args[1] == "female")
11player:notify("Are you SURE you want to pretend to be a woman?  You only get to make this decision once (barring expensive surgery).");
12else
13player:notify(("Are you SURE you want to be " + args[1]) + "?  You only get to make this decision once (barring expensive surgery).");
14endif
15if (!$command_utils:yes_or_no())
16player:notify("Okay, aborted.");
17return;
18endif
19else
20player:notify(("Sorry, you're already " + this.gender) + ".  If you really feel like you were meant to be another gender, talk to an expert medic.");
21return;
22endif
23result = this:set_gender(args[1], 1);
24if (args[1] == "male")
25$bodyparts.penis:add_to(this);
26$bodyparts.chest:add_to(this);
27elseif (args[1] == "female")
28$bodyparts.vagina:add_to(this);
29$bodyparts.breasts:add_to(this);
30endif
31quote = (result == E_NONE) ? "\"" | "";
32player:notify(tostr("Gender set to ", quote, this.gender, quote, "."));
33if (typeof(result) != ERR)
34player:notify($string_utils:pronoun_sub("Your pronouns:  %s,%o,%p,%q,%r,%S,%O,%P,%Q,%R"));
35elseif (result != E_NONE)
36player:notify(tostr("Couldn't set pronouns:  ", result));
37else
38player:notify("Pronouns unchanged.");
39endif
40endif

ex*amine x

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1set_task_perms(player);
2if (!this:can_see())
3this:tell("It's too dark to see much of anything.");
4return;
5endif
6if (!dobjstr)
7dobjstr = "here";
8endif
9what = $match_utils:match(dobjstr, {@player.contents, @player.location.contents, player.location});
10if ($command_utils:object_match_failed(what, dobjstr))
11return;
12endif
13yield 1;
14what:do_examine(player);

add_feature

Spec this none thisFlags rxdOwner #29Definer #6

Referenced by

Source

1"Add a feature to this player's features list.  Caller must be this or have suitable permissions (this or wizardly).";
2"If this is a nonprogrammer, then ask feature if it is feature_ok (that is, if it has a verb :feature_ok which returns a true value, or a property .feature_ok which is true).";
3"After adding feature, call feature:feature_add(this).";
4"Returns true if successful, E_INVARG if not a valid object, and E_PERM if !feature_ok or if caller doesn't have permission.";
5if ((caller == this) || $perm_utils:controls(caller_perms(), this))
6feature = args[1];
7if ((typeof(feature) != OBJ) || (!valid(feature)))
8return E_INVARG;
9"Not a valid object.";
10endif
11if ($code_utils:verb_or_property(feature, "feature_ok", this))
12"The object is willing to be a feature.";
13if (typeof(this.features) == LIST)
14"If list, we can simply setadd the feature.";
15this.features = setadd(this.features, feature);
16else
17"If not, we erase the old value and create a new list.";
18this.features = {feature};
19endif
20"Tell the feature it's just been added.";
21$ou:has_verb(feature, "feature_add") && feature:feature_add(this);
22return 1;
23"We're done.";
24else
25return E_PERM;
26"Feature isn't feature_ok.";
27endif
28else
29return E_PERM;
30"Caller doesn't have permission.";
31endif

remove_feature

Spec this none thisFlags rxdOwner #29Definer #6

Referenced by

Source

1"Remove a feature from this player's features list.  Caller must be this, or have permissions of this, a wizard, or feature.owner.";
2"Returns true if successful, E_PERM if caller didn't have permission.";
3feature = args[1];
4if (((caller == this) || $perm_utils:controls(caller_perms(), this)) || (caller_perms() == feature.owner))
5if (typeof(this.features) == LIST)
6"If this is a list, we can just setremove...";
7this.features = setremove(this.features, feature);
8"Otherwise, we leave it alone.";
9endif
10"Let the feature know it's been removed.";
11$ou:has_verb(feature, "feature_remove") && feature:feature_remove(this);
12return 1;
13"We're done.";
14else
15return E_PERM;
16"Caller didn't have permission.";
17endif

@quit

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"if ((!(verb in {\"ragequit\", \"@ragequit\", \"forcequit\", \"@forcequit\", \"@forcejoyquit\"})) && (player.location != player.home))";
2"  if ((!is_a(player.location, #483)) || (!player.location:permits(player)))";
3"    if (!(player.location in {#47385}))";
4"      player:tell(\"This is not your home! Are you sure you want to log off here?\");";
5"      player:tell(\"If it is your apartment and you are getting this message, try @sethome then @quit again.\");";
6"      player:tell(\"If you do not care, use @forcequit\");";
7"      return;";
8"    endif";
9"  endif";
10"endif";
11"holders = is_a(player.employer, $biz) ? player.employer.ranks[\"holders\"] | {};";
12if (gamevalid(mcp_session = $mcp:session_for(player)) && mcp_session:handles_package($mcp.packages.client))
13$mcp.packages.client:send_disconnect(player);
14endif
15boot_player(player);

examine_commands_ok

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1return this == args[1];

is_listening

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1"return true if player is active.";
2return typeof(`idle_seconds(this) ! ANY') != ERR;

announce announce_all_but announce_all

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1return this.location:(verb)(@args);
2"temporarily let player:announce be noisy to player";
3if (verb == "announce_all_but")
4if (this in args[1])
5return;
6endif
7args = args[2..$];
8endif
9this:tell("(from within you) ", @args);

linewrap

Spec this none thisFlags rxdOwner #29Definer #6

Referenced by

none

Source

1"Return a true value if this needs linewrapping.";
2"default is true if .linelen > 0";
3return this.linelen > 0;

ownership_quota

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if ($perm_utils:controls(caller_perms(), this))
2return this.(verb);
3else
4return E_PERM;
5endif

set_linelength

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1"Set linelength.  Linelength must be an integer >= 10.";
2"If wrap is currently off (i.e. linelength is less than 0), maintains sign.  That is, this function *takes* an absolute value, and coerces the sign to be appropriate.";
3"If you want to override the dwimming of wrap, pass in a second argument.";
4"returns E_PERM if not allowed, E_INVARG if linelength is too low, otherwise the linelength.";
5if ((caller != this) && (!$perm_utils:controls(caller_perms(), this)))
6return E_PERM;
7elseif (abs(len = args[1]) < 10)
8return E_INVARG;
9elseif (length(args) > 1)
10this.linelen = len;
11else
12"DWIM here.";
13this.linelen = (this.linelen > 0) ? len | (-len);
14return len;
15endif

set_pagelength

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Set pagelength. Must be an integer >= 5, or 0 to turn pagelength off.";
2"Returns E_PERM if you shouldn't be doing this, E_INVARG if it's too low, otherwise, what it got set to.";
3if ((caller != this) && (!$perm_utils:controls(caller_perms(), this)))
4return E_PERM;
5elseif (((len = args[1]) < 5) && (len != 0))
6return E_INVARG;
7else
8if ((this.pagelen = len) == 0)
9if (lb = this.linebuffer)
10"queued text remains";
11this:notify_lines(lb);
12clear_property(this, "linebuffer");
13endif
14endif
15return len;
16endif

set_home

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"set_home(newhome) attempts to change this.home to newhome";
2"E_TYPE   if newhome doesn't have a callable :accept_for_abode verb.";
3"E_INVARG if newhome won't accept you as a resident.";
4"E_PERM   if you don't own this and aren't its parent.";
5"1        if it works.";
6newhome = args[1];
7if ((caller == this) || $perm_utils:controls(caller_perms(), this))
8if ($object_utils:has_callable_verb(newhome, "accept_for_abode"))
9if (newhome:accept_for_abode(this))
10return (typeof(e = `this.home = args[1] ! ANY') != ERR) || e;
11else
12return E_INVARG;
13endif
14else
15return E_TYPE;
16endif
17else
18return E_PERM;
19endif

@registerme

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"@registerme as <email-address> -- enter a new email address for player";
2"   will change the database entry, assign a new password, and mail the new password to the player at the given email address.";
3if (player != this)
4return player:notify(tostr(E_PERM));
5endif
6who = this;
7if ($object_utils:isa(this, $guest))
8who:notify("Sorry, guests should use the '@request' command to request a character.");
9return;
10endif
11connection = $string_utils:connection_hostname(connection_name(who));
12if (!argstr)
13if ($wiz_utils:get_email_address(who))
14player:tell("You are currently registered as:  ", $wiz_utils:get_email_address(who));
15else
16player:tell("You are not currently registered.");
17endif
18player:tell("Use @registerme as <address> to change this.");
19return;
20elseif (((prepstr != "as") || (!iobjstr)) || dobjstr)
21player:tell("Usage: @registerme as <address>");
22return;
23endif
24email = iobjstr;
25if (email == $wiz_utils:get_email_address(this))
26who:notify("That is your current address.  Not changed.");
27return;
28elseif (reason = $wiz_utils:check_reregistration(this, email, connection))
29if (reason[1] == "-")
30if (!$command_utils:yes_or_no(reason[2..$] + ". Automatic registration not allowed. Ask to be registered at this address anyway?"))
31who:notify("Okay.");
32return;
33endif
34else
35return who:notify(tostr(reason, " Please try again."));
36endif
37endif
38if ($network.active && (!reason))
39if (!$command_utils:yes_or_no(tostr("If you continue, your password will be changed, the new password mailed to `", email, "'. Do you want to continue?")))
40return who:notify("Registration terminated.");
41endif
42password = $wiz_utils:random_password(5);
43old = $wiz_utils:get_email_address(who) || "[ unregistered ]";
44who:notify(tostr("Registering you, and changing your password and mailing new one to ", email, "."));
45result = $network:sendmail(email, tostr("Your ", $network.MOO_Name, " character, ", who.name), "Reply-to: " + $login.registration_address, @$generic_editor:fill_string(tostr("Your ", $network.MOO_name, " character, ", $string_utils:nn(who), " has been registered to this email address (", email, "), and a new password assigned.  The new password is `", password, "'. Please keep your password secure. You can change your password with the @password command."), 75));
46if (result != 0)
47who:notify(tostr("Mail sending did not work: ", reason, ". Reregistration terminated."));
48return;
49endif
50who:notify(tostr("Mail with your new password forwarded. If you do not get it, send regular email to ", $login.registration_address, " with your character name."));
51$mail_agent:send_message($new_player_log, $new_player_log, "reg " + $string_utils:nn(this), {email, tostr("formerly ", old)});
52$registration_db:add(this, email, "Reregistered at " + ctime());
53$wiz_utils:set_email_address(this, email);
54who.password = crypt(password);
55who.last_password_time = time();
56else
57who:notify("No automatic reregistration: your request will be forwarded.");
58if (typeof(curreg = $registration_db:find(email)) == LIST)
59additional_info = {"Current registration information for this email address:", @$registration_db:describe_registration(curreg)};
60else
61additional_info = {};
62endif
63$mail_agent:send_message(this, $registration_db.registrar, "Registration request", {((("Reregistration request from " + $string_utils:nn(who)) + " connected via ") + connection) + ":", "", (("@register " + who.name) + " ") + email, ("@new-password " + who.name) + " is ", "", "Reason this request was forwarded:", reason, @additional_info});
64endif

ctime

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1":ctime([INT time]) => STR as the function.";
2"May be hacked by players and player-classes to reflect differences in time-zone.";
3return ctime(@args);

news

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Usage: news [contents] [articles]";
2"";
3"Common uses:";
4"news           -- display all current news, or as @mail-options decree";
5"news new       -- display articles you haven't seen yet";
6"news all       -- display all current news";
7"news contents  -- display headers of current news";
8"news <article> -- display article";
9"news archive   -- display news which has been marked as archived.";
10set_task_perms(player);
11cur = this:get_current_message($news) || {0, 0};
12arch = 0;
13if (((!args) && (o = player:mail_option("news"))) && (o != "all"))
14"no arguments, use the player's default";
15args = {o};
16elseif (args == {"all"})
17args = {};
18elseif (args == {"archive"})
19arch = 1;
20args = {};
21endif
22if (hdrs_only = args && (args[1] == "contents"))
23"Do the mail contents list";
24args[1..1] = {};
25endif
26if (args)
27if (typeof(seq = $news:_parse(args, @cur)) == STR)
28player:notify(seq);
29return;
30elseif (seq = $seq_utils:intersection(seq, $news.current_news))
31else
32player:notify((args == {"new"}) ? "No new news." | "None of those are current articles.");
33return;
34endif
35elseif (arch && (seq = $news.archive_news))
36"yduJ hates this coding style.  Just so you know.";
37elseif (seq = $news.current_news)
38else
39player:notify("No news");
40return;
41endif
42if (hdrs_only)
43$news:display_seq_headers(seq, @cur);
44else
45player:set_current_message($news, @$news:news_display_seq_full(seq));
46endif

notify_lines_suspended

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1if (($perm_utils:controls(caller_perms(), this) || (caller == this)) || (caller_perms() == this))
2set_task_perms(caller_perms());
3for line in ((typeof(lines = args[1]) != LIST) ? {lines} | lines)
4$command_utils:suspend_if_needed(0);
5this:notify(tostr(line));
6endfor
7else
8return E_PERM;
9endif

_chparent

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1set_task_perms(caller_perms());
2return chparent(@args);

@password

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (typeof(player.password) != STR)
2if (length(args) != 1)
3return player:notify(tostr("Usage:  ", verb, " <new-password>"));
4else
5new_password = args[1];
6endif
7elseif (length(args) != 2)
8player:notify(tostr("Usage:  ", verb, " <old-password> <new-password>"));
9return;
10elseif (player.password != crypt(tostr(args[1]), player.password))
11player:notify("That's not your old password.");
12return;
13elseif (is_clear_property(player, "password"))
14player:notify("Your password has a `clear' property.  Please refer to a wizard for assistance in changing it.");
15return;
16else
17new_password = args[2];
18endif
19if (r = $password_verifier:reject_password(new_password, player))
20player:notify(r);
21return;
22endif
23player.password = crypt(tostr(new_password));
24player.last_password_time = time();
25player:notify("New password set.");

recycle

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if ((caller == this) || $perm_utils:controls(caller_perms(), this))
2pass(@args);
3features = this.features;
4"Have to do this, or :feature_remove thinks you're a liar and doesn't believe.";
5this.features = {};
6for x in (features)
7try
8x:feature_remove(this);
9except (ANY)
10"Ignore errors";
11endtry
12$command_utils:suspend_if_needed(0);
13endfor
14endif

email_address

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1set_task_perms(caller_perms());
2return this.email_address;

set_email_address

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1set_task_perms(caller_perms());
2this.email_address = args[1];

reconfunc

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (((valid(cp = caller_perms()) && (caller != this)) && (!$perm_utils:controls(cp, this))) && (caller != $sysobj))
2return E_PERM;
3endif
4return this:confunc(@args);

check_pref

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1{pref} = args;
2if (pref == "ansi")
3return this.(pref);
4endif
5if (typeof(check = `this.prefs[pref] ! ANY') != ERR)
6return check;
7endif
8if (typeof(check = `$prefs[pref] ! ANY') != ERR)
9return check[1];
10endif
11"if nothing matched we got an invalid pref name";
12return E_INVARG;

@pref @prefs

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1words = args;
2if (!words)
3this:list_pref_categories();
4return;
5endif
6value = "";
7if (length(words) == 1)
8if (words[1][1] == "+")
9value = 1;
10elseif (words[1][1] == "-")
11value = 0;
12elseif (words[1] in $lu:slice($hu:flatten($prefs, 1), 3))
13this:list_prefs(words[1]);
14return;
15elseif ((words[1] == "all") || (words[1] == "any"))
16this:list_prefs();
17return;
18else
19player:tell("Usage: ", verb, " +<pref>, or -<pref>, or <pref> is <value> or <category>");
20return;
21endif
22(typeof(value) == INT) && (pref = words[1][2..$]);
23elseif ((length(words) != 3) || (words[2] != "is"))
24player:tell("Usage: ", verb, " <pref> is <value>");
25return;
26else
27pref = words[1];
28if ((words[3] == "off") || (words[3] == "0"))
29value = 0;
30elseif ((words[3] == "on") || (words[3] == "1"))
31value = 1;
32endif
33endif
34this:set_pref(pref, value);

list_prefs

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1{?category = 0} = args;
2prefs = {};
3for kvp in ($prefs)
4{name, setup} = kvp;
5if ((!category) || (category == setup[2]))
6if (((name in player.prefs) || player.programmer) || (!setup[4]))
7prefs = setadd(prefs, {name, @setup});
8endif
9endif
10endfor
11if (prefs)
12prefs = $lu:sort_alist(prefs, 1);
13lines = {};
14for pref in (prefs)
15lines = listappend(lines, {pref[1], this:check_pref(pref[1]) ? ($ansi.green + "on") + $ansi.reset | (($ansi.red + "off") + $ansi.reset), pref[4]});
16endfor
17player:tell_lines($su:make_table((($ansi.bg_blue + $ansi.white) + $ansi.bold_on) + $ansi.underline_on, {"Preference", "Value", "Description"}, {"", "", ""}, lines, {15, 5, 55}));
18else
19player:tell("You have no preferences!");
20endif

parse_command

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1":parse_command(STR command) => { STR verbstr, STR dobjstr, STR prepstr, STR iobjstr, STR argstr}";
2command = args[1];
3"first pick the verb string off the beginning";
4command = $su:triml(command);
5if (verbsep = index(command, " "))
6verbstr = command[1..verbsep - 1];
7argstr = command[verbsep + 1..$];
8subject = argstr;
9else
10"we only got a verb, no args";
11return {command, "", "", "", ""};
12endif
13"look for quoted text";
14encoding = 0;
15encoded_subject = "";
16for x in [1..length(subject)]
17if ((x != 1) && (subject[x - 1] == "\\"))
18char = subject[x];
19encoded_subject = encoded_subject[1..$ - 1];
20elseif (subject[x] == "~")
21encoded_subject = encoded_subject + "~";
22char = "~";
23"this will produce ~~ which will come back as a single ~ in decode_binary() later";
24elseif (encoding && (subject[x] == "\""))
25encoding = 0;
26char = "\"";
27elseif (((!encoding) && (subject[x] == "\"")) && (x != length(subject)))
28"make sure we have a closing quote";
29for y in [x + 1..length(subject)]
30if ((subject[y] == "\"") && (subject[y - 1] != "\\"))
31encoding = 1;
32break;
33endif
34endfor
35char = "\"";
36elseif (encoding && (subject[x] == " "))
37char = "~20";
38else
39char = subject[x];
40endif
41encoded_subject = encoded_subject + char;
42endfor
43preps = {"with", "using", "at", "to", "in front of", "in", "inside", "into", "on top of", "on", "onto", "upon", "out of", "from inside", "from", "over", "through", "under", "underneath", "beneath", "behind", "beside", "for", "about", "is", "as", "off of", "off"};
44for prep in (preps)
45if (prepidx = index(encoded_subject, prep))
46if (((prepidx == 1) && (length(argstr) > length(prep))) && (argstr[length(prep) + 1] != " "))
47continue;
48elseif ((prepidx != 1) && (argstr[prepidx - 1] != " "))
49continue;
50elseif ((((prepidx + length(prep)) - 1) != length(argstr)) && (argstr[prepidx + length(prep)] != " "))
51continue;
52endif
53prepstr = prep;
54prepend = (prepidx + length(prep)) - 1;
55if (prepidx > 1)
56dobjstr = argstr[1..prepidx - 2];
57dobjstr = $su:trim(dobjstr);
58dobjstr = $su:trim(dobjstr, "\"");
59decode = decode_binary(dobjstr);
60dobjstr = "";
61for z in (decode)
62if (typeof(z) == NUM)
63dobjstr = dobjstr + $su:from_ascii(z);
64else
65dobjstr = dobjstr + z;
66endif
67endfor
68else
69dobjstr = "";
70endif
71if ((prepend + 2) > length(argstr))
72iobjstr = "";
73else
74iobjstr = argstr[prepend + 2..$];
75iobjstr = $su:trim(iobjstr);
76iobjstr = $su:trim(iobjstr, "\"");
77decode = decode_binary(iobjstr);
78iobjstr = "";
79for z in (decode)
80if (typeof(z) == NUM)
81iobjstr = iobjstr + $su:from_ascii(z);
82else
83iobjstr = iobjstr + z;
84endif
85endfor
86endif
87return {verbstr, dobjstr, prepstr, iobjstr, argstr};
88endif
89endfor
90"if no prep was found, then the whole argstr is considered dobjstr";
91dobjstr = argstr;
92iobjstr = "";
93prepstr = "";
94return {verbstr, dobjstr, prepstr, iobjstr, argstr};

_walkto

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1where = args[1];
2delay = args[2];
3pincher = (length(args) > 2) ? args[3] | #-1;
4count = 0;
5lastrooms = {};
6fork (0)
7while ((count < 50) && (this.location != where))
8if (this.location in lastrooms)
9return;
10endif
11lastrooms = {@lastrooms, this.location};
12nexthop = this.location:next_hop_to(where);
13if (valid(nexthop))
14if (nexthop:pinch_ok(this))
15if (nexthop.otherside.location == this.home)
16if ((this.home == #445) || (!length($lu:remove_if_not($bf, "is_connected", setremove(this.location:occupants($player), pincher)))))
17this:aat(this:name() + " goes home.");
18this:moveto(nexthop.otherside.location);
19this:aat(this:name() + " comes home and passes out.");
20endif
21else
22nexthop:move(this);
23endif
24else
25return;
26endif
27else
28return;
29endif
30suspend(delay);
31count = count + 1;
32endwhile
33endfork

match_verb

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

No program (verb defined but unprogrammed).

ansi_sub

Spec this none thisFlags rxOwner #361Definer #6

Referenced by

Source

1"Put asterisks around things NPCs say in bold; strip all other codes entirely.";
2"If ansihack == 1, sub out bold_off codes with reset codes.";
3s = args[1];
4if ((!this.ansi) || this.ansihack)
5if (!`connected_seconds(this) ! ANY => 0')
6return args[1];
7endif
8endif
9if (!this.ansi)
10do_replace = 0;
11for thing in ($lu:slice(callers()))
12if (is_a(thing, $npc))
13do_replace = 1;
14break;
15endif
16endfor
17while (spec = match(s, "~1%([bB]%[[0-9;]+m%)"))
18code = s[spec[3][1][1]..spec[3][1][2]];
19repl = "";
20if (do_replace && (code in {"b[1m", "b]22m", "b[0m"}))
21repl = "*";
22endif
23s = (s[1..spec[1] - 1] + repl) + s[spec[2] + 1..$];
24endwhile
25return s;
26else
27if (this.ansihack)
28s = strsub(s, $ansi.bold_off, $ansi.reset);
29return s;
30endif
31endif
32return s;

take_damage

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1if (this.location == #485)
2msg = tostr(this.name, " took ", args[2], " of ", args[1], " damage on their ", args[3], ".");
3if (length(args) > 3)
4msg = tostr(msg, " Attacker was ", $su:nn(args[4]), ".");
5endif
6$nets.gamenet:announce(this, msg, 1);
7return;
8endif
9h = this.health;
10r = pass(@args);
11if (this.health != h)
12meter = $meter_utils:damage_for(this, h, this.health, this.health_max);
13ouch = #635:select("damage_meter", r * 3, $bodypart);
14this:tell(((((meter + "  ") + $ansi.bold_on) + ouch) + ((args[3] == $bodypart) ? "" | (("  Your " + args[3].name) + "!"))) + $ansi.reset);
15this.last_hit_meter = meter;
16endif
17return r;

page pgae pgage

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

Source

1{?whostr = "", @text} = args;
2if (!whostr)
3player:tell("Usage: page <person> <message>");
4return;
5endif
6if (whostr != "help")
7if ((!area(player):may_chat()) || (!player:may_chat()))
8player:tell("Something seems to be blocking your wristpad signal.");
9return;
10endif
11endif
12if (whostr == "npc")
13if (!text)
14return player:tell("usage: page npc <name> <message>");
15endif
16whostr = text[1];
17text = text[2..$];
18who = $mu:match(whostr, {@$rpg.page_npcs});
19if (!valid(who))
20player:tell("There's no npc named '", whostr, "' on the comm network.");
21else
22player:_page(who, @text);
23endif
24else
25who = $su:match_player(whostr);
26if (!valid(who))
27player:tell("There's no one named '", whostr, "' on the comm network.");
28else
29player:_page(who, @text);
30endif
31endif

'*

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (length(verb) > 1)
2whoname = verb[2..$];
3player:page(whoname, @args);
4else
5player:tell("Page who?");
6endif

_wake

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1dead = is_a(this.body, $corpse) ? 1 | 0;
2pass(@args);
3if (dead && is_a(this:area(), $real_area))
4$ou:has_verb(this, "resurrect") && this:resurrect();
5endif

respawn

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (this.hardcore)
2$rpg:bury_player(this);
3endif
4pass(@args);

award_xp

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1":award_xp(INT amount[, INT dont-announce])";
2{xp, ?dont_announce = 0, ?no_bonus = 0} = args;
3if (xp < 0)
4raise(E_INVARG, "negative xp", xp);
5endif
6"xp = min(xp, $rpg.max_player_xp);";
7bonus = 0;
8hasbonus = 0;
9if (!this.xp_total)
10return;
11elseif (this.xp_total == $rpg.max_player_xp)
12return;
13endif
14if (this.hardcore)
15xp = xp * 2;
16endif
17if ((xp > 0) && (!no_bonus))
18for x in (this.blood)
19if (bonus = x[1]:xp_bonus(x[3]))
20bonus = 1.0 + (tofloat(bonus) / 100.0);
21xp = max(xp + 1, toint(tofloat(xp) * tofloat(bonus)));
22hasbonus = 1;
23endif
24endfor
25endif
26xp_total = min(this.xp_total + xp, $rpg.max_player_xp);
27xp = min(xp, xp_total - this.xp_total);
28this.xp = this.xp + xp;
29this.xp_total = this.xp_total + xp;
30if ((xp > 0) && (!dont_announce))
31this:tell(tostr($ansi.bold_on, hasbonus ? $ansi.green | $ansi.white, "[ You earned ", xp, " XP! ]", $ansi.reset));
32if (xp_total == $rpg.max_player_xp)
33this:tell(tostr($ansi.bold_on, $ansi.white, "[ You've hit the XP limit! Congratulations! ]", $ansi.reset));
34endif
35elseif (!xp)
36this:tell(tostr($ansi.bold_on, $ansi.white, "[ You didn't earn any XP for that. ]", $ansi.reset));
37endif
38return xp;

hostname

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1words = $su:explode(connection_name(this));
2hostname = words[4];
3hostname = strsub(hostname, ",", "");
4return hostname;

friend*s

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (!dobjstr)
2if (!player.friends)
3player:tell("You have no friends!  Ha.");
4return;
5endif
6fs = (length(this.friends) == 1) ? "friend" | "friends";
7player:tell("You consider ", $su:english_list($lu:map_prop(this.friends, "name")), " to be your ", fs, ".");
8fo = {};
9for x in (this.friends)
10if ((((!is_a(x, $immortal)) || is_a(this, $immortal)) && is_connected(x)) && `x.who_visible ! E_PROPNF => 1')
11fo = {@fo, x};
12endif
13endfor
14if (fo)
15player:tell($su:capitalize($su:english_list($lu:map_verb(fo, "dname"))), (length(fo) > 1) ? " are" | " is", " awake.");
16endif
17else
18for x in (args)
19if ((x[1] == "!") || (x[1] == "-"))
20n = x[2..$];
21who = $su:match_player(n);
22if (!valid(who))
23player:tell("I don't know who '", n, "' is.");
24elseif ((!this.programmer) && who.programmer)
25player:tell("You can't ", verb, " admins!");
26elseif (!(who in this.friends))
27player:tell(who:dnamec(), " wasn't your friend anyway.");
28else
29this.friends = setremove(this.friends, who);
30player:tell("Removed ", who:dname(), " as your friend.");
31endif
32else
33if (x[1] == "+")
34n = x[2..$];
35else
36n = x;
37endif
38who = $su:match_player(n);
39if (!valid(who))
40player:tell("I don't know who '", n, "' is.");
41elseif ((!this.programmer) && who.programmer)
42player:tell("You can't ", verb, " admins!");
43elseif (who in this.friends)
44player:tell(who:dnamec(), " is already your friend.");
45else
46this.friends = setadd(this.friends, who);
47this.enemies = setremove(this.enemies, who);
48player:tell("Added ", who:dname(), " as your friend.");
49endif
50endif
51endfor
52endif

allow refuse deny unallow disallow permit

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

Referenced by

none

Source

1what = dobjstr;
2if (!(what in $rpg.allowable_actions))
3player:tell("You can only ", verb, " ", $su:english_list($rpg.allowable_actions), ".");
4return;
5endif
6if (iobjstr == "friends")
7whon = "friends (added with 'friend +person')";
8who = "friends";
9elseif (iobjstr == "admins")
10whon = "the admins";
11who = "admins";
12elseif (iobjstr == "corp")
13if (!is_a(this.employer, $biz))
14player:tell("You're not an employee of any corp yet.");
15return;
16endif
17whon = "other members of your corp";
18who = "corp";
19elseif (((iobjstr == "all") || (iobjstr == "anyone")) || (iobjstr == "everyone"))
20who = "anyone";
21whon = "anyone";
22elseif (!valid(who = this.location:match_someone(iobjstr)))
23player:tell("I don't know who '", iobjstr, "' is.");
24player:tell("You can ", verb, " from friends, corp, admins, anyone, or a particular person.");
25return;
26else
27whon = who:name();
28endif
29i = 0;
30for x in [1..length(this.allows)]
31if (this.allows[x][1] == what)
32i = x;
33endif
34endfor
35if (verb in {"allow", "permit", "accept"})
36verb = "allow";
37elseif (verb in {"deny", "unallow", "disallow", "forbid", "refuse"})
38verb = "refuse";
39endif
40if (i)
41if (((verb == "allow") || (verb == "accept")) && (who in this.allows[i][2]))
42player:tell("You already allow ", what, " from ", whon, ".");
43elseif (((verb == "refuse") || (verb == "deny")) && (!(who in this.allows[i][2])))
44player:tell("You already refuse ", what, " from ", whon, " by default.");
45elseif ((verb == "allow") || (verb == "accept"))
46this.allows[i][2] = setadd(this.allows[i][2], who);
47player:tell("You now allow ", what, " from ", whon, ".");
48if (typeof(who) == OBJ)
49if ((player.location == who.location) || (who.location in `$lu:map_prop($lu:map_prop(player.location.exits, "otherside"), "location") ! ANY => {}'))
50who:systell(player:dnamec(), " now allows ", what, " from you.");
51endif
52endif
53elseif ((verb == "refuse") || (verb == "deny"))
54this.allows[i][2] = setremove(this.allows[i][2], who);
55player:tell("You now refuse ", what, " from ", whon, ".");
56if (typeof(who) == OBJ)
57if (player.location == who.location)
58who:systell(player:dnamec(), " now refuses ", what, " from you.");
59endif
60endif
61if (!this.allows[i][2])
62this.allows = listdelete(this.allows, i);
63endif
64endif
65elseif (verb == "refuse")
66player:tell("You already refuse ", what, " from everyone by default.");
67else
68this.allows = {@this.allows, {what, {who}}};
69player:tell("You now ", verb, " ", what, " from ", whon, ".");
70if (typeof(who) == OBJ)
71if ((player.location == who.location) || (who.location in `$lu:map_prop($lu:map_prop(player.location.exits, "otherside"), "location") ! ANY => {}'))
72who:systell(player:dnamec(), " now ", verb, "s ", what, " from you.");
73endif
74endif
75endif

allows refuses refusals

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1who = this;
2if (dobjstr)
3if (dobjstr in {"clear", "reset"})
4clear_property(player, "allows");
5player:tell("Your allows have been reset.");
6return;
7elseif (this.programmer)
8who = $su:match_player(dobjstr);
9if (!valid(who))
10this:tell(dobjstr, " is not a player.");
11return;
12endif
13endif
14endif
15left = $rpg.allowable_actions;
16for x in (who.allows)
17what = x[1];
18left = setremove(left, what);
19whol = {};
20for y in (x[2])
21if (typeof(y) == OBJ)
22if (gamevalid(y) && is_a(y, $creature))
23whol = {@whol, y:dname()};
24endif
25else
26whol = {@whol, y};
27endif
28endfor
29player:tell("You allow ", what, " from ", $su:english_list(whol), ("anyone" in whol) ? "." | ((", and refuse " + what) + " from anyone else."));
30endfor
31if (left)
32player:tell("By default, you refuse ", $su:english_list(left), " from anyone.");
33endif
34player:tell(tostr("You can reset all of your allows by using '", $ansi.bold_on, "allows clear", $ansi.bold_off, "'."));

idle_seconds

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1return `idle_seconds(this) ! ANY => "offline"';

go

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (args)
2if (((length(args) == 1) && (!player.executing)) && valid(exit = this.location:match_exit(args[1])))
3if ((!valid(exit.otherside)) || (!valid(exit.otherside.location)))
4player:tell("You can't go that way.");
5player.programmer && player:tell($ansi.cyan, "[ invalid .otherside ]", $ansi.reset);
6return;
7endif
8exit:invoke(player);
9else
10for x in (args)
11player:queue_action($actions.move, {x}, 1, x);
12endfor
13endif
14else
15player:tell("Usage: move <series of exits>  Set a movement path.");
16endif

tell_contents_backup

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Copied from generic player (#6):tell_contents by Satan (#2) Fri Apr  2 02:49:41 2004 PST";
2c = args[1];
3if (c)
4longear = {};
5gear = {};
6width = player:linelen();
7half = width / 2;
8player:tell("Carrying:");
9for thing in (c)
10cx = tostr(" ", thing:title());
11if (thing in this.wearing)
12cx = cx + " (worn)";
13elseif (thing in this.wielding)
14cx = cx + " (held)";
15endif
16if (length(cx) > half)
17longear = {@longear, cx};
18else
19gear = {@gear, cx};
20endif
21endfor
22player:tell_lines($string_utils:columnize(gear, 2, width));
23player:tell_lines(longear);
24endif

area_name

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1

_hear

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1this:tell(args[1]);

worn

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1player:tell($ansi.bg_blue, $ansi.white, $ansi.bold_on, $ansi.underline_on, "Body    Worn                   Thk Cond  Dodge", $ansi.reset);
2used = {};
3for body in (player.body_parts)
4worn = player:wearing_on(body);
5s = $su:left(body.name, -8);
6if (!worn)
7player:tell(s);
8else
9for armor in (worn)
10if (armor in used)
11s = ((s + $ansi.yellow) + armor.name) + $ansi.reset;
12else
13used = {@used, armor};
14s = ((((s + $ansi.bold_on) + $ansi.yellow) + $su:left(armor.name, -23)) + $ansi.white) + $ansi.bold_off;
15s = s + $su:left(tostr(armor.thickness), -4);
16s = s + $su:left((tostr(armor.health) + "/") + tostr(armor.health_max), -6);
17dm = $su:left(tostr(armor.dodge_mod), -6);
18if (armor.dodge_mod > 0.0)
19dm = (($ansi.green + $ansi.bold_on) + dm) + $ansi.reset;
20elseif (armor.dodge_mod < 0.0)
21dm = (($ansi.red + $ansi.bold_on) + dm) + $ansi.reset;
22endif
23s = s + dm;
24endif
25player:tell(s);
26s = "        ";
27endfor
28endif
29endfor

pinch

Spec this none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Send this player stumbling home, if they're disconnected.";
2if (player == this)
3if (this:is_in_afterlife())
4player:tell("Yeah, wouldn't it be nice if this was just a dream!");
5elseif (!is_a(this:area(), $real_area))
6player:tell("You pinch yourself, and... yeah, nothing happens.");
7else
8player:tell("You pinch yourself.");
9endif
10return;
11endif
12player:tell("You pinch ", this:dname(), " on the arm.");
13this:tell(player:dnamec(), " pinches you on the arm.");
14player.location:announce_all_but({this, player}, player:dnamec(), " pinches ", this:dname(), " on the arm.");
15if (!is_connected(this))
16this.following = #-1;
17this.hunting = "";
18if (this.programmer)
19e = `this.pinch_dmg ! E_PROPNF => {}';
20place = this.location;
21this:_teleport(this.home);
22else
23this:_walkto(this.home:room(), 4, player);
24endif
25endif

die

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1this:_lose_stress(this.stress);
2this:lose_thirst(this.thirst);
3this.attacked = {};
4this.last_death_callers = {callers(), args};
5this:revert_code_name();
6pass(@args);

repair fix

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (!valid(dobj))
2dobj = $match_utils:match(dobjstr, {@player.contents, @player.location.contents});
3endif
4if (!valid(dobj))
5player:tell("Repair what?");
6elseif (!$api.repairable:is_on(dobj))
7player:tell("You don't see any way to repair ", dobj:iname(), ".");
8else
9player:queue_action($actions.repair, {dobj}, 1, "repair " + dobj.name);
10endif

start_fighting

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1who = args[1];
2if (!this.fighting)
3"$drugs.combat_fatigue:remove_from(this, 999);";
4this.combat_rounds = 0;
5endif
6for x in (this.wielding)
7if ((!is_a(x, #284)) && is_a(who, #6123))
8this:tell("You need a ranged weapon for this practice session to do you any good.  Stow your ", x.name, ".");
9return;
10endif
11endfor
12if (is_player(who))
13if (!(this in who.fighting))
14if (!this:can_pvp(who))
15this:systell("You're not allowed to attack ", who:dname(), ".");
16return;
17endif
18endif
19endif
20for x in (this.blood)
21if (x[1].xp)
22this:ingest(#7888, 2 + x[3], 3);
23endif
24endfor
25r = pass(@args);
26if (length(args) < 2)
27if (valid(p = this.party))
28for x in (setremove(this.location:occupants($player), this))
29if (x.party == p)
30if (p.roles[x in p.members] == "tank")
31x:start_fighting(who, 1);
32endif
33endif
34endfor
35endif
36endif
37return r;

new_tell_contents

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1{?things = this.contents} = args;
2for x in ({@this.wielding, @this.wearing})
3things = setremove(things, x);
4endfor
5wield_msgs = $su:message_db(this.wielding, "iname");
6wear_msgs = $su:message_db(this.wearing, "iname");
7other_msgs = $su:message_db(things, "iname");
8total_weight = 0;
9show_weights = player:check_pref("weights");
10player:tell("Carrying:");
11"... show wielded stuff first ...";
12short_msgs = {};
13long_msgs = {};
14for x in (wield_msgs)
15if ((length(x[2]) + (show_weights ? 11 | 1)) > abs(player.linelen / 2))
16long_msgs = setadd(long_msgs, x);
17else
18short_msgs = setadd(short_msgs, x);
19endif
20endfor
21rendered_short = {};
22for x in (short_msgs)
23msg = x[2];
24if ((len = length(x[1])) > 1)
25msg = $su:strip_article(msg);
26msg = ($su:aggregate_number(len) + " ") + x[1][1]:plural_name();
27endif
28if (show_weights)
29weight = 0;
30for y in (x[1])
31weight = weight + y:weight();
32endfor
33total_weight = total_weight + weight;
34weight = $su:english_weight_short(weight);
35rendered_short = setadd(rendered_short, ((((((($ansi.cyan + "[ ") + $su:right(weight, -6)) + " ] ") + $ansi.reset) + $ansi.bold_on) + msg) + " (held)") + $ansi.reset);
36else
37rendered_short = setadd(rendered_short, (($ansi.bold_on + msg) + " (held)") + $ansi.reset);
38endif
39endfor
40rendered_long = {};
41for x in (long_msgs)
42msg = x[2];
43if ((len = length(x[1])) > 1)
44msg = $su:strip_article(msg);
45msg = ($su:aggregate_number(len) + " ") + x[1][1]:plural_name();
46endif
47if (show_weights)
48weight = 0;
49for y in (x[1])
50weight = weight + y:weight();
51endfor
52total_weight = total_weight + weight;
53weight = $su:english_weight_short(weight);
54rendered_long = setadd(rendered_long, ((((((($ansi.cyan + "[") + $su:left(weight, -5)) + "] ") + $ansi.reset) + $ansi.bold_on) + msg) + " (worn)") + $ansi.reset);
55else
56rendered_long = setadd(rendered_long, (($ansi.bold_on + msg) + " (worn)") + $ansi.reset);
57endif
58endfor
59for x in [1..len = length(rendered_short)]
60if (x % 2)
61player:tell(rendered_short[x][1..abs(player.linelen / 2) - 1], " ", (len < (x + 1)) ? "" | rendered_short[x + 1][1..abs(player.linelen / 2) - 1]);
62endif
63endfor
64if (rendered_long)
65player:tell_lines(rendered_long);
66endif
67"... now show worn stuff ...";
68long_msgs = {};
69short_msgs = {};
70for x in (wear_msgs)
71if ((length(x[2]) + (show_weights ? 11 | 1)) > abs(player.linelen / 2))
72long_msgs = setadd(long_msgs, x);
73else
74short_msgs = setadd(short_msgs, x);
75endif
76endfor
77rendered_short = {};
78for x in (short_msgs)
79msg = x[2];
80if ((len = length(x[1])) > 1)
81msg = $su:strip_article(msg);
82msg = ($su:aggregate_number(len) + " ") + x[1][1]:plural_name();
83endif
84if (show_weights)
85weight = 0;
86for y in (x[1])
87weight = weight + y:weight();
88endfor
89total_weight = total_weight + weight;
90weight = $su:english_weight_short(weight);
91rendered_short = setadd(rendered_short, ((((((($ansi.cyan + "[ ") + $su:right(weight, -6)) + " ] ") + $ansi.reset) + $ansi.bold_on) + msg) + " (worn)") + $ansi.reset);
92else
93rendered_short = setadd(rendered_short, (($ansi.bold_on + msg) + " (worn)") + $ansi.reset);
94endif
95endfor
96rendered_long = {};
97for x in (long_msgs)
98msg = x[2];
99if ((len = length(x[1])) > 1)
100msg = $su:strip_article(msg);
101msg = ($su:aggregate_number(len) + " ") + x[1][1]:plural_name();
102endif
103if (show_weights)
104weight = 0;
105for y in (x[1])
106weight = weight + y:weight();
107endfor
108total_weight = total_weight + weight;
109weight = $su:english_weight_short(weight);
110rendered_long = setadd(rendered_long, ((((((($ansi.cyan + "[") + $su:left(weight, -5)) + "] ") + $ansi.reset) + $ansi.bold_on) + msg) + " (worn)") + $ansi.reset);
111else
112rendered_long = setadd(rendered_long, (($ansi.bold_on + msg) + " (worn)") + $ansi.reset);
113endif
114endfor
115for x in [1..len = length(rendered_short)]
116if (x % 2)
117player:tell($su:left(rendered_short[x], -(abs(player.linelen / 2) - 1)), " ", (len < (x + 1)) ? "" | $su:left(rendered_short[x + 1], (-abs(player.linelen / 2)) - 1));
118endif
119endfor
120if (rendered_long)
121player:tell_lines(rendered_long);
122endif

journal*s achievement*s kills travel*s explored

Spec any none anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1all = 0;
2if (player.programmer)
3target = $su:match_player(dobjstr);
4if (is_a(target, $player))
5who = target;
6category = verb;
7else
8who = player;
9category = dobjstr;
10endif
11else
12who = player;
13category = dobjstr;
14endif
15types = [];
16types["journal"] = {#63664, "unique experiences"};
17types["achievements"] = {#82907, "achievements"};
18types["kills"] = {#197494, "species killed"};
19types["travels"] = {#437441, "places explored"};
20if (!all)
21if (!category)
22wanted = verb;
23else
24wanted = category;
25endif
26if (wanted == "achievement")
27wanted = "achievements";
28elseif (wanted == "journals")
29wanted = "journal";
30elseif ((wanted == "explored") || (wanted == "travel"))
31wanted = "travels";
32endif
33if (!(wanted in types))
34player:tell(tostr("I'm sorry, surely you meant ", $su:english_list(keys(types), "nothing", " or ")), ".");
35return;
36endif
37else
38wanted = "journal";
39endif
40got = {0, 0};
41parent = types[wanted][1];
42tagline = types[wanted][2];
43player:tell(($ansi.header + "Unique XP awards you've earned:") + $ansi.reset);
44quests = who:occupants(parent, "quest_xp");
45if (who:check_pref("sortjournal"))
46quests = $lu:reverse($lu:sort_prop(quests, "xp_award"));
47endif
48for quest in (quests)
49desc = quest:description_for(who);
50if (desc)
51player:tell(tostr($ansi.cyan, $su:left(tostr(quest.xp_award), -4), $ansi.reset, " ", $ansi.yellow, $ansi.bold_on, $su:left(quest:name_for(who), -27), $ansi.bold_off, " ", desc, $ansi.reset));
52else
53player:tell(tostr($ansi.cyan, $su:left(tostr(quest.xp_award), -4)), $ansi.reset, " ", $ansi.yellow, $ansi.bold_on, quest:name_for(who), $ansi.reset);
54endif
55got[1] = got[1] + quest.xp_award;
56got[2] = got[2] + 1;
57endfor
58if (!got[2])
59player:tell("You haven't earned a single one yet.  What a lazy bastard you are.");
60endif
61total = {0, 0};
62for x in ($ou:leaves_suspended(parent))
63total[1] = total[1] + x.xp_award;
64total[2] = total[2] + 1;
65endfor
66player:tell(tostr($ansi.bold_on, "You've had ", got[2], "/", total[2], " ", tagline, ", for ", got[1], "/", total[1], " XP.", $ansi.reset));
67player:tell("You probably have others too! Check out '", $su:english_list(setremove(keys(types), wanted), "nothing", " and '", "', '", "',"), "'.");

heartbeat

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1r = pass(@args);
2this:change_temperature();
3if (is_connected(this))
4"this:_heartbeat_hunger();";
5if (((idle_seconds(this) > 300) && (this.posture == "standing")) && (!this.executing))
6this.location:idle_sit(this);
7endif
8"if (gamevalid(this.out_of_band_session))";
9"  try";
10"    $mcp.status:statline_update(this);";
11"    $mcp.packages.hellmoo_status:statline_update(this);";
12"  except e (ANY)";
13"    $rpg:report_error(e);";
14"  endtry";
15"endif";
16elseif (((time() - this.last_connect_time) > 300) || (time() < this.last_connect_time))
17$heart:unregister(this);
18if ((random(100) < 3) && is_a(area(this), $real_area))
19this:aat(this:dnamec(), " snores softly.");
20endif
21endif
22return r;

hear_event_arrive

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"all that follows is for autodefense of a player's home when not connected";
2who = args[3];
3if (!area(this).combat_ok)
4return 0;
5endif

lose_stress

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (this:is_freak())
2return this:_gain_stress(@args);
3else
4return this:_lose_stress(@args);
5endif

gain_stress

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1if (this:is_freak())
2return this:_lose_stress(@args);
3else
4return this:_gain_stress(@args);
5endif

_fight

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (this.fighting && (this.posture != "standing"))
2if (this:check_pref("autofight"))
3for x in ({@occupants(this.location, $furniture), this.location})
4if (this in {@x.sitting, @x.reclining})
5return {$actions.stand, {x}, 1, "stand"};
6endif
7endfor
8endif
9endif
10return pass(@args);

@sethome

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (this.location:allow_sethome(this))
2this.home = this.location;
3player:tell(this.location.name, " is your new home.");
4else
5player:tell("You're not allowed to make this your home.");
6if (this.location.owner.programmer || (this.location.owner == #984))
7return;
8endif
9player:tell("If you want to live here, ask ", this.location.owner.name, " to @addresident you.");
10endif

show_score_full

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1pass(@args);
2"this:ip_daily();";

is_restraining

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1r = {};
2for x in (occupants(this.location, $creature))
3if ((x.executing && (x.executing[1] == $actions.struggle)) && (x.executing[2][1] == this))
4r = listappend(r, x);
5endif
6endfor
7return r;

moveto

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1r = pass(@args);
2if (is_a(this.location, $npc))
3this:die();
4elseif (!is_a(this.location, $room))
50 && $nets.prognet:announce(this, tostr($su:nn(this), " somehow ended up in ", $su:nn(this.location)), 1);
6endif
7this.posture = "standing";
8return r;

wake

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if ((this:area() == #1436) && (this.location != #1436.debriefing))
2#1436:do_wake(this);
3return;
4endif
5if (!valid(this.body))
6player:tell("I don't think you're asleep.  Sorry to break the news.");
7elseif (this.body:is_dead())
8player:tell("It's a little late for that.");
9elseif (is_a(this.cyberdeck, $cyberdeck))
10this.cyberdeck:do_jackout();
11elseif (#37066:doses_for(this.body))
12#37066:remove_from(this.body, 999);
13#37066:remove_from(this, 999);
14elseif (!this.programmer)
15this:tell("You pinch yourself really hard, but it does no good.");
16else
17this:_wake();
18#919:remove_from(this, $maxint);
19#798:remove_from(this, $maxint);
20endif

chatnet_BACKUP

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1channel = #118:named(verb);
2if (!valid(channel))
3player:tell(verb, " is not a valid channel.");
4return;
5endif
6if (((verb == "ltnet") || (verb == "buildnet")) && (player.programmer == 0))
7player:tell("I don't understand that.");
8return;
9endif
10name = channel.use_real_name ? player:real_name() | player:name();
11if (argstr == "on")
12if (this in channel.subscribers)
13this:tell("You're already on ", channel.name, ".");
14return;
15endif
16if ((!is_a(player, $immortal)) && (!player:cooldown_check(tostr("join ", channel.name), `channel.cooldown ! E_PROPNF => 1800', 0, 1)))
17return;
18endif
19this:add_feature(channel);
20if ((verb in {"chatnet", "tradenet"}) && this.programmer)
21player:tell($ansi.bold_on, "You're now listening to ", channel.name, " (but cannot speak).", $ansi.reset);
22elseif (channel.announce_joins)
23channel:announce(#-1, tostr(player:name(), " has joined ", channel.name, "."), 1);
24endif
25if (verb == "djnet")
26#56237:look_self();
27endif
28elseif (argstr == "off")
29if (!(this in channel.subscribers))
30this:tell("You're not on ", channel.name, ".");
31return;
32endif
33if ((verb in {"chatnet", "tradenet"}) && this.programmer)
34this:tell($ansi.bold_on, "You're no longer listening to ", channel.name, ".", $ansi.reset);
35elseif (channel.announce_joins)
36channel:announce(#-1, tostr(player:name(), " has left ", channel.name, "."), 1);
37endif
38this:remove_feature(channel);
39elseif (argstr == "info")
40if (verb == "djnet")
41#56237:look_self();
42endif
43elseif (argstr == "schedule")
44if (verb == "djnet")
45#63245:look_self();
46endif
47else
48if (verb == "djnet")
49player:tell("Usage: ", verb, " on|off|info|schedule");
50else
51player:tell("Usage: ", verb, " on|off");
52endif
53endif

gear

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Copied from generic player (#6):gear by Gilmore (#98) Sun Apr  4 13:59:32 2010 CDT";
2if (player:check_pref("blindgear"))
3this:blind_gear(args);
4return;
5endif
6if ((!player.programmer) || (!dobjstr))
7who = this;
8else
9who = valid(dobj) ? dobj | $su:match_player(dobjstr);
10if ((!valid(who)) || (!is_a(who, $creature)))
11player:tell("gear who?");
12return;
13endif
14endif
15player:tell(($ansi.header + "Bodypart  Armor                     Beat  Slash Stab  Bullt Burn  Elec  Acid") + $ansi.reset);
16dtypes = {#268, #277, #278, #279, #280, #281, #282};
17for part in (who.body_parts)
18data = {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}};
19armors = who:wearing_on(part);
20anew = {};
21for x in (armors)
22if (x.armor)
23anew = setadd(anew, x);
24endif
25endfor
26armors = anew;
27for armor in ({@armors, who})
28deter = is_a(armor, $clothing) ? (armor.health_max - armor.health) / 3 | 0;
29for aval in (armor.armor)
30i = 1;
31while (i <= length(dtypes))
32if (is_a(dtypes[i], aval[1]))
33data[i][1] = data[i][1] + max(0, aval[2] - deter);
34data[i][2] = data[i][2] + max(0, aval[3] - deter);
35endif
36i = i + 1;
37endwhile
38endfor
39endfor
40s = $su:left(part.name, -9) + " ";
41astr = "";
42first = 1;
43for x in (armors)
44astr = (astr + (first ? "" | "+")) + x.name;
45first = 0;
46endfor
47s = (((s + $ansi.yellow) + $su:left(astr, -25)) + $ansi.reset) + " ";
48for x in (data)
49if (x[1] || x[2])
50s = (((s + $ansi.bold_on) + $su:left((tostr(x[1]) + "-") + tostr(x[2]), -5)) + $ansi.reset) + " ";
51else
52s = s + "      ";
53endif
54endfor
55player:tell(s);
56endfor
57dpen = 0.0;
58for x in (who.wearing)
59dpen = dpen + x.dodge_mod;
60endfor
61dpen = tofloat(toint(dpen * 10.0) / 10);
62player:tell($ansi.bold_on, "Total dodge penalty from armor: ", $ansi.blue, dpen, $ansi.reset);
63player:tell(($ansi.header + "Weapon                  Raw   Hit Spd Par DType base  effec crit%  eDPS   ") + $ansi.reset);
64oweap = setremove(who:occupants($weapon), myweap = who:weapon());
65weapons = {myweap, @oweap};
66if (!(who.unarmed_weapon in weapons))
67if (typeof(who.unarmed_weapon) == LIST)
68weapons = {@weapons, @who.unarmed_weapon};
69else
70weapons = {@weapons, who.unarmed_weapon};
71endif
72endif
73for w in (weapons)
74hit = w:tohit(who);
75dmg = w:damage();
76raw = (tostr(w.min_skill) + "-") + tostr(ceil = w:grind_ceiling());
77if (ceil > 8)
78raw = tostr(w.min_skill) + "-*";
79endif
80praw = w.skill:raw(who);
81if (praw < w.min_skill)
82rawcolor = $ansi.red;
83elseif (praw > ceil)
84rawcolor = $ansi.yellow;
85else
86rawcolor = $ansi.green;
87endif
88edmg = w:damage(who, (hit - 10) / 2);
89first = 1;
90dc = 0;
91dps = 0.0;
92for d in (dmg)
93dc = dc + 1;
94ed = edmg[dc];
95if (first)
96name = w.long_name_msg || w.name;
97if ((w == myweap) || (w in who.wielding))
98s = ((($ansi.bold_on + $ansi.yellow) + $su:left(name, -23)) + $ansi.reset) + " ";
99else
100s = (($ansi.yellow + $su:left(name, -23)) + $ansi.reset) + " ";
101endif
102s = (((s + rawcolor) + $su:left(raw, -5)) + $ansi.reset) + " ";
103s = (s + $su:left(tostr(hit), -3)) + " ";
104spd = w:speed(who);
105if ((w in who.wielding) && (length(who:occupants($weapon, "wielding")) > 1))
106spd = spd * 2.0;
107endif
108s = (s + $su:left(tostr(spd), -3)) + " ";
109if (w.parry_class == 999)
110pstr = ($ansi.red + "-  ") + $ansi.reset;
111else
112pstr = ($ansi.green + $su:left($su:space(w.parry_class, "*"), -3)) + $ansi.reset;
113endif
114s = (s + pstr) + " ";
115else
116s = "                                        + ";
117endif
118s = ((((s + $ansi.red) + $ansi.bold_on) + $su:left(d[1].abbrev, -5)) + " ") + $ansi.reset;
119s = (s + $su:left((tostr(max(d[2], 0)) + "-") + tostr(max(d[3], 0)), -5)) + " ";
120s = (s + $su:left((tostr(max(ed[2], 0)) + "-") + tostr(max(ed[3], 0)), -5)) + " ";
121s = (s + $su:left(tostr(ed[4]) + "%", -5)) + "  ";
122dps = dps + (tofloat(ed[2]) + (tofloat(ed[3] - ed[2]) / 2.0));
123dps = dps * (tofloat(100 + d[4]) / 100.0);
124if (dc == length(dmg))
125`dps = dps / spd ! ANY => 0.0';
126s = ((s + $ansi.bold_on) + $su:left(tostr(dps), -4)) + $ansi.reset;
127endif
128player:tell(s);
129first = 0;
130$cu:sin();
131endfor
132$cu:sin();
133endfor

teach

Spec any any anyFlags rxdOwner #29Definer #6

Referenced by

none

Source

1tlimit = $skills.teach:total(this) - 5;
2if (!argstr)
3player:tell($ansi.bold_on, "You're a level ", $skills.teach:total(this), " teacher.");
4player:tell("You can teach any of these skills:");
5player:tell($ansi.bg_blue, $ansi.bold_on, $ansi.underline_on, "Skill          Raw   ", $ansi.underline_off, "Teach up to", $ansi.reset);
6spellbook = {};
7for x in ($lu:sort_prop($ou:leaves($skill), "name"))
8if (!is_a(x, $stat))
9raw = x:raw(player);
10teach = min(raw, tlimit);
11if (teach > (is_a(x, $stat) ? 10 | 0))
12spellbook = {@spellbook, {x, x.name, raw, teach}};
13endif
14endif
15endfor
16spellbook = $lu:reverse($lu:sort_alist(spellbook, 2));
17spellbook = $lu:reverse($lu:sort_alist(spellbook, 4));
18for spell in (spellbook)
19{skill, skillname, raw, teach} = spell;
20player:tell($su:left(skill.name, -15), $ansi.bold_on, $su:left(tostr(raw), 6), $ansi.yellow, teach, $ansi.reset);
21endfor
22return;
23endif
24student = $match_utils:match(iobjstr, this.location:occupants($creature));
25skill = $skill:named(dobjstr);
26if (student == this)
27player:tell("You can't teach yourself anything.  Go practice!");
28elseif (!valid(skill))
29player:tell("There's no skill '", dobjstr, "'.");
30elseif (!valid(student))
31player:tell("Teach to whom?");
32elseif (is_a(skill, $stat))
33player:tell("You can't teach ", skill.name, " to other people.");
34else
35player:queue_action($actions.teach, {student, skill}, 0, $su:ps("teach %t to %dn", student, skill));
36endif

recip*es

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

No program (verb defined but unprogrammed).

@brief

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (length(args))
2if (args[1] == "on")
3this.brief = 1;
4player:tell("Brief descriptions on.");
5elseif (args[1] == "off")
6this.brief = 0;
7player:tell("Brief descriptions off.");
8elseif (args[1] == "extra")
9this.brief = 2;
10player:tell("Extremely brief descriptions on.");
11else
12player:tell("Do what now? (use 'on', 'off', or 'extra'.)");
13endif
14else
15if (this.brief)
16if (this.brief == 2)
17player:tell("Extremely brief descriptions are on.");
18else
19player:tell("Brief descriptions are currently on.");
20endif
21else
22player:tell("Brief descriptions are currently off.");
23endif
24endif

@addr*oom

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Copied from Frand's player class (#89):@addroom by Hacker (#36) Wed Jul  6 16:57:04 2005 CDT";
2"'@addroom <name> <object>', '@addroom <object> <name>', '@addroom <name>', '@addroom <object>', '@addroom' - Add a room to your personal database of teleport destinations. Example: '@addroom Kitchen #24'. Reasonable <object>s are numbers (#17) and 'here'. If you leave out <object>, the object is the current room. If you leave out <name>, the name is the specified room's name. If you leave out both, you get the current room and its name.";
3if (!dobjstr)
4object = this.location;
5name = valid(object) ? object.name | "Nowhere";
6else
7name = dobjstr;
8object = this.location;
9endif
10if (!valid(object))
11player:tell("This is not a valid location.");
12return E_INVARG;
13endif
14if (object in $lu:slice(this.rooms, 2))
15player:tell("You already know about this room.");
16return;
17endif
18player:tell("Adding '", name, "' to your database of rooms.");
19this.rooms = {@this.rooms, {name, object}};

@rooms

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Copied from Frand's player class (#89):@rooms by Hacker (#36) Wed Jul  6 16:57:30 2005 CDT";
2"'@rooms' - List the rooms which are known by name.";
3line = "";
4for item in (this.rooms)
5line = (line + item[1]) + "  ";
6endfor
7player:tell(line);

@rmr*oom

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Copied from Frand's player class (#89):@rmroom by Hacker (#36) Wed Jul  6 16:57:38 2005 CDT";
2"'@rmroom <roomname>' - Remove a room from your personal database of teleport destinations. Example: '@rmroom library'.";
3if (((!caller) && (player != this)) || (caller && (callers()[1][3] != this)))
4if (!caller)
5player:tell(E_PERM);
6endif
7return E_PERM;
8endif
9index = this:index_room(dobjstr);
10if (index)
11player:tell("Removing ", this.rooms[index][1], "(", this.rooms[index][2], ").");
12this.rooms = listdelete(this.rooms, index);
13else
14player:tell("That room is not in your database of rooms. Check '@rooms'.");
15endif

enemy

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (!dobjstr)
2player:tell("You consider ", $su:english_list($lu:map_prop(this.enemies, "name")), " to be your enemies.");
3else
4for x in (args)
5if ((x[1] == "!") || (x[1] == "-"))
6n = x[2..$];
7who = $su:match_player(n);
8if (!valid(who))
9player:tell("I don't know who '", n, "' is.");
10elseif ((!this.programmer) && who.programmer)
11player:tell("You can't ", verb, " admins!");
12elseif (!(who in this.enemies))
13player:tell(who:dnamec(), " wasn't your enemy anyway.");
14else
15this.enemies = setremove(this.enemies, who);
16player:tell("Removed ", who:dname(), " as your enemy.");
17endif
18else
19if (x[1] == "+")
20n = x[2..$];
21else
22n = x;
23endif
24who = $su:match_player(n);
25if (!valid(who))
26player:tell("I don't know who '", n, "' is.");
27elseif ((!this.programmer) && who.programmer)
28player:tell("You can't ", verb, " admins!");
29elseif (who in this.enemies)
30player:tell(who:dnamec(), " is already your enemy.");
31else
32this.friends = setremove(this.friends, who);
33this.enemies = setadd(this.enemies, who);
34player:tell("Added ", who:dname(), " as your enemy.");
35endif
36endif
37endfor
38endif

client_tell

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1if (this.client)
2notify(this, tostr(@args));
3endif

@client

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (args && (args[1] == "on"))
2this.client = 1;
3player:tell(($ansi.blue + "[ Client mode engaged. ]") + $ansi.reset);
4elseif (this.client)
5this.client = 0;
6player:tell("Client mode off.");
7else
8this.client = 1;
9player:tell("Client mode on.");
10endif

client_inventory

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1player:client_tell("#$#inventory");
2player:client_tell("root #", toint(this), ",", this.name);
3for x in (this.contents)
4if (is_a(x, $thing))
5$client:tell_inv_add(player, x);
6endif
7endfor
8player:client_tell("#$#/inventory");

enterfunc

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (this.client && is_a(what = args[1], $thing))
2this:client_tell("#$#inventory");
3$client:tell_inv_add(this, what);
4this:client_tell("#$#/inventory");
5endif
6return pass(@args);

exitfunc

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (this.client && is_a(what = args[1], $thing))
2this:client_tell("#$#inventory");
3$client:tell_inv_rm(this, what);
4this:client_tell("#$#/inventory");
5endif
6return pass(@args);

is_hardcore

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (is_a(this, $prog))
2return 0;
3endif
4clone = #-1;
5`clone = this.respawn:clone_for(this) ! ANY => 0';
6if (valid(clone))
7if (clone.active == 0)
8return 1;
9endif
10endif
11return 0;

su*m

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1s = $rpg:health_bar(this.health, this.health_max, 0);
2s = (((((s + "  ") + $ansi.white) + $ansi.bold_on) + "XP: ") + tostr(this.xp)) + "  ";
3"s = ((s + $ansi.green) + \"$\") + $su:group_number(this.credit);";
4s = (s + "  ") + $ansi.reset;
5player:tell(s + $ansi.reset);

resign_backup

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (!is_a(this.employer, $biz))
2player:tell("You're not employed by anyone.");
3else
4player:tell("You're currently employed by ", this.employer.company_name, ".");
5player:tell("Are you sure you want to resign?");
6if ($cu:yes_or_no())
7player:tell("You've resigned from ", this.employer.company_name, ".  You can now be employed by another business.");
8this.employer:do_fire(this);
9else
10player:tell("Cancelled.");
11endif
12endif

killed_by

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1pass(@args);
2killer = args[1];
3killers = args[2];
4if (gamevalid(channel = `this.employer.channel ! ANY => #-1'))
5if (gamevalid(this.body))
6where = this.body:area();
7else
8where = this:area();
9endif
10killername = killer:iname();
11if (is_a(killer, $player) && valid(killer.employer))
12killername = (" (" + killer.employer.symbol) + ")";
13if (gamevalid(kchannel = `killer.employer.channel ! ANY => #-1'))
14kchannel:announce(killer, ((((killer:dnamec() + " killed ") + this:iname()) + " in ") + where:dname()) + ".", 1);
15endif
16endif
17channel:announce(this, ((((this:dnamec() + " was killed by ") + killer:iname()) + " in ") + where:dname()) + ".", 1);
18endif
19if (is_player(killer) && killer:area().pvp_stress)
20xdif = killer.xp_total - this.xp_total;
21if (xdif > 10000)
22if (killer in this.attacked)
23killer:tell("You have no remorse. The bastard deserved it.");
24else
25if (player != this)
26this:_pvp_record(killers, "die");
27endif
28endif
29endif
30endif

@nude

Spec any is anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Usage:  @nude <bodypart> is <description>";
2parts = this.body_parts;
3part = $mu:match(dobjstr, parts);
4if ((!valid(part)) || (!is_a(part, #299)))
5player:tell("Nude what?");
6player:tell("Possible body parts: ", $su:english_list($lu:sort($lu:map_prop(parts, "name"))), ".");
7for x in (this.nude_descs)
8if (is_a(x[1], #299) && (length(x[2]) > 0))
9player:tell(x[1]:dnamec(), " is currently set to: ", x[2]);
10endif
11endfor
12return;
13endif
14text = iobjstr;
15ti = 0;
16for i in [1..length(this.nude_descs)]
17if (this.nude_descs[i][1] == part)
18ti = i;
19break;
20endif
21endfor
22text = $su:escape($su:trim(text));
23if (length(text) > 200)
24player:tell("Sorry, that is too long.");
25return;
26endif
27total = 0;
28for desc in (this.nude_descs)
29total = total + ((desc[1] == part) ? length(text) | length(desc[2]));
30endfor
31if (total > 2200)
32player:tell("Sorry, the combination of all nude descriptions is too long.");
33return;
34endif
35if (ti)
36if (text)
37this.nude_descs[ti][2] = text;
38else
39this.nude_descs = listdelete(this.nude_descs, ti);
40endif
41elseif (text)
42this.nude_descs = {@this.nude_descs, {part, text}};
43endif
44if (text)
45player:tell("Described your nude ", part.name, " as \"", text, "\".");
46else
47player:tell("Undescribed your nude ", part.name, ".");
48endif

wear

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (args && (args[1] == "all"))
2if (length(args) > 1)
3for x in ($set_utils:diff($mu:match_many($lu:implode(args, " "), player:occupants($clothing)), player.wearing))
4x:wear();
5endfor
6else
7for x in ($set_utils:diff(player:occupants($clothing), player.wearing))
8x:wear();
9endfor
10endif
11else
12dobj = $match_utils:match(dobjstr, {@player.contents});
13if (!valid(dobj))
14return player:tell("Wear what?");
15elseif (!is_a(dobj, $clothing))
16return player:tell("You can't wear that!");
17endif
18dobj:wear();
19endif

on_move

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Add thirst, stress.";
2{from, to} = args;
3thirst = $rpg.thirst_per_move * area(this).thirst_modifier;
4if (!from.outdoor)
5thirst = thirst / 2.0;
6endif
7"this:gain_thirst(thirst)";

gain_thirst

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1amt = args[1];
2amt = tofloat(amt);
3this.thirst = this.thirst + amt;
4if (this.thirst > 100.0)
5sdoses = $rpg.thirst:doses_for(this);
6ndoses = toint(this.thirst) / 100;
7if (sdoses < ndoses)
8this:ingest($rpg.thirst, ndoses - sdoses, 0);
9endif
10endif

lose_thirst

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1amt = args[1];
2amt = tofloat(amt);
3othirst = this.thirst;
4this.thirst = max(0.0, this.thirst - amt);
5ndoses = toint(this.thirst) / 100;
6sdoses = $rpg.thirst:doses_for(this);
7if (ndoses < sdoses)
8$rpg.thirst:remove_from(this, sdoses - ndoses);
9endif

dodge_or_parry

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1r = pass(@args);
2if (this.executing && (this.executing[1] == $actions.dodge))
3this:cancel_current_action();
4endif
5bonus = args[3];
6if (random(100) < 15)
7stress = min(2, max(10, bonus + 3));
8dmod = 0.0;
9for x in (this.wearing)
10dmod = dmod - x.dodge_mod;
11endfor
12stress2 = tofloat(stress) * dmod;
13stress = stress + toint(stress2 / 2.0);
14this:gain_stress(stress);
15endif
16return r;

tell_contents_old

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Copied from generic player (#6):tell_contents by Satan (#2) Sun Nov  9 01:09:04 2008 CST";
2gn = {"Weapons", "Ammo", "Clothing", "Medical", "Consumables", "Artifacts", "Containers", "Trophies", "Recipes", "Misc", "Non-things"};
3g = {{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}};
4total_weight = 0;
5for x in (this.contents)
6if (((!is_a(x, $thing)) && (!is_a(x, $decal))) && is_a(player, $prog))
7g[11] = setadd(g[11], x);
8elseif (is_a(x, #27317))
9g[8] = setadd(g[8], x);
10elseif (is_a(x, $weapon))
11g[1] = setadd(g[1], x);
12elseif (is_a(x, $ammo))
13g[2] = setadd(g[2], x);
14elseif (is_a(x, $clothing))
15g[3] = setadd(g[3], x);
16elseif (is_a(x, #804))
17g[4] = setadd(g[4], x);
18elseif (is_a(x, #723))
19g[4] = setadd(g[4], x);
20elseif (is_a(x, #835))
21g[4] = setadd(g[4], x);
22elseif (is_a(x, $food))
23g[5] = setadd(g[5], x);
24elseif (is_a(x, #868))
25g[5] = setadd(g[5], x);
26elseif (is_a(x, #890))
27g[5] = setadd(g[5], x);
28elseif (is_a(x, #877))
29g[5] = setadd(g[5], x);
30elseif (is_a(x, $treasure))
31g[6] = setadd(g[6], x);
32elseif (is_a(x, $container))
33g[7] = setadd(g[7], x);
34elseif (is_a(x, $recipe))
35g[9] = setadd(g[9], x);
36else
37g[10] = setadd(g[10], x);
38endif
39if (x:weight() > 0)
40total_weight = total_weight + x:weight();
41endif
42endfor
43for x in [1..length(g)]
44if (g[x])
45player:tell($ansi.bold_on, gn[x], ":", $ansi.reset);
46this:tell_contents_sub(g[x]);
47endif
48endfor
49weights = player:check_pref("weights");
50if (weights)
51player:tell(((($ansi.cyan + "[ Total Load: ") + $su:english_weight(total_weight)) + " ]") + $ansi.reset);
52endif

tell_contents_sub

Spec this none thisFlags rxdOwner #29Definer #6

Referenced by

Source

1{things} = args;
2msg_db = {};
3names = {};
4weights = player:check_pref("weights");
5if (#594466 in $lu:slice(callers(), 1))
6weights = 0;
7endif
8for x in (things)
9added = 0;
10iname = x:iname();
11if (x in this.wielding)
12if (x == this:weapon())
13iname = (($ansi.bold_on + iname) + " (wielded)") + $ansi.reset;
14else
15iname = (($ansi.bold_on + iname) + " (held)") + $ansi.reset;
16endif
17elseif (x in this.wearing)
18iname = (($ansi.bold_on + iname) + " (worn)") + $ansi.reset;
19endif
20if (weights)
21iname = ((((iname + $ansi.cyan) + " [") + $su:english_weight_short(weight = x:weight())) + "]") + $ansi.reset;
22endif
23if (i = $lu:iassoc(iname, msg_db, 2))
24msg_db[i][3] = msg_db[i][3] + 1;
25msg_db[i][1] = setadd(msg_db[i][1], x);
26added = 1;
27else
28msg_db = {@msg_db, {{x}, iname, 1}};
29endif
30yield;
31endfor
32for x in (msg_db)
33if (x[3] > 1)
34name = ($string_utils:aggregate_number(x[3]) + " ") + x[1][1]:plural_name();
35if (weights)
36wt = 0;
37for z in (x[1])
38wt = wt + z:weight();
39endfor
40name = ((((name + $ansi.cyan) + " [") + $su:english_weight_short(wt)) + "]") + $ansi.reset;
41endif
42else
43name = x[2];
44endif
45names = {@names, name};
46yield;
47endfor
48player:tell_item_list(names);

track

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if ($mu:match(dobjstr, {player}) == player)
2player:tell("Really?  You want to track ", player.name, "?  You think it's funny to type shit like that into the game all day just to see what happens?  I honestly can't understand you people sometimes.");
3return;
4endif
5if (!dobjstr)
6this:queue_action($actions.track, {}, 1, "track");
7else
8this:queue_action($actions.track, {dobjstr}, 1, ("track '" + dobjstr) + "'");
9endif

jailnet_BACKUP

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1channel = #111518;
2if ((!this.programmer) && (area(this) != #2312.prison))
3return this:tell("Really now?");
4endif
5if (argstr == "on")
6this:add_feature(channel) && channel:announce(this, ((this:name() + " has joined ") + channel.name) + ".", 1);
7elseif (argstr == "off")
8this:remove_feature(channel) && channel:announce(this, ((this:name() + " has left ") + channel.name) + ".", 1);
9else
10this:tell("Usage: jailnet on|off");
11endif

tell_item_list

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1"tell_item_list(LIST names) Format a list of item names nicely and present them to the player.";
2singlecol = `this:check_pref("singlecolumn") ! ANY => 0';
3names = args[1];
4if (singlecol)
5for name in (names)
6player:tell("    ", name);
7endfor
8else
9x = 1;
10while (x <= length(names))
11player:tell("  ", $su:left(names[x], 30), (length($ansi:strip(names)) > x) ? "  " + $su:left(names[x + 1], 30) | "");
12x = x + 2;
13yield;
14endwhile
15endif

newtell

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (this.watched)
2this.watch_buffer = listappend(this.watch_buffer, {time(), $su:from_list(@args, " ")});
3endif
4return pass(@args);

@send

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1this:("@qsend")(@args);

idle

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (!dobjstr)
2player:tell("syntax: idle <player>.");
3return;
4endif
5who = $su:match_player(dobjstr);
6if ((!is_a(player, $immortal)) && is_a(who, $immortal))
7player:tell(dobjstr, " couldn't be found.");
8return;
9endif
10if ((is_a(who, $immortal) && (!is_a(player, $immortal))) && (who.who_visible <= 0))
11player:tell("You cannot tell whether ", who.name, " is idle.");
12return;
13endif
14if (!is_connected(who))
15player:tell(who:dnamec(), " isn't connected.");
16return;
17endif
18idle = idle_seconds(who);
19if (idle < 25)
20player:tell(who.name, " is not idle.");
21return;
22endif
23if (idle > 25)
24player:tell(who.name, (" has been idle for " + $time_utils:english_time(idle)) + ".");
25if (who.idlemsg)
26player:tell("reason: ", who.idlemsg);
27endif
28endif

idlemsg

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Copied from thecreator (#144187):idlemsg Sat Dec  9 18:09:50 2006 PST";
2if (!argstr)
3player:tell("IdleMSG cleared.");
4player.idlemsg = "";
5return;
6endif
7if (length(argstr) > 256)
8player:tell("You're IdleMSG can only be up to 256 characters.");
9return;
10endif
11player:tell("IdleMSG set to: ", argstr);
12player.idlemsg = argstr;

internet_BACKUP

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1channel = #123357;
2if (player:region() == #16788)
3if (argstr == "on")
4this:add_feature(channel);
5channel:announce(player, ((player:name() + " has logged in to the ") + channel.name) + ".", 1);
6elseif (argstr == "off")
7channel:announce(player, ((player:name() + " has logged out of the ") + channel.name) + ".", 1);
8this:remove_feature(channel);
9else
10player:tell("Usage: internet on|off");
11endif
12else
13player:tell("Interwhat? Perhaps you should be on it first.");
14endif

_pvp_record

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1if (length(args) < 2)
2return E_INVARG;
3endif
4aggressors = args[1];
5infraction = tostr(args[2]);
6if (typeof(aggressors) == OBJ)
7aggressors = {aggressors};
8endif
9announced = 0;
10for a in (aggressors)
11if (is_a(a, $player))
12"try";
13"  $mysql:add_pvp_record(infraction, a, this);";
14"except (ANY)";
15"  this.pvp_record = {@this.pvp_record, {time(), infraction, {a, a.xp_total}, this.xp_total}};";
16"  a.pvp_agg_record = setadd(a.pvp_agg_record, {time(), infraction, {this, this.xp_total}, a.xp_total});";
17"endtry";
18if (infraction == "die")
19$nets.gamenet:announce(this, this.name + " died in PvP combat.", 1);
20endif
21endif
22endfor

_gain_stress

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1s = this.stress;
2impamt = 1.0;
3amt = (tofloat(args[1]) * $rpg.global_stress_factor) * impamt;
4cool = $skills.cool:total(this);
5coolmod = tofloat(cool) / 10.0;
6coolmod = max(0.5, coolmod);
7amt = amt / coolmod;
8amt = toint(amt);
9this.stress = this.stress + amt;
10this.stress = min(this.stress, 500);
11sdoses = $rpg.stress:doses_for(this);
12ndoses = this.stress / 100;
13if (sdoses < ndoses)
14this:ingest($rpg.stress, ndoses - sdoses, 0);
15elseif (sdoses > ndoses)
16$rpg.stress:remove_from(this, sdoses - ndoses);
17endif
18gain = this.stress - s;
19if (((gain > 0) && this:check_pref("analstress")) || (gain > 5))
20meter = $rpg:gbar_for(this, this.stress, 500, 30, this.stress - s, $ansi.yellow, $ansi.red, 1);
21ouch = #635:select("stress_meter", this.stress - s, $bodypart);
22this:tell((((meter + "  ") + $ansi.bold_on) + ouch) + $ansi.reset);
23endif
24return gain;

_lose_stress

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1"Copied from generic player (#6):lose_stress by Gilmore (#98) Fri Jan 12 14:17:17 2007 PST";
2amt = args[1];
3ostress = this.stress;
4this.stress = max(0, this.stress - amt);
5if (this.stress < (ostress - 1))
6meter = $rpg:gbar_for(this, this.stress, 500, 30, this.stress - ostress, $ansi.yellow, $ansi.green);
7ouch = #635:select("stress_meter", this.stress - ostress, $bodypart);
8this:tell((((meter + "  ") + $ansi.bold_on) + ouch) + $ansi.reset);
9endif
10ndoses = this.stress / 100;
11sdoses = $rpg.stress:doses_for(this);
12if (ndoses < sdoses)
13$rpg.stress:remove_from(this, sdoses - ndoses);
14endif
15if (ostress && (!this.stress))
16this:tell("You feel completely relaxed; every bit of stress has drained out of you.");
17endif
18return ostress - this.stress;

debug_tell

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

No program (verb defined but unprogrammed).

who_doing_msg

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1return $su:msg(this.doing_msg);

who_duck_msg

Spec this none thisFlags rxdOwner #29Definer #6

Referenced by

none

Source

1"Copied from generic player (#6):who_doing_msg by Jed (#2918) Tue Feb  6 23:28:58 2007 CST";
2"Copied from Dej (#45097):who_doing_msg by Jed (#2918) Tue Feb  6 23:27:55 2007 CST";
3"Copied from Jed (#2918):who_doing_msg Tue Feb  6 23:19:29 2007 CST";
4return tostr("o< " + #86710.leisure[random($)]);

_brainscan

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1pass(who = args[1]);
2if (this.programmer)
3this:_whisper(who, "I'm a god.  Do you hear me?  A GOD.");
4this:tell($ansi.bold_on, who:dnamec(), " tried to read your mind!", $ansi.reset);
5elseif (!who.programmer)
6check = $skills.senses:check(who, 0);
7if (check > 0)
8this:_whisper(who, "Hey...is ", who:dname(), " reading my mind?");
9this:tell("You notice ", who:dname(), " staring intently at you for a moment.");
10endif
11else
12home = this.home:area();
13this:_whisper(who, "I live in ", home:dname(), ".");
14ts = $skills.brawn;
15for x in ($ou:leaves($skill))
16if (x:total(this) > ts:total(this))
17ts = x;
18endif
19endfor
20this:_whisper(who, "I specialize in ", ts.name, ".");
21endif

remove

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (dobjstr == "all")
2if (!player.wearing)
3player:tell("Did you even realize you were already naked?  Well, you are.");
4return;
5endif
6for x in (player.wearing)
7if (is_a(x, #128311))
8player:tell("You can't remove the ", x.name, ".");
9else
10player.wearing = setremove(player.wearing, x);
11x:on_remove(player);
12player:aat(player:dnamec(), " takes off ", player.pp, " ", x.name, ".");
13endif
14endfor
15$skills.dodge:flush(player);
16$skills.cool:flush(player);
17else
18dobj = $match_utils:match(dobjstr, {@player.contents});
19if (!valid(dobj))
20player:tell("Remove what?");
21return;
22elseif ((!is_a(dobj, $clothing)) || is_a(dobj, #128311))
23player:tell("You can't remove that!");
24return;
25else
26dobj:remove();
27endif
28endif

who_doing_msg_old

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (this.doing_msg != "")
2return this.doing_msg;
3else
4return this:doing_msg();
5endif

tard_sub

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1msg = args[1];
2brains = #114:total(this);
3if (brains < 1)
4msg = {"blublhglhbluhlg", "durrrrr!", "buhhhh durrrrr.", "duhuurrrrr.", "yawpyawpyawp!", "duhhh.", "bluuuurururuduuh."};
5msg = msg[random(length(msg))];
6return msg;
7endif
8newmsg = $su:substitute(msg, this.tard_subs);
9"Never typo the lol";
10if (random(10) < 3)
11newmsg = tostr(newmsg + " lol");
12endif
13if (brains < 3)
14newmsg = $su:uppercase(newmsg);
15endif
16return newmsg;

say_backup

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Copied from generic player (#6):say by Spunky (#97) Tue Apr 17 23:07:34 2007 CDT";
2txt = $su:escape(args[1]);
3"I hate the players.";
4if (($su:match_string(txt, "*virii*") || $su:match_string(txt, "*expresso*")) || $su:match_string(txt, "*irregardless*"))
5#67932:zap(this);
6endif
7if (#114:total(this) < 9)
8txt = this:tard_sub(txt);
9endif
10if (length(args) > 1)
11pass(txt, @args[2..$]);
12else
13pass(txt);
14endif

char_age

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1seconds_per_day = 86400;
2chron_game_age = time() - this.char_start_time;
3if (this.char_start_time == 0)
4chron_game_age = 0;
5endif
6chron_game_age = chron_game_age / seconds_per_day;
7chron_game_age = 16 * chron_game_age;
8game_age = chron_game_age + (this.char_start_age * 365);
9if (this.char_extra_age < 0)
10this.char_extra_epochs = this.char_extra_epochs + 1;
11this.char_extra_age = 1;
12endif
13game_age = game_age + (($maxint / seconds_per_day) * this.char_extra_epochs);
14game_age = game_age + (this.char_extra_age / seconds_per_day);
15return_age = game_age / 365;
16if ((return_age == 40) && this.virgin)
17#178389:award_to(this);
18endif
19if (return_age > 69)
20#196100:award_to(this);
21endif
22if (return_age > 79)
23#154066:award_to(this);
24endif
25if (return_age > 89)
26#214896:award_to(this);
27endif
28if (return_age > 99)
29#108315:award_to(this);
30endif
31return return_age;

tell_age

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1char_age = this:char_age();
2game_age = tostr($su:group_number(char_age), " ", $su:plural("year", char_age, 2));
3msg = tostr(this.psc, " is ", game_age, " old.");
4player:tell(msg);

hear_rumor

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1rumor = args[1];
2if (gamevalid(rumor.quest))
3rumor.quest:add_hint(this, ("\"..." + rumor.description) + "...\"");
4endif

leet_sub

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1msg = args[1];
2newmsg = msg;
3"newmsg = $su:substitute(msg, this.leet_subs);";
4if (random(10) < 3)
5newmsg = tostr(newmsg + " lol");
6endif
7newmsg = $su:uppercase(newmsg);
8return newmsg;

avatar_name

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (valid(c = this:cyberdeck()))
2if (!c.avatar_name)
3name = this:real_name();
4else
5name = c.avatar_name;
6endif
7else
8name = this:real_name();
9endif
10return name;

inventory_tag

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1what = args[1];
2tag = "";
3if (what in this.wielding)
4if (what == this:weapon())
5tag = "wielded";
6else
7tag = "held";
8endif
9elseif (what in this.wearing)
10tag = "worn";
11endif
12return tag;

@age

Spec any none noneFlags rxdOwner #29Definer #6

Referenced by

none

Source

1if (args && (typeof(args[1]) == OBJ))
2dobj = args[1];
3elseif ((dobjstr == "") || (dobj == player))
4dobj = player;
5else
6dobj = $string_utils:match_player(dobjstr);
7if (!valid(dobj))
8$command_utils:player_match_failed(dobj, dobjstr);
9return;
10elseif ((!is_a(player, $immortal)) && is_a(dobj, $immortal))
11player:tell("\"", dobjstr, "\" is not the name of any player.");
12return;
13endif
14endif
15time = dobj.first_connect_time;
16if (time == $maxint)
17duration = time() - dobj.last_disconnect_time;
18if (duration < 86400)
19notice = $string_utils:from_seconds(duration);
20else
21notice = $time_utils:english_time((duration / 86400) * 86400);
22endif
23player:notify(tostr(dobj.name, " has never connected.  It was created ", notice, " ago."));
24elseif (time == 0)
25player:notify(tostr(dobj.name, " first connected before initial connections were being recorded."));
26else
27player:notify(tostr(dobj.name, " first connected on ", ctime(time)));
28duration = time() - time;
29if (duration < 86400)
30notice = $string_utils:from_seconds(duration);
31else
32notice = $time_utils:english_time((duration / 86400) * 86400);
33endif
34player:notify(tostr($string_utils:pronoun_sub("%S %<is> ", dobj), notice, " old."));
35endif
36char_age = dobj:char_age();
37game_age = tostr($su:group_number(char_age), " ", $su:plural("year", char_age, 2));
38player:notify(tostr("This character is ", game_age, " old."));
39birthday = $time:ctime($time:time(dobj.first_connect_time));
40player:tell(dobj:dnamec(), "'s birthday is ", birthday[5..10], ".");

index_room

Spec this none thisFlags rxdOwner #29Definer #6

Referenced by

Source

1"'index_room (<room name>)' - Look up a room in your personal database of room names, returning its index in the list. Return 0 if it is not in the list. If the room name is the empty string, then only exact matches are considered; otherwise, a leading match is good enough.";
2room = tostr(args[1]);
3size = length(room);
4index = 1;
5match = 0;
6for item in (this.rooms)
7item_name = item[1];
8if (room == item_name)
9return index;
10elseif ((size && (length(item_name) >= size)) && (room == item_name[1..size]))
11match = index;
12endif
13index = index + 1;
14endfor
15return match;

fetishes_fed

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1f = pass(@args);
2if ((age = this:char_age()) < 16)
3f = {@f, #26354};
4elseif (age > 60)
5f = {@f, #129691};
6endif
7return f;

suck_sub

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1txt = args[1];
2nt = "hu";
3for x in [1..length(txt)]
4nc = "ghjlrau"[random(7)];
5nt = nt + nc;
6endfor
7nt = $su:uppercase(nt);
8return nt;

set_pref_old

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1pref = args[1];
2value = args[2];
3updated = 0;
4for x in [1..length(this.prefs)]
5if (this.prefs[x][1] == pref)
6this.prefs[x][2] = value;
7return 1;
8endif
9endfor

mxp_tell

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (this.client)
2notify(this, tostr(@args));
3endif

tell_reclone

Spec this none thisFlags rxdOwner #29Definer #6

Referenced by

none

Source

1if (valid(this.respawn))
2player:tell($ansi.bold_on, $ansi.green, "You will reclone in ", this:respawn_location():area().name, ".", $ansi.reset);
3endif

name

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1if (this.code_name)
2return this.code_name;
3endif
4return this.name;

real_name

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1"Copied from generic creature (#109):real_name by Spunky (#97) Wed Jul 30 00:05:21 2008 CDT";
2if (is_a(this.body, $body))
3return this.body:real_name();
4else
5return this.name;
6endif

pname plural_name

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Copied from Root Class (#1):pname by Spunky (#97) Wed Jul 30 00:16:37 2008 CDT";
2{?howmany = 1} = args;
3enum = "";
4if (howmany > 1)
5enum = $su:english_number(howmany);
6endif
7if (this.code_name != "")
8name = this.code_plural ? this.code_plural | $su:plural(this.code_name);
9else
10name = this.plural_name ? this.plural_name | $su:plural(this.name);
11endif
12return (enum ? enum + " " | "") + name;

revert_code_name

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1if (this.obscured == 0)
2return;
3endif
4name = this.code_name;
5this.code_name = "";
6aliases = this.aliases;
7for a in ($su:words($ansi:strip(name)))
8aliases = setremove(aliases, a);
9endfor
10this.aliases = aliases;
11if (this.programmer)
12this.has_proper_name = 1;
13endif
14this.obscured = 0;
15clear_property(this, "obscured_desc_msg");
16if (valid(this.party))
17this.party:announce(this.name, " is no longer ", name, ".");
18endif
19return name;

set_code_name

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1{name, ?desc = {}} = args;
2if (this.obscured)
3this:revert_code_name();
4endif
5this.code_name = name;
6aliases = this.aliases;
7for a in ($su:words($ansi:strip(name)))
8aliases = setadd(aliases, a);
9endfor
10this.aliases = aliases;
11this.obscured = 1;
12if (desc)
13this.obscured_desc_msg = (typeof(desc) == LIST) ? desc | {desc};
14endif
15if (valid(this.party))
16this.party:announce(this.name, " has become ", name, ".");
17endif

default_respawn

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1return $player_start;

description

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1if (this.obscured_desc_msg)
2return this.obscured_desc_msg;
3endif
4return this.description;

pee piss

Spec none any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1target = $mu:match(iobjstr, player.location.contents);
2if (!valid(target))
3target = $mu:match(iobjstr, player.contents);
4endif
5bodypart = #-1;
6if (!$recycler:valid(target))
7{target, bodypart} = $mu:match_bodyref(iobjstr, player.location:occupants($creature));
8endif
9doing = this:is_doing();
10if (is_a(doing, #272239) || `doing.piss_male_msg ! ANY')
11if ($drugs.urine:doses_for(this))
12mm = ("piss_" + (this:has_penis() ? "male" | (this:has_vagina() ? "female" | "neuter"))) + "_msg";
13if (m = doing.(mm))
14catcher = this.executing ? this.executing[2][1] | (this.queue ? this.queue[1][2][1] | #-1);
15if (typeof(catcher) == LIST)
16catcher = catcher[1];
17endif
18this:aat($su:ps($su:msg(m), this, catcher, catcher));
19this.location:broadcast_event(1, $actions.pee, this, {catcher});
20$drugs.urine:remove_from(this, 1);
21return;
22endif
23else
24player:tell("You don't have to piss right now.  Too bad, huh?  That'd be HOT.");
25return;
26endif
27endif
28if ((0 && is_a(target, $creature)) && (!target:_allows("sex", this)))
29this:tell("You don't think ", target:dname(), " is going to let you piss on ", target.po, ".  Even if you ask nicely.");
30return;
31endif
32this:queue_action($actions.pee, {target, bodypart}, 1, "pee");

quest_xp

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1t = 0;
2"for x in (this.quest_xp)";
3"  yield;";
4"  t = t + `x.xp_award ! ANY => 0';";
5"endfor";
6"for x in (this.jobs)";
7"  t = t + `x:total_xp_for(this) ! ANY => 0';";
8"endfor";
9return t;

show_xp

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1total = this.xp_total;
2unspent = this.xp;
3unspent = $su:group_number(unspent);
4total = $su:group_number(total);
5player:tell($ansi.white, $ansi.bold_on, "       XP ", $ansi.bold_off, $ansi.dark_gray, "// ", $ansi.yellow, $ansi.bold_on, total, $ansi.bold_off, $ansi.white, " total  ", $ansi.dark_gray, "// ", $ansi.white, $ansi.bold_on, unspent, $ansi.bold_off, " to spend", $ansi.reset);
6ip_total = $su:group_number(this:ip_total());
7player:tell($ansi.white, $ansi.bold_on, "       IP ", $ansi.bold_off, $ansi.dark_gray, "// ", $ansi.white, $ansi.bold_on, ip_total, $ansi.bold_off, " total equivalent ", $ansi.dark_gray, $ansi.reset);

_heartbeat_age

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1age = this:char_age();
2stress = this.stress;
3if (age < 30)
4"free hormone boost for you!";
5this:_heartbeat_horny();
6elseif (age > 65)
7if (stress >= 100)
8ha_chance = ((age - 60) / 5) * ((stress - 100) / 10);
9if ($drugs.aspirin:doses_for(this))
10ha_chance = ha_chance / 2;
11endif
12if (random(1000) < ha_chance)
13this:ingest($drugs.heart_attack, random(8), 4);
14endif
15endif
16if (age > 70)
17dis_chance = (age - 65) / 5;
18if (random(1000) < dis_chance)
19dis = $ou:leaves(#115843)[random($)];
20this:ingest(dis, 1);
21endif
22endif
23endif

_heartbeat_horny

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1horny_chance = $rpg.horny_chance;
2if (random(1000) <= horny_chance)
3for x in (this.wearing)
4if (`x.no_horny ! ANY')
5return;
6endif
7endfor
8this:ingest(#8811, 1, 0);
9endif

_heartbeat_hunger

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (this:check_pref("autoeat"))
2if (idle_seconds(this) > 600)
3if ($drugs.hunger:doses_for(this) > ($drugs.hunger.overdosage / 2))
4if (fud = this:occupants($food))
5while (fud)
6if (!fud[1].edible)
7fud = listdelete(fud, 1);
8continue;
9else
10this:queue_action($actions.eat, {fud[1]}, 1, "eat " + fud[1]:dname());
11break;
12endif
13endwhile
14endif
15endif
16endif
17endif
18if (random(100) <= $rpg.hunger_chance)
19if (!this:is_in_afterlife())
20if (!$drugs.nutrition:doses_for(this))
21this:ingest($drugs.hunger, 1, 0);
22endif
23endif
24endif

effective_xp

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1return this.xp_total - this:quest_xp();

ip_total

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1total = 0;
2for skill in ($ou:descendants($skill))
3if (is_a(skill, $stat) || skill.f)
4continue;
5endif
6theip = `(skill:raw(this) * 100) + skill:ip(this) ! ANY => 0';
7if (theip > 0)
8total = total + theip;
9endif
10endfor
11return total;

tell_standings

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1standings = {};
2for faction in ($ou:leaves($faction))
3if (standing = faction:_tell_standings(this))
4standings = setadd(standings, {faction, standing});
5endif
6endfor
7if (standings != {})
8player:tell($ansi.yellow, $ansi.bold_on, "Current faction standings:", $ansi.reset);
9for item in (standings)
10color = $ansi.white;
11if (toint(item[2]) < 0)
12color = $ansi.red;
13else
14color = $ansi.green;
15endif
16player:tell(color, $ansi.bold_on, $su:right(item[1].name, -25), $ansi.reset, " ", $rpg:gbar_for(player, toint(item[2]), tonum(item[1].max_standing), 30, 0, color, color, 1));
17endfor
18else
19player:tell("No current faction standings.");
20endif

learn

Spec any any anyFlags rxdOwner #29Definer #6

Referenced by

none

Source

1teacher = $match_utils:match(iobjstr, player.location:occupants($creature));
2if (is_a(teacher, $player))
3player:_learn($skill:named(dobjstr), teacher);
4elseif (is_a(teacher, $creature))
5"Defer to the creature learning verb.";
6teacher:learn();
7elseif (valid(dobj = $match_utils:match(iobjstr, player.location.contents)))
8player:tell($su:ps("You don't think you can learn anything from %dn.", dobj));
9else
10player:tell("Learn from who?");
11endif

enter_room

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1this:change_temperature();
2if (this:check_pref("autosmell"))
3player = this;
4this.location:smell(1);
5endif
6return pass(@args);

dnamec

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1if (this.has_proper_name)
2return this:name();
3else
4return "The " + this:name();
5endif

tell_wanted

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1first = 1;
2for system in ($ou:leaves_suspended(#41658))
3if ((!system.show_in_status) || (system.prefix == ""))
4continue;
5endif
6stars = system:wanted_level(this, 0);
7stars = #249314:get_fake_stars(this, system, stars);
8if (stars)
9if (first)
10player:tell((($ansi.bold_on + $ansi.red) + "You're WANTED!") + $ansi.reset);
11first = 0;
12endif
13player:tell($su:left(system.prefix, 9), $meter_utils:wanted_for(player, stars, 200, 30));
14endif
15endfor

corpse_meats

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1meats = args[1];
2return meats;

lm*ap localmap

Spec any none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1player:tell("You call up an in-depth scan...");
2(!player.programmer) && suspend(1);
3if (player.location.map_restricted)
4player:tell("Hm.  Nothing but static.");
5return;
6elseif ((player.location:darkness(1, player) > 1) && (!player:can_see_in_dark()))
7player:tell("Hm.  It's too dark to pull up a useful map.");
8return;
9endif
10here = {this.location.x, this.location.y, this.location.z};
11xsize = 4;
12ysize = 4;
13start = {here[1] - xsize, here[2] - ysize, here[3]};
14end = {here[1] + xsize, here[2] + xsize, here[3]};
15rooms = {};
16for y in [start[2]..end[2]]
17rline = leasts = lsouths = lsws = {};
18for y in [start[1]..end[1]]
19rline = {@rline, #-1};
20endfor
21rooms = {@rooms, rline};
22endfor
23easts = souths = sws = ses = rooms;
24legend = {};
25lnames = {};
26licons = {};
27possrooms = {};
28thisarea = this:area();
29for room in (thisarea.contents)
30if ((is_a(room, $room) && (room.z == here[3])) && (!`room.no_lmap ! ANY'))
31relx = (xsize + 1) + (room.x - here[1]);
32rely = (ysize + 1) + (room.y - here[2]);
33possrooms = {@possrooms, {room, relx, rely, thisarea}};
34for ex in (room.exits)
35if ((valid(ex.otherside) && valid(ex.otherside.location)) && ((oarea = ex.otherside.location:area()) != thisarea))
36oroom = ex.otherside.location;
37if (dvec = $rpg:direction_vector(ex.direction))
38possrooms = setadd(possrooms, {oroom, relx + dvec[1], rely + dvec[2], oarea});
39endif
40endif
41endfor
42endif
43endfor
44for r in (possrooms)
45{room, relx, rely, rarea} = r;
46if (valid(`rooms[rely][relx] = room ! ANY => #-1'))
47icon = (rarea == thisarea) ? room:_icon() | rarea.icon;
48name = $su:left((rarea == thisarea) ? room.name | rarea.name, -27);
49if ((!(icon in licons)) && (!(name in lnames)))
50ladd = (((icon + ": ") + $ansi.bold_on) + name) + $ansi.reset;
51if (room.outdoor && (rarea == thisarea))
52legend = {@legend, ladd};
53lnames = {@lnames, name};
54licons = {@licons, icon};
55else
56legend = {ladd, @legend};
57lnames = {name, @lnames};
58licons = {icon, @licons};
59endif
60endif
61for exit in (room.exits)
62oea = valid(exit.otherside) ? exit.otherside:area() | #-1;
63if ((oea == thisarea) || (rarea == thisarea))
64if (exit.direction == "east")
65`easts[rely][relx] = exit ! ANY';
66elseif (exit.direction == "south")
67`souths[rely][relx] = exit ! ANY';
68elseif (exit.direction == "southwest")
69`sws[rely][relx] = exit ! ANY';
70elseif (exit.direction == "southeast")
71`ses[rely][relx] = exit ! ANY';
72endif
73endif
74endfor
75endif
76endfor
77y = 1;
78ilegend = 1;
79legend = {(((($ansi.bg_blue + $ansi.cyan) + $ansi.bold_on) + "()") + $ansi.reset) + ": YOU ARE HERE", @legend};
80blank = ($ansi.dark_gray + ". . ") + $ansi.reset;
81for line in (rooms)
82x = 1;
83t = "";
84t2 = "";
85for room in (line)
86if (valid(room))
87if (external = room:area() != thisarea)
88b1 = "<";
89b2 = ">";
90else
91b1 = "[";
92b2 = "]";
93endif
94b1 = room.outdoor ? b1 | ($ansi.bold_on + b1);
95b2 = room.outdoor ? b2 | ($ansi.bold_on + b2);
96if (is_a(room, #490))
97b1 = $ansi.dark_gray + b1;
98b2 = $ansi.dark_gray + b2;
99endif
100if (((room.x == here[1]) && (room.y == here[2])) && (!external))
101icon = ((($ansi.bg_blue + $ansi.cyan) + $ansi.bold_on) + "()") + $ansi.reset;
102b1 = $ansi.bg_blue + " ";
103b2 = $ansi.bg_blue + " ";
104else
105if (!external)
106icon = room:_icon();
107else
108icon = room:area().icon;
109endif
110endif
111t = ((((t + b1) + icon) + $ansi.reset) + b2) + $ansi.reset;
112else
113t = t + blank;
114endif
115if (valid(exit = easts[y][x]))
116if (is_a(exit, $door))
117t = t + "+";
118elseif (is_a(exit, $exit))
119t = t + "-";
120else
121t = t + " ";
122endif
123else
124t = t + " ";
125endif
126if (x > 1)
127t2 = t2 + " ";
128endif
129has_sw = valid(sws[y][x]);
130has_se = valid(`ses[y][x - 1] ! ANY => #-1');
131if (has_sw && has_se)
132t2 = t2 + "X";
133elseif (has_sw)
134t2 = t2 + "/";
135elseif (has_se)
136t2 = t2 + "\\";
137else
138t2 = t2 + " ";
139endif
140if (x > 1)
141t2 = t2 + " ";
142endif
143if (valid(exit = souths[y][x]))
144t2 = t2 + (is_a(exit, $door) ? "+" | "|");
145else
146t2 = t2 + " ";
147endif
148t2 = t2 + " ";
149x = x + 1;
150endfor
151t = (t + "  ") + `legend[ilegend] ! ANY => ""';
152t2 = (t2 + "    ") + `legend[ilegend + 1] ! ANY => ""';
153player:tell(t);
154player:tell(t2 + $ansi.reset);
155y = y + 1;
156ilegend = ilegend + 2;
157endfor

xyzzy

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1player:tell("Nothing happens.");

roll

Spec none none noneFlags rxdOwner #29Definer #6

Referenced by

none

Source

1if (is_a(this.location, #761))
2player:tell("Roll around on what?  The air?");
3return;
4endif
5caller:queue_action($actions.roll, {}, 1, "rolling");

pose

Spec none with/using anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1posee = $mu:match(iobjstr, setremove(player.location:occupants($living), player));
2if (valid(posee))
3player:queue_action($actions.pose, {posee}, 1, "pose with " + posee:name());
4else
5player:tell("There's no '", iobjstr, "' here that you can pose with.");
6endif

cool*downs

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1told = 0;
2for x in (this.cooldowns)
3s = (typeof(x[1]) == OBJ) ? x[1].name | x[1];
4if ((t = x[2] - time()) > 0)
5if (!`s[1..6] == "found" ! ANY => 0')
6t = $time:duration(t);
7player:tell("You can't ", s, " for another ", t, ".");
8told = 1;
9endif
10endif
11endfor
12if (!told)
13player:tell("You don't have any active cooldowns.  Go crazy on...whatever.");
14endif

taunt

Spec any any anyFlags rxdOwner #29Definer #6

Referenced by

none

Source

1"Taunt someone, with or without an object.";
2who = caller;
3target = $mu:match(dobjstr, who.location:occupants($living));
4if (who == target)
5who:tell("You can't taunt yourself.");
6return;
7endif
8if ((prepstr == "with") && iobjstr)
9weapon = $mu:match(iobjstr, who.contents);
10if (!valid(weapon))
11who:tell("Taunt with what?");
12return;
13endif
14if (!is_a(weapon, $weapon))
15who:tell("You can't figure out a way to taunt with that.");
16return;
17endif
18else
19weapon = #-1;
20endif
21if (!valid(target))
22who:tell("Taunt who?");
23return;
24endif
25if (!is_a(target, $living))
26who:tell("You can't taunt inanimate objects.");
27return;
28endif
29caller:queue_action(#171979, {target, weapon}, 1, "taunting " + target:dnamec());

may_chat

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1body = is_a(this.body, $body) ? this.body | this;
2return is_a(this, $immortal) || (((this.may_chat && (!is_in_a(this, #2180))) && area(body):may_chat(body)) && (!this:is_in_afterlife()));

record_pvp

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1{aggressor, kind} = args;
2this.pvp_record = listappend(this.pvp_record, {time(), kind, {aggressor, aggressor.xp_total}, this.xp_total});

systell

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1if (typeof(args[1]) == LIST)
2lines = args[1];
3else
4lines = {$su:from_list(args)};
5endif
6for line in (lines)
7this:tell($ansi.cyan, $ansi.bold_on, "[ ", line, $ansi.reset, $ansi.cyan, $ansi.bold_on, " ]", $ansi.reset);
8endfor

job*s

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Copied from Eazy (#364606):jobs Sun Sep 27 19:43:38 2009 CDT";
2who = player;
3if ((player.programmer && (f = "for" in args)) && (length(args) > f))
4if (is_a(new = $su:match_player(args[f + 1]), $player))
5who = new;
6player:tell($ansi.bold_on, "Showing jobs for ", $su:nn(new), $ansi.reset);
7else
8player:tell("Couldn't match ", args[f + 1]);
9endif
10endif
11if (!dobjstr)
12player:tell($ansi.bg_blue, $ansi.white, $ansi.bold_on, $ansi.underline_on, "Job                           XP   Progress Earned  Again in...", $ansi.reset);
13count = 0;
14totalcount = 0;
15xp = 0;
16totalxp = 0;
17hasunlimited = 0;
18found = {};
19for job in ($lu:sort_prop(who.jobs, "name"))
20if (who in job.players)
21found = {@found, job};
22data = job.players[who];
23s = $su:left(job.name, -30);
24s = (s + $ansi.white) + $su:left(tostr(job.xp), -5);
25maxxed = 0;
26if (!job.progress_max)
27prog = "-";
28else
29sofar = (length(data) > 2) ? data[3] | 0;
30prog = (tostr(sofar) + "/") + tostr(job.progress_max);
31endif
32s = s + $su:left(prog, -9);
33if (!job.max_repeats)
34earn = "(unlim)";
35else
36earn = (tostr(data[2]) + "/") + tostr(job.max_repeats);
37endif
38s = s + $su:left(earn, -8);
39again = time() - data[1];
40if (job.max_repeats && (data[2] >= job.max_repeats))
41again = "--";
42maxxed = 1;
43elseif (again < job.interval)
44again = $time:game_duration(job.interval - again);
45else
46again = "Now";
47endif
48xp = xp + (data[2] * job.xp);
49count = count + data[2];
50if (job.max_repeats)
51totalxp = totalxp + (job.max_repeats * job.xp);
52totalcount = totalcount + job.max_repeats;
53else
54hasunlimited = 1;
55endif
56s = s + again;
57if (!maxxed)
58s = ($ansi.yellow + s) + $ansi.reset;
59if (!job:cant_earn(who))
60s = $ansi.bold_on + s;
61endif
62else
63if (player:check_pref("hidejobs"))
64continue;
65endif
66s = tostr($ansi.black, $ansi.bold_on, $ansi:strip(s), $ansi.reset);
67endif
68player:tell(s);
69endif
70endfor
71if (totalxp)
72player:tell(tostr($ansi.bold_on, "You've completed ", count, "/", hasunlimited ? $ansi.tilde | "", totalcount, " jobs, for ", xp, "/", hasunlimited ? $ansi.tilde | "", totalxp, " XP.", $ansi.reset));
73endif
74if (!found)
75player:tell("You haven't found any jobs yet.");
76else
77player:tell("Type 'job <name>' for details.");
78endif
79else
80job = $mu:match(dobjstr, $ou:leaves($job));
81if (player.location == #414684)
82if (!valid(job))
83player:tell("There's no '", dobjstr, "' job on the board.");
84return;
85endif
86elseif ((!valid(job)) || (!(who in job.players)))
87player:tell("You haven't found any '", dobjstr, "' job.");
88return;
89endif
90player:tell("");
91player:tell($ansi.yellow, "       job: ", $ansi.bold_on, job.name, $ansi.reset);
92mapwhere = #-1;
93if (valid(job.given_by) || valid(job.map_location))
94mapwhere = valid(job.map_location) ? job.map_location | job.given_by.home;
95endif
96if (valid(mapwhere))
97map = mapwhere.map;
98else
99map = {"          ", "          ", "          ", "          ", "          "};
100endif
101desc = (typeof(job.description) == LIST) ? job.description[1] | job.description;
102data = `job.players[player] ! ANY => {0, 0, 0}';
103if (job.progress_max)
104prog = ((("(progress: " + tostr(`data[3] ! ANY => 0')) + "/") + tostr(job.progress_max)) + ")";
105desc = (desc + " ") + prog;
106endif
107player:tell(map[1], "  ", desc);
108loc = #-1;
109if (valid(job.map_location) || valid(job.given_by))
110loc = valid(job.map_location) ? job.map_location | job.given_by.home;
111endif
112if (valid(loc))
113name = `strsub(job.given_by:dname(), "generic ", "") ! ANY => "???"';
114player:tell(map[2], "  Given by ", $ansi.bold_on, name, $ansi.bold_off, " in ", loc:area():dname(), ".");
115else
116player:tell(map[2]);
117endif
118s = ("Worth " + tostr(job.xp)) + " XP, ";
119if (job.max_repeats)
120s = ((s + "up to ") + $su:english_number(job.max_repeats)) + " times";
121else
122s = s + "unlimited times";
123endif
124player:tell(map[3], "  ", s, ".");
125player:tell(map[4], "  Available every ", $time:game_duration(job.interval, 1), ".");
126if (cant = job:cant_earn(who))
127player:tell(map[5], "  ", $su:capitalize(cant), ".");
128else
129player:tell(map[5], "  You could do this job again right now.");
130endif
131if (job.summary_msg)
132player:tell($ansi.cyan, $ansi.bold_on);
133player:tell_lines(job.summary_msg);
134player:tell($ansi.reset);
135endif
136endif

hear_event_move

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (args[1])
2who = args[3];
3exit = args[4][1];
4if (((((who != this) && (who != this.following)) && gamevalid(this.party)) && (this.party.leader == who)) && this:check_pref("followleader"))
5exit:invoke(this);
6endif
7if (this:is_doing($actions.aim))
8aimee = this.executing[2][1];
9if (who == aimee)
10this:cancel_current_action();
11endif
12endif
13endif
14return pass(@args);

afterlife

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1lives = {};
2for x in (this.quest_xp)
3if (valid(life = `x.afterlife ! ANY => #-1'))
4lives = {@lives, life};
5endif
6endfor
7if (valid(life = pass(@args)))
8lives = {@lives, life};
9endif
10if (lives)
11return lives[random($)];
12endif
13return #-1;

@comment @vote @yes @no

Spec any any anyFlags rdOwner #361Definer #6

Referenced by

none

Source

1if (player != this)
2raise(E_PERM);
3endif
4if (p = this:parse_mailread_cmd(verb, args, "", "on", 1))
5{folder, msgseq, curr, args} = p;
6if (has_callable_verb(folder, "_" + verb))
7if (this.wizard || folder:is_readable_by(this))
8folder:("_" + verb)(msgseq, args);
9else
10player:tell("Permission denied.");
11endif
12else
13player:tell("You can't use ", verb, " on *", folder.name, ".");
14endif
15endif

@top @bottom

Spec any any anyFlags rdOwner #361Definer #6

Referenced by

none

Source

1"@top [<n>] [<folder>] [by upvotes|totalvotes|comments|terribleness]";
2"Read the top messages on folders. Defaults to top 10 by upvotes.";
3n = 10;
4folder = #-1;
5sortby = "upvotes";
6fail = 0;
7if (verb == "@bottom")
8sortby = "terribleness";
9endif
10while (args)
11if (fail)
12player:tell("Usage: @top [<n>] [<folder>] [by upvotes|totalvotes|comments|terribleness]");
13return;
14endif
15if ((intarg = toint(args[1])) && (args[1] == tostr(intarg)))
16if ((intarg < 1) || (intarg > 50))
17player:tell("@top: n must be between 1 and 50.");
18return;
19endif
20n = intarg;
21args = listdelete(args, 1);
22elseif (args[1][1] == "*")
23folder = $mail_agent:match_recipient(args[1], this);
24if (!valid(folder))
25$mail_agent:match_failed(folder, args[1]);
26return;
27endif
28if (!is_a(folder, $issue_list))
29player:tell("You can't use @top with *", folder.name, ", it isn't an issue-tracking mailing list.");
30return;
31endif
32if (!folder:is_readable_by(player))
33player:tell("Not for you. :(");
34return;
35endif
36args = listdelete(args, 1);
37elseif ((args[1] == "by") && (length(args) > 1))
38if (args[2] in {"totalvotes", "upvotes", "comments", "terribleness"})
39sortby = args[2];
40else
41fail = 1;
42endif
43args = args[3..$];
44else
45fail = 1;
46endif
47endwhile
48if (!valid(folder))
49player:tell("You must specify a folder, e.g. @top *ideas.");
50return;
51endif
52if (sortby == "terribleness")
53sortby = "worst";
54endif
55folder:display_top_seq(n, sortby);

room_smell_msg

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1for x in (this.blood)
2if (s = `x[1].room_smell_msg ! ANY')
3return s;
4endif
5endfor

@attach

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (player != this)
2raise(E_PERM);
3endif
4"@attach x to msg on blah";
5if (length(args) >= 5)
6if (to_idx = "to" in args)
7whatstr = $su:from_list(args[1..to_idx - 1], " ");
8if (whatstr == "here")
9what = player.location;
10else
11what = $mu:match(whatstr, {@player.contents, @player.location.contents});
12endif
13if (!valid(what))
14$mu:object_match_failed(what, whatstr, {@player.contents, @player.location.contents});
15return;
16endif
17if (rest = args[to_idx + 1..$])
18prepstr = "on";
19if (p = this:parse_mailread_cmd(verb, rest, "", "on"))
20{folder, msgseq, curr, args} = p;
21if (!is_a(folder, $issue_list))
22return player:tell("You cannot attach items to ", is_a(folder, #45) ? "*" + folder.name | folder.name, ", only certain lists allow attaching.");
23endif
24if (this.wizard || folder:is_readable_by(this))
25return folder:("_@attach")(what, msgseq);
26else
27player:tell("Permission denied to attach to *", folder.name);
28return;
29endif
30else
31return;
32endif
33endif
34endif
35endif
36player:tell("Usage: @attach <obj> to <msg> on <list>");

bigmap medmap widemap hugemap

Spec none none noneFlags rxdOwner #29Definer #6

Referenced by

none

Source

1if (((!player.programmer) && (!is_a(area(this), $blueprint))) || (is_a(area(this), $blueprint) && (!area(this):can_edit(player))))
2player:tell("Sorry you're not supposed to have this!!");
3return;
4endif
5player:tell("You call up a quick scan of your surroundings...");
6if (!player.programmer)
7suspend(2);
8endif
9if (player.location.map_restricted)
10player:tell("Hm.  Nothing but static.");
11return;
12endif
13loc = player.location;
14if ((is_a(loc, #23025) && is_a(area(loc), #20103)) && is_a(area(loc).flyer, $flyer))
15loc = area(loc).flyer.location;
16endif
17stime = time();
18len = abs(player.linelen) / 2;
19if (verb == "bigmap")
20ht = abs(player.linelen) - 30;
21elseif (verb == "widemap")
22ht = 60;
23len = 60;
24elseif (verb == "hugemap")
25len = abs(player.linelen) - 20;
26ht = len / 2;
27else
28ht = len / 2;
29endif
30player:tell_lines($rpg:draw_map(loc, len, ht));
31etime = time() - stime;
32player:tell("Generation time: ", tostr(etime / 60), " minutes, ", tostr(etime % 60), " seconds.");

@home

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if ((!gamevalid(this.home)) || (!is_a(this.home, $room)))
2this.home = #445;
3player:tell("You didn't have a valid home for some reason. Your home has been reset to the Crash Landing cube hotel in Freedom City.");
4else
5this:notify(tostr("Your home is currently " + this.home:name(), " in ", area(this.home):name(), "."));
6endif

lush_sub

Spec this none thisFlags rxdOwner #29Definer #6

Referenced by

none

Source

1{txt, doses} = args;
2i = doses;
3if ((!txt) || ((random(100) < 60) && ($skills.cool:check(this, -doses, 1) > doses)))
4return txt;
5endif
6if ((doses > 6) && (random(100) < 10))
7txt = #183747.not_fucking_drunk_msg[random($)];
8endif
9while (i)
10if (random(12) < doses)
11txt = strsub(txt, @#183747.lush_subs[random($)]);
12endif
13i = i - 1;
14endwhile
15if (random(doses) > 4)
16n = random(length(txt));
17txt = (txt[1..n] + "*hic*") + txt[n..$];
18endif
19if (random(doses) > 4)
20if (txt[$] == ".")
21txt[$] = "!";
22endif
23txt = txt + "!";
24endif
25return (random(doses) > 5) ? $su:uppercase(txt) | txt;

reverse_light

Spec this none thisFlags rxdOwner #29Definer #6

Referenced by

none

Source

1number = 0;
2for x in (this.wearing)
3number = number + `x:reverse_light() ! E_VERBNF => 0';
4endfor
5number = number + `this.reverse_light ! E_PROPNF => 0';
6return number;

compliment

Spec any none noneFlags rxdOwner #29Definer #6

Referenced by

none

Source

1"Copied from ChiFO (Chiyo's features) (#183747):compliment by Chiyo (#143894) Wed Feb  3 17:42:06 2010 CST";
2target = $mu:match(dobjstr, player.location.contents);
3if (player == target)
4player:tell("You know, there's fishing for compliments, and there's trying to compliment yourself.");
5return;
6endif
7if (!is_a(target, $living))
8player:tell("You can't compliment non-living things.");
9return;
10endif
11chifo = #183747;
12msg = (chifo.first_compliment_msg[random($)] + " ") + chifo.second_compliment_msg[random($)];
13player:say(msg, target);
14(target == #93227) && #93227:maybe_rate(#-1, 1);

scam con

Spec this none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (0)
2player:tell("You don't think you'll have much luck scamming ", this:iname(), ".");
3elseif (player:cooldown_check("scam " + this.name, 300))
4if (player == this)
5for x in ($actions.scam.played_yourself_msg)
6player:tell(x);
7suspend(1 + random(3));
8endfor
9return;
10endif
11player:queue_action($actions.scam, {this}, 1, "scam " + this.name);
12endif

@type

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (player != this)
2raise(E_PERM);
3endif
4if (p = this:parse_mailread_cmd(verb, args, "", "on", 1))
5{folder, msgseq, curr, args} = p;
6if (has_callable_verb(folder, "_" + verb))
7folder:("_" + verb)(msgseq, args);
8else
9player:tell("You can't use ", verb, " on *", folder.name, ".");
10endif
11endif

sleep

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (!this.programmer)
2player:tell("You're not sleepy.");
3return;
4endif
5if (!valid(this.body))
6if (!(this.executing || this.queue))
7this:ingest(#37066, 1, 1);
8else
9player:tell("You're a little too occupied to sleep right now.");
10endif
11else
12player:tell("Did it occur to you that you might already be asleep?  Try 'wake'.");
13endif

net_receive

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1this:tell(@args);

hint

Spec none none noneFlags rxdOwner #361Definer #6

Referenced by

none

Source

1$hints:tell_hint(this);

hear_noise

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1noise = args[1];
2source = args[2];
3params = args[3];
4volume = args[4];
5msg = args[5];
6plugs = 0;
7for x in (this.wearing)
8if (is_a(x, #39163))
9plugs = plugs + 1;
10endif
11endfor
12if (!plugs)
13this:tell(msg);
14endif

gen_rep_msg

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1r = {};
2if (this.xp_total < 2000)
3return;
4endif
5if (valid(this.employer))
6if (this in this.employer.ranks["holders"])
7r = {@r, "%s runs " + this.employer.symbol};
8else
9r = {@r, "%s works for " + this.employer.symbol};
10endif
11else
12r = {@r, "%s's an independent"};
13endif
14if (this.xp_total < 15000)
15r = {@r, "%s's just some scrub"};
16elseif (this.xp_total < 30000)
17r = {@r, "%s's been making a name for %oself"};
18elseif (this.xp_total < 60000)
19r = {@r, "%s's kind of a big deal"};
20elseif (this.xp_total < 100000)
21r = {@r, "%s's a real heavy"};
22else
23r = {@r, "%s is legendary"};
24endif
25for x in (this.quest_xp)
26if (m = x.rep_msg)
27r = {@r, m};
28endif
29endfor
30for x in (this.jobs)
31if (m = x:rep_msg(this))
32r = {@r, m};
33endif
34endfor
35if (this.karma < -25)
36r = {@r, "%s is a major asshole"};
37elseif (this.karma < -10)
38r = {@r, "%s's kind of a dick"};
39elseif (this.karma > 30)
40r = {@r, "%s's a good dude"};
41elseif (this.karma > 10)
42r = {@r, "%s's pretty OK"};
43endif
44if ($skills.brawn:total(this) > 19)
45r = {@r, "%s's like, super-strong"};
46endif
47if ($skills.brains:total(this) > 19)
48r = {@r, "%s's like, super-smart"};
49endif
50if ($skills.cool:total(this) > 19)
51r = {@r, "%s's like, super-cool"};
52endif
53return r;

list_pref_categories

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1cats = {};
2for kvp in ($prefs)
3{name, setup} = kvp;
4if (((name in player.prefs) || player.programmer) || (!setup[4]))
5if (setup[2] == "")
6cats = setadd(cats, "misc");
7else
8cats = setadd(cats, setup[2]);
9endif
10endif
11endfor
12if (cats)
13cats = $lu:sort(cats);
14lines = {};
15for cat in (cats)
16lines = listappend(lines, {cat, (cat in $prefcats) ? $prefcats[cat] | ""});
17endfor
18player:tell_lines($su:make_table(tostr($ansi.bg_blue, $ansi.white, $ansi.bold_on, $ansi.underline_on), {"Category", "Description"}, {"", ""}, lines, {15, 60}));
19player:tell("");
20player:tell("View the preferences available under a category by using @prefs <category name> or view all preferences available by using @prefs all");
21else
22player:tell("You have no preference categories!");
23endif

inamec

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1return this:iname();

hints rumors

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (!this.quests)
2player:tell("You haven't found any hints at all.");
3elseif (!args)
4player:tell($ansi.header, "Journal entry            Hints  Found in                 ", $ansi.reset);
5for quest in ($lu:sort(keys(this.quests)))
6hints = this.quests[quest];
7m = $su:left(quest.name, -25);
8m = m + $su:left(tostr(length(hints)), -7);
9areas = {};
10for h in (hints)
11{ar, hint} = h;
12areas = setadd(areas, ar.name);
13endfor
14m = m + $su:english_list(areas);
15player:tell($ansi.yellow, m, $ansi.reset);
16endfor
17player:systell("To see hints for a journal, type '", $ansi.bold_on, "hints <journal name>", $ansi.bold_off, "'.");
18else
19quest = $mu:match(argstr, keys(this.quests));
20if (!valid(quest))
21player:tell("You haven't found any '", argstr, "' journal entry yet.");
22else
23player:tell($ansi.header, "Hints for '", quest.name, "'...                                     ", $ansi.reset);
24data = this.quests[quest];
25areas = $lu:remove_duplicates($lu:slice(data, 1));
26for a in (areas)
27player:tell($ansi.bold_on, $ansi.yellow, "In ", a:dname(), ":", $ansi.reset);
28for x in (data)
29if (x[1] == a)
30player:tell($ansi.yellow, "  ", x[2], $ansi.reset);
31endif
32endfor
33endfor
34endif
35endif

tree_tag

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1if (this.f)
2return "";
3endif
4home = tostr("Home: ", valid(this.home) ? `area(this.home):title() ! ANY => "ERR"' | "NONE", " ");
5return tostr(home);

ip_daily

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1newday = time() - $rpg.last_ip_reset;
2newday = 10800 - newday;
3if (newday < 1)
4newday = " (any minute now!)";
5else
6newday = $time:duration(newday * 8);
7newday = (" (" + tostr(newday)) + " to go)";
8endif
9if (!this.ip_daily)
10player:tell((($ansi.bold_on + "You've done all the practicing you can do today.") + newday) + $ansi.reset);
11else
12player:tell($ansi.bold_on + "You have earned ", tostr($rpg.ip_daily - this.ip_daily), (" IP today." + newday) + $ansi.reset);
13endif

set_pref

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1pref = args[1];
2value = args[2];
3"look for this pref in the list";
4if ((!(data = `$prefs[pref] ! ANY')) || (data[4] && (!player.programmer)))
5player:tell("You have no \"", pref, "\" preference to set.");
6return;
7endif
8if (typeof(data[1]) == STR)
9value = tostr(value);
10elseif (typeof(data[1]) == INT)
11value = toint(value);
12elseif (typeof(data[1]) == FLOAT)
13value = tofloat(value);
14else
15player:tell("\"", value, "\" isn't a valid value for your \"", pref, "\" preference.");
16return;
17endif
18"set the pref";
19this.prefs[pref] = value;
20player:tell("You set your \"", pref, "\" preference to ", value, ".");
21if ($ou:has_verb(this, "on_pref_" + pref))
22this:("on_pref_" + pref)(value);
23endif
24if (pref == "mxp")
25value ? $mxp:activate(this) | $mxp:deactivate(this);
26endif

on_pref_blind

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1value = args[1];
2if (value)
3this:set_pref("ansi", 0);
4this:set_pref("hidejobs", 1);
5this:set_pref("corpmap", 0);
6this:set_pref("boldnames", 0);
7this:set_pref("shortskills", 1);
8this:set_pref("showmap", 0);
9this:set_pref("shownudes", 0);
10this:set_pref("notacmeters", 1);
11this:set_pref("meters", 0);
12this:set_pref("meterboth", 0);
13this:set_pref("lookpad", 1);
14this:set_pref("showdesc", 0);
15this:set_pref("singlecolumn", 1);
16this:set_pref("blindgear", 1);
17this.brief = 2;
18player:tell("Extremely brief descriptions on.");
19else
20this:set_pref("ansi", 1);
21this:set_pref("hidejobs", 0);
22this:set_pref("corpmap", 1);
23this:set_pref("boldnames", 1);
24this:set_pref("shortskills", 0);
25this:set_pref("showmap", 1);
26this:set_pref("shownudes", 1);
27this:set_pref("notacmeters", 0);
28this:set_pref("meters", 1);
29this:set_pref("meterboth", 1);
30this:set_pref("lookpad", 0);
31this:set_pref("showdesc", 1);
32this:set_pref("singlecolumn", 0);
33this:set_pref("blindgear", 0);
34this.brief = 0;
35player:tell("Brief descriptions off.");
36endif

on_pref_ansi

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1value = toint(args[1]);
2if (value > length($ansi.theme_names))
3player:tell("There is no ANSI theme with that number.");
4return;
5else
6this.ansi = value;
7return;
8endif

post_pee

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1who = args[1];
2if (who != this)
3if (!this:wearing_on($bodyparts.groin))
4$quests.golden_shower:award_to(who);
5$quests.golden_shower:award_to(this);
6endif
7if (this:is_doing($actions.heart_attack))
8$quests.youtube_material:award_to(who);
9endif
10endif
11pass(@args);

@register-alt

Spec any any anyFlags rxdOwner #361Definer #6

Referenced by

none

Source

1"Copied from Necanthrope (#142):@register-alt Wed Mar  2 13:00:34 2011 CST";
2"Register an alt for this account. ONLY DO THIS FROM YOUR MAIN.";
3playername = argstr;
4db = #557786;
5net = $nets.prognet;
6if (valid(who = $su:match_player(playername)))
7if (who.email_address != player.email_address)
8player:systell("The email address for that account does not match yours.  Please log in and reset the alt's email address.");
9return;
10endif
11if (who == player)
12player:systell("Don't be an idiot.");
13return;
14endif
15if (who in keys($player_db.player_alts))
16player:systell(who:dnamec(), " is already a registered main.");
17return;
18endif
19for item in (keys($player_db.player_alts))
20if (player in $player_db.player_alts[item])
21player:systell("This account is already registered as an alt.");
22return;
23endif
24if (who in $player_db.player_alts[item])
25player:systell(who:dnamec(), " is already registered to ", item:dnamec(), ".");
26return;
27endif
28endfor
29if (player in keys($player_db.player_alts))
30$player_db.player_alts[player] = setadd($player_db.player_alts[player], who);
31else
32$player_db.player_alts[player] = {who};
33endif
34player:systell(who:dnamec(), " registered as your player alt.  Have fun!");
35net:announce(player, ((player:dnamec() + " has registered ") + $su:nn(who)) + " as an alt.", 1);
36else
37player:systell("I couldn't find a player named '", argstr, "'.");
38endif

can_pvp

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1"Can we legally PVP who?";
2who = args[1];
3return 1;
4if ((who in $login.newted) || (who.password == "scrambled"))
5"scumbag";
6return 1;
7endif
8"if (this.xp_total < $rpg.newbie_xp)";
9"  this:systell(\"You're a newbie, and can't attack anyone for any reason.\");";
10"  return 0;";
11"endif";
12"if (who.xp_total < $rpg.newbie_xp)";
13"  this:systell(who:dnamec(), \" is a newbie, and can't be attacked for any reason.\");";
14"  return 0;";
15"endif";

blind_gear

Spec this none thisFlags rxdOwner #29Definer #6

Referenced by

Source

1"Copied from laser_spider (#381051):blind_gear Fri Jun 17 09:58:14 2011 PDT";
2"Copied from laser_spider (#381051):blind_gear Wed May 25 21:03:28 2011 PDT";
3if ((!player.programmer) || (!dobjstr))
4who = this;
5else
6who = valid(dobj) ? dobj | $su:match_player(dobjstr);
7if ((!valid(who)) || (!is_a(who, $creature)))
8player:tell("gear who?");
9return;
10endif
11endif
12player:tell("ARMOR:");
13dtypes = {#268, #277, #278, #279, #280, #281, #282};
14dtypenames = {"Beat", "Slash", "Stab", "Bullet", "Burn", "Electric", "Acid"};
15for part in (who.body_parts)
16data = {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}};
17armors = who:wearing_on(part);
18anew = {};
19for x in (armors)
20if (x.armor)
21anew = setadd(anew, x);
22endif
23endfor
24armors = anew;
25for y in ({@armors, who})
26deter = is_a(y, $clothing) ? (y.health_max - y.health) / 3 | 0;
27for aval in (y.armor)
28i = 1;
29while (i <= length(dtypes))
30if (dtypes[i] == aval[1])
31data[i][1] = data[i][1] + max(0, aval[2] - deter);
32data[i][2] = data[i][2] + max(0, aval[3] - deter);
33endif
34i = i + 1;
35endwhile
36endfor
37endfor
38s = part.name + ": ";
39astr = "";
40first = 1;
41for x in (armors)
42astr = (astr + (first ? "" | "+")) + x.name;
43first = 0;
44endfor
45astr = (length(astr) > 25) ? astr[1..25] | astr;
46s = (s + astr) + " ";
47soakstr = "";
48n = 1;
49for x in (data)
50if (x[1] || x[2])
51soakstr = (((soakstr + dtypenames[n]) + ": ") + $su:left((tostr(x[1]) + "-") + tostr(x[2]), -5)) + " ";
52endif
53n = n + 1;
54endfor
55if (soakstr == "")
56soakstr = "nothing";
57endif
58s = s + soakstr;
59player:tell(s);
60endfor
61dpen = 0.0;
62for x in (who.wearing)
63dpen = dpen + x.dodge_mod;
64endfor
65dpen = tofloat(toint(dpen * 10.0) / 10);
66player:tell("Total dodge penalty from armor: ", dpen);
67player:tell("");
68yield;
69player:tell("WEAPONS:");
70oweap = setremove(who:occupants($weapon), myweap = who:weapon());
71weapons = {myweap, @oweap};
72if (!(who.unarmed_weapon in weapons))
73if (typeof(who.unarmed_weapon) == LIST)
74weapons = {@weapons, @who.unarmed_weapon};
75else
76weapons = {@weapons, who.unarmed_weapon};
77endif
78endif
79for w in (weapons)
80hit = w:tohit(who);
81dmg = w:damage();
82raw = (tostr(w.min_skill) + "-") + tostr(ceil = w:grind_ceiling());
83if (ceil >= 15)
84raw = tostr(w.min_skill) + "-15";
85endif
86edmg = w:damage(who, (hit - 10) / 2);
87first = 1;
88dc = 0;
89dps = 0.0;
90if (first)
91name = w.long_name_msg || w.name;
92s = $su:left(name, -23) + " ";
93s = ((s + "Raw range: ") + $su:left(raw, -5)) + " ";
94s = ((s + "To-hit: ") + $su:left(tostr(hit), -3)) + " ";
95spd = w:speed(who);
96if ((w in who.wielding) && (length(who:occupants($weapon, "wielding")) > 1))
97spd = spd * 2.0;
98endif
99s = ((s + "Speed: ") + $su:left(tostr(spd), -3)) + " ";
100if (w.parry_class == 999)
101pstr = "unparryable ";
102else
103pstr = ("Parry class: " + $su:left(w.parry_class, -3)) + " ";
104endif
105s = (s + pstr) + " ";
106endif
107if (first)
108s = s + "Damage: ";
109endif
110for d in (dmg)
111dc = dc + 1;
112ed = edmg[dc];
113s = (s + $su:left(d[1].abbrev, -5)) + " ";
114s = ((s + "Base: ") + $su:left((tostr(max(d[2], 0)) + "-") + tostr(max(d[3], 0)), -5)) + " ";
115s = ((s + "Effective: ") + $su:left((tostr(max(ed[2], 0)) + "-") + tostr(max(ed[3], 0)), -5)) + " ";
116s = ((s + "Crit rate: ") + $su:left(tostr(ed[4]) + "%", -5)) + "  ";
117dps = dps + (tofloat(ed[2]) + (tofloat(ed[3] - ed[2]) / 2.0));
118dps = dps * (tofloat(100 + d[4]) / 100.0);
119if (dc == length(dmg))
120`dps = dps / spd ! ANY => 0.0';
121s = (s + "eDPS: ") + $su:left(tostr(dps), -4);
122endif
123first = 0;
124yield;
125endfor
126player:tell(s);
127yield;
128endfor

_page

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

Source

1who = args[1];
2user = this;
3if (length(args) > 1)
4msg = $su:from_list(args[2..$], " ");
5else
6msg = "BEEP";
7endif
8msg = $su:escape(msg);
9if (is_player(who))
10if ((length(msg) > 250) && (!this:can_send_long_message(user, who)))
11msg = msg[1..250];
12user:tell("Your page exceeded safety limits and has been downsized.");
13endif
14who:_receive(user, msg);
15else
16`who:page_receive(user, msg) ! E_VERBNF => 0';
17endif
18user:tell(((("You text '" + $ansi.bold_on) + msg) + $ansi.reset) + "' to ", who.name, ".");
19if ((this.page_msg && (!who.programmer)) && (random(100) < 10))
20argstr = "naughty naughty";
21user.location:announce($su:ps(this.page_msg, user, this));
22endif

_receive

Spec this none thisFlags rxdOwner #361Definer #6

Referenced by

none

Source

1{sender, text} = args;
2m = this.page_receive_msg;
3if (is_a(sender, $creature))
4m = strsub(m, "%n", sender:real_name());
5else
6m = strsub(m, "%n", sender:dname());
7endif
8m = strsub(m, "%message", ($ansi.bold_on + text) + $ansi.reset);
9if (valid(this.location))
10this:tell(m);
11"if (this.history_on)";
12"  this.history = {{sender, text, time()}, @this.history};";
13"  if (length(this.history) > this.history_max)";
14"    this.history = this.history[1..this.history_max];";
15"  endif";
16"endif";
17if (is_player(this) && (!(this in connected_players())))
18if (is_a(sender, $player))
19sender:tell("Your wristpad buzzes: Target is asleep.  Please try another time.");
20endif
21elseif ((!is_a(sender, $immortal)) && is_a(this, $immortal))
22sender:tell("Your wristpad buzzes: Target is asleep.  Please try another time.");
23endif
24endif