generic gamer #91

Parent #40Owner #36Flags read, fertileSource QuestCore.db

Aliases: generic gamer, gamer

91 verbs · 106 properties · 2 children

Verbs

VerbSpecFlagsDefinerLines
init_for_corethis none thisrxd#9143
quickpage '*any any anyrd#9144
follow trail stop-following forgetany none nonerd#9161
dump_followersthis none thisrxd#918
capture cuffthis none nonerd#9115
surrendernone none nonerd#912
_capturethis none thisrxd#9111
_leashthis none thisrxd#9120
release uncuff losethis none nonerxd#9126
_releasethis none thisrxd#918
dump_goodiesthis none thisrxd#9139
look_selfthis none thisrxd#9115
tell_contentsthis none thisrxd#9122
look_statethis none thisrxd#9110
@he*althnone none nonerd#9114
diethis none thisrxd#9193
_wieldthis none thisrxd#912
pass_outthis none thisrxd#9113
freezethis none thisrxd#9113
take_hitthis none thisrxd#9122
take_healththis none thisrxd#913
armorthis none thisrxd#917
damagethis none thisrxd#9117
to_hitthis none thisrxd#9110
to_defendthis none thisrxd#917
tellthis none thisrxd#9128
titlethis none thisrxd#9122
sayany any anyrxd#918
emoteany any anyrxd#9110
reached_limitthis none thisrxd#9116
my_huhthis none thisrxd#917
g*et t*akeany none nonerxd#9139
dr*op th*rowany none nonerxd#9151
gi*ve ha*nd payany at/to anyrxd#9160
conv*ertany at/to anyrd#9116
transfer_ammothis none thisrxd#9144
descriptionthis none thisrxd#911
@kids @s*how @verbs @props @properties @exam*ine exam*ine where*is @where*is homeany none nonerd#9124
@stats @score @points @skills @stnone none nonerxd#9192
@boostany at/to anyrd#9149
@send @answer @repl*yany any anyrxd#9146
cash money goldnone none nonerd#917
my_match_objectthis none thisrxd#918
medicalthis none thisrxd#915
@featuresany for/about anyrxd#9123
@add-feature @addfeature @remove-feature @rmfeatureany none nonerd#915
_add_money _rem_moneythis none thisrxd#9116
_has_amountthis none thisrxd#916
_lootthis none thisrxd#9118
roll_againstthis none thisrxd#9162
@rollany none nonerd#9124
loot rob pilfer roll search stripthis none nonerxd#912
speak*ingany none nonerd#9126
rememberany as anyrd#9123
do_forgetthis none thisrxd#919
short_desc_matchesthis none thisrxd#9110
@rememberednone none nonerd#915
short_desc_msgthis none thisrxd#911
@know*ledgenone none nonerxd#9123
know retain reflect journalany any anyrxd#9119
@unknow @forgetany none nonerxd#9115
@en*emiesnone none nonerxd#915
@roomnum*bersany any anyrxd#9120
@k*illsnone none nonerxd#911
infobarthis none thisrxd#9121
@infobarany any anyrxd#9124
request_linethis none thisrxd#912
_at*tackthis none thisrxd#9142
_k*illthis none thisrxd#9165
@adv*anceany none nonerxd#9152
@info @lev*el @lvl @life @xpnone none nonerxd#918
@bonusnone none nonerxd#911
@reset @chargennone none nonerxd#9158
@pkillany any anyrxd#9135
@mapany any anyrxd#9125
mapthis none thisrxd#9169
max_spellsthis none thisrxd#911
_heal_spellthis none thisrxd#9133
$*any none nonerxd#9156
_knowledge_spellthis none thisrxd#9139
_enchant_spellthis none thisrxd#9157
_sleep_spellthis none thisrxd#9147
_escape_spellthis none thisrxd#9123
_power_spellthis none thisrxd#9134
_speed_spellthis none thisrxd#9134
_fear_spellthis none thisrxd#9151
_missile_spellthis none thisrxd#9169
_pacify_spellthis none thisrxd#9153
_death_spellthis none thisrxd#9168
alc*hemizeany in/inside/into anyrxd#9142
compass mnone none nonerxd#911

Properties

PropertyDefinerFlagsOwnerValue
death_msg#91rc#36"%N %<falls> down dead!"
alive#91r#361
alert#91r#361
mobile#91r#361
wielded#91r#36#182
last_paged#91r#36#2
last_healed#91r#36#-1
followed_by#91r#36#-1
following#91r#36#-1
free_points#91r#360.0
stats#91r#36{{"Strength", "Dexterity", "Intelligence", "Health"}, {10.0, 10.0, 10.0, 10.0}}
stats_current#91r#36{{"Strength", "Dexterity", "Intelligence", "Health"}, {10.0, 10.0, 10.0, 10.0}}
skills#91r#36{{"combat", "medical", "language"}, {0.0, 0.0, 0.0}}
race#91r#36"Human"
org#91r#36""
money#91r#36{}
follow_msg#91rc#36"%N %<is/are> following %d."
stopfollow_msg#91rc#36"%N %<stops> following %d."
searching#91r#360
languages#91r#36{{#142}, {2.0}}
speaking#91r#36#-1
remembered_names#91r#36{}
short_desc_msg#91r#36""
knowledge#91rwc#36{}
magic_immunity#91rc#360
roomnum#91rwc#360
killcount#91rc#360
pkill#91rc#360
level#91rc#361
experience#91rc#360
adv_points#91rc#360
resets#91rc#360
exp#91rc#36150
class#91rc#36"Peasant"
map#91rc#360
used_spells#91rc#360
_mail_task#40rc#36<clear>
messages_going#40c#36<clear>
mail_lists#40rc#36<clear>
mail_notify#40r#2<clear>
mail_forward#40rc#36<clear>
mail_options#40rc#36{}
message_keep_date#40rc#36<clear>
messages_kept#40rc#36<clear>
current_message#40c#36{0, -1300000000}
messages#40c#36<clear>
ansi_options#95r#36{"bold", "blinking", "misc", "extra", "colors"}
replace_codes#95r#36
list of 20{"bold", "unbold", "bright", "unbright", "normal", "red", "green", "yellow", "blue", "purple", "cyan", "gray", "grey", "magenta", "white", "underline", "inverse", "blink", "unblink", "beep"}
features#6r#36{#92, #143}
previous_connection#6#2<clear>
email_address#6#2<clear>
last_disconnect_time#6r#2<clear>
help#6rc#36#105
more_msg#6rc#36<clear>
linetask#6r#36<clear>
linesleft#6r#36<clear>
linebuffer#6#36<clear>
pagelen#6r#36<clear>
owned_objects#6r#2<clear>
linelen#6r#36-79
current_folder#6c#36<clear>
all_connect_places#6#2<clear>
last_connect_place#6#2<clear>
brief#6rc#36<clear>
lines#6c#36<clear>
page_absent_msg#6rc#36<clear>
pq#6rc#36<clear>
pqc#6rc#36<clear>
page_origin_msg#6rc#36<clear>
page_echo_msg#6rc#36<clear>
edit_options#6rc#36<clear>
last_connect_time#6r#2<clear>
ownership_quota#6#36<clear>
gender#6rc#36<clear>
prc#6rc#36<clear>
ppc#6rc#36<clear>
poc#6rc#36<clear>
psc#6rc#36<clear>
pr#6rc#36<clear>
pp#6rc#36<clear>
po#6rc#36<clear>
ps#6rc#36<clear>
home#6rc#36#62
password#6#2<clear>
gaglist#6rc#36<clear>
paranoid#6rc#36<clear>
display_options#6rc#36<clear>
verb_subs#6rc#36<clear>
first_connect_time#6r#2<clear>
size_quota#6#36<clear>
last_password_time#6#2<clear>
last_connect_attempt#6#2<clear>
page_count_start_time#6r#2<clear>
ping_task#6r#36<clear>
infobar#6rc#36<clear>
value_base#102r#2<clear>
damage_base#102r#20.5
x_loc#102r#36<clear>
y_loc#102r#36<clear>
ansi_title#102r#36<clear>
obvious#102r#36<clear>
build_help#102rc#36<clear>
key#1c#360
aliases#1r#2{"generic gamer", "gamer"}
description#1rc#36"A player without further description."
object_size#1r#36{68946, -1090650497}

Ancestry

Ancestors (nearest first): #40 Generic Mail Receiving Player#95 ANSI PC#6 generic player#102 subthing#1 Root Class

Children: #90 Frand's administrator class, #116 generic puppet

Call graph

calls n91_0 #91:init_for_core n40_52 #40:init_for_core n91_0->n40_52 n91_1 #91:quickpage n6_18 #6:tell n91_1->n6_18 n20_20 #20:match_player n91_1->n20_20 n56_1 #56:player_match_result n91_1->n56_1 n6_29 #6:page n91_1->n6_29 n91_2 #91:follow n91_2->n6_18 n91_2->n20_20 n51_0 #51:match n91_2->n51_0 n98_12 #98:person_match_failed n91_2->n98_12 n91_25 #91:tell n91_2->n91_25 n35_1 #35:say_action n91_2->n35_1 n52_5 #52:isa n91_2->n52_5 n55_18 #55:iassoc n91_2->n55_18 n27_1 #27:intersection n91_2->n27_1 n1_29 #1:contents n91_2->n1_29 n91_25->n6_18 n6_9 #6:titlec n91_25->n6_9 n102_4 #102:title n91_25->n102_4 n91_4 #91:capture n91_4->n6_18 n91_4->n91_25 n91_4->n27_1 n91_4->n1_29 n91_4->n6_9 n91_4->n102_4 n91_26 #91:title n91_4->n91_26 n52_6 #52:ancestors n91_26->n52_6 n91_5 #91:surrender n91_5->n35_1 n91_18 #91:freeze n91_5->n91_18 n91_18->n91_25 n91_6 #91:_capture n91_7 #91:_leash n91_6->n91_7 n91_7->n91_25 n91_7->n52_5 n91_7->n27_1 n91_7->n1_29 n91_7->n6_9 n91_7->n91_7 n91_9 #91:_release n91_7->n91_9 n91_9->n35_1 n91_9->n52_5 n99_4 #99:valid_task n91_9->n99_4 n99_17 #99:schedule n91_9->n99_17 n91_8 #91:release n91_8->n6_18 n91_8->n35_1 n91_8->n27_1 n91_8->n1_29 n91_8->n6_9 n91_8->n91_26 n91_8->n91_9 n91_10 #91:dump_goodies n91_10->n52_5 n63_1 #63:_recycle n91_10->n63_1 n52_3 #52:has_callable_verb n91_10->n52_3 n52_0 #52:has_property n91_10->n52_0 n63_2 #63:_create n91_10->n63_2 n21_1 #21:set_names n91_10->n21_1 n91_11 #91:look_self n91_11->n6_18 n91_11->n1_29 n91_11->n6_9 n6_79 #6:tell_lines n91_11->n6_79 n91_36 #91:description n91_11->n91_36 n41_7 #41:pronoun_sub n91_11->n41_7 n91_13 #91:look_state n91_11->n91_13 n20_8 #20:from_seconds n91_11->n20_8 n91_12 #91:tell_contents n91_11->n91_12 n91_13->n6_18 n91_13->n41_7 n91_13->n20_8 n91_12->n6_18 n91_12->n52_0 n91_12->n6_79 n6_13 #6:linelen n91_12->n6_13 n32_0 #32:length n91_12->n32_0 n20_4 #20:columnize n91_12->n20_4 n91_14 #91:@he*alth n91_14->n6_18 n91_15 #91:die n91_15->n91_25 n91_15->n6_9 n91_15->n91_26 n91_15->n63_2 n91_15->n52_6 n91_17 #91:pass_out n91_15->n91_17 n91_17->n91_25

Showing 48 of 156 verbs; 108 not shown.

Source

init_for_core

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1if (caller_perms().wizard)
2if (this == $rpgamer)
3this.stats = {{"Strength", "Dexterity", "Intelligence", "Health"}, {10.0, 10.0, 10.0, 10.0}};
4this.stats_current = {{"Strength", "Dexterity", "Intelligence", "Health"}, {10.0, 10.0, 10.0, 10.0}};
5this.skills = {{"combat", "medical", "language"}, {0.0, 0.0, 0.0}};
6this.death_msg = "%N %<falls> limply to the ground.";
7this.alive = 1;
8this.alert = 1;
9this.mobile = 1;
10this.wielded = $hand;
11this.last_paged = #2;
12this.last_healed = #-1;
13this.followed_by = #-1;
14this.following = #-1;
15this.free_points = 0.0;
16this.race = "human";
17this.org = "";
18this.money = {};
19this.damage_base = 0.5;
20this.follow_msg = "%N %<is/are> following %d.";
21this.stopfollow_msg = "%N %<stops> following %d.";
22this.speaking = #-1;
23elseif (!this.wizard)
24for p in (properties($rpgamer))
25if ((!p) in {"build_help", "help_msg"})
26clear_property(this, p);
27endif
28endfor
29endif
30if (this == $builder)
31this.stats = {{"Strength", "Dexterity", "Intelligence", "Health"}, {20.0, 20.0, 20.0, 20.0}};
32this.stats_current = {{"Strength", "Dexterity", "Intelligence", "Health"}, {20.0, 20.0, 20.0, 20.0}};
33this.skills = {{"combat", "medical", "language"}, {5.0, 5.0, 5.0}};
34elseif (this != $rpgamer)
35clear_property(this, "skills");
36clear_property(this, "stats");
37clear_property(this, "stats_current");
38endif
39this.languages = {{$default_lang}, {2.0}};
40this.remembered_names = {};
41this.short_desc_msg = "";
42return pass(@args);
43endif

quickpage '*

Spec any any anyFlags rdOwner #36Definer #91

Referenced by

none

Source

1"Quickpage has the advantage that if you don't give a name,it will";
2"assume you meant the last person you paged.  Useful if you're having";
3"a long conversation.  Syntax:";
4"'<player> <message>      Quickpages a given player.";
5"' <message>              Quickpages last player.  Space is important.";
6"quickpage player message Quickpages a given player.";
7"quickpage message        Quickpages last player.  Note that if your message";
8"                         starts with some player's name, it'll go to them,";
9"                         instead.  Use ' to be safe.";
10if (args == {})
11if (length(verb) == 1)
12player:tell("You last paged: ", this.last_paged:title(), " (", this.last_paged, ").");
13else
14player:tell("Sending blank pages is a waste of time.");
15endif
16return 1;
17endif
18verbname = verb;
19if (verbname == "quickpage")
20dobjvalid = tonum($string_utils:match_player(args[1]));
21if (dobjvalid > 0)
22whostring = args[1];
23message = argstr[length(dobjstr) + 1..length(argstr)];
24else
25whostring = player.last_paged.name;
26message = argstr;
27endif
28elseif (length(verbname) > 1)
29whostring = verbname[2..length(verbname)];
30message = argstr;
31iobjstr = (dobjstr + " ") + iobjstr;
32dobjstr = whostring;
33else
34whostring = player.last_paged.name;
35message = argstr;
36iobjstr = (dobjstr + " ") + iobjstr;
37dobjstr = whostring;
38endif
39target = $string_utils:match_player(whostring);
40if ($command_utils:player_match_failed(target, whostring))
41return;
42endif
43player.last_paged = target;
44return player:page(target.name, message);

follow trail stop-following forget

Spec any none noneFlags rdOwner #2Definer #91

Referenced by

none

Source

1who = dobjstr;
2person = valid(dobj) ? dobj | $match_utils:match(who, this.location:contents());
3person = ((person == $ambiguous_match) || `!(!property_info(person, "followed_by")) ! ANY => 0') ? person | $string_utils:match_player(who);
4if ($rp_regulator:person_match_failed(person, who))
5return;
6elseif (person.location != player.location)
7return player:tell(person.name, " can not be found here.");
8endif
9if (person == this)
10this:tell(who, "? You can only follow other people.");
11return;
12endif
13if (verb in {"follow", "trail"})
14if (valid(this.following))
15this:tell("You're already following ", this.following:title(), ". 'Stop-following' or 'forget' ", this.following:title(), " first.");
16return;
17endif
18dobj = this.following = person;
19$you:say_action(this.follow_msg);
20person.followed_by = this;
21this:tell("('Stop-following' or 'forget' ", this.following:title(), " to quit following)");
22while (valid(this.following))
23if ((((!(person in connected_players())) && is_player(person)) || ((!(this in connected_players())) && is_player(this))) || (!person.location:acceptable(this)))
24person:tell(this.name, " just stopped following you.");
25this.following:dump_followers();
26this:tell("You have just stopped following ", person:title(), ".");
27this:tell(person:titlec(), " has either entered a room secured against you, disconnected, or managed to lose you.");
28else
29suspend(5);
30if (((person.location != this.location) && $object_utils:isa(person.location, $room)) || ($object_utils:isa(person.location, $terrain) && (!person.location:match_loc(person, this))))
31if (person.location == $dead_zone)
32this.following:dump_followers();
33return this:tell("You cannot follow ", person:title(), " into the dead zone.");
34endif
35suspend(1);
36this.x_loc = person.x_loc;
37this.y_loc = person.y_loc;
38move(this, person.location);
39$you:say_action("%N %<follows> %d.");
40endif
41endif
42endwhile
43else
44if (!valid(this.following))
45if (verb == "forget")
46rns = player.remembered_names;
47if (!(rin = $list_utils:iassoc(argstr, rns, 2)))
48return player:tell("You don't know anyone named '", argstr, "'.");
49endif
50player:tell("Okay you have forgotten about ", rns[rin][2], ", ", rns[rin][1]:short_desc_msg(), ".");
51return player:do_forget(rns[rin][1]);
52endif
53this:tell("You aren't following anyone, anyway.");
54elseif (((c = $set_utils:intersection(player:contents(), children($cuffs))) != {}) && c[1].wornness)
55this:tell("You're a prisoner, and can't free yourself.");
56else
57dobj = person;
58this.following:dump_followers();
59$you:say_action(this.stopfollow_msg);
60endif
61endif

dump_followers

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

Source

1if (valid(this.followed_by))
2this.followed_by.following = $nothing;
3endif
4if (valid(this.following))
5this.following.followed_by = $nothing;
6endif
7this.followed_by = $nothing;
8this.following = $nothing;

capture cuff

Spec this none noneFlags rdOwner #36Definer #91

Referenced by

none

Source

1if ((player != this) && `player.alive ! E_PROPNF => 0')
2if ((((!this.alert) || (!this.mobile)) && (c = $set_utils:intersection(player:contents(), children($cuffs)))) && c[1]:ok_to_use())
3c[1]:_cuff(this);
4elseif (((((player.stats_current[2][1] > (this.stats_current[2][1] * 1.2)) || (player.stats_current[2][2] > (this.stats_current[2][2] * 1.2))) || (player.stats_current[2][4] > (this.stats_current[2][4] * 2.0))) && (c = $set_utils:intersection(player:contents(), children($cuffs)))) && (player in c[1].trustees))
5c[1]:_cuff(this);
6elseif ((this.alert && this.alive) && this.mobile)
7this:tell(player:titlec(), " tries to capture you, but you avoid ", player.pp, " grasp.");
8player:tell(this:titlec(), " cautiously dodges your advance.");
9this.location:announce_all_but({this, player}, tostr(this:titlec(), " cautiously avoids ", player:title(), "."));
10else
11player:tell("Why not try searching ", this:title(), " instead?");
12endif
13else
14player:tell("You like bondage, huh?");
15endif

surrender

Spec none none noneFlags rdOwner #36Definer #91

Referenced by

none

Source

1$you:say_action("%N %<surrenders>!");
2this:freeze();

_capture

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1"WIZ OWNED";
2"This is if called by handcuffs or mental control verbs.";
3this.following = player;
4player.followed_by = this;
5if (`$scheduler:kill_task(this.wander_task) ! E_PROPNF => 0')
6this.wander_task = 0;
7endif
8if (!(this.wielded in {$hand, $claw, $teeth}))
9this.wielded:_unwield();
10endif
11this:_leash();

_leash

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1if ((valid(this.following) && this.following.alert) && this.following.alive)
2suspend(1);
3if (((valid(this.following) && (this.following.location != this.location)) && $object_utils:isa(this.following.location, $room)) && (!$object_utils:isa(this.following.location, $editor)))
4this.location:announce_all_but({this}, this:titlec(), " follows ", this.following:title(), " out.");
5move(this, this.following.location);
6this.location:announce_all_but({this}, this:titlec(), " is being led by ", this.following:title(), ".");
7elseif ((valid(this.following) && $object_utils:isa(this.following.location, $terrain)) && (!this.following.location:match_loc(this.following, this)))
8this.location:announce_all_but({this, this.following}, this:titlec(), " follows.");
9this.x_loc = this.following.x_loc;
10this.y_loc = this.following.y_loc;
11this:tell("You follow.");
12this.following:tell(this:titlec(), " follows.");
13this.location:announce_all_but({this, this.following}, this:titlec(), " follows in shackles.");
14endif
15fork (4)
16this:_leash();
17endfork
18elseif ($set_utils:intersection(this:contents(), children($cuffs)) != {})
19this:_release();
20endif

release uncuff lose

Spec this none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (verb == "lose")
2if (this == player.followed_by)
3$you:say_action("%N %<attempts> to evade all followers.");
4return player:dump_followers();
5else
6return player:tell(this:titlec(), " is only casually following you, if at all.");
7endif
8endif
9"Cuffs";
10if ((c = $set_utils:intersection(this:contents(), children($cuffs))) && c[1]:ok_to_use())
11if (player != this)
12return c[1]:_uncuff(this);
13else
14return player:tell("Sorry, the cuffs are designed so you can't release yourself.");
15endif
16elseif (c != {})
17return player:tell("Only an authorized person can release ", this.po, ".");
18endif
19"Mental";
20if (this.following == player)
21this:_release();
22elseif (valid(this.following))
23player:tell("Only the person who captured ", this:title(), " can release ", this.po, ".");
24else
25player:tell(this:titlec(), " is not a prisoner.");
26endif

_release

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1"WIZ OWNED...to be called from handcuffs or mental control verbs.";
2if (valid(this.following))
3$you:say_action("%N %<releases> %d.");
4if ((!is_player(this)) && $object_utils:isa(this, $puppet))
5this.wander_task = (0 || (!$scheduler:valid_task(tonum(this.wander_task)))) ? $scheduler:schedule_every(this.wait_seconds, this, "wander") | this.wander_task;
6endif
7player:dump_followers();
8endif

dump_goodies

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1"USAGE: dump_goodies(1 or 0) => moves contents of this to this location.";
2"       if 1 is the argument, money is dumped, too";
3"WIZ PERMS";
4if (valid(this.location))
5this.wielded = $hand;
6for x in (this.contents)
7if ($object_utils:isa(x, $container))
8for y in (x.contents)
9y:moveto(this);
10endfor
11$recycler:_recycle(x);
12endif
13endfor
14for x in (this.contents)
15try
16if (($object_utils:has_callable_verb(x, "recycle_at_death") && (!((this.alive && this.alert) && this.mobile))) && x.recycle_at_death)
17x:recycle_at_death();
18else
19x:moveto(this.location);
20endif
21if ($object_utils:has_property(x, "x_loc"))
22x.x_loc = this.x_loc;
23x.y_loc = this.y_loc;
24endif
25except v (ANY)
26"it won't move";
27endtry
28endfor
29"Move money to this location";
30if ((this.money != {}) && args[1])
31money = $recycler:_create($death_purse, $default_holder);
32$building_utils:set_names(money, tostr(this.name, "'s cash purse,cash purse,cash,purse,money"));
33money.money = this.money;
34this.money = {};
35money:moveto(this.location);
36money.x_loc = this.x_loc;
37money.y_loc = this.y_loc;
38endif
39endif

look_self

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1player:tell(this:titlec());
2player:tell_lines(this:description());
3if (!(this in connected_players()))
4player:tell($gender_utils:pronoun_sub("%{:He} %{!is} sleeping.", this));
5elseif (`player.alert ! E_PROPNF => 0' && `player.alive ! E_PROPNF => 0')
6this:look_state();
7elseif ((idle = idle_seconds(this)) < 60)
8player:tell($gender_utils:pronoun_sub("%{:He} %{!is} awake and %{!looks} alert.", this));
9else
10time = $string_utils:from_seconds(idle);
11player:tell($gender_utils:pronoun_sub("%{:He} %{!is} awake, but %{!has} been staring off into space for ", this), time, ".");
12endif
13if (c = this:contents())
14this:tell_contents(c);
15endif

tell_contents

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1c = args[1];
2if (c)
3au = $ansi_utils;
4longear = {};
5gear = {};
6width = player:linelen();
7half = width / 2;
8player:tell("Carrying:");
9for thing in (c)
10cx = tostr(" ", thing:title(), " (", thing, ")");
11if ($object_utils:has_property(player, "wielded"))
12cx = (this.wielded == thing) ? tostr(cx, " (Equipped)") | cx;
13endif
14if (valid(au) ? au:length(cx) | (length(cx) > half))
15longear = {@longear, cx};
16else
17gear = {@gear, cx};
18endif
19endfor
20player:tell_lines($string_utils:columnize(gear, 2, width));
21player:tell_lines(longear);
22endif

look_state

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1if (!this.alert)
2player:tell($gender_utils:pronoun_sub("%{:He} %{!is} knocked unconscious.", this));
3elseif (!this.alive)
4player:tell($gender_utils:pronoun_sub("%{:He} %{!is} ethereal, as if dead.", this));
5elseif ((idle = idle_seconds(this)) < 60)
6player:tell($gender_utils:pronoun_sub("%{:He} %{!is} awake and %{!looks} alert.", this));
7else
8time = $string_utils:from_seconds(idle);
9player:tell($gender_utils:pronoun_sub("%{:He} %{!is} awake, but %{!has} been staring off into space for ", this), time, ".");
10endif

@he*alth

Spec none none noneFlags rdOwner #2Definer #91

Referenced by

none

Source

1"Usage: @health => tells you your current health level as a percentage of your maximum potential health.";
2current = player.stats_current[2][4];
3max = player.stats[2][4];
4if (max != 0.0)
5health = 100.0 * (current / max);
6pointer = (toint(health) / 3) + 11;
7pointer = (pointer > 22) ? pointer + 8 | pointer;
8pointer = (pointer > 41) ? pointer + 7 | pointer;
9bar = "[bold][red]-----------[yellow]-----------[green]----------- [normal]";
10bar[pointer] = "|";
11player:tell(bar, floatstr(health, 2), "%");
12else
13player:tell("You are completely dead.");
14endif

die

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1"Moves player to afterlife.";
2"WIZ PERMS!";
3if (this.programmer)
4return this.stats_current[2][4] = this.stats_current[2][4] + 0.01;
5endif
6who = (length(callers()) < 2) ? player | callers()[2][3];
7trustees = {this.owner};
8for x in ($object_utils:ancestors(this))
9trustees = setadd(trustees, x.owner);
10endfor
11for x in ($object_utils:ancestors(this.location))
12trustees = setadd(trustees, x.owner);
13endfor
14if ((!(who in trustees)) && (!who.wizard))
15"Bogus killer";
16return;
17elseif (!this.alive)
18"already dead";
19return this:pass_out();
20endif
21this.alive = 0;
22this.location:announce_all_but({this}, $string_utils:pronoun_sub(this.death_msg, this));
23this:tell("[red]You have died![normal]");
24this.wielded = $hand;
25if (this.contents == {})
26drop = "You have nothing in inventory to drop.";
27this:tell(drop);
28this:tell();
29else
30drop = ("You are dropping " + $string_utils:title_list(this.contents)) + ".";
31for i in (this.contents)
32move(i, this.location);
33endfor
34this:tell(drop);
35this:tell();
36this.location:tell(this:title(), " drops everything ", this.ps, " was carrying!");
37endif
38if (this.money == {})
39this:tell("You have no gold to drop.");
40else
41hadgold = 1;
42goldstr = tostr(this.money[1][2]);
43goldbag = $recycler:_create($death_purse, $hacker);
44bagname = ("Bag of " + this.name) + "'s Gold";
45goldbag.name = bagname;
46goldbag.aliases = {bagname, "Gold"};
47goldbag.money = {{"gold", this.money[1][2]}};
48move(goldbag, this.location);
49this:tell(("You drop [bold][yellow]" + tostr(this.money[1][2])) + "[normal] Gold!");
50this.money = {};
51this.location:tell(this:title(), (" drops [bold][yellow]" + goldstr) + "[normal] Gold!");
52endif
53deathscene = this.location;
54this.alert = 0;
55this:dump_followers();
56fork (7)
57deathscene:announce_all(this:title(), " vanishes!");
58this.alert = 1;
59this:tell("[red]Your soul moves to the underworld![normal]");
60this:tell(" ");
61this.x_loc = (this.x_loc < 1) ? 1 | this.x_loc;
62this.y_loc = (this.y_loc < 1) ? 1 | this.y_loc;
63move(this, $dead_zone);
64this.location:announce_all_but({this}, this:titlec(), "(yes, quite dead) has arrived.");
65if (parent(this) == $rpgamer)
66for item in (setremove(this.owned_objects, this))
67$wiz_utils:set_owner(item, $default_holder);
68endfor
69endif
70endfork
71this.stats = {{"Strength", "Dexterity", "Intelligence", "Health"}, {0.0, 0.0, 0.0, 0.0}};
72this.stats_current = {{"Strength", "Dexterity", "Intelligence", "Health"}, {0.0, 0.0, 0.0, 0.0}};
73this.skills = {{"combat", "medical", "language"}, {0.0, 0.0, 0.0}};
74this.adv_points = 0;
75this.experience = 0;
76this.level = 1;
77this.free_points = 0.0;
78this.damage_base = 0.5;
79this.pkill = 0;
80this.magic_immunity = 0;
81this.killcount = 0;
82this.knowledge = {};
83this.infobar = 1;
84this.roomnum = 0;
85this.wielded = $hand;
86this.home = $dead_zone;
87brats = children($rpgamer);
88for x in (brats)
89if (ghost = this in $list_utils:slice(x.remembered_names, 1))
90x.remembered_names = setremove(x.remembered_names, x.remembered_names[ghost]);
91endif
92(ticks_left() < 5000) && suspend(0);
93endfor

_wield

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

none

Source

1"Wield arg[1]";
2return this.wielded = args[1];

pass_out

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

Source

1"Bye-bye land for 60 seconds";
2if (this.alert)
3this.location:announce_all_but({this}, $string_utils:pronoun_sub("%N %<falls> unconscious.", this));
4this:tell("You fall unconscious.");
5this.alert = 0;
6fork (60)
7this.alert = 1;
8if (this.alive)
9this.location:announce_all_but({this}, $string_utils:pronoun_sub("%N %<awakens> from unconsciousness.", this));
10this:tell("You awaken.");
11endif
12endfork
13endif

freeze

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

Source

1"Paralysis for 60 seconds";
2if (this.mobile)
3this.location:announce_all_but({this}, $string_utils:pronoun_sub("%N %<becomes> immobilized.", this));
4this:tell("You become immobilized.");
5this.mobile = 0;
6fork (60)
7this.mobile = 1;
8if (this.alive && this.alert)
9this.location:announce_all_but({this}, $string_utils:pronoun_sub("%N %<regains> mobility.", this));
10this:tell("You regain mobility.");
11endif
12endfork
13endif

take_hit

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

none

Source

1"USAGE: victim:take_hit(damage[, attacker])";
2damage = tofloat(args[1]);
3if (!(this in connected_players()))
4if ((length(args) > 1) && valid(args[2]))
5x = args[2];
6else
7x = player;
8endif
9$you:say_action2(x, this, "%N %<recoils> from a shockwave, caused by %p blow to the stasis field surrounding %d.");
10x.stats_current[2][4] = x.stats_current[2][4] - damage;
11return this.stats_current[2][4];
12endif
13if ((((caller == this.location) || (caller == this.owner)) || `caller.hostility ! E_PROPNF => 0') || `caller.weapon ! E_PROPNF => 0')
14damage = ((x = damage - this:armor()) > 0.1) ? x | 0.1;
15player:tell(this:title(), " takes [red]", floatstr(damage, 2), "[normal] damage!");
16this.stats_current[2][4] = this.stats_current[2][4] - damage;
17player:infobar();
18if (this.stats_current[2][4] < 0.0)
19this:die();
20endif
21endif
22return this.stats_current[2][4];

take_health

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

none

Source

1"USAGE: beneficiary:take_health(healing points)";
2this.stats_current[2][4] = this.stats_current[2][4] + tofloat(args[1]);
3return this.stats_current[2][4] = (this.stats_current[2][4] < this.stats[2][4]) ? this.stats_current[2][4] | this.stats[2][4];

armor

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1armor = 0.0;
2for x in (this:contents())
3if (`x.wornness ! E_PROPNF => 0')
4armor = armor + x:shield_rating();
5endif
6endfor
7return armor;

damage

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1"USAGE: assailant:damage([any])";
2"Returns wielded weapon damage, modified by strength.";
3"If missle weapon is used, returns just weapon damage.";
4"If no args are sent, damage will vary up or down from the base by a 25% margin.";
5"If there are additional combat skills affecting damage, this is the verb to hack.";
6if (!valid(this.wielded))
7damage = this.damage_base;
8else
9damage = this.wielded.shoots ? this.wielded.projectile_dam | (this.wielded.damage_base + ((this.stats_current[2][1] - 10.0) / 3.142));
10endif
11moddam = random(5);
12if ((moddam = 1) && (!args))
13damage = damage - (damage * 0.25);
14elseif ((moddam = 5) && (!args))
15damage = damage + (damage * 0.25);
16endif
17return (damage > 0.0) ? damage | 0.1;

to_hit

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1"If missle weapon, returns dexterity, modified by basic combat skill";
2"If not, returns average strength & dexterity, modified by combat skill";
3"If there are additional skills affecting striking accuracy, this is the verb to hack.";
4combat = "combat" in this.skills[1];
5if (valid(this.wielded) && this.wielded.shoots)
6attack = this.stats_current[2][2] + sqrt(this.skills[2][combat]);
7else
8attack = ((this.stats_current[2][2] + this.stats_current[2][1]) / 2.0) + sqrt(this.skills[2][combat]);
9endif
10return (attack > 0.0) ? attack | 0.1;

to_defend

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1"Returns dexterity, modified by basic combat skill.";
2"Compared to to_hit(), combat skill has only half the effect.";
3"This:armor() likewise has only half the effect it does on take_hit().";
4combat = "combat" in this.skills[1];
5dex = (((!(this in connected_players())) || (!this.alert)) || (!this.mobile)) ? 0.1 | this.stats_current[2][2];
6defense = (dex + (sqrt(this.skills[2][combat]) / 2.0)) + (this:armor() / 2.0);
7return (defense > 0.0) ? defense | 0.1;

tell

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

Source

1"Enforces unconsciousness.";
2"Only verbs using 'notify' should get through.";
3if (this.alert || (player == this))
4if ((caller == this.location) && (!this.alert))
5return;
6elseif (((caller == $channels) || this.gaglist) || this.paranoid)
7pass(@args);
8else
9newargs = args;
10if ((this != player) && (generic = `player:short_desc_msg() ! E_VERBNF => player:title()'))
11if (i = player in $list_utils:slice(this.remembered_names, 1))
12generic = this.remembered_names[i][2];
13endif
14for x in [1..length(newargs)]
15newarg = tostr(newargs[x]);
16if (start = index(newarg, player:titlec()))
17if (start == 1)
18newargs[x] = $string_utils:subst(newarg, {{player:titlec(), $string_utils:capitalize(generic)}});
19else
20newargs[x] = $string_utils:subst(newarg, {{player:title(), generic}});
21endif
22endif
23endfor
24endif
25this:notify(tostr(@newargs));
26endif
27endif
28return;

title

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

Source

1name = `i = this in $list_utils:slice(player.remembered_names, 1) ! ANY => 0' ? player.remembered_names[i][2] | `this:short_desc_msg() ! E_VERBNF => this.name';
2title = (x = name in $list_utils:slice(this.ansi_title, 1)) ? this.ansi_title[x][2] | name;
3blurb = "";
4if (this in connected_players())
5if (!this.alive)
6blurb = "dead";
7elseif (!this.alert)
8blurb = "unconscious";
9elseif (!this.mobile)
10blurb = "immobilized";
11elseif ((this.stats_current[2][4] / (this.stats[2][4] + 0.0001)) < 0.75)
12blurb = "injured";
13elseif (idle_seconds(this) > 120)
14blurb = "idle";
15elseif (this.stats_current[2][3] < 1.75)
16blurb = "drooling";
17endif
18elseif (!($puppet in $object_utils:ancestors(this)))
19blurb = "asleep";
20endif
21title = blurb ? tostr(title, "(", blurb, ")") | title;
22return title;

say

Spec any any anyFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if ($object_utils:has_callable_verb(this.location, "say") != {$room})
2return this.location:(verb)(@args);
3else
4argstr = $ansi_utils:terminate_normal(argstr);
5endif
6sayverb = $string_utils:get_say_verb(argstr);
7this:tell("You ", $you:verb_sub(sayverb), ", \"", argstr, "\" ", $lang_utils:in_line_for($lang_utils:speaking(this), this));
8$lang_utils:announce(this, setremove(this.location:contents(), this), tostr(this:titlec(), " ", $gender_utils:get_conj(sayverb, this), ", \"%lang_encrypt\""), argstr);

emote

Spec any any anyFlags rxdOwner #2Definer #91

Referenced by

none

Source

1"WIZ PERMS";
2if ($object_utils:has_callable_verb(this.location, "emote") != {$room})
3return this.location:(verb)(@args);
4endif
5if (argstr && (argstr[1] == ":"))
6argstr[1..1] = "";
7else
8argstr[1..0] = " ";
9endif
10this.location:announce_all(this:title(), argstr);

reached_limit

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

Source

1"Returns true if this player can hold no more";
2if ($frand_class in $object_utils:ancestors(this))
3return 0;
4endif
5allstuff = {};
6lightstuff = 0.0;
7for item in (this:contents())
8if ($container in $object_utils:ancestors(item))
9allstuff = {@allstuff, @item.contents};
10elseif ($note in $object_utils:ancestors(item))
11lightstuff = lightstuff + 0.5;
12endif
13allstuff = {@allstuff, item};
14endfor
15weight = length(allstuff) - $math_utils:round(lightstuff);
16return (weight > $math_utils:round(1.5 * this.stats_current[2][1])) ? 1 | 0;

my_huh

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1"WIZ PERMS";
2if (((args[1] in {"g", "get", "t", "take"}) && dobjstr) && prepstr)
3player:tell($string_utils:capitalize(prepstr), " what? Try just \"", args[1], " ", dobjstr, "\".");
4kill_task(task_id());
5else
6return pass(@args);
7endif

g*et t*ake

Spec any none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1"WIZ PERMS";
2if (this:reached_limit())
3this:tell("You cannot carry any more.");
4return;
5elseif (dobjstr in {"all", "everything"})
6for o in (this.location:contents())
7if (`!o.gender ! E_PROPNF => 1')
8`o:g(@args) ! ANY => ""';
9endif
10endfor
11player:tell("[bold]You took everything you could.[normal]");
12return;
13endif
14dobj = (!valid(dobj)) ? $match_utils:match(dobjstr, this.location:contents()) | dobj;
15if (dobj == $failed_match)
16parsed = $string_utils:first_word(dobjstr);
17amount = parsed[1];
18stuff = parsed[2];
19object = toint(amount) ? $match_utils:match(stuff, this.location:contents()) | dobj;
20if (valid(object))
21dobj = object;
22this:tell("You take all ", dobj:title(), ". (Drop what you don't want.)");
23endif
24endif
25if (!(dobj in players()))
26if (valid(dobj) && $object_utils:has_verb(dobj, verb))
27if ($player in $object_utils:ancestors(dobj))
28player:tell("You can't pick up people!");
29return;
30endif
31return dobj:(verb)(@args);
32endif
33if (dobjstr && `this.location:match_fake(dobjstr) ! E_VERBNF => ""')
34return player:tell($string_utils:capitalize(dobjstr), " will not move.");
35endif
36$command_utils:do_huh(verb, args);
37else
38player:tell("You can't pick up a player.");
39endif

dr*op th*row

Spec any none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1"WIZ PERMS";
2if (dobjstr in {"all", "everything"})
3for o in (this:contents())
4if (`!o.gender ! E_PROPNF => 1')
5`o:dr(@args) ! ANY => ""';
6endif
7endfor
8return player:tell("Done.");
9endif
10dobj = (!valid(dobj)) ? $match_utils:match(dobjstr, this:contents()) | dobj;
11if (valid(dobj) && $object_utils:has_verb(dobj, verb))
12if ($object_utils:has_property(dobj, "linelen"))
13return player:tell("I'm sorry... Were we dating?");
14elseif ($object_utils:has_property(dobj, "x_loc"))
15dobj.x_loc = this.x_loc;
16dobj.y_loc = this.y_loc;
17endif
18return dobj:(verb)(@args);
19endif
20if (parsed = $string_utils:first_word(dobjstr))
21amount = parsed[1];
22stuff = parsed[2];
23if (!$money_utils:_has_currency(stuff))
24if (toint(amount))
25ammo = this:match(stuff);
26collect = $object_utils:has_property(ammo, "rounds") || $object_utils:has_property(ammo, "units");
27if (valid(ammo) && collect)
28if ($object_utils:has_property(ammo, "x_loc"))
29ammo.x_loc = this.x_loc;
30ammo.y_loc = this.y_loc;
31endif
32return this:transfer_ammo(amount, ammo, this.location);
33elseif (ammo == $ambiguous_match)
34return this:tell("There are a couple of things named \"", stuff, "\" around.");
35elseif (dobj == $ambiguous_match)
36return this:tell("You have a couple of things named \"", dobjstr, "\" on you.");
37else
38return this:tell("You really don't have ", dobjstr, " to spare, do you?");
39endif
40endif
41elseif (toint(amount))
42return this:tell("Why would you throw away good money?");
43endif
44if ($object_utils:has_property(dobj, "x_loc"))
45dobj.x_loc = this.x_loc;
46dobj.y_loc = this.y_loc;
47endif
48$command_utils:do_huh(verb, args);
49else
50return player:tell($string_utils:capitalize(verb), " what?");
51endif

gi*ve ha*nd pay

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

Referenced by

none

Source

1"WIZ PERMS";
2if ((player != this.owner) && (player != caller))
3return player:tell(tostr(E_PERM));
4elseif (dobjstr in {"all", "everything"})
5for o in (this:contents())
6if (`!o.gender ! E_PROPNF => 1')
7`o:gi(@args) ! ANY => ""';
8endif
9endfor
10return player:tell("Done.");
11endif
12dobj = (!valid(dobj)) ? $match_utils:match(dobjstr, this:contents()) | dobj;
13if (valid(dobj) && $object_utils:has_verb(dobj, verb))
14if (valid(iobj) && $object_utils:has_property(iobj, "stats_current"))
15if (iobj:reached_limit())
16return this:tell(iobj:titlec(), " cannot carry any more.");
17endif
18endif
19return dobj:(verb)(args[2]);
20endif
21args = setremove(args, "to");
22person = $match_utils:match(iobjstr, player.location:contents());
23if (!valid(person))
24if ($object_utils:has_verb(this.location, "match_fake") && this.location:match_fake(iobjstr))
25return player:tell($string_utils:capitalize(iobjstr), " ignores your offer.");
26endif
27return $rp_regulator:person_match_failed(person, iobjstr);
28elseif (person.location != this.location)
29return player:tell("I don't see that person here.");
30elseif (toint(args[1]) < 0)
31return player:tell("You can't give a negative amount.");
32elseif (!$money_utils:_has_currency(args[2]))
33if (toint(args[1]))
34c = {@this:contents(), @this.location:contents()};
35ammo = $string_utils:match(args[2], c, "name", c, "aliases");
36collect = $object_utils:has_property(ammo, "rounds") || $object_utils:has_property(ammo, "units");
37if (valid(ammo) && collect)
38return this:transfer_ammo(args[1], ammo, person);
39elseif (ammo == $ambiguous_match)
40return player:tell("There are a couple of things named \"", args[2], "\" around.");
41elseif (dobj == $ambiguous_match)
42return player:tell("You have a couple of things named \"", dobjstr, "\" on you.");
43else
44return player:tell("You really don't have ", dobjstr, " to spare, do you?");
45endif
46endif
47elseif (toint(args[1]))
48if (!$object_utils:has_callable_verb(person, "_add_money"))
49return player:tell(person:titlec(), " can't accept that.");
50endif
51left = this:_rem_money(args[2], tofloat(args[1]));
52if (left != 0)
53return this:tell("You don't have that many ", args[2], ".");
54endif
55person:_add_money(args[2], tofloat(args[1]));
56this.location:announce_all_but({this, person}, this:title(), " hands some money to ", person:title(), ".");
57this:tell("You pay ", args[1], " ", args[2], " to ", person:title(), ".");
58return person:tell(this:title(), " pays ", args[1], " ", args[2], " to you.");
59endif
60$command_utils:do_huh(verb, args);

conv*ert

Spec any at/to anyFlags rdOwner #36Definer #91

Referenced by

none

Source

1"conv <amount> <currency1> to <currency2> => does mathematical (not actual) conversion";
2args = setremove(args, "to");
3is_real = $money_utils:_has_currency(args[2]);
4if (length(args) < 3)
5return this:tell("...to which currency?");
6elseif (this.stats_current[2][3] < 5.75)
7return this:tell("You don't know the math needed to convert currencies.");
8endif
9also_real = $money_utils:_has_currency(args[3]);
10amount = toint(args[1]) ? tofloat(args[1]) | 0.0;
11if ((is_real && also_real) && (amount > 0.0))
12tvalue = $money_utils:_from_to(args[2], args[3], amount);
13this:tell(args[1], " ", args[2], " = ", floatstr(tvalue, 2), " ", args[3]);
14else
15this:tell("Cannot convert - Invalid input.");
16endif

transfer_ammo

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1"USAGE: transfer_ammo(amount,source,recipient)";
2"WIZ PERMS";
3amount = toint(args[1]);
4source = args[2];
5recipient = args[3];
6prop = $object_utils:has_property(source, "rounds") ? "rounds" | "units";
7clip = #-1;
8if ((this.location == recipient.location) || (this.location == recipient))
9for x in (recipient:contents())
10if (parent(x) == parent(source))
11clip = x;
12endif
13endfor
14if ((amount > 0) && (amount <= source.(prop)))
15if (!valid(clip))
16gen = source.f ? source | parent(source);
17nclip = $recycler:_create(gen, $default_holder);
18$building_utils:set_names(nclip, $string_utils:from_list(source.aliases, ","));
19nclip.(prop) = 0;
20nclip:moveto(recipient);
21clip = nclip;
22endif
23for z in [1..amount]
24if (source.(prop) > 0)
25clip.(prop) = clip.(prop) + 1;
26source.(prop) = source.(prop) - 1;
27endif
28endfor
29if (`this.currency ! E_PROPNF => 0')
30this.location:announce_all(this:titlec(), " counts out ", args[1], " ", source:title(), ".");
31elseif (this.location == recipient)
32$you:say_action(tostr("%N %<drops> ", args[1], " ", source:title(), "."));
33else
34$you:say_action(tostr("%N %<gives> ", args[1], " ", source:title(), " to %i."));
35endif
36fork (1)
37$object_utils:isa(clip, $ammo) ? clip:combine() | "already absorbed";
38endfork
39else
40this:tell("You don't have that many to spare.");
41endif
42else
43this:tell(recipient:titlec(), " is not here.");
44endif

description

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1return this.description ? this.description | "You see an ordinary person.";

@kids @s*how @verbs @props @properties @exam*ine exam*ine where*is @where*is home

Spec any none noneFlags rdOwner #2Definer #91

Referenced by

none

Source

1if (verb in {"exam", "examine"})
2if (`dobj.location in {player, player.location} ! ANY => 0' || $object_utils:isa(this, $frand_class))
3dobj:do_examine(this);
4elseif (dobj == $ambiguous_match)
5this:tell("Which one?");
6elseif (dobj == $failed_match)
7if (fakeobj = `this.location:match_fake(dobjstr) ! ANY => 0')
8if (fakeobj == {"seat"})
9this:tell_lines(this.location.seat_desc);
10elseif (fakeobj == {"pool"})
11this:tell_lines(this.location.pool_desc);
12else
13return this:tell_lines(fakeobj);
14endif
15return this.location:who_do_what();
16else
17this:tell("That object is not here.");
18endif
19endif
20elseif (parent(this) != $rpgamer)
21return `this:(verb)(@args) ! E_VERBNF => ""';
22else
23player:tell("I don't understand that.");
24endif

@stats @score @points @skills @st

Spec none none noneFlags rxdOwner #2Definer #91

Referenced by

Source

1"@stats, @score, @points, @skills -- tells you your current stats and skills.";
2lvlup = player.level + 1;
3if (!player.pkill)
4pk = "OFF";
5else
6pk = "ON";
7endif
8if (!player.alive)
9liv = "[bold][red]Dead[normal]";
10else
11liv = "[bold][cyan]Alive[normal]";
12endif
13if (!player.alert)
14alr = "[bold][red]Unconscious[normal]";
15else
16alr = "[bold][cyan]Conscious[normal]";
17endif
18if (!player.mobile)
19mob = "[bold][red]Paralyzed[normal]";
20else
21mob = "[bold][cyan]Mobile[normal]";
22endif
23if (parent(player) == $wiz)
24type = "[bold][green][Wizard][normal]";
25elseif (parent(player) == $prog)
26type = "[bold][green][Programmer][normal]";
27elseif (parent(player) == $builder)
28type = "[bold][green][Builder][normal]";
29else
30type = "[bold][blue][Player][normal]";
31endif
32player:tell();
33player:tell(" [purple]", player.name, "[normal] ", type, " [cyan](", $string_utils:capitalize(player.gender), ")[normal]");
34player:tell(" [bold][cyan]", player.race, " ", player.class, "[normal]");
35if (player.magic_immunity)
36player:tell(" [bold][blue][MAGIC IMMUNITY][normal]");
37endif
38player:tell();
39player:tell(" [bold][cyan]Level ", tostr(player.level), " [blue]/ [cyan]Experience: ", tostr(player.experience), "/", tostr($server_options.level_info[lvlup][2]), "[normal]");
40player:tell();
41player:tell(" [bold][red]Kills: ", tostr(player.killcount), "[normal]");
42player:tell();
43player:tell(" [bold][red]PKILL: ", pk, "[normal]");
44player:tell();
45player:tell(" [purple]Status: ", liv, ", ", alr, " [purple]and[normal] ", mob);
46player:tell();
47player:tell(" [bold][green][underline]STATISTICS        CUR/MAX      [normal]");
48player:tell(" [bold][green]Strength.......[unbold] ", floatstr(player.stats_current[2][1], 2), "/", floatstr(player.stats[2][1], 2), "[normal]");
49player:tell(" [bold][green]Dexterity......[unbold] ", floatstr(player.stats_current[2][2], 2), "/", floatstr(player.stats[2][2], 2), "[normal]");
50player:tell(" [bold][green]Intelligence...[unbold] ", floatstr(player.stats_current[2][3], 2), "/", floatstr(player.stats[2][3], 2), "[normal]");
51player:tell(" [bold][green]Health.........[unbold] ", floatstr(player.stats_current[2][4], 2), "/", floatstr(player.stats[2][4], 2), "[normal]");
52player:tell(" [bold][green]Combat.........[unbold] ", floatstr(player.skills[2][1], 2), "[normal]");
53player:tell();
54player:tell(" [green]Attack......... ", floatstr(player:to_hit(), 2), "[normal]");
55player:tell(" [green]Defense........ ", floatstr(player:to_defend(), 2), "[normal]");
56player:tell(" [green]Damage Base.... ", floatstr(player:damage(), 2), "[normal]");
57player:tell(" [green]Armor.......... ", floatstr(player:armor(), 2), "[normal]");
58player:tell();
59player:tell(" [cyan]Adv. Points.... ", tostr(player.adv_points), "[normal]");
60player:tell(" [cyan]Bonus Points... ", floatstr(player.free_points, 2), "[normal]");
61player:tell();
62if ((player.class == "Blue Mage") || (player.class == "Red Mage"))
63player:tell(" [bold][green]Spells......... ", tostr(player.used_spells), "/", tostr(player:max_spells()), "[normal]");
64player:tell();
65endif
66if (player.wielded == $hand)
67player:tell(" Wielding....... (nothing)");
68else
69player:tell(" Wielding....... ", player.wielded:title());
70endif
71player:tell();
72armor = {};
73for x in (player.contents)
74if ((parent(parent(x)) == $clothing) && (x.wornness == 1))
75armor = setadd(armor, x);
76endif
77endfor
78for y in (armor)
79if ((y.body_area == "arm") || (y.body_area == "hand"))
80wearstr = " Holding........ ";
81elseif (((y.body_area == "torso") || (y.body_area == "head")) || (y.body_area == "legs"))
82wearstr = " Wearing........ ";
83endif
84player:tell(wearstr, y:title(), " (", $string_utils:capitalize(y.body_area), ")");
85endfor
86player:tell();
87if (player.money != {})
88player:tell(" [bold][yellow]Gold........... [normal]", floatstr(player.money[1][2], 2));
89else
90player:tell(" [bold][yellow]Gold............ [normal](none)");
91endif
92player:tell();

@boost

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

Referenced by

none

Source

1"USAGE: @boost <stat/skill> to <level>";
2"       <level> can be a number, or the word 'maximum' ('max')";
3if (`player.location == $local.chargen ! ANY => 0' && ($local.chargen.type == "choice"))
4return player:tell("Use \"set\" while generating your character.");
5elseif (length(parsed = $rp_regulator:parse_stat_level(dobjstr, iobjstr, player)) == 3)
6{kind, index, newlevel} = parsed;
7else
8if (!(iobjstr in {"max", "maximum"}))
9player:tell(E_INVARG);
10endif
11return;
12endif
13if (kind == "stat")
14if (newlevel < player.stats[2][index])
15return player:tell("You cannot lower statistics to gain points.");
16endif
17player.free_points = player.free_points + ($rp_regulator:boost_mod(player.stats[1][index], this) * $rp_regulator:statcost(player.stats[2][index]));
18newcost = $rp_regulator:boost_mod(player.stats[1][index], this) * $rp_regulator:statcost(newlevel);
19if (newcost <= player.free_points)
20player.free_points = player.free_points - newcost;
21curdif = newlevel - player.stats[2][index];
22player.stats_current[2][index] = curdif + player.stats_current[2][index];
23player.stats[2][index] = newlevel;
24player:tell(player.stats[1][index], " => ", floatstr(newlevel, 2));
25player:infobar();
26else
27player.free_points = player.free_points - ($rp_regulator:boost_mod(player.stats[1][index], this) * $rp_regulator:statcost(player.stats[2][index]));
28player:tell("You don't have enough points for that change.");
29endif
30else
31if (newlevel < player.skills[2][index])
32return player:tell("You cannot lower skills to gain points.");
33endif
34minskill = (dobjstr == "ki") ? 0.2 | 0.0;
35if (player.skills[2][index] <= minskill)
36return player:tell("You can't boost skills in which you don't have minimum proficiency.");
37endif
38player.free_points = player.free_points + ($rp_regulator:boost_mod(player.skills[1][index], this) * $rp_regulator:skillcost(player.skills[2][index]));
39newcost = $rp_regulator:boost_mod(player.skills[1][index], this) * $rp_regulator:skillcost(newlevel);
40if (newcost <= player.free_points)
41player.free_points = player.free_points - newcost;
42player.skills[2][index] = newlevel;
43player:tell(player.skills[1][index], " => ", floatstr(newlevel, 2));
44player:infobar();
45else
46player.free_points = player.free_points - ($rp_regulator:boost_mod(player.skills[1][index], this) * $rp_regulator:skillcost(player.skills[2][index]));
47player:tell("You don't have enough points for that change.");
48endif
49endif

@send @answer @repl*y

Spec any any anyFlags rxdOwner #2Definer #91

Referenced by

none

Source

1"This verb uses a property 'sanctuary', already on the combat room.";
2"(room.sanctuary == 0) => combat allowed.";
3"(room.sanctuary == 1) => combat forbidden.";
4"(room.sanctuary == 2) => combat forbidden and mailing allowed.";
5if (`!(!property_info(this.location, "sanctuary")) ! E_PROPNF => 0')
6if ((this.location.sanctuary == 2) || (parent(this) != $rpgamer))
7return pass(@args);
8endif
9this:tell("You can't find a good place to compose your letter.");
10if ($command_utils:yes_or_no("Do you want to send a quick note (no editing)?"))
11if (args && (args[1] == "to"))
12args = listdelete(args, 1);
13endif
14subject = {};
15for a in (args)
16if (((i = index(a, "=")) > 3) && (index("subject", a[1..i - 1]) == 1))
17args = setremove(args, a);
18a[1..i] = "";
19subject = {a};
20endif
21endfor
22rcpts = $mail_editor:parse_recipients({}, args) || $mail_editor:parse_recipients({}, $command_utils:read("mail recipients"));
23if (rcpts)
24subj = $command_utils:read("subject");
25if (subj)
26this:tell("Enter your message below:");
27if (text = $command_utils:read_lines())
28return $mail_agent:send_message(this, rcpts, subj, text) && this:tell("Mail sent.");
29endif
30endif
31endif
32return this:tell("Session aborted.");
33else
34if (valid(realm = this.location.location))
35realm = $object_utils:isa(realm, $realm) ? realm | realm.location;
36realm = $object_utils:isa(realm, $realm) ? realm | $nothing;
37postals = {};
38for p in (realm.contents)
39postals = ($object_utils:isa(p, $rpg_room) && (p.sanctuary == 2)) ? {@postals, p} | postals;
40endfor
41this:tell("Mail terminals in the area: ", $string_utils:nn(postals));
42endif
43return;
44endif
45endif
46pass(@args);

cash money gold

Spec none none noneFlags rdOwner #36Definer #91

Referenced by

none

Source

1if (this.money == {})
2this:tell("You have no money.");
3elseif (this.stats_current[2][3] < 4.25)
4this:tell("You lack the intelligence required to count money.");
5else
6this:tell("You have [bold][yellow]", floatstr(this.money[1][2], 2), "[normal] gold.");
7endif

my_match_object

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1if (parent(this) != $rpgamer)
2return pass(@args);
3endif
4o = pass(@args);
5if (`o.location == player ! E_INVIND => 0')
6return o;
7endif
8return (valid(o) && (!valid(player.location:match(args[1])))) ? $failed_match | o;

medical

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1"USAGE: healer:medical()";
2"Returns intelligence level, modified by medical skill.";
3"If there are additional skills affecting healing, this is the verb to hack.";
4medical = "medical" in this.skills[1];
5return (0.667 * this.stats_current[2][3]) + (1.5 * this.skills[2][medical]);

@features

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

Referenced by

none

Source

1if (parent(this) == $rpgamer)
2features = {};
3for feature in (this.features)
4if (!valid(feature))
5this:remove_feature(feature);
6else
7features = listappend(features, feature);
8endif
9endfor
10if (features)
11len = max(length("Feature"), length(tostr(max_object()))) + 1;
12player:tell("These features may contain help files for their use. Type \"? <#feature>\" to access that information.");
13player:tell($string_utils:left("Feature", len), "Name");
14player:tell($string_utils:left("-------", len), "----");
15for feature in (features)
16player:tell($string_utils:left(tostr(feature), len), feature.name);
17endfor
18player:tell($string_utils:left("-------", len), "----");
19endif
20player:tell(length(features), " feature", (length(features) > 1) ? "s" | "", " found.");
21else
22pass(@args);
23endif

@add-feature @addfeature @remove-feature @rmfeature

Spec any none noneFlags rdOwner #2Definer #91

Referenced by

none

Source

1if (parent(this) == $rpgamer)
2return player:notify("Sorry, only a wizard can add or remove your features on this MOO.");
3elseif (caller == this)
4pass(@args);
5endif

_add_money _rem_money

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

Source

1"USAGE: _add_money(currency, amount) or _rem_money(currency, amount)";
2"       _rem_money returns 1 if unsucessful.";
3plus = (verb == "_add_money") ? 1 | 0;
4if (m = args[1] in $list_utils:slice(this.money))
5if (plus)
6this.money[m][2] = this.money[m][2] + tofloat(args[2]);
7elseif ((leftover = this.money[m][2] - tofloat(args[2])) >= 0.0)
8this.money[m][2] = leftover;
9return 0;
10else
11return 1;
12endif
13elseif (plus)
14this.money = {@this.money, {args[1], tofloat(args[2])}};
15endif
16return 1;

_has_amount

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1"USAGE: _has_amount(currency) => FLOAT";
2if (m = args[1] in $list_utils:slice(this.money))
3return this.money[m][2];
4else
5return 0.0;
6endif

_loot

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (player.location == this.location)
2if (this in connected_players())
3if ((!this.alert) || (!this.mobile))
4this:dump_goodies(1);
5$you:say_action("%N %<searches> %d for valuable goods.");
6this.location:tell_contents(setremove(this.location:contents(), player), this.location.ctype);
7else
8this:tell("You cautiously dodge ", player:title(), ", who is trying to steal from you.");
9player:tell(this:titlec(), " cautiously dodges your advance.");
10this.location:announce_all_but({this, player}, tostr(this:titlec(), " cautiously avoids ", player:title(), "."));
11endif
12else
13$you:say_action("%N %<attempts> to search %d for valuable goods, but %<is/are> deflected by a stasis field.");
14endif
15else
16player:tell("There is no \"", dobjstr, "\" here.");
17endif
18"WIZ PERMS";

roll_against

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

Source

1"USAGE: roll_against(StatOrSkillName or nothing, [modifier]) => Tests for successful action attempt. Skill points & free points are adjusted automatically.";
2"       => 0=failure, 1=success, 2=total success";
3"       optional [modifier] should be between 0.75 and 1.25, with higher numbers offering a greater chance of success.";
4"supports: strength, dexterity, intelligence, health, attack, defense, combat, medical, language, charismatic, necromatic, legerdemain, mechanical, pilot, command, search, vision, stealth";
5name = `args[1] ! E_RANGE => ""';
6level = 10.5;
7sk = 0;
8if (!name)
9"use defaults";
10elseif (i = name in this.stats[1])
11level = this.stats[2][i];
12sk = 0;
13elseif (name in {"combat", "attack"})
14sk = "combat" in this.skills[1];
15level = this:to_hit();
16elseif (name == "defense")
17sk = "combat" in this.skills[1];
18level = this:to_defend();
19elseif (name == "medical")
20level = this:medical();
21sk = name in this.skills[1];
22elseif (name in {"language", "necromatic", "mechanical"})
23level = this.stats_current[2][3] + `this.skills[2][sk = name in this.skills[1]] ! ANY => 0.0';
24elseif (name == "pilot")
25level = (((2.0 * this.stats_current[2][2]) + this.stats_current[2][3]) / 3.0) + `this.skills[2][sk = "vision" in this.skills[1]] ! ANY => 0.0';
26elseif (name in {"legerdemain", "stealth"})
27name = (sk = name in this.skills[1]) ? name | "legerdemain";
28level = this.stats_current[2][2] + `this.skills[2][sk = name in this.skills[1]] ! ANY => 0.0';
29elseif (name in {"charismatic", "command"})
30name = (sk = name in this.skills[1]) ? name | "charismatic";
31level = this.stats_current[2][3] + `this.skills[2][sk = name in this.skills[1]] ! ANY => 0.0';
32elseif (name in {"vision", "search"})
33name = (sk = name in this.skills[1]) ? name | "vision";
34level = (((this.stats_current[2][4] + this.stats_current[2][3]) + this.stats_current[2][2]) / 3.0) + `this.skills[2][sk = name in this.skills[1]] ! ANY => 0.0';
35else
36"use defaults";
37endif
38rec = {this, sk};
39if (m = `tofloat(args[2]) ! ANY => 0')
40modifier = (m > 1.25) ? 1.25 | m;
41modifier = (m < 0.75) ? 0.75 | m;
42else
43modifier = 1.0;
44endif
45roll = tofloat((random(6) + random(6)) + random(6)) / modifier;
46if ((roll < 5.0) || (roll < (level - 10.0)))
47hit = 2;
48elseif ((roll < level) && (roll < 16.0))
49hit = 1;
50else
51hit = 0;
52endif
53if (!(rec in $rp_regulator.rollers))
54if (sk)
55denom = ((lump = this.skills[2][sk]) >= 1.0) ? lump | 1.0;
56this.skills[2][sk] = this.skills[2][sk] + ((tofloat(hit) + 0.25) * (0.0005 / denom));
57endif
58this.free_points = this.free_points + ((tofloat(hit) + 0.5) * 0.0005);
59$rp_regulator.rollers = setadd($rp_regulator.rollers, rec);
60$scheduler:schedule(7, $rp_regulator, "remove_roller", {rec});
61endif
62return hit;

@roll

Spec any none noneFlags rdOwner #2Definer #91

Referenced by

none

Source

1"USAGE: @roll <StatOrSkillName or nothing> => Tests for successful action attempt.";
2"       => failure, success, or total success";
3"";
4"supports: strength, dexterity, intelligence, health, attack, defense, combat, medical, language, charismatic, necromatic, legerdemain, mechanical, pilot, command, search, vision, stealth";
5"";
6"Players may create their own roleplay rules and situations and use this verb to test for successful attempts.";
7b = $failed_match;
8skills = {"strength", "dexterity", "intelligence", "health", "attack", "defense", "combat", "medical", "language", "charismatic", "necromatic", "legerdemain", "mechanical", "pilot", "command", "search", "vision", "stealth"};
9if (dobjstr && (!(b = $string_utils:match_stringlist(dobjstr, skills))))
10if (!$command_utils:yes_or_no("This is not a valid roll option. Do you wish a standard success roll?"))
11return player:tell("[yellow]***[normal] @roll aborted [yellow]***[normal]");
12endif
13dobjstr = "";
14endif
15dobjstr = ((!typeof(b)) && b) ? skills[b] | dobjstr;
16success = this:roll_against(dobjstr);
17blurb = (!typeof(b)) ? "[yellow]***[normal] %N %<rolls> for " | "[yellow]***[normal] %N %<rolls> against the situation";
18if (!success)
19$you:say_action(tostr(blurb, dobjstr, " and %<fails>. [yellow]***[normal]"));
20elseif (success == 1)
21$you:say_action(tostr(blurb, dobjstr, " and %<succeeds>. [yellow]***[normal]"));
22else
23$you:say_action(tostr(blurb, dobjstr, " and [bold]totally[normal] %<succeeds>. [yellow]***[normal]"));
24endif

loot rob pilfer roll search strip

Spec this none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1"USAGE: loot/rob/pilfer/roll/search/strip <person> => if person is knocked out, moves person.contents to the room.";
2"this:_loot();   <= Disabled command.";

speak*ing

Spec any none noneFlags rdOwner #2Definer #91

Referenced by

none

Source

1if (dobjstr == "")
2player:Tell("You know the following languages:");
3player:Tell("-----------------------------------");
4n = 0;
5for l in ($lang_utils:can_speak_languages(player))
6(ticks_left() < 4000) && suspend(0);
7n = n + 1;
8player:tell(n, ". ", l.lang_name);
9endfor
10player:tell();
11player:tell("You are currently speaking ", $lang_utils:speaking(player).lang_name, ".");
12else
13n = tonum(dobjstr);
14langs = $lang_utils:can_speak_languages(player);
15if ((n == 0) || (n > length(langs)))
16m = $string_utils:match(dobjstr, langs, "lang_name");
17if (!valid(m))
18return player:Tell("You don't speak that language.");
19endif
20lang = m;
21else
22lang = langs[n];
23endif
24player.speaking = lang;
25player:Tell("You are now speaking ", lang.lang_name, ".");
26endif

remember

Spec any as anyFlags rdOwner #36Definer #91

Referenced by

none

Source

1rm = player.location:match(dobjstr);
2if (!valid(rm))
3return (rm == $ambiguous_match) ? player:Tell("There are too many things described as '", dobjstr, "'.") | player:Tell("I don't see any person described as '", dobjstr, "'.");
4elseif (!($rpgamer in $object_utils:ancestors(rm)))
5return player:Tell("You don't need to remember that.");
6endif
7rin = rm in $list_utils:slice(player.remembered_names, 1);
8if (rin)
9player:tell("You already have that person remembered as '", player.remembered_names[rin][2], "'.");
10if (!$command_utils:yes_or_no("Do you want to overwrite the old name?"))
11return player:tell("Okay. It will remain as '", player.remembered_names[rin][2], "'.");
12endif
13player.remembered_names = setremove(player.remembered_names, player.remembered_names[rin]);
14endif
15player.remembered_names = setadd(player.remembered_names, {rm, iobjstr});
16player:tell("Okay you now know that person as '", iobjstr, "'.");
17suspend(1);
18"clean out non-players";
19for r in (player.remembered_names)
20if (!($rpgamer in $object_utils:ancestors(r[1])))
21player.remembered_names = setremove(player.remembered_names, r);
22endif
23endfor

do_forget

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

none

Source

1remembered = this.remembered_names;
2{target} = args;
3index = $list_utils:iassoc(target, remembered, 1);
4if (!index)
5return 0;
6endif
7remembered = listdelete(remembered, index);
8this.remembered_names = remembered;
9return 1;

short_desc_matches

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

none

Source

1base = this:short_desc_msg();
2words = $string_utils:words(base);
3l = length(words);
4alist = {this.gender, this.race, (this.gender + " ") + this.race, (this.race + " ") + this.gender};
5for i in [1..l]
6alist = setadd(alist, $string_utils:from_list(words[i..l], " "));
7blist = $list_utils:remove_duplicates({words[i], words[l]});
8alist = setadd(alist, $string_utils:from_list(blist, " "));
9endfor
10return $list_utils:remove_duplicates(alist);

@remembered

Spec none none noneFlags rdOwner #36Definer #91

Referenced by

none

Source

1for r in (player.remembered_names)
2(ticks_left() < 500) && suspend(0);
3player:tell(r[2], ": ", `r[1]:short_desc_msg() ! ANY => "ERROR, contact a wizard about your .remembered_names list"');
4endfor
5player:tell();

short_desc_msg

Spec this none thisFlags rxdOwner #36Definer #91

Referenced by

Source

1return this.short_desc_msg ? this.short_desc_msg | tostr("a ", this.gender, " ", this.race);

@know*ledge

Spec none none noneFlags rxdOwner #36Definer #91

Referenced by

none

Source

1if (player.knowledge == {})
2player:tell("You have not retained any knowledge.");
3return;
4else
5player:tell("[purple]Your quest for knowledge has yielded...[normal]");
6player:tell("");
7for x in (player.knowledge)
8if (typeof(x) == LIST)
9for w in (this.knowledge)
10player:tell(tostr("[cyan]", tostr(w), "[normal]"));
11endfor
12player:tell("");
13elseif (typeof(x) == STR)
14player:tell("[cyan]", x, "[normal]");
15endif
16if (typeof(this.knowledge) == STR)
17player:tell_lines(tostr("[purple]", tostr(x), "[normal]"));
18player:tell("");
19endif
20endfor
21player:tell("");
22player:tell("[purple](End)[normal]");
23endif

know retain reflect journal

Spec any any anyFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (!argstr)
2player:tell("[purple]You reflect on your quest...[normal]");
3player:tell("");
4reflect = $command_utils:read_lines();
5player.knowledge = setadd(player.knowledge, tostr("~ Reflection from ", ctime()));
6for x in (reflect)
7player.knowledge = setadd(player.knowledge, x);
8endfor
9player.knowledge = setadd(player.knowledge, tostr("~ End of reflection from ", ctime()));
10player:tell("[purple]You have added to your knowledge.[normal]");
11return;
12elseif (argstr)
13player.knowledge = setadd(player.knowledge, tostr("~ From ", ctime(), "... ", argstr));
14player:tell("[purple]You have added to your knowledge.[normal]");
15return;
16else
17player:tell("Improper syntax.");
18return;
19endif

@unknow @forget

Spec any none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (!argstr)
2choice = $command_utils:yes_or_no("[purple]Do you really want to erase your knowledge irrevocably?[normal]");
3if (!choice)
4player:tell("[purple]No change to your knowledge.[normal]");
5return;
6elseif (choice)
7player.knowledge = {};
8player:tell("[purple]Your knowledge has been erased.[normal]");
9return;
10endif
11elseif (argstr)
12player.knowledge = listdelete(player.knowledge, toint(argstr));
13player:tell("[purple]Item number ", argstr, " removed from your knowledge.[normal]");
14return;
15endif

@en*emies

Spec none none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1for x in (player.location.contents)
2if (parent(parent(x)) == $monster)
3player:tell("You see ", x:title(), " (", tostr(toobj(x)), ").");
4endif
5endfor

@roomnum*bers

Spec any any anyFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (!argstr)
2if (!player.roomnum)
3player:tell("Current Option: Room numbers are not displayed. (see 'help @roomnumbers')");
4return;
5else
6player:tell("Current Option: Room numbers are displayed. (see 'help @roomnumbers')");
7return;
8endif
9endif
10if (argstr == "on")
11player.roomnum = 1;
12player:tell("Room numbers will be displayed.");
13return;
14elseif (argstr == "off")
15player.roomnum = 0;
16player:tell("Room numbers will not be displayed.");
17return;
18else
19player:tell("Usage: @roomnumbers <on|off>");
20endif

@k*ills

Spec none none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1player:tell("You have killed [red]", tostr(player.killcount), "[normal] enemies.");

infobar

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (player.infobar)
2if (player.money == {})
3goldstr = "[yellow]G 0[normal]";
4else
5goldstr = ("[yellow]G " + floatstr(player.money[1][2], 0)) + "[normal]";
6endif
7levelup = player.level + 1;
8hp = ((("[green]HP " + floatstr(player.stats_current[2][4], 1)) + "/") + floatstr(player.stats[2][4], 1)) + "[blue]|";
9if (player.adv_points > 0)
10infobar = (((((((((("[bold][blue]{[purple]" + player.name) + "[blue]|[cyan]LVL ") + tostr(player.level)) + "[red]! [cyan]XP ") + tostr(player.experience)) + "/") + tostr($server_options.level_info[levelup][2])) + "[blue]|") + hp) + goldstr) + "[bold][blue]}[normal]";
11else
12if (player.level >= 50)
13infobar = (((((("[bold][blue]{[purple]" + player.name) + "[blue]|[cyan]LVL ") + tostr(player.level)) + " [cyan]XP MAX[blue]|") + hp) + goldstr) + "[bold][blue]}[normal]";
14else
15infobar = (((((((((("[bold][blue]{[purple]" + player.name) + "[blue]|[cyan]LVL ") + tostr(player.level)) + " [cyan]XP ") + tostr(player.experience)) + "/") + tostr($server_options.level_info[levelup][2])) + "[blue]|") + hp) + goldstr) + "[bold][blue]}[normal]";
16endif
17endif
18player:tell();
19player:tell(infobar);
20player:tell();
21endif

@infobar

Spec any any anyFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (!argstr)
2player:tell("Usage: @infobar <on|off>");
3player:tell();
4player:tell("Turns the information bar (the information displayed after a command is entered) on or off.");
5return;
6elseif ((argstr == "on") && (player.infobar == 1))
7player:tell("The information bar is already turned on.");
8return;
9elseif ((argstr == "off") && (player.infobar == 0))
10player:tell("The information bar is already turned off.");
11return;
12endif
13if (argstr == "on")
14player.infobar = 1;
15player:tell("You have turned on your information bar.");
16return;
17elseif (argstr == "off")
18player.infobar = 0;
19player:tell("You have turned off your information bar.");
20return;
21else
22player:tell("Use '@infobar on' or '@infobar off'.");
23return;
24endif

request_line

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1r = read(player);
2return r;

_at*tack

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (!argstr)
2player:tell("Usage: _attack <target>");
3return;
4endif
5if (argstr[1] == "#")
6target = tostr(toobj(toint(argstr[2..$])));
7player:tell("----- target=", target, " ----- obj");
8else
9target = tostr($string_utils:match_object(argstr, player.location));
10endif
11if (toobj(target) == #-2)
12player:tell("'", argstr, "' could be more than one monster. Attacking the first.");
13target = "first " + argstr;
14endif
15if (target == #-3)
16player:tell("'", argstr, "' cannot be found here.");
17return;
18endif
19if (((toobj(target) in player.location.contents) && (parent(toobj(target)) == $player_class)) && (toobj(target).pkill == 0))
20player:tell(target:title(), " is not a player-killer!");
21return;
22endif
23target = toobj(target);
24pmod = tofloat(player.stats_current[2][1]) + tofloat(player.stats_current[2][2]);
25tmod = tofloat(target.stats_current[2][1]) / 2.0;
26if (target in player.location.contents)
27playerinit = player.stats_current[2][2] + tofloat(random(6));
28targetinit = target.stats_current[2][2] + tofloat(random(6));
29if (playerinit >= targetinit)
30critical = random(64);
31if (critical == 64)
32return player.location:do_attack(player.name, target.name, tofloat(random(toint(player:damage()))) + pmod, 1);
33endif
34return player.location:do_attack(player.name, target.name, tofloat(random(toint(player:damage()))) + pmod, 0);
35elseif (targetinit > playerinit)
36critical = random(64);
37if (critical == 64)
38return target.location:do_attack(target.name, player.name, tofloat(random(toint(target:damage()))) + tmod, 1);
39endif
40return target.location:do_attack(target.name, player.name, tofloat(random(toint(target:damage()))) + tmod, 0);
41endif
42endif

_k*ill

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (!argstr)
2player:tell("Usage: _kill <target>");
3return;
4endif
5target = $string_utils:match_object(argstr, player.location);
6if (target == #-2)
7player:tell("'", argstr, "' could be more than one monster.");
8player:tell("Use @enemies (or @en) to see monster object numbers, then _kill #<object-num>.");
9return;
10endif
11if (target == #-3)
12player:tell("'", argstr, "' cannot be found here. ");
13return;
14endif
15if (!valid(target))
16player:tell("Invalid target.");
17return;
18endif
19if (!$object_utils:has_property(target, "wielded"))
20player:tell("Invalid target.");
21return;
22endif
23if (((target in player.location.contents) && (parent(target) == $player_class)) && (target.pkill == 0))
24player:tell(target:title(), " is not a player-killer!");
25return;
26endif
27pmod = tofloat(player.stats_current[2][1]) + tofloat(player.stats_current[2][2]);
28tmod = tofloat(target.stats_current[2][1]) / 2.0;
29if (target in player.location.contents)
30playerinit = player.stats_current[2][2] + tofloat(random(6));
31targetinit = target.stats_current[2][2] + tofloat(random(6));
32if (playerinit >= targetinit)
33critical = random(64);
34if (critical == 64)
35player.location:do_attack(player.name, target.name, tofloat(random(toint(player:damage()))) + pmod, 1);
36if ((target in player.location.contents) && target.alive)
37cmd = "kill " + argstr;
38suspend(4);
39force_input(player, cmd);
40endif
41endif
42player.location:do_attack(player.name, target.name, tofloat(random(toint(player:damage()))) + pmod, 0);
43if ((target in player.location.contents) && target.alive)
44cmd = "kill " + argstr;
45suspend(4);
46force_input(player, cmd);
47endif
48elseif (targetinit > playerinit)
49critical = random(64);
50if (critical == 64)
51target.location:do_attack(target.name, player.name, tofloat(random(toint(target:damage()))) + tmod, 1);
52if ((target in player.location.contents) && target.alive)
53cmd = "kill " + argstr;
54suspend(4);
55force_input(player, cmd);
56endif
57endif
58target.location:do_attack(target.name, player.name, tofloat(random(toint(target:damage()))) + tmod, 0);
59if ((target in player.location.contents) && target.alive)
60cmd = "kill " + argstr;
61suspend(4);
62force_input(player, cmd);
63endif
64endif
65endif

@adv*ance

Spec any none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (!argstr)
2player:tell("You have [bold][green]", tostr(player.adv_points), "[normal] Advancement Points.");
3player:tell("");
4player:tell("Usage: @advance <stat>");
5player:tell("       @adv* <stat>");
6player:tell("");
7player:tell("Advances one of your stats one full point.");
8player:tell("<stat> may be strength, dexterity, intelligence, health or combat.");
9player:tell("Abbreviations str, dex, int, hea, or com are also acceptable.");
10return;
11endif
12if (!player.adv_points)
13player:tell("You do not have any Advancement Points.");
14return;
15endif
16if ((dobjstr == "strength") || (dobjstr == "str"))
17player.stats[2][1] = player.stats[2][1] + 1.0;
18player.stats_current[2][1] = player.stats_current[2][1] + 1.0;
19player:tell("Your Strength has increased to ", floatstr(player.stats[2][1], 1), ".");
20player.adv_points = player.adv_points - 1;
21player:tell("You now have ", tostr(player.adv_points), " Advancement Points.");
22return;
23elseif ((dobjstr == "dexterity") || (dobjstr == "dex"))
24player.stats[2][2] = player.stats[2][2] + 1.0;
25player.stats_current[2][2] = player.stats_current[2][2] + 1.0;
26player:tell("Your Dexterity has increased to ", floatstr(player.stats[2][2], 1), ".");
27player.adv_points = player.adv_points - 1;
28player:tell("You now have ", tostr(player.adv_points), " Advancement Points.");
29return;
30elseif ((dobjstr == "intelligence") || (dobjstr == "int"))
31player.stats[2][3] = player.stats[2][3] + 1.0;
32player.stats_current[2][3] = player.stats_current[2][3] + 1.0;
33player:tell("Your Intelligence has increased to ", floatstr(player.stats[2][3], 1), ".");
34player.adv_points = player.adv_points - 1;
35player:tell("You now have ", tostr(player.adv_points), " Advancement Points.");
36return;
37elseif ((dobjstr == "health") || (dobjstr == "hea"))
38player.stats[2][4] = player.stats[2][4] + 1.0;
39player.stats_current[2][4] = player.stats_current[2][4] + 1.0;
40player:tell("Your Health has increased to ", floatstr(player.stats[2][4], 1), ".");
41player.adv_points = player.adv_points - 1;
42player:tell("You now have ", tostr(player.adv_points), " Advancement Points.");
43return;
44elseif ((dobjstr == "combat") || (dobjstr == "com"))
45player.skills[2][1] = player.skills[2][1] + 1.0;
46player:tell("Your Combat has increased to ", floatstr(player.skills[2][1], 1), ".");
47player.adv_points = player.adv_points - 1;
48player:tell("You now have ", tostr(player.adv_points), " Advancement Points.");
49return;
50else
51player:tell("Improper syntax. Type 'help @advance'.");
52endif

@info @lev*el @lvl @life @xp

Spec none none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1levelup = player.level + 1;
2player:tell();
3player:tell("You are at level [bold][cyan]", tostr(player.level), "[normal]. You have [bold][red]", tostr(player.adv_points), " [normal]Advancement Points.");
4player:tell("You have [bold][cyan]", tostr(player.experience), "[normal] experience points.");
5player:tell("You need [bold][cyan]", tostr($server_options.level_info[levelup][2]), "[normal] to reach level ", tostr(levelup), "[normal].");
6player:tell();
7player:tell("You have [bold][green]", floatstr(player.stats_current[2][4], 1), "[normal] out of a maximum [bold][green]", floatstr(player.stats[2][4], 1), "[normal].");
8player:tell("You are carrying [bold][yellow]", floatstr(player.money[1][2], 1), " [normal]gold.");

@bonus

Spec none none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1return player:tell("You have [bold]", floatstr(player.free_points, 2), " [normal]Bonus Points.");

@reset @chargen

Spec none none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1player:tell();
2player:tell("[bold][red]WARNING: USING THIS COMMAND WILL RESET YOUR CHARACTER TO LEVEL 1,[normal]");
3player:tell("         [bold][red]YOUR STATS WILL RESET, YOU WILL LOSE YOUR GOLD, AND YOUR [normal]");
4player:tell("         [bold][red]ITEMS WILL BE DROPPED.[normal]");
5player:tell();
6player:tell("[bold][red]Do you wish to continue?[normal]");
7player:tell();
8choice = $command_utils:yes_or_no();
9if ((choice == 0) || (choice == E_INVARG))
10player:tell("You have chosen not to reset your character.");
11player:infobar();
12return;
13endif
14if (choice == 1)
15if (player.contents == {})
16drop = "You have nothing in inventory to drop.";
17player:tell(drop);
18else
19drop = ("You are dropping " + $string_utils:title_list(player.contents)) + ".";
20for i in (player.contents)
21move(i, player.location);
22endfor
23player:tell(drop);
24player.location:tell(player:title(), " drops everything ", player.ps, " was carrying!");
25endif
26player.stats = {{"Strength", "Dexterity", "Intelligence", "Health"}, {10.0, 10.0, 10.0, 10.0}};
27player.stats_current = {{"Strength", "Dexterity", "Intelligence", "Health"}, {10.0, 10.0, 10.0, 10.0}};
28player.skills = {{"combat", "medical", "language"}, {0.0, 0.0, 0.0}};
29player.money = {{"gold", 32.0}};
30player.alive = 1;
31player.alert = 1;
32player.adv_points = 0;
33player.experience = 0;
34player.level = 1;
35player.free_points = 0.0;
36player.damage_base = 0.5;
37player.magic_immunity = 0;
38player.pkill = 0;
39player.killcount = 0;
40player.knowledge = {};
41player.infobar = 1;
42player.roomnum = 0;
43player.wielded = $hand;
44player.home = #62;
45player:infobar();
46player.resets = player.resets + 1;
47player:tell("Your character has been successfully reset.");
48player:tell("You will now be moved back to the Character Generator.");
49suspend(2);
50player.location:announce(this:titlec(), " slowly vanishes into blue mist...");
51player:tell("You dematerialize into a blue mist and fade from existence...");
52player:tell("");
53move(player, $local_chargen);
54return;
55endif
56player:tell("You have chosen not to reset your character.");
57player:infobar();
58return;

@pkill

Spec any any anyFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if ((argstr == "on") && (!player.pkill))
2player:tell("You have PKILL set to OFF. (Default)");
3player:tell();
4player:tell("PKILL can be turned on if you wish, but it CANNOT be turned off later. It will only reset to OFF if you die or @reset.");
5player:tell();
6player:tell("Do you want to permanently set PKILL to ON?");
7choice = $command_utils:yes_or_no();
8if (choice == 1)
9player.pkill = 1;
10return player:tell("PKILL set to ON.");
11else
12player:tell("PKILL will remain OFF.");
13endif
14elseif ((argstr == "off") && (!player.pkill))
15return player:tell("You have PKILL set to OFF already.");
16elseif ((argstr == "on") && player.pkill)
17return player:tell("You have PKILL set to ON already.");
18elseif ((argstr == "off") && player.pkill)
19player:tell("You cannot set PKILL to OFF once it is set to ON.");
20player:tell("PKILL will remain ON.");
21else
22player:tell("Usage: @pkill <on>");
23player:tell();
24player:tell("Set PKILL to ON. It cannot be set to OFF after this; it only resets to OFF if you die or @reset.");
25player:tell("'@pkill' by itself returns your PKILL setting.");
26endif
27if (!argstr)
28if (player.pkill)
29setting = "ON";
30elseif (!player.pkill)
31setting = "OFF";
32endif
33player:tell();
34return player:tell("You have PKILL set to ", setting, ".");
35endif

@map

Spec any any anyFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (!argstr)
2player:tell("Usage: @map <on|off>");
3player:tell();
4player:tell("Turns the minimap on or off. Default: Off");
5player:tell("When minimap is on, exits in a room are not displayed and described as usual. You may still look at a given exit to see where it leads.");
6return;
7elseif ((argstr == "on") && (player.map == 1))
8player:tell("The minimap is already turned on.");
9return;
10elseif ((argstr == "off") && (player.map == 0))
11player:tell("The minimap is already turned off.");
12return;
13endif
14if (argstr == "on")
15player.map = 1;
16player:tell("You have turned on your minimap.");
17return;
18elseif (argstr == "off")
19player.map = 0;
20player:tell("You have turned off your minimap.");
21return;
22else
23player:tell("Use '@map on' or '@map off'.");
24return;
25endif

map

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1light = 1;
2if (player.location.dark)
3light = 0;
4endif
5for z in (player.contents)
6if ($object_utils:isa(z, $light) && z.light_on)
7light = 1;
8endif
9endfor
10if (!light)
11player:tell("+--------+");
12player:tell("| (dark) |");
13player:tell("+--------+");
14player:tell();
15return;
16endif
17ex = {};
18c = "@";
19n = ".";
20ne = ".";
21nw = ".";
22s = ".";
23se = ".";
24sw = ".";
25e = "..";
26w = "..";
27u = ".";
28d = ".";
29for i in (player.location.exits)
30ex = setadd(ex, i.aliases[$]);
31endfor
32if ("n" in ex)
33n = "|";
34endif
35if ("ne" in ex)
36ne = "/";
37endif
38if ("nw" in ex)
39nw = "\\";
40endif
41if ("s" in ex)
42s = "|";
43endif
44if ("se" in ex)
45se = "\\";
46endif
47if ("sw" in ex)
48sw = "/";
49endif
50if ("e" in ex)
51e = "--";
52endif
53if ("w" in ex)
54w = "--";
55endif
56if ("u" in ex)
57u = "^";
58endif
59if ("d" in ex)
60d = "v";
61endif
62player:tell("+---------+");
63player:tell("| NW N NE |");
64player:tell("|  ", nw, ".", n, ".", ne, "  |  Up   ", u);
65player:tell("| W", w, c, e, "E |  Down ", d);
66player:tell("|  ", sw, ".", s, ".", se, "  |");
67player:tell("| SW S SE |");
68player:tell("+---------+");
69player:tell();

max_spells

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1return toint(player.stats[2][3]);

_heal_spell

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (player.class != "Blue Mage")
2return player:tell("Only Blue Mages may cast this spell as a known spell.");
3endif
4if (player.used_spells >= player:max_spells())
5return player:tell("You have reached your maximum of ", tostr(player:max_spells()), " spells per day.");
6endif
7if (player.stats_current[2][3] < 11.0)
8return player:tell("You do not have a high enough INT ability! This spell requires at least 11.0.");
9endif
10target = $string_utils:match_object(args[1], player.location);
11if (((args[1] == "me") || (args[1] == "self")) || (args[1] == "myself"))
12target = player;
13endif
14if ((!$object_utils:has_property(target, "stats")) || (!$object_utils:has_verb(target, "take_health")))
15player:tell("The target is invalid!");
16return;
17endif
18if (target.stats_current[2][4] >= target.stats[2][4])
19player:tell("Target is at or above full health!");
20return;
21endif
22if ((target in player.location.contents) && (target.stats_current[2][4] < target.stats[2][4]))
23before = target.stats_current[2][4];
24target:take_health(10.0);
25healed = floatstr(target.stats_current[2][4] - before, 2);
26player:tell("You cast [yellow]Healing[normal] on ", target:title(), "!");
27player.location:announce(player:title(), " casts [yellow]Healing[normal] on ", target:title(), "!");
28target:tell(player:title(), " casts [yellow]Healing[normal] on you!");
29player:tell(target:title(), " gains ", healed, " health!");
30player.location:announce(target:title(), " gains ", healed, " health!");
31target:tell("You gain ", healed, " hit points!");
32player.used_spells = player.used_spells + 1;
33endif

$*

Spec any none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (verb == "$escape")
2if (player.level < 10)
3return player:tell("You must be at level 10 or higher to cast this spell innately.");
4else
5return player:_escape_spell();
6endif
7elseif (!argstr)
8player:tell("Invalid spell command.");
9return;
10endif
11if (((player.class == "Peasant") || (player.class == "Warrior")) || (player.class == "Alchemist"))
12return player:tell(player.class, "s cannot cast innate spells.");
13endif
14if (verb == "$know")
15return player:_knowledge_spell(argstr);
16elseif (verb == "$heal")
17return player:_heal_spell(argstr);
18elseif (verb == "$enchant")
19return player:_enchant_spell(argstr);
20elseif (verb == "$sleep")
21return player:_sleep_spell(argstr);
22elseif (verb == "$power")
23if (player.level < 5)
24return player:tell("You must be at level 5 or higher to cast this spell innately.");
25else
26return player:_power_spell(argstr);
27endif
28elseif (verb == "$speed")
29if (player.level < 5)
30return player:tell("You must be at level 5 or higher to cast this spell innately.");
31else
32return player:_speed_spell(argstr);
33endif
34elseif (verb == "$fear")
35return player:_fear_spell(argstr);
36elseif (verb == "$missile")
37if (player.level < 10)
38return player:tell("You must be a Red Mage at level 10 or higher to cast this spell innately.");
39else
40return player:_missile_spell(argstr);
41endif
42elseif (verb == "$pacify")
43if (player.level < 15)
44return player:tell("You must be a Blue Mage at level 15 or higher to cast this spell innately.");
45else
46return player:_pacify_spell(argstr);
47endif
48elseif (verb == "$death")
49if (player.level < 20)
50return player:tell("You must be a Red Mage at level 20 or higher to cast this spell innately.");
51else
52return player:_death_spell(argstr);
53endif
54else
55return player:tell("Invalid spell.");
56endif

_knowledge_spell

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if ((player.class != "Blue Mage") && (player.class != "Red Mage"))
2return player:tell("Only Mages may cast this spell as a known spell.");
3endif
4if (player.used_spells >= player:max_spells())
5return player:tell("You have reached your maximum of ", tostr(player:max_spells()), " spells per day.");
6endif
7if (player.stats_current[2][3] < 11.0)
8return player:tell("You do not have a high enough INT ability! This spell requires at least 11.0.");
9endif
10target = $string_utils:match_object(args[1], player.location);
11if ((((args[1] == "me") || (args[1] == "self")) || (args[1] == "myself")) || (target == player))
12player:tell("You cannot target yourself with this spell!");
13return;
14endif
15if ((target == $failed_match) || (!$object_utils:has_property(parent(target), "learn")))
16player:tell("The target is invalid!");
17return;
18endif
19if (!parent(target).learn)
20player:tell("Target does not have any information!");
21return;
22endif
23if ((target in player.location.contents) && parent(target).learn)
24player:tell("You cast [yellow]Knowledge[normal] on ", target:title(), "!");
25player.location:announce(player:title(), " casts [yellow]Knowledge[normal] on ", target:title(), "!");
26target:tell(player:title(), " casts [yellow]Knowledge[normal] on you!");
27player.knowledge = setadd(player.knowledge, tostr("~ Knowledge of ", parent(target).name, " ~"));
28player:tell("");
29for b in (parent(target).learn)
30player.knowledge = setadd(player.knowledge, tostr(b));
31player:tell("[purple]", b, "[normal]");
32endfor
33player:tell("");
34player.knowledge = setadd(player.knowledge, tostr("~ End of Knowledge of ", parent(target).name, " ~"));
35player:tell("You gain knowledge of ", target:title(), "!");
36player.location:announce(target:title(), " gains knowledge of ", target:title(), "!");
37target:tell("You have gained knowledge of ", target:title(), "!");
38player.used_spells = player.used_spells + 1;
39endif

_enchant_spell

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if ((player.class != "Blue Mage") && (player.class != "Red Mage"))
2return player:tell("Only Mages may cast this spell as a known spell.");
3endif
4if (player.used_spells >= player:max_spells())
5return player:tell("You have reached your maximum of ", tostr(player:max_spells()), " spells per day.");
6endif
7if (player.stats_current[2][3] < 11.0)
8return player:tell("You do not have a high enough INT ability! This spell requires at least 11.0.");
9endif
10target = $string_utils:match_object(args[1], player.location);
11if (((args[1] == "me") || (args[1] == "self")) || (args[1] == "myself"))
12player:tell("The target must be armor or a weapon, and you must be carrying it.");
13return;
14endif
15if ($object_utils:has_property(target, "enchant_level"))
16if ((target.enchant_level + 1) > toint(player.stats_current[2][3]))
17player:tell("You cannot enchant ", target.name, " beyond your INT ability.");
18return;
19endif
20endif
21if ((target in player.contents) && $object_utils:has_property(target, "armor"))
22target.armor = target.armor + 1.0;
23target.enchant_level = target.enchant_level + 1;
24target.value_base = target.value_base + 20.0;
25player:tell("You cast [yellow]Enchantment[normal] on ", target.name, "!");
26player.location:announce(player:title(), " casts [yellow]Enchantment[normal] on ", target.name, "!");
27player:tell("Your ", target.name, " gets +1.0 to Armor!");
28player.location:announce(player:title(), " enchants ", player.pp, " ", target.name, "!");
29player.used_spells = player.used_spells + 1;
30return;
31elseif (((target in player.contents) && $object_utils:has_property(target, "weapon")) && target.shoots)
32target.projectile_dam = target.projectile_dam + 1.0;
33target.enchant_level = target.enchant_level + 1;
34target.value_base = target.value_base + 20.0;
35player:tell("You cast [yellow]Enchantment[normal] on ", target:title(), "!");
36player.location:announce(player:title(), " casts [yellow]Enchantment[normal] on ", target:title(), "!");
37player:tell("Your ", target:title(), " gets +1.0 to Projectile Damage!");
38player.location:announce(player:title(), " enchants ", player.pp, " ", target:title(), "!");
39player.used_spells = player.used_spells + 1;
40elseif (((target in player.contents) && $object_utils:has_property(target, "weapon")) && (!target.shoots))
41target.damage_base = target.damage_base + 1.0;
42target.enchant_level = target.enchant_level + 1;
43target.value_base = target.value_base + 20.0;
44player:tell("You cast [yellow]Enchantment[normal] on ", target:title(), "!");
45player.location:announce(player:title(), " casts [yellow]Enchantment[normal] on ", target:title(), "!");
46player:tell("Your ", target:title(), " gets +1.0 to Damage!");
47player.location:announce(player:title(), " enchants ", player.pp, " ", target:title(), "!");
48player.used_spells = player.used_spells + 1;
49elseif (!valid(target))
50player:tell("The target is invalid.");
51player:tell("The target must be armor or a weapon, and you must be carrying it.");
52return;
53else
54player:tell("No effect.");
55player:tell("The target must be armor or a weapon, and you must be carrying it.");
56return;
57endif

_sleep_spell

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if ((player.class != "Blue Mage") && (player.class != "Red Mage"))
2return player:tell("Only Mages may cast this spell as a known spell.");
3endif
4if (player.used_spells >= player:max_spells())
5return player:tell("You have reached your maximum of ", tostr(player:max_spells()), " spells per day.");
6endif
7if (player.stats_current[2][3] < 11.0)
8return player:tell("You do not have a high enough INT ability! This spell requires at least 11.0.");
9endif
10target = $string_utils:match_object(args[1], player.location);
11if (!valid(target))
12player:tell("The target is invalid.");
13return;
14endif
15if ((((args[1] == "me") || (args[1] == "self")) || (args[1] == "myself")) || (target == player))
16player:tell("You cannot cast this spell on yourself!");
17return;
18endif
19if ((!player.pkill) && (target in players()))
20return player:tell("You have PKILL set to off and cannot fight other players.");
21endif
22if (player.pkill && (!target.pkill))
23return player:tell(target:title(), " is a non-PKILL player.");
24endif
25if ($object_utils:has_property(target, "magic_immunity"))
26if (target.magic_immunity)
27player:tell(target:title(), " is immune to magic!");
28return;
29endif
30endif
31if (((target in player.location.contents) && $object_utils:has_property(target, "alive")) && $object_utils:has_property(target, "alert"))
32player:tell("You cast [yellow]Sleep[normal] on ", target:title(), "!");
33player.location:announce(player:title(), " casts [yellow]Sleep[normal] on ", target:title(), "!");
34target.alert = 0;
35player.location:announce_all(target:title(), " has fallen asleep!");
36player.used_spells = player.used_spells + 1;
37fork (45)
38target.alert = 1;
39if (target.alive)
40player.location:announce_all(target:title(), " has awakened!");
41endif
42endfork
43else
44player:tell("No effect.");
45player:tell("The target must be a player or monster in the same area as you.");
46return;
47endif

_escape_spell

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (player.class != "Blue Mage")
2return player:tell("Only Blue Mages may cast this spell as a known spell.");
3endif
4if (player.used_spells >= player:max_spells())
5return player:tell("You have reached your maximum of ", tostr(player:max_spells()), " spells per day.");
6endif
7if (player.stats_current[2][3] < 12.0)
8return player:tell("You do not have a high enough INT ability! This spell requires at least 12.0.");
9endif
10if (player.location == player.home)
11player:tell("You are already at your home!");
12return;
13endif
14if (player.location != player.home)
15player:tell("You cast [yellow]Escape[normal]!");
16player.location:announce(player:title(), " casts [yellow]Escape[normal]!");
17suspend(1);
18player.location:announce_all("Suddenly, ", player:title(), " has teleported ", player.pr, " away!");
19move(player, player.home);
20suspend(2);
21player.location:announce_all("Suddenly, ", player:title(), " has teleported ", player.pr, " into the area!");
22player.used_spells = player.used_spells + 1;
23endif

_power_spell

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if ((player.class != "Blue Mage") && (player.class != "Red Mage"))
2return player:tell("Only Mages may cast this spell as a known spell.");
3endif
4if (player.used_spells >= player:max_spells())
5return player:tell("You have reached your maximum of ", tostr(player:max_spells()), " spells per day.");
6endif
7if (player.stats_current[2][3] < 13.0)
8return player:tell("You do not have a high enough INT ability! This spell requires at least 13.0.");
9endif
10target = $string_utils:match_object(args[1], player.location);
11if (((args[1] == "me") || (args[1] == "self")) || (args[1] == "myself"))
12target = player;
13endif
14if (!$object_utils:has_property(target, "stats"))
15player:tell("The target is invalid!");
16return;
17endif
18if ((target in player.location.contents) && target.alive)
19before = target.stats_current[2][1];
20target.stats_current[2][1] = target.stats_current[2][1] + 4.0;
21player:tell("You cast [yellow]Power[normal] on ", target:title(), "!");
22player.location:announce(player:title(), " casts [yellow]Power[normal] on ", target:title(), "!");
23target:tell(player:title(), " casts [yellow]Power[normal] on you!");
24player:tell(target:title(), " receives +4 to Strength!");
25player.location:announce(target:title(), " receives +4 to Strength!");
26target:tell("You receive +4 to Strength!");
27player.used_spells = player.used_spells + 1;
28fork (180)
29target.stats_current[2][1] = before;
30player:tell("The [yellow]Power[normal] spell cast on ", target:title(), " wears off!");
31target.location:announce("The [yellow]Power[normal] spell cast on ", target:title(), " wears off!");
32target.location:announce("The [yellow]Power[normal] spell ", player:title(), " cast on you wears off!");
33endfork
34endif

_speed_spell

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if ((player.class != "Blue Mage") && (player.class != "Red Mage"))
2return player:tell("Only Mages may cast this spell as a known spell.");
3endif
4if (player.used_spells >= player:max_spells())
5return player:tell("You have reached your maximum of ", tostr(player:max_spells()), " spells per day.");
6endif
7if (player.stats_current[2][3] < 13.0)
8return player:tell("You do not have a high enough INT ability! This spell requires at least 13.0.");
9endif
10target = $string_utils:match_object(args[1], player.location);
11if (((args[1] == "me") || (args[1] == "self")) || (args[1] == "myself"))
12target = player;
13endif
14if (!$object_utils:has_property(target, "stats"))
15player:tell("The target is invalid!");
16return;
17endif
18if ((target in player.location.contents) && target.alive)
19before = target.stats_current[2][2];
20target.stats_current[2][2] = target.stats_current[2][2] + 4.0;
21player:tell("You cast [yellow]Speed[normal] on ", target:title(), "!");
22player.location:announce(player:title(), " casts [yellow]Speed[normal] on ", target:title(), "!");
23target:tell(player:title(), " casts [yellow]Speed[normal] on you!");
24player:tell(target:title(), " receives +4 to Dexterity!");
25player.location:announce(target:title(), " receives +4 to Dexterity!");
26target:tell("You receive +4 to Dexterity!");
27player.used_spells = player.used_spells + 1;
28fork (180)
29target.stats_current[2][2] = before;
30player:tell("The [yellow]Speed[normal] spell cast on ", target:title(), " wears off!");
31target.location:announce("The [yellow]Speed[normal] spell cast on ", target:title(), " wears off!");
32target.location:announce("The [yellow]Speed[normal] spell ", player:title(), " cast on you wears off!");
33endfork
34endif

_fear_spell

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (player.class != "Red Mage")
2return player:tell("Only Red Mages may cast this spell as a known spell.");
3endif
4if (player.used_spells >= player:max_spells())
5return player:tell("You have reached your maximum of ", tostr(player:max_spells()), " spells per day.");
6endif
7if (player.stats_current[2][3] < 12.0)
8return player:tell("You do not have a high enough INT ability! This spell requires at least 12.0.");
9endif
10target = $string_utils:match_object(args[1], player.location);
11if (!valid(target))
12player:tell("The target is invalid.");
13return;
14endif
15if ((((args[1] == "me") || (args[1] == "self")) || (args[1] == "myself")) || (target == player))
16player:tell("You cannot target yourself with this spell!");
17return;
18endif
19if (target in players())
20player:tell(target:title(), " is a player and cannot be the target of this spell!");
21return;
22endif
23if ($object_utils:has_property(target, "magic_immunity"))
24if (target.magic_immunity)
25player:tell(target:title(), " is immune to magic!");
26return;
27endif
28endif
29if (((target in player.location.contents) && $object_utils:has_property(target, "alive")) && $object_utils:has_property(target, "alert"))
30r = {};
31c = target.location;
32for x in (c.exits)
33if (!x.dest.bot_locked)
34r = setadd(r, x.aliases[$]);
35endif
36endfor
37if (r == {})
38return player:tell(target:title(), " cannot move anywhere!");
39endif
40d = random(length(r));
41player:tell("You cast [yellow]Fear[normal] on ", target:title(), "!");
42player.location:announce(player:title(), " casts [yellow]Fear[normal] on ", target:title(), "!");
43player:tell(target:title(), " panics!");
44player.used_spells = player.used_spells + 1;
45suspend(3);
46force_input(target, tostr(r[d]));
47suspend(2);
48target.location:announce(this:title(), " runs in from ", c.name, "!");
49else
50return player:tell("The target is invalid.");
51endif

_missile_spell

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (player.class != "Red Mage")
2return player:tell("Only Red Mages may cast this spell as a known spell.");
3endif
4if (player.used_spells >= player:max_spells())
5return player:tell("You have reached your maximum of ", tostr(player:max_spells()), " spells per day.");
6endif
7if (player.stats_current[2][3] < 14.0)
8return player:tell("You do not have a high enough INT ability! This spell requires at least 14.0.");
9endif
10target = $string_utils:match_object(args[1], player.location);
11if (!valid(target))
12player:tell("The target is invalid.");
13return;
14endif
15if (((args[1] == "me") || (args[1] == "self")) || (args[1] == "myself"))
16player:tell("You cannot cast this spell on yourself!");
17return;
18endif
19if ((!player.pkill) && (target in players()))
20return player:tell("You have PKILL set to off and cannot fight other players.");
21endif
22if (player.pkill && (!target.pkill))
23return player:tell(target:title(), " is a non-PKILL player.");
24endif
25if ($object_utils:has_property(target, "magic_immunity"))
26if (target.magic_immunity)
27player:tell(target:title(), " is immune to magic!");
28return;
29endif
30endif
31if (((target in player.location.contents) && $object_utils:has_property(target, "alive")) && target.alive)
32player:tell("You cast [yellow]Magic Missile[normal] on ", target:title(), "!");
33player.location:announce(player:title(), " casts [yellow]Magic Missile[normal] on ", target:title(), "!");
34target.stats_current[2][4] = target.stats_current[2][4] - 50.0;
35player:tell("The [yellow]Magic Missile[normal] inflicts [red]50[normal] damage on ", target:title(), "!");
36player.location:announce_all(target:title(), " takes severe damage from the [yellow]Magic Missile[normal]!");
37player.used_spells = player.used_spells + 1;
38if (target in players())
39target:tell("You take [red]50[normal] damage from ", player:title(), "'s [yellow]Magic Missile[normal]!");
40endif
41endif
42if (target.stats_current[2][4] < 0.0)
43player:tell("You have defeated ", target:title(), "!");
44player.experience = player.experience + toobj(target).exp;
45player:tell("You gain [cyan]", tostr(target.exp), "[normal] experience points!");
46newlevel = player.level + 1;
47if ((player.experience >= ($server_options.level_info[newlevel][2] + 1)) && (newlevel < $server_options.max_player_level))
48player.level = player.level + 1;
49player:tell("");
50player:tell("[bold][purple]YOU HAVE REACHED [cyan]LEVEL ", tostr(newlevel), "[purple]![normal]");
51player.adv_points = player.adv_points + $server_options.level_info[player.level][3];
52player:tell("[purple]You have received ", $server_options.level_info[player.level][3], " Advancement Points!");
53player.stats_current == player.stats;
54player:tell("");
55endif
56player:tell("You collect [bold][yellow]", target.money[1][2], "[normal] Gold!");
57player.money = {{"gold", player.money[1][2] + target.money[1][2]}};
58dropstr = "";
59if (target.contents == {})
60drop = "nothing";
61else
62drop = $string_utils:title_list(target.contents);
63for i in (target.contents)
64move(i, target.location);
65endfor
66endif
67player:tell(target:title(), " drops ", drop, ".");
68player.killcount = player.killcount + 1;
69endif

_pacify_spell

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (player.class != "Blue Mage")
2return player:tell("Only Blue Mages may cast this spell as a known spell.");
3endif
4if (player.used_spells >= player:max_spells())
5return player:tell("You have reached your maximum of ", tostr(player:max_spells()), " spells per day.");
6endif
7if (player.stats_current[2][3] < 14.0)
8return player:tell("You do not have a high enough INT ability! This spell requires at least 14.0.");
9endif
10target = $string_utils:match_object(args[1], player.location);
11if (!valid(target))
12player:tell("The target is invalid.");
13return;
14endif
15if (((args[1] == "me") || (args[1] == "self")) || (args[1] == "myself"))
16player:tell("You cannot cast this spell on yourself!");
17return;
18endif
19if (!$object_utils:has_property(target, "skills"))
20player:tell("The target is invalid!");
21return;
22endif
23if ((!player.pkill) && (target in players()))
24return player:tell("You have PKILL set to off and cannot fight other players.");
25endif
26if (player.pkill && (!target.pkill))
27return player:tell(target:title(), " is a non-PKILL player.");
28endif
29if ($object_utils:has_property(target, "magic_immunity"))
30if (target.magic_immunity)
31player:tell(target:title(), " is immune to magic!");
32return;
33endif
34endif
35if ((target in player.location.contents) && target.alive)
36before = target.skills[2][1];
37target.skills[2][1] = 0.0;
38player:tell("You cast [yellow]Pacifism[normal] on ", target:title(), "!");
39player.location:announce(player:title(), " casts [yellow]Pacifism[normal] on ", target:title(), "!");
40target:tell(player:title(), " casts [yellow]Pacifism[normal] on you!");
41player:tell(target:title(), " has been weakened by magic!");
42player.location:announce(target:title(), " has been weakened by magic!");
43target:tell("You have been weakened by magic! Your combat skill is 0.0 for 2 minutes!");
44player.used_spells = player.used_spells + 1;
45fork (120)
46if (target.alive)
47target.skills[2][1] = before;
48endif
49player:tell("The [yellow]Pacifism[normal] spell cast on ", target:title(), " wears off!");
50target.location:announce("The [yellow]Pacifism[normal] spell cast on ", target:title(), " wears off!");
51target.location:announce("The [yellow]Pacifism[normal] spell ", player:title(), " cast on you wears off!");
52endfork
53endif

_death_spell

Spec this none thisFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (player.class != "Red Mage")
2return player:tell("Only Red Mages may cast this spell as a known spell.");
3endif
4if (player.used_spells >= player:max_spells())
5return player:tell("You have reached your maximum of ", tostr(player:max_spells()), " spells per day.");
6endif
7if (player.stats_current[2][3] < 16.0)
8return player:tell("You do not have a high enough INT ability! This spell requires at least 16.0.");
9endif
10target = $string_utils:match_object(args[1], player.location);
11if (!valid(target))
12player:tell("The target is invalid.");
13return;
14endif
15if (((args[1] == "me") || (args[1] == "self")) || (args[1] == "myself"))
16player:tell("You cannot cast this spell on yourself!");
17return;
18endif
19if (target in players())
20player:tell(target:title(), " is a player and cannot be the target of this spell!");
21return;
22endif
23if ($object_utils:has_property(target, "magic_immunity"))
24if (target.magic_immunity)
25player:tell(target:title(), " is immune to magic!");
26return;
27endif
28endif
29if (((target in player.location.contents) && $object_utils:has_property(target, "alive")) && $object_utils:has_property(target, "alert"))
30player:tell("You cast [yellow]Death[normal] on ", target:title(), "!");
31player.location:announce(player:title(), " casts [yellow]Death[normal] on ", target:title(), "!");
32player:tell("Intense energy builds around you...");
33player.used_spells = player.used_spells + 1;
34suspend(3);
35if (target.alive)
36player.location:announce_all("A mass of dark energy jolts at ", target:title(), "!");
37target:die();
38player:tell("You have defeated ", target:title(), "!");
39player.experience = player.experience + toobj(target).exp;
40player:tell("You gain [cyan]", tostr(target.exp), "[normal] experience points!");
41endif
42newlevel = player.level + 1;
43if ((player.experience >= ($server_options.level_info[newlevel][2] + 1)) && (newlevel < $server_options.max_player_level))
44player.level = player.level + 1;
45player:tell("");
46player:tell("[bold][purple]YOU HAVE REACHED [cyan]LEVEL ", tostr(newlevel), "[purple]![normal]");
47player.adv_points = player.adv_points + $server_options.level_info[player.level][3];
48player:tell("[purple]You have received ", $server_options.level_info[player.level][3], " Advancement Points!");
49player.stats_current == player.stats;
50player:tell("");
51endif
52player:tell("You collect [bold][yellow]", target.money[1][2], "[normal] Gold!");
53player.money = {{"gold", player.money[1][2] + target.money[1][2]}};
54dropstr = "";
55if (target.contents == {})
56drop = "nothing";
57else
58drop = $string_utils:title_list(target.contents);
59for i in (target.contents)
60move(i, target.location);
61endfor
62endif
63player:tell(target:title(), " drops ", drop, ".");
64player.killcount = player.killcount + 1;
65else
66player:tell("No effect.");
67player:tell("The target must be a living being.");
68endif

alc*hemize

Spec any in/inside/into anyFlags rxdOwner #2Definer #91

Referenced by

none

Source

1if (player.class != "Alchemist")
2return player:tell("You cannot perform alchemy.");
3endif
4if (!argstr)
5return player:tell("No item specified.");
6endif
7if ((iobjstr != "gold") && (iobjstr != "points"))
8return player:tell("You can alchemize items into gold or points.");
9endif
10item = player:my_match_object(dobjstr, player);
11if (item == $ambiguous_match)
12return player:tell("There appears to be more than one.");
13elseif (item == $failed_match)
14return player:tell("'", dobjstr, "' was not found in your inventory.");
15endif
16if ((parent(parent(item)) != $weapon) && (parent(parent(item)) != $clothing))
17return player:tell("You can only alchemize weapons or armor.");
18endif
19if ((parent(parent(item)) == $weapon) && (item == player.wielded))
20return player:tell("You cannot alchemize ", item:title(), " while you are still wielding it.");
21endif
22if ((parent(parent(item)) == $clothing) && (item.wornness == 1))
23return player:tell("You cannot alchemize ", item:title(), " while you are wearing it.");
24endif
25if (item == $hand)
26return player:tell("You cannot alchemize your hand.");
27endif
28if ((item in player.contents) && (iobjstr == "gold"))
29val = item.value_base / 2.0;
30player.money[1][2] = player.money[1][2] + val;
31player:tell("You have alchemized ", item:title(), " into [bold][yellow]", floatstr(val, 2), " Gold[normal]!");
32player.location:announce(player:title(), " alchemizes ", item:title(), "... It has vanished!");
33$recycler:_recycle(item);
34elseif ((item in player.contents) && (iobjstr == "points"))
35val = item.value_base / 4.0;
36player.free_points = player.free_points + val;
37player:tell("You have alchemized ", item:title(), " into [bold][cyan]", floatstr(val, 2), " Bonus Points[normal]!");
38player.location:announce(player:title(), " alchemizes ", item:title(), "... It has vanished!");
39$recycler:_recycle(item);
40else
41return player:tell("Alchemy failed.");
42endif

compass m

Spec none none noneFlags rxdOwner #2Definer #91

Referenced by

none

Source

1return player:map();