RPG room #104
Aliases: RPG room
60 verbs · 54 properties · 4 children
Verbs
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
bot_locked | #104 | rc | #36 | 0 |
fakes | #104 | r | #36 | {} |
retail | #104 | rc | #36 | 0 |
seat | #104 | r | #36 | "" |
pool | #104 | r | #36 | "" |
seat_desc | #104 | r | #36 | "You notice nothing special." |
pool_desc | #104 | r | #36 | "You see nothing special." |
sit_phrase | #104 | rc | #36 | "" |
stand_phrase | #104 | rc | #36 | "" |
swim_phrase | #104 | rc | #36 | "" |
dry_phrase | #104 | rc | #36 | "" |
push_phrase | #104 | rc | #36 | "" |
seat_aliai | #104 | r | #36 | {} |
pool_aliai | #104 | r | #36 | {} |
seat_contents | #104 | r | #36 | {} |
pool_contents | #104 | r | #36 | {} |
seat_max | #104 | r | #36 | 1 |
pool_max | #104 | r | #36 | 1 |
details | #104 | rc | #36 | {} |
temp_detail_index | #104 | rc | #36 | 0 |
temp_detail_desc | #104 | rc | #36 | {} |
outdoors | #104 | r | #36 | 1 |
attack_queue | #104 | r | #2 | {} |
battle_on | #104 | r | #2 | 0 |
stop_msg | #104 | rc | #36 | "%N attacked in a sanctuary; %N will be penalized." |
remove_msg | #104 | rc | #36 | "The attack on %n is short and brutal. The guards drag %p limp body as they leave the area." |
dump_msg | #104 | rc | #36 | "Two large, muscular guards burst in to dump the body of %n, who has been severely beaten. They depart just as quickly." |
dump_loc | #104 | rc | #36 | #62 |
sanctuary | #104 | rc | #36 | 0 |
ansi_title | #104 | r | #36 | {} |
dark_desc | #104 | rc | #36 | "" |
title_style | #104 | rc | #36 | 0 |
build_help | #104 | rc | #36 | list of 62{"===============================", " Owners", "======= SEATS AND POOLS =======", "\"@newseat @new-seat @newpool @new-pool\" room is string => Gives a name to the seat or pool.", "", "\"@rmseat @rm-seat @rmpool @rm-pool\" room => Clears all associated properties.", "", "\"@descseat @desc-seat @descpool @desc-pool\" room as string => Describe the seat/pool.", "", "\"@maxseat @max-seat @maxpool @max-pool\" room is integer => Set maximum occupancy.", "", "\"@seatalias @seat-alias @poolalias @pool-alias\" room is string => Add an alias to seat/pool.", "", "\"@rmseatalias @rmpoolalias\" string from room => Remove an alias from seat/pool.", "", "======= DETAILS =======", "\"@outdoor*s on/off\" => Turns outside messages on and off, if it is inside a weather wrapper.", "", "\"@det*ail @new-d*etail @newd*etail\" here is name => Add a detail. Player will be prompted for a description.", "", "@rmdet*ail name from here => removes the detail from the room's database.", "", "\"@detail-a*lias @detaila*lias\" name is alias => adds an alias to the detail \"name\". You must be inside the room to execute this one.", "", "\"@edit-d*etail\" name on here => finds the name or alias string and reads the associated description into the note editor. When the player re-enters the room, the edited text is copied back into the detail.", "", "\"@rmdetail-a*lias @rmdetaila*lias\" name from here => finds the name or alias string and removes it from the details list.", "", "@add-fake STRING => Add a non-descript detail to the room", "", "@rm-fake STRING => Remove a non-descript detail from the room", "", "@fakes => Lists details and fake objects.", "", "======= PROPERTIES =======", "@set here.sit_phrase, here.stand_phrase, here.swim_phrase, here.dry_phrase, here.push_phrase, and here.award_msg.", "", "All of these messages are pronoun and verb parsed.", "", "EXAMPLE: @set here.push_phrase to \"%N %<runs> up and %<pushes> %d into the pool!\", where %N is the player and %d is the victim.", "", "here.sanctuary 0, 1 or 2 => 1 prevents combat, 2 allows mailing.", "", "here.stop_msg \"A hefty guard arrives out of nowhere and tackles %n. An identically huge guard quickly joins in the struggle and beats %o unconscious.\"", "", "here.remove_msg \"The attack on %n is short and brutal. The guards drag %p limp body as they leave the area.\"", "", "here.dump_msg \"Two large, muscular guards burst in to dump the body of %n, who has been severely beaten. They depart just as quickly.\"", "", "here.dump_loc #room => Place to dump the quelled assailant.", "", "Diggable Room => @set the \".dig_level\" property!", "dig_levels: 0 => no digging allowed", " 1 => requires a pick or axe", " 2 => requires a shovel or better", " 3 => requires claws or better", " 4 => can be dug with hands", "", "=====================", " Visitors", "======= VERBS =======", "sit, rest, wait, sleep, relax, idle, stand, swim, dive, dry, stop/quit swimming, look, get, take, move, push, put, go, sneak, search, dig.....are all handled."} |
battle_task | #104 | r | #2 | 0 |
dig_level | #104 | rc | #36 | 0 |
holes | #104 | r | #2 | {} |
help_msg | #104 | rc | #36 | {"sit, rest, wait, sleep, relax, idle, stand, swim, dive, dry, stop/quit swimming, look, get, take, move, push, put, go, sneak, search, dig"} |
who_location_msg | #3 | rc | #36 | <clear> |
free_home | #3 | rc | #36 | <clear> |
victim_ejection_msg | #3 | rc | #36 | <clear> |
ejection_msg | #3 | rc | #36 | <clear> |
oejection_msg | #3 | rc | #36 | <clear> |
residents | #3 | rc | #36 | <clear> |
free_entry | #3 | rc | #36 | <clear> |
entrances | #3 | c | #36 | <clear> |
blessed_object | #3 | rc | #36 | <clear> |
blessed_task | #3 | rc | #36 | <clear> |
exits | #3 | c | #36 | <clear> |
dark | #3 | rc | #36 | <clear> |
ctype | #3 | rc | #36 | <clear> |
key | #1 | c | #36 | 0 |
aliases | #1 | rc | #36 | {"RPG room"} |
description | #1 | rc | #36 | <clear> |
object_size | #1 | r | #36 | {64497, -1090650497} |
Ancestry
Ancestors (nearest first): #3 generic room → #1 Root Class
Children: #118 virtual exit room, #119 generic maze and terrain room, #146 The Underworld, #180 Default Item Home
Call graph
Showing 48 of 116 verbs; 68 not shown.
Source
@add-fake
Referenced by
none
Source
1if ((player == this.owner) || player.wizard) 2this.fakes = dobjstr ? setadd(this.fakes, dobjstr) | this.fakes; 3player:tell("Detail noted."); 4else 5player:tell(E_PERM); 6endif
@rm-fake
Referenced by
none
Source
1if ((player == this.owner) || player.wizard) 2this.fakes = dobjstr ? setremove(this.fakes, dobjstr) | this.fakes; 3player:tell("Detail removed."); 4else 5player:tell(E_PERM); 6endif
@fakes
Referenced by
none
Source
1if (!$object_utils:has_property(player, "build_options")) 2return; 3endif 4details = {"none"}; 5fakes = {"none"}; 6if ($object_utils:has_property(this, "details") && (this.details != {})) 7details = $list_utils:slice(this.details); 8details = $list_utils:append(@details); 9player:tell("Details: ", $string_utils:english_list(details)); 10endif 11fakes = (this.fakes != {}) ? this.fakes | fakes; 12player:tell("Fakes: ", $string_utils:english_list(fakes));
order buy
Referenced by
none
Source
1if (iobjstr && (!valid(iobj))) 2iobj = this:match(iobjstr); 3endif 4if ($object_utils:has_callable_verb(iobj, verb)) 5return iobj:(verb)(@args); 6elseif (!this.retail) 7return player:tell("You can't ", verb, " anything here."); 8endif 9player:tell("Try \"buy <item> from <salesperson>\"."); 10player:tell("If you aren't sure what's available and what it will cost, ask <salesperson> for prices.");
l*ook
Referenced by
- #119:l*ook line 2:
pass( - #119:l*ook line 32:
pass( - #135:l*ook line 3:
pass( - #135:l*ook line 16:
pass( - #140:l*ook line 9:
pass(
Source
1if ((dobjstr == "") && (!prepstr)) 2this:look_self(@args); 3elseif (dobjstr == "me") 4player:look_self(); 5elseif ((prepstr != "in") && (prepstr != "on")) 6if ((!dobjstr) && (prepstr == "at")) 7dobjstr = iobjstr; 8iobjstr = ""; 9else 10dobjstr = dobjstr + (prepstr && ((dobjstr && " ") + prepstr)); 11dobjstr = dobjstr + (iobjstr && ((dobjstr && " ") + iobjstr)); 12endif 13sources = {@player.location:contents(), @player.contents, @player.location:obvious_exits()}; 14dobj = player.programmer ? this:match_object(dobjstr) | player:my_match_object(dobjstr); 15dobj = valid(dobj) ? dobj | $match_utils:match(dobjstr, sources); 16(ticks_left() < 4000) && suspend(0); 17if (!(dobj in {$failed_match, $ambiguous_match})) 18if (player.programmer || (dobj in sources)) 19dobj:look_self(); 20endif 21elseif (fakeobj = this:match_fake(dobjstr)) 22if (fakeobj == {"seat"}) 23player:tell_lines(this.seat_desc); 24elseif (fakeobj == {"pool"}) 25player:tell_lines(this.pool_desc); 26else 27return player:tell_lines(fakeobj); 28endif 29return this:who_do_what(); 30else 31$command_utils:object_match_failed(dobj, dobjstr); 32endif 33elseif (!iobjstr) 34player:tell(verb, " ", prepstr, " what?"); 35else 36sources = {@player.location:contents(), @player.contents}; 37iobj = player.programmer ? this:match_object(iobjstr) | player:my_match_object(iobjstr); 38iobj = valid(iobj) ? iobj | $match_utils:match(iobjstr, sources); 39(ticks_left() < 4000) && suspend(0); 40if (!$command_utils:object_match_failed(iobj, iobjstr)) 41if (dobjstr == "") 42if (player.programmer || (iobj in sources)) 43iobj:look_self(); 44endif 45elseif ((thing = iobj:match(dobjstr)) == $failed_match) 46player:tell("I don't see any \"", dobjstr, "\" ", prepstr, " ", iobj.name, "."); 47elseif (thing == $ambiguous_match) 48player:tell("There are several things ", prepstr, " ", iobj.name, " one might call \"", dobjstr, "\"."); 49else 50thing:look_self(); 51endif 52endif 53endif
is_unlocked_for
Referenced by
none
Source
1"WIZ PERMS"; 2if ($object_utils:isa(args[1], $monster) && this.bot_locked) 3return 0; 4endif 5return (this.key == 0) || $lock_utils:eval_key(this.key, args[1]);
replace_detail
Referenced by
- #104:@det*ail line 4:
this:replace_detail
Source
1"WIZ PERMS"; 2set_task_perms(player); 3z = this:find_detail(args[1]); 4if (z) 5dname = this.details[z][1][1]; 6if ($command_utils:yes_or_no(tostr("Do you really want to clear the detail \"", dname, "\"?"))) 7this.details = setremove(this.details, this.details[z]); 8player:tell("Detail \"", dname, "\" reset as \"", args[1], "\"."); 9return args[1]; 10else 11return "abort!!!"; 12endif 13endif 14return args[1];
@det*ail @new-d*etail @newd*etail
Referenced by
none
Source
1"WIZ PERMS"; 2set_task_perms(player); 3if (iobjstr && ((player == this.owner) || player.wizard)) 4name = this:replace_detail(iobjstr); 5if (name == "abort!!!") 6return player:tell("Original detail preserved."); 7endif 8player:tell("Describe \"", iobjstr, "\"."); 9desc = $command_utils:read_lines(); 10det = {{name}, desc}; 11this.details = {@this.details, det}; 12player:tell("\"", name, "\" added as a detail. Use \"@detail-a*lias ", name, " is <alias>\" to add aliases."); 13else 14player:tell("You must own this room and create details by entering \"@detail here is <name>\"."); 15endif
@detail-a*lias @detaila*lias
Referenced by
none
Source
1"WIZ PERMS"; 2set_task_perms(player); 3if (iobjstr && ((player == this.owner) || player.wizard)) 4z = this:find_detail(dobjstr); 5if (z) 6this.details[z][1] = {@this.details[z][1], iobjstr}; 7return player:tell("Alias \"", iobjstr, "\" added to \"", dobjstr, "\"."); 8endif 9player:tell("No detail called \"", dobjstr, "\" was found."); 10endif 11player:tell("You must own the room and supply a name for the detail alias.");
remove_detail
Referenced by
- #104:@rmdet*ail line 4:
this:remove_detail
Source
1"WIZ PERMS"; 2set_task_perms(player); 3z = this:find_detail(args[1]); 4if (z) 5this.details = setremove(this.details, this.details[z]); 6player:tell("Detail \"", args[1], "\" removed."); 7return 1; 8endif 9return 0;
@rmdet*ail
Referenced by
none
Source
1"WIZ PERMS"; 2set_task_perms(player); 3if ((player == this.owner) || player.wizard) 4if (!this:remove_detail(dobjstr)) 5player:tell("No detail called \"", dobjstr, "\" was found."); 6endif 7endif
@edit-d*etail
Referenced by
none
Source
1"WIZ PERMS"; 2set_task_perms(player); 3if (dobjstr && ((player == this.owner) || player.wizard)) 4z = this:find_detail(dobjstr); 5if (z) 6this.temp_detail_index = z; 7this.temp_detail_desc = this.details[z][2]; 8$note_editor:invoke(tostr(this, ".temp_detail_desc"), "@edit"); 9"See this:enterfunc for the cleanup routine"; 10return; 11endif 12return player:tell("No detail called \"", dobjstr, "\" was found."); 13endif 14player:tell("You must own the room and supply a name for the detail to edit.");
@rmdetail-a*lias @rmdetaila*lias
Referenced by
none
Source
1"WIZ PERMS"; 2set_task_perms(player); 3if (dobjstr && ((player == this.owner) || player.wizard)) 4z = this:find_detail(dobjstr); 5if (z) 6if (this.details[z][1] == {dobjstr}) 7return player:tell("\"", dobjstr, "\" is the only alias for that detail. Use \"@rmdet ", dobjstr, " from here\" if you really want to delete the whole detail."); 8else 9this.details[z][1] = setremove(this.details[z][1], dobjstr); 10player:tell("\"", dobjstr, "\" has been removed as an alias for that detail."); 11endif 12endif 13endif
find_detail
Referenced by
- #104:replace_detail line 3:
this:find_detail - #104:@detail-a*lias line 4:
this:find_detail - #104:remove_detail line 3:
this:find_detail - #104:@edit-d*etail line 4:
this:find_detail - #104:@rmdetail-a*lias line 4:
this:find_detail - #104:match_fake line 19:
this:find_detail
Source
1for detail in (this.details) 2z = args[1] in detail[1]; 3if (z && args[1]) 4return detail in this.details; 5endif 6endfor 7return;
@newseat @new-seat @newpool @new-pool
Referenced by
none
Source
1"If there is an indirect object string, insert it as the name of the seat or pool"; 2if (iobjstr && ((player == this.owner) || player.wizard)) 3if ((verb == "@newseat") || (verb == "@new-seat")) 4this.seat = iobjstr; 5player:tell("Seat '", this.seat, "' added."); 6else 7this.pool = iobjstr; 8player:tell("Pool '", this.pool, "' added."); 9endif 10endif
@rmseat @rm-seat @rmpool @rm-pool
Referenced by
none
Source
1"Clear all properties associated with the seat or pool. Reset the maximum occupants to 1"; 2if ((player == this.owner) || player.wizard) 3if ((verb == "@rmseat") || (verb == "@rm-seat")) 4this.seat = ""; 5this.seat_desc = "You notice nothing special."; 6this.seat_aliai = {}; 7this.seat_contents = {}; 8this.seat_max = 1; 9player:tell("Seat removed. All associated properties reset."); 10else 11this.pool = ""; 12this.pool_desc = "You see nothing special."; 13this.pool_aliai = {}; 14this.pool_contents = {}; 15this.pool_max = 1; 16player:tell("Pool removed. All associated properties reset."); 17endif 18endif
@descseat @desc-seat @descpool @desc-pool
Referenced by
none
Source
1"enter indirect object string as the description"; 2if ((player == this.owner) || player.wizard) 3if ((verb == "@descseat") || (verb == "@desc-seat")) 4this.seat_desc = iobjstr; 5player:tell("Seat described."); 6else 7this.pool_desc = iobjstr; 8player:tell("Pool described."); 9endif 10endif
@maxseat @max-seat @maxpool @max-pool
Referenced by
none
Source
1"if no indirect object, tell player current setting"; 2"test for a valid integer in indirect object => if so, change"; 3if (iobjstr == "") 4if ((verb == "@maxseat") || (verb == "@max-seat")) 5player:tell("Up to ", tostr(this.seat_max), " may occupy ", this.seat, "."); 6else 7player:tell("Up to ", tostr(this.pool_max), " may swim in ", this.pool, "."); 8endif 9elseif (toint(iobjstr) && ((player == this.owner) || player.wizard)) 10if ((verb == "@maxseat") || (verb == "@max-seat")) 11this.seat_max = toint(iobjstr); 12player:tell("Up to ", tostr(this.seat_max), " may now occupy ", this.seat, "."); 13else 14this.pool_max = toint(iobjstr); 15player:tell("Up to ", tostr(this.pool_max), " may now swim in ", this.pool, "."); 16endif 17else 18player:tell(iobjstr, " is not a valid integer"); 19endif
@seatalias @seat-alias @poolalias @pool-alias
Referenced by
none
Source
1"if not found as name or alias of seat or pool"; 2"add to the appropriate set of aliases"; 3if ((player == this.owner) || player.wizard) 4if (this:match_fake(iobjstr)) 5player:tell(iobjstr, " is already used as an alias."); 6elseif ((verb == "@seatalias") || (verb == "@seat-alias")) 7if (iobjstr) 8this.seat_aliai = setadd(this.seat_aliai, iobjstr); 9endif 10player:tell($string_utils:english_list(this.seat_aliai), " is/are alias(es) for the seat '", this.seat, "'."); 11else 12if (iobjstr) 13this.pool_aliai = setadd(this.pool_aliai, iobjstr); 14endif 15player:tell($string_utils:english_list(this.pool_aliai), " is/are alias(es) for the pool '", this.pool, "'."); 16endif 17endif
@rmseatalias @rmpoolalias
Referenced by
none
Source
1"check for direct object in seat aliases and in pool aliases => if found, remove"; 2if ((player == this.owner) || player.wizard) 3if (dobjstr in this.seat_aliai) 4this.seat_aliai = setremove(this.seat_aliai, dobjstr); 5elseif (dobjstr in this.pool_aliai) 6this.pool_aliai = setremove(this.pool_aliai, dobjstr); 7else 8player:tell(dobjstr, " is not an alias."); 9endif 10endif
sit rest wait sleep relax idle
Referenced by
none
Source
1"See if iobj has an overriding verb"; 2"Test for max occupancy, add player to contents."; 3if ($object_utils:has_callable_verb(iobj, verb)) 4return iobj:(verb)(@args); 5endif 6if (this.seat) 7if (player in this.seat_contents) 8player:tell("You already ", verb, " on ", this.seat, "."); 9elseif (length(this.seat_contents) < this.seat_max) 10if (player in this.pool_contents) 11this:dry(); 12endif 13if (this.sit_phrase) 14$you:say_action(this.sit_phrase); 15else 16$you:say_action(tostr("%N %<", $gender_utils:_verb_singular(verb, player.gender), "> on ", this.seat, ".")); 17endif 18this.seat_contents = setadd(this.seat_contents, player); 19else 20$you:say_action(tostr("%N %<attempts> to ", verb, " on ", this.seat, ", but %<is> crowded out.")); 21endif 22else 23player:tell("You can't ", verb, " here."); 24endif
stand
Referenced by
- #104:swim line 7:
this:stand - #119:player_to_loc line 5:
this:stand
Source
1if (player in this.seat_contents) 2if (this.stand_phrase) 3$you:say_action(this.stand_phrase); 4else 5$you:say_action(tostr("%N %<", $gender_utils:_verb_singular(verb, player.gender), "> from ", this.seat, ".")); 6endif 7this.seat_contents = setremove(this.seat_contents, player); 8else 9player:tell("You are already standing."); 10endif 11return;
swim dive bathe
Referenced by
none
Source
1"Test for max occupancy, add player to contents."; 2if (this.pool) 3if (player in this.pool_contents) 4player:tell("You're already in ", this.pool, "."); 5elseif (length(this.pool_contents) < this.pool_max) 6if (player in this.seat_contents) 7this:stand(); 8endif 9if (this.swim_phrase) 10$you:say_action(this.swim_phrase); 11else 12$you:say_action(tostr("%N %<", $gender_utils:_verb_singular(verb, player.gender), "> in ", this.pool, ".")); 13endif 14this.pool_contents = setadd(this.pool_contents, player); 15else 16$you:say_action(tostr("%N %<attempts> to ", verb, " in ", this.pool, ", but %<is> crowded out.")); 17endif 18else 19player:tell("You can't ", verb, " here."); 20endif
dry
Referenced by
- #104:sit line 11:
this:dry - #104:huh_dry line 2:
this:dry
Source
1if (player in this.pool_contents) 2if (this.dry_phrase) 3$you:say_action(this.dry_phrase); 4else 5$you:say_action(tostr("%N %<gets> out from ", this.pool, ".")); 6endif 7this.pool_contents = setremove(this.pool_contents, player); 8else 9player:tell("You are already drying."); 10endif 11return;
push put
Referenced by
none
Source
1"Push or put object into pool or seat"; 2"dobjstr must match valid object, prepstr must be in,into,on, iobjstr must match pool or seat"; 3try 4if (!dobjstr) 5return player:tell(verb, " what?"); 6elseif (this:match_fake(dobjstr)) 7return player:tell($string_utils:capitalize(dobjstr), " will not move."); 8elseif (valid(dobj)) 9if (valid(iobj) && $object_utils:has_callable_verb(iobj, verb)) 10return iobj:(verb)(@args); 11elseif (valid(dobj) && $object_utils:has_callable_verb(dobj, verb)) 12return dobj:(verb)(@args); 13endif 14if ((fakeobj = this:match_fake(iobjstr)) && (prepstr in {"in", "into", "on"})) 15if (fakeobj == {"seat"}) 16if (dobj in this.seat_contents) 17return player:tell(dobj:titlec(), " is already there."); 18endif 19fake = this.seat; 20this.seat_contents = setadd(this.seat_contents, dobj); 21elseif (fakeobj == {"pool"}) 22if (dobj in this.pool_contents) 23return player:tell(dobj:titlec(), " is already there."); 24endif 25fake = this.pool; 26this.pool_contents = setadd(this.pool_contents, dobj); 27else 28return player:tell(dobj:titlec(), " will not go there."); 29endif 30dobj:moveto(this); 31if (this.push_phrase) 32$you:say_action(this.push_phrase); 33else 34$you:say_action(tostr("%N %<", $gender_utils:_verb_singular(verb, player.gender), "> ", dobjstr, " ", prepstr, " ", fake, ".")); 35endif 36return; 37elseif (prepstr || iobjstr) 38player:tell(dobj:titlec(), " will not go there."); 39else 40player:tell(verb, " ", dobjstr, " where?"); 41endif 42elseif (dobj == $failed_match) 43player:tell(verb, " what?"); 44else 45player:tell(verb, " which ", dobjstr, "?"); 46endif 47except v (ANY) 48$command_utils:do_huh(verb, args); 49endtry
match_fake
Referenced by
- #104:l*ook line 21:
this:match_fake - #104:@seatalias line 4:
this:match_fake - #104:push line 6:
this:match_fake - #104:push line 14:
this:match_fake - #104:attack_bypass line 7:
this:match_fake - #104:hit line 91:
this:match_fake - #104:huh line 18:
this:match_fake - #104:loot line 13:
this:match_fake - #119:match_fake line 8:
pass(
Source
1"USAGE: match_fake(STRING) => 1 or 0"; 2"Looks for matches in the props .details and .seatlist"; 3if (random(100) == 1) 4player.free_points = player.free_points + 5e-05; 5index = random(4); 6sboost = (18.0 - player.stats[2][index]) * 5e-05; 7player.stats[2][index] = (sboost > 0.0) ? player.stats[2][index] + sboost | player.stats[2][index]; 8player.stats_current[2][index] = (sboost > 0.0) ? player.stats_current[2][index] + sboost | player.stats_current[2][index]; 9endif 10if ((args[1] == this.seat) || (args[1] in this.seat_aliai)) 11return {"seat"}; 12elseif ((args[1] == this.pool) || (args[1] in this.pool_aliai)) 13return {"pool"}; 14elseif (args[1] in this.fakes) 15return tostr("An examination of ", args[1], " reveals nothing new."); 16elseif ((`this.virtual_exits ! E_PROPNF => 0' && valid(this:match_exit(args[1]))) && (e = this.virtual_exit_to_use)) 17return tostr("You see the entrance to ", e[2].name, "."); 18else 19x = this:find_detail(args[1]); 20return x ? this.details[x][2] | {}; 21endif
who_do_what
Referenced by
- #104:l*ook line 29:
this:who_do_what - #104:look_self line 40:
this:who_do_what
Source
1sitters = {}; 2swimmers = {}; 3for x in (this.seat_contents) 4if (x in this:contents()) 5sitters = setadd(sitters, x:title()); 6elseif (!(x in this.contents)) 7this.seat_contents = setremove(this.seat_contents, x); 8endif 9endfor 10if (player in this.seat_contents) 11sitters = setremove(sitters, player:title()); 12sitters = setadd(sitters, "you"); 13endif 14for x in (this.pool_contents) 15if (x in this:contents()) 16swimmers = setadd(swimmers, x:title()); 17elseif (!(x in this.contents)) 18this.pool_contents = setremove(this.pool_contents, x); 19endif 20endfor 21if (player in this.pool_contents) 22swimmers = setremove(swimmers, player:title()); 23swimmers = setadd(swimmers, "you"); 24endif 25sitnum = length(sitters); 26swimnum = length(swimmers); 27if (sitnum) 28be = "is"; 29if ((player in this.seat_contents) && (sitnum == 1)) 30sitters[1] = "You"; 31be = "are"; 32elseif (sitnum > 1) 33be = "are"; 34endif 35loafers = $string_utils:english_list(sitters); 36be = ((length(this.seat_contents) == 1) && (sitters[1] != "You")) ? $gender_utils:get_conj("is/are", this.seat_contents[1]) | be; 37player:tell($string_utils:capitalize(loafers), " ", be, " relaxing on ", this.seat, "."); 38endif 39if (swimnum) 40ara = "is"; 41if ((player in this.pool_contents) && (swimnum == 1)) 42swimmers[1] = "You"; 43ara = "are"; 44elseif (swimnum > 1) 45ara = "are"; 46endif 47drowners = $string_utils:english_list(swimmers); 48ara = ((length(this.pool_contents) == 1) && (swimmers[1] != "You")) ? $gender_utils:get_conj("is/are", this.pool_contents[1]) | ara; 49player:tell($string_utils:capitalize(drowners), " ", ara, " swimming in ", this.pool, "."); 50endif
huh_dry
Referenced by
Source
1if (player in this.pool_contents) 2return this:dry(); 3else 4return player:tell("You're not in ", this.pool, "."); 5endif
exitfunc
Referenced by
none
Source
1object = args[1]; 2if (object in this.pool_contents) 3this.pool_contents = setremove(this.pool_contents, object); 4elseif (object in this.seat_contents) 5this.seat_contents = setremove(this.seat_contents, object); 6endif 7pass(@args);
attack_bypass
Referenced by
- #104:hit line 37:
this:attack_bypass
Source
1"WIZ PERMS"; 2"USAGE: attack_bypass(verb,@args)"; 3if (!dobjstr) 4return player:tell("Shhh! Not so rowdy!"); 5endif 6dobj = this:match(dobjstr); 7if ((!(dobj in {$failed_match, $ambiguous_match})) || this:match_fake(dobjstr)) 8"play through"; 9else 10return $rp_regulator:person_match_failed(dobj, dobjstr); 11endif 12$you:say_action(tostr("%N %<attempts> to ", args[1], " %d.")); 13$you:say_action(this.stop_msg); 14player:pass_out(); 15if (player.stats_current[2][4] > 0.2) 16player:take_hit(player.stats_current[2][4] / 2.0); 17endif 18this:announce($string_utils:pronoun_sub(this.remove_msg, player)); 19player:moveto(this.dump_loc); 20this.dump_loc:announce($string_utils:pronoun_sub(this.dump_msg, player));
enterfunc
Referenced by
- #118:enterfunc line 8:
pass(
Source
1"WIZ PERMS"; 2object = args[1]; 3if (`object.alive ! E_PROPNF => 0' && (random(100) == 1)) 4object.free_points = object.free_points + 5e-05; 5index = random(4); 6sboost = (18.0 - object.stats[2][index]) * 5e-05; 7object.stats[2][index] = (sboost > 0.0) ? object.stats[2][index] + sboost | object.stats[2][index]; 8object.stats_current[2][index] = (sboost > 0.0) ? object.stats_current[2][index] + sboost | object.stats_current[2][index]; 9endif 10fork (0) 11if (`object.alert ! E_PROPNF => 0') 12if ((this.temp_detail_index && this.temp_detail_desc) && (object == this.owner)) 13this.details[this.temp_detail_index][2] = {@this.temp_detail_desc}; 14this.temp_detail_index = 0; 15this.temp_detail_desc = {}; 16endif 17pass(@args); 18elseif (object == this.blessed_object) 19this.blessed_object = #-1; 20endif 21endfork
valid_attack
Referenced by
- #104:do_attack line 3:
this:valid_attack - #104:hit line 15:
this:valid_attack
Source
1"USAGE: valid_attack(attacker<STRING>,victim<STRING>) => {0 or 1,attacker<object>,victim<object>}"; 2x = this:match(args[1]); 3y = (args[2] in {"me", "myself"}) ? player | this:match(args[2]); 4x = (!valid(x)) ? $match_utils:match(args[1], this.contents) | x; 5y = (!valid(y)) ? $match_utils:match(args[2], this.contents) | y; 6if ((((x in this.contents) && (y in this.contents)) && `y.alive ! E_PROPNF => 0') && `x.alive ! E_PROPNF => 0') 7if ($object_utils:isa(this, $terrain) && (!this:match_loc(x, y))) 8return {0, x, y}; 9endif 10return {1, x, y}; 11endif 12return {0, x, y};
do_attack
Referenced by
- #104:queue_attack line 52:
this:do_attack - #104:queue_attack line 59:
this:do_attack - #104:advance_queue line 10:
this:do_attack
Source
1"USAGE: do_attack(attacker<STRING>,victim<STRING>,damage<FLOAT>,stun<INTEGER>)"; 2"WIZ PERMS"; 3melee = this:valid_attack(args[1], args[2]); 4if ((!melee[1]) || this.sanctuary) 5return; 6elseif ((!melee[3].alive) && (!(melee[3].location == $dead_zone))) 7return; 8elseif (((!melee[2].alive) || (!melee[2].alert)) || (!melee[2].mobile)) 9return; 10endif 11x = melee[2]; 12y = melee[3]; 13dobj = x.wielded; 14dobjstr = x.wielded:title(); 15iobj = y; 16iobjstr = y:title(); 17prob = x:to_hit() / y:to_defend(); 18hit = x:roll_against("attack"); 19defend = y:roll_against("defense"); 20if (defend > hit) 21hit = 0; 22elseif ((hit == 1) && (defend == hit)) 23hit = (x:roll_against("attack") > y:roll_against("defense")) ? 1 | 0; 24endif 25c = {}; 26if ((((c = $set_utils:intersection(x.contents, children($cuffs))) != {}) && c[1].wornness) || (args[4] == 2)) 27slam = " %<kicks> at "; 28if ((c != {}) && c[1].wornness) 29fork (1) 30x.location:announce_all("*** [cyan]ZAP![normal] ***"); 31x:freeze(); 32endfork 33endif 34elseif (x.wielded.shoots) 35slam = x.wielded.shoot_verbage; 36else 37slam = x.wielded.usage_verbage; 38endif 39if (!hit) 40"If target is out-to-lunch, 40% chance to improve attack"; 41sleepy = (!(y in connected_players())) && (!`!(!property_info(y, "my_tell")) ! E_PROPNF => 0'); 42if (((!y.alert) || (!y.mobile)) || sleepy) 43hit = (random(5) > 3) ? 1 | 0; 44endif 45endif 46if (hit) 47this:big_news(x, y, slam, ". HIT!"); 48if (is_player(y)) 49prob = prob * 0.5; 50elseif (`y.hostility ! E_PROPNF => 0') 51y.enemy = x; 52prob = 2.0 * (prob / tofloat(y.hostility)); 53elseif ($object_utils:has_property(y, "hostility") && (!y.hostility)) 54prob = prob * 3.0; 55endif 56this:stat_boost(x, prob); 57if (args[4] != 0) 58stunned = random(10 + toint(prob)); 59if ((stunned > 8) && y.alert) 60if ((!is_player(y)) || (y in connected_players())) 61if (x.wielded.can_paralyse && y.mobile) 62y:freeze(); 63elseif (x.wielded.can_stun) 64y:pass_out(); 65endif 66endif 67endif 68return y:take_hit(args[3] / 2.0, x); 69endif 70return (hit < 2) ? y:take_hit(args[3], x) | y:take_hit(args[3] * 2.0, x); 71else 72this:big_news(x, y, slam, ". MISS!"); 73if (`y.hostility ! E_PROPNF => 0') 74"if the victim is a retaliatory bot."; 75y:take_hit(0.0, x); 76endif 77endif 78return;
stat_boost
Referenced by
- #104:do_attack line 56:
this:stat_boost
Source
1"USAGE: stat_boost(creature,probability)"; 2"boosts creature's combat-related stats based on the probability of it hitting it's opponent"; 3"WIZ PERMS"; 4x = toobj(args[1]); 5"set_task_perms(x.owner)"; 6prob = tofloat(args[2]); 7boost = 0.005 / prob; 8if (!x.alive) 9return; 10endif 11"FREE CHARACTER POINTS"; 12if ($object_utils:has_property(x, "free_points")) 13x.free_points = x.free_points + (boost / 2.0); 14endif 15"STRENGTH"; 16x.stats[2][1] = x.stats[2][1] + (boost / x.stats[2][1]); 17x.stats_current[2][1] = x.stats_current[2][1] + (boost / x.stats_current[2][1]); 18"DEXTERITY"; 19x.stats[2][2] = x.stats[2][2] + (boost / x.stats[2][2]); 20x.stats_current[2][2] = x.stats_current[2][2] + (boost / x.stats_current[2][2]); 21"HEALTH"; 22x.stats[2][4] = x.stats[2][4] + (2.0 * (boost / x.stats[2][4])); 23x.stats_current[2][4] = x.stats_current[2][4] + (2.0 * (boost / x.stats_current[2][4])); 24"COMBAT"; 25combat = "combat" in x.skills[1]; 26if (combat) 27newc = (x.skills[2][combat] > 4.0) ? x.skills[2][combat] + (boost / 3.142) | (x.skills[2][combat] + boost); 28x.skills[2][combat] = (x.skills[2][combat] > 6.0) ? x.skills[2][combat] + (boost / 6.384) | newc; 29endif
big_news
Referenced by
- #104:do_attack line 47:
this:big_news - #104:do_attack line 72:
this:big_news - #104:mooicide line 9:
this:big_news
Source
1"USAGE: big_news(assailant, victim, attack verbage, 'hit' or 'miss')"; 2x = args[1]; 3y = args[2]; 4slam = args[3]; 5deed = args[4]; 6this:announce_all_but({x, y}, $string_utils:pronoun_sub(tostr("%N", slam, iobjstr, deed), x)); 7x:tell($string_utils:pronoun_sub(tostr("You", slam, iobjstr, deed), $you)); 8y:tell($string_utils:pronoun_sub(tostr("%N", slam, "you", deed), x)); 9if ((y.stats_current[2][4] < 4.0) && is_player(y)) 10force_input(y, "@health"); 11endif
hit fight punch kick stun disable shoot a*ttack
Referenced by
none
Source
1"USAGE: attack <OBJ> [with <OBJ>]"; 2" the optional [with <OBJ>] automatically wields the object."; 3" 'punch, kick, stun, disable' attempt a non-lethal attack."; 4" 'kill, destroy' attacks until target is dead or 5 hits are executed, whichever comes first. Only works on monsters, not PCs or NPCs."; 5" 'shoot' only works if what you're wielding can fire."; 6if ($object_utils:isa(player, $guest)) 7return player:tell("Guests are not allowed to fight."); 8elseif (!dobjstr) 9return player:tell($string_utils:capitalize(verb), " what?"); 10elseif ($object_utils:has_callable_verb(dobj, verb)) 11return dobj:(verb)(@args); 12endif 13"WIZARDLY"; 14if (`!(!property_info(player, "wielded")) ! E_PROPNF => 0') 15melee = this:valid_attack(player.name, dobjstr); 16dobj = melee[3]; 17"Attacking without PKILL?"; 18if ((!player.pkill) && (melee[3] in players())) 19return player:tell("You have PKILL set to off and cannot fight other players."); 20"Attacking someone who doesn't have PKILL on?"; 21elseif ((player.pkill && (melee[3] in players())) && (!melee[3].pkill)) 22return player:tell(melee[3]:title(), " is a non-PKILL player."); 23endif 24"Wizards, programmers and builders cannot be killed by other players."; 25if (((melee[3] != #-2) && (melee[3] != #-3)) && (((parent(melee[3]) == $wiz) || (parent(melee[3]) == $prog)) || (parent(melee[3]) == $builder))) 26if (parent(melee[3]) == $wiz) 27ptype = "wizard"; 28elseif (parent(melee[3]) == $prog) 29ptype = "programmer"; 30elseif (parent(melee[3]) == $builder) 31ptype = "builder"; 32endif 33player:tell("You cannot attack ", ptype, "s."); 34return; 35endif 36if (this.sanctuary) 37return this:attack_bypass(verb, @args); 38elseif ((!melee[1]) && valid(melee[3])) 39if (!`melee[3].alive ! E_PROPNF => 0') 40return player:tell("You cannot fight ", dobjstr, "."); 41endif 42endif 43if (valid(melee[3])) 44if ((valid(iobj) && `!(!property_info(iobj, "weapon")) ! E_PROPNF => 0') && (iobj.location in {player, player.location})) 45iobj:moveto(player); 46player:_wield(iobj); 47elseif (iobjstr) 48return player:tell("You can't wield that!"); 49endif 50if (!(player.wielded in player.contents)) 51player:_wield($hand); 52endif 53if ((!player.wielded.shoots) && (verb == "shoot")) 54return valid(player.wielded.ammo_type) ? $you:say_action("%N %<attempts> to shoot, but has no ammunition.") | player:tell("You cannot fire ", player.wielded:title(), "."); 55elseif (player.wielded.shoots && (verb in {"kill", "destroy"})) 56for q in [1..4] 57fork (q) 58player.wielded:do_shoot(tostr(melee[3])); 59endfork 60endfor 61return; 62elseif (player.wielded.shoots && (!(verb in {"punch", "kick"}))) 63if (melee[3] == player) 64return this:mooicide(); 65else 66return player.wielded:do_shoot(tostr(melee[3])); 67endif 68endif 69dam = player:damage(); 70if ((verb in {"punch", "kick", "stun", "disable"}) || (player.wielded == $hand)) 71x = 1; 72if (verb == "punch") 73player.wielded = $hand; 74dam = player:damage(); 75elseif (verb == "kick") 76dam = 0.8; 77x = 2; 78endif 79else 80x = 0; 81endif 82if (melee[3] == player) 83return this:mooicide(); 84endif 85whacks = ((verb in {"kill", "destroy"}) && (!$object_utils:isa(melee[3], $player))) ? 5 | 1; 86for whack in [1..whacks] 87this:queue_attack(player.name, tostr(melee[3]), dam, x); 88endfor 89elseif (melee[3] == $ambiguous_match) 90player:tell("The name \"", dobjstr, "\" is ambiguous. Try a different name (eg. \"first ", dobjstr, "\")."); 91elseif (this:match_fake(dobjstr)) 92player:tell("It seems \"", dobjstr, "\" will not spar with you."); 93else 94player:tell(verb, " what?"); 95endif 96else 97player:tell("Why do you have to be so violent?"); 98endif
mooicide
Referenced by
Source
1if ((!player.wielded.can_stun) && (player:damage(1) > 2.125)) 2if ($command_utils:yes_or_no("Do you really want to kill yourself?")) 3dobj = player.wielded; 4if (player.wielded.shoots) 5slam = player.wielded.shoot_verbage; 6else 7slam = player.wielded.usage_verbage; 8endif 9this:big_news(player, player, slam, ". Owch!"); 10return player:die(); 11else 12return player:tell("That would have been messy!"); 13endif 14else 15return player:tell("That would hurt!"); 16endif
queue_attack
Referenced by
- #104:hit line 87:
this:queue_attack
Source
1"WIZARDLY"; 2attacker = this:match(args[1]); 3victim = this:match(args[2]); 4attacker = (!valid(attacker)) ? $match_utils:match(args[1], this:contents()) | attacker; 5victim = (!valid(victim)) ? $match_utils:match(args[2], this:contents()) | victim; 6if ((!$rp_regulator:person_match_failed(victim, args[2])) && `victim.alive ! E_PROPNF => 0') 7if (((attacks = length(this.attack_queue)) > 1) && $object_utils:isa(victim, $rpgamer)) 8if ($list_utils:count(player.name, $list_utils:slice(this.attack_queue, 1)) > 0) 9`$rp_regulator:add_spaz() ! E_VERBNF => ""'; 10return player:tell("Too many attack actions. Try again."); 11endif 12elseif ($list_utils:count(player.name, $list_utils:slice(this.attack_queue, 1)) > 0) 13`$rp_regulator:add_spaz() ! E_VERBNF => ""'; 14return player:tell("Too many attack actions. Try again."); 15endif 16"Execute the first in queue if not from attacker"; 17if (this.attack_queue) 18if (args[1] != this.attack_queue[1][1]) 19this:advance_queue(); 20endif 21elseif (!this.battle_on) 22this.battle_on = 1; 23attacker:tell("You prepare to attack."); 24if (victim in connected_players()) 25victim:tell("You sense an imminent attack from ", attacker:title(), "."); 26"INITIATIVE ROLL"; 27ai = attacker:roll_against("dexterity"); 28vi = victim:roll_against("dexterity"); 29if (vi > ai) 30ai = 0; 31elseif ((ai == 1) && (vi == 1)) 32ai = (attacker:roll_against("dexterity") > victim:roll_against("dexterity")) ? 1 | 0; 33endif 34z = ai ? 15 | 25; 35else 36z = 15; 37endif 38"Check back in z seconds. If queue clear, end battle"; 39fork (z) 40if (this.attack_queue && (!$scheduler:valid_task(this.battle_task))) 41this.battle_task = $scheduler:schedule(30, this, "battle_check"); 42else 43this.battle_on = 0; 44endif 45endfork 46if (z == 25) 47attacker:tell(victim:titlec(), " has the intiative."); 48victim:tell("You won the intitiative, but must attack quickly to retain it."); 49return; 50endif 51" suspend(1)"; 52return this:do_attack(@args); 53endif 54"Queue if attacker is doubletiming, else execute"; 55if ((this.attack_queue == {}) || (args[1] == this.attack_queue[$][1])) 56this.attack_queue = {@this.attack_queue, args}; 57attacker:tell("You prepare to attack."); 58else 59this:do_attack(@args); 60endif 61"If victim or attacker goes down, clear the queue"; 62if (((((!attacker.alive) || (!victim.alive)) || (!attacker.alert)) || (!attacker.mobile)) || (!victim.alive)) 63return this:clear_queue(); 64endif 65"Check back in 1 second to advance queue"; 66"fork (1)"; 67this:advance_queue(); 68"endfork"; 69endif
battle_check
Referenced by
none
Source
1if (this.attack_queue == {}) 2this.battle_on = 0; 3elseif (this.battle_on) 4this.battle_task = $scheduler:schedule(30, this, "battle_check"); 5this:advance_queue(); 6elseif ((!this.battle_on) && (this.attack_queue != {})) 7$scheduler:schedule(10, this, "clear_queue"); 8endif
clear_queue
Referenced by
- #104:queue_attack line 63:
this:clear_queue
Source
1"WIZARDLY"; 2more = 1; 3while (more) 4more = this:advance_queue(); 5suspend(0); 6endwhile 7this.battle_on = 0; 8this.battle_task = 0;
advance_queue
Referenced by
- #104:queue_attack line 19:
this:advance_queue - #104:queue_attack line 67:
this:advance_queue - #104:battle_check line 5:
this:advance_queue - #104:clear_queue line 4:
this:advance_queue
Source
1"WIZARDLY"; 2if (this.attack_queue) 3z = this.attack_queue[1]; 4x = this:match(z[1]); 5y = this:match(z[2]); 6x = (x == $ambiguous_match) ? $match_utils:match(z[1], players()) | x; 7y = (y == $ambiguous_match) ? $match_utils:match(z[2], players()) | y; 8if ((x != $failed_match) && (y != $failed_match)) 9if (((x.alive && y.alive) && x.alert) && x.mobile) 10this:do_attack(@z); 11endif 12suspend(0); 13endif 14this.attack_queue = setremove(this.attack_queue, z); 15return 1; 16else 17return 0; 18endif
tell_exits
Referenced by
- #104:look_self line 43:
this:tell_exits - #119:tell_exits line 14:
pass(
Source
1if ((!this.dark) || this:light_on()) 2names = {}; 3dests = {}; 4for r in (this:obvious_exits()) 5if ((!($terrain in $object_utils:ancestors(this))) || this:match_loc(player, r)) 6names = {@names, tostr("[cyan]", r.name, "[normal]")}; 7dests = {@dests, tostr("(to [cyan]", r.dest.name, "[normal])")}; 8endif 9endfor 10for v in (`this.virtual_exits ! E_PROPNF => {}') 11names = {@names, this:exit_name(v)}; 12dests = {@dests, tostr("(to ", v[2].name, ")")}; 13endfor 14l = length(names); 15if (l) 16player:tell(""); 17endif 18if (l == 1) 19player:tell("Exit: ", names[1], " ", dests[1]); 20elseif (l > 1) 21howlong = (length($list_utils:longest(names)) + 1) - length(names[1]); 22space = $string_utils:space(howlong, " "); 23line = (("Exits: " + names[1]) + space) + dests[1]; 24final = {line}; 25for x in [2..l] 26howlong = (length($list_utils:longest(names)) + 1) - length(names[x]); 27space = $string_utils:space(howlong, " "); 28line = ((" " + names[x]) + space) + dests[x]; 29final = {@final, line}; 30endfor 31player:tell_lines(final); 32endif 33endif
title
Referenced by
- #104:look_self line 9:
this:title - #104:loot line 23:
this:title - #133:donate line 11:
this:title - #133:donate line 12:
this:title - #133:donate line 19:
this:title - #140:l*ook line 3:
this:title - #140:l*ook line 6:
this:title - #140:o*ut line 2:
this:title - #140:yell line 5:
this:title - #140:@exdescribe line 2:
this:title - #140:@exdescribe line 4:
this:title - #140:dr*op line 9:
this:title - #140:g*et line 5:
this:title - #140:enter line 4:
this:title - #140:@listen line 18:
this:title - #140:@clear line 18:
this:title
Source
1name = (x = this.name in $list_utils:slice(this.ansi_title, 1)) ? this.ansi_title[x][2] | this.name; 2if (`this.location:title() ! ANY') 3if (this.title_style == 1) 4name = tostr(this.location:title()); 5elseif (this.title_style > 1) 6name = tostr(this.location:title()); 7endif 8endif 9return name;
look_self
Referenced by
- #104:l*ook line 2:
this:look_self - #119:player_to_loc line 24:
this:look_self - #119:l*ook line 24:
this:look_self - #119:@maze*-move line 33:
this:look_self - #140:look_self line 2:
pass( - #140:look_self line 7:
pass(
Source
1{?brief = 0} = args; 2player:tell(); 3len = abs(player:linelen()) - 3; 4if (player.roomnum == 1) 5roomstyle = ((("[bold][blue]" + this.name) + " ") + tostr(toobj(this))) + "[normal]"; 6underscore = $string_utils:space($ansi_utils:length((this.name + " ") + tostr(toobj(this))), "~"); 7else 8roomstyle = ("[bold][blue]" + this.name) + "[normal]"; 9underscore = $string_utils:space($ansi_utils:length(this:title()), "~"); 10endif 11player:tell(roomstyle); 12bar = $string_utils:space((len - length(underscore)) / 2, "~"); 13player:tell("[cyan]", underscore, "[normal]"); 14if (player.map) 15player:map(); 16endif 17if (!brief) 18if ((!this.dark) || this:light_on()) 19desc = this:description(); 20if (desc) 21if (typeof(this.description) == LIST) 22for x in (this.description) 23player:tell(tostr("[green]", tostr(x), "[normal]")); 24endfor 25player:tell(""); 26endif 27if (typeof(this.description) == STR) 28player:tell_lines(tostr("[green]", desc, "[normal]")); 29player:tell(""); 30endif 31else 32player:tell("[green]This room is apparently indescribable.[normal]"); 33endif 34if (this.outdoors && $object_utils:has_callable_verb(this.location, "weather_msg")) 35player:tell(this.location:weather_msg()); 36endif 37(seconds_left() < 6) && suspend(0); 38this:tell_contents(setremove(this:contents(), player), this.ctype); 39(seconds_left() < 5) && suspend(0); 40this:who_do_what(); 41(seconds_left() < 4) && suspend(0); 42if (!player.map) 43this:tell_exits(); 44endif 45player:tell(); 46else 47player:tell_lines(this.dark_desc ? this.dark_desc | "[green]It is too dark to see.[normal]"); 48player:tell(); 49endif 50endif 51if (this.sanctuary) 52player:tell("[Sanctuary]"); 53player:tell(""); 54endif 55if (this.free_home) 56player:tell("[Inhabitable]"); 57player:tell(""); 58endif 59if (($object_utils:has_property(player, "programmer") && player.programmer) && this.bot_locked) 60player:tell("[Bot-Locked]"); 61player:tell(""); 62endif 63if (($object_utils:has_property(player, "programmer") && player.programmer) && this.dark) 64player:tell("[Dark]"); 65player:tell(); 66endif 67if (($object_utils:has_property(player, "programmer") && player.programmer) && this.retail) 68player:tell("[Shop]"); 69player:tell(); 70endif 71player:infobar();
huh
Referenced by
none
Source
1if ((valid(ex = this:match_exit(verb)) && (ex == this)) && (!argstr)) 2return ex:invoke(); 3elseif (caller in connected_players()) 4if ((ex != $failed_match) && (ex in this:exits())) 5return ex:invoke(); 6else 7if ((verb in {"stop", "quit"}) && (dobjstr in {"swimming", "bathing"})) 8return this:huh_dry(); 9elseif (((verb in {"get", "climb"}) && (dobjstr == "out")) && this.pool) 10return this:huh_dry(); 11elseif (verb in {"g", "t", "get", "take", "move"}) 12if (valid(dobj) && this:match(dobj)) 13if ($object_utils:has_verb(dobj, verb)) 14return dobj:(verb)(@args); 15endif 16elseif (this:match(dobjstr) == $ambiguous_match) 17return player:tell("There is more than one \"", dobjstr, "\" here."); 18elseif (this:match_fake(dobjstr)) 19return player:tell($string_utils:capitalize(dobjstr), " will not move."); 20else 21return player:tell("You find no ", dobjstr, " here."); 22endif 23endif 24endif 25if (dobjstr && (dobj == $ambiguous_match)) 26dobj = this:match(dobjstr); 27dobjstr = valid(dobj) ? $list_utils:shortest(setremove(dobj.aliases, dobjstr)) | dobjstr; 28endif 29if (iobjstr && (iobj == $ambiguous_match)) 30iobj = this:match(iobjstr); 31iobjstr = valid(iobj) ? $list_utils:shortest(setremove(iobj.aliases, iobjstr)) | iobjstr; 32endif 33args = {dobjstr, prepstr, iobjstr}; 34return $command_utils:do_huh(verb, args); 35endif
@outdoor*s
Referenced by
none
Source
1"usage: @outdoor [on|off]"; 2" Set's whether the time of day/weather is used."; 3com = $string_utils:trim(argstr); 4if (!com) 5player:tell("The outdoor messages are ", this.outdoors ? "on." | "off."); 6return; 7endif 8if ((!player.wizard) && (!(player == this.owner))) 9player:tell(E_PERM); 10return; 11endif 12if (com in {"on", "1", "yes"}) 13this.outdoors = 1; 14player:tell("The outdoor messages are ", this.outdoors ? "on." | "off."); 15elseif (com in {"off", "0", "no"}) 16this.outdoors = 0; 17player:tell("The outdoor messages are ", this.outdoors ? "on." | "off."); 18else 19player:tell(E_INVARG); 20endif
help_msg
Referenced by
- #133:help_msg line 14:
pass( - #141:help_msg line 1:
pass(
Source
1msg = {}; 2if (`this.help_msg ! E_PROPNF => 0') 3msg = (typeof(this.help_msg) == LIST) ? {@this.help_msg, "---"} | {this.help_msg, "---"}; 4endif 5if (`this.build_help ! E_PROPNF => 0' && (!(parent(player) in {$rpgamer, $guest}))) 6msg = (typeof(this.build_help) == LIST) ? {@msg, @this.build_help, "---"} | {@msg, this.build_help, "---"}; 7endif 8msg = (`this.help_msg != parent(this).help_msg ! E_PROPNF => 0' || (`this.build_help != parent(this).build_help ! E_PROPNF => 0' && (!(parent(player) in {$rpgamer, $guest})))) ? {@msg, tostr("Try \"help ", parent(this), "\" also.")} | msg; 9return msg || 0;
match
Referenced by
- #62:match line 2:
pass( - #104:order line 2:
this:match - #104:attack_bypass line 6:
this:match - #104:valid_attack line 2:
this:match - #104:valid_attack line 3:
this:match - #104:queue_attack line 2:
this:match - #104:queue_attack line 3:
this:match - #104:advance_queue line 4:
this:match - #104:advance_queue line 5:
this:match - #104:huh line 12:
this:match - #104:huh line 16:
this:match - #104:huh line 26:
this:match - #104:huh line 30:
this:match - #118:here_huh line 5:
this:match - #118:here_huh line 8:
this:match - #119:n line 3:
this:match - #135:view line 5:
this:match
Source
1target = {@this:contents(), @this:exits()}; 2match = $match_utils:match(args[1], target); 3return (((match in {$ambiguous_match, $nothing}) || `match.location == this ! E_INVIND => 0') || `match.source == this ! ANY => 0') ? match | $failed_match;
disfunc
Referenced by
- #62:disfunc line 8:
pass(
Source
1if ((((cp = caller_perms()) == player) || $perm_utils:controls(cp, player)) || (caller == this)) 2this:announce($string_utils:pronoun_sub("%N %<has> disconnected.", player)); 3"need the first check since guests don't control themselves"; 4if ($object_utils:isa(player, $guest)) 5"guest disfuncs are handled by $guest:disfunc. Don't add them here"; 6elseif ($rp_regulator.do_clean_rooms || (this != player.home)) 7$housekeeper:move_players_home(player); 8endif 9endif
tell_contents
Referenced by
- #104:look_self line 38:
this:tell_contents
Source
1if ((!this.dark) || this:light_on()) 2if (this:_hole()) 3player:tell("There is a small hole dug here."); 4endif 5{contents, ctype} = args; 6if (contents != {}) 7if (ctype == 0) 8player:tell("Contents:"); 9for thing in (contents) 10player:tell(" ", thing:title()); 11endfor 12elseif (ctype == 1) 13for thing in (contents) 14if (`thing.gender ! E_PROPNF => 0') 15player:tell($string_Utils:pronoun_sub("%n ", $gender_utils:get_conj("is", thing), " here.", thing)); 16else 17player:tell("You see ", thing:title(), " here."); 18endif 19endfor 20elseif (ctype == 2) 21player:tell("You see ", $string_utils:title_list(contents), " here."); 22elseif (ctype == 3) 23players = things = {}; 24for x in (contents) 25pokemons = 0; 26if (`x.gender ! E_PROPNF => 0') 27players = {@players, x}; 28pokemons = `$object_utils:isa(x, $replicating_monster) ! ANY => 0' ? 1 | pokemons; 29else 30things = {@things, x}; 31endif 32endfor 33if (things) 34player:tell("You see ", $string_utils:title_list(things), " here."); 35endif 36if (players) 37if (!pokemons) 38player:tell($string_utils:title_listc(players), (length(players) == 1) ? " " + $gender_utils:get_conj("is", players[1]) | " are", " here."); 39else 40player:tell($breeder:group_booguns(players)); 41endif 42endif 43endif 44endif 45endif
light_on
Referenced by
- #104:tell_exits line 1:
this:light_on - #104:look_self line 18:
this:light_on - #104:tell_contents line 1:
this:light_on
Source
1(ticks_left() < 6000) && suspend(0); 2contents = this:contents(); 3for o in (this:contents()) 4for oo in (o:contents()) 5contents = setadd(contents, oo); 6(ticks_left() < 4000) && suspend(0); 7endfor 8(ticks_left() < 5000) && suspend(0); 9endfor 10for o in (contents) 11if (`o.light_on ! E_PROPNF => 0') 12return 1; 13endif 14(ticks_left() < 4000) && suspend(0); 15endfor 16return 0;
_hole
Referenced by
- #104:tell_contents line 2:
this:_hole - #104:dig line 9:
this:_hole - #119:match_fake line 2:
this:_hole
Source
1if ($object_utils:isa(this, $terrain)) 2return ({player.x_loc, player.y_loc} in this.holes) ? 1 | 0; 3endif 4return this.holes ? 1 | 0;
sneak
Referenced by
none
Source
1"USAGE: 'sneak <direction>' gives player a chance of moving unnoticed. It is used just like the 'go' verb."; 2if (`player:roll_against("stealth") ! ANY => 0' && player.obvious) 3player.obvious = 0; 4fork (3) 5player.obvious = 1; 6endfork 7endif 8this:go(@args);
contents
Referenced by
- #104:who_do_what line 4:
this:contents - #104:who_do_what line 15:
this:contents - #104:queue_attack line 4:
this:contents - #104:queue_attack line 5:
this:contents - #104:look_self line 38:
this:contents - #104:match line 1:
this:contents - #104:light_on line 2:
this:contents - #104:light_on line 3:
this:contents - #104:loot line 8:
this:contents - #104:loot line 22:
this:contents - #118:here_huh line 16:
this:contents - #118:here_huh line 16:
this:contents
Source
1stuff = {}; 2for o in (this.contents) 3stuff = `o.obvious ! E_PROPNF => 1' ? {@stuff, o} | stuff; 4endfor 5return stuff;
loot rob pilfer roll search strip
Referenced by
none
Source
1"USAGE: search [any] => checks for success against 'search' skill."; 2" Found objects having a make_visible() verb should return a 1 when called."; 3if (player.location != this) 4return; 5elseif (this == player.searching) 6return player:tell("You're still searching."); 7endif 8dobj = (!valid(dobj)) ? $match_utils:match(dobjstr, {@this:contents(), @this:obvious_exits()}) | dobj; 9if (dobj == $ambiguous_match) 10return player:tell("Which one?"); 11elseif ($object_utils:has_callable_verb(dobj, verb)) 12dobj:(verb)(@args); 13elseif ((dobjstr && (!valid(dobj))) && this:match_fake(dobjstr)) 14player:tell("You find nothing that a casual glance did not reveal."); 15elseif (verb == "search") 16player.searching = this; 17exits = {}; 18for x in (this.exits) 19exits = x.obvious ? exits | {@exits, x}; 20endfor 21objects = {}; 22objects = $set_utils:union(this:contents(), exits); 23player:tell("You begin searching ", this:title(), "."); 24for object in (objects) 25suspend(7); 26if (player.location != player.searching) 27return player.searching = $nothing; 28endif 29srch = dfnd = 0; 30if (`!object.obvious ! E_PROPNF => 0' || (object in exits)) 31srch = player:roll_against("search"); 32if ($object_utils:has_callable_verb(object, "roll_against")) 33dfnd = object:roll_against("stealth"); 34else 35dfnd = random(2) - 1; 36endif 37endif 38if (srch <= dfnd) 39objects = setremove(objects, object); 40endif 41endfor 42player.searching = $nothing; 43for object in (objects) 44if (`!object.obvious ! E_PROPNF => 0') 45if (`object:make_visible() ! E_VERBNF => 0') 46player:tell("You reveal ", object:title(), "."); 47else 48player:tell("You discover ", object:title(), " (still in hiding)."); 49endif 50elseif (object in exits) 51player:tell("You detect a hidden exit, ", object:title()); 52endif 53endfor 54if (!objects) 55player:tell("You discover nothing new."); 56endif 57else 58player:tell("You want to ", verb, " what?"); 59endif
com*mand per*suade
Referenced by
none
Source
1if ($object_utils:has_callable_verb(dobj, verb)) 2return dobj:(verb)(@args); 3endif 4name = dobjstr; 5argstr = iobjstr; 6who = player.location:match_object(name); 7sayverb = $string_utils:get_say_verb(argstr); 8preppy = $string_utils:get_say_verb_prep(sayverb); 9argstr = $code_utils:argstr(verb, args, argstr); 10metitle = player:titlec(); 11if (!valid(who)) 12whotitle = name; 13wttell = setremove(setremove(player.location.contents, who), player); 14else 15whotitle = who:title(); 16wilf = $lang_utils:in_line_for($lang_utils:speaking(player), who); 17who:Tell(metitle, " ", $gender_utils:get_conj(sayverb, player), preppy, "you, \"", $lang_utils:encrypt(player, who, argstr), "\" ", wilf); 18wttell = setremove(setremove(player.location.contents, who), player); 19endif 20pilf = $lang_utils:in_line_for($lang_utils:speaking(player), player); 21player:tell("You ", $you:verb_sub(sayverb), preppy, whotitle, ", \"", argstr, "\" ", pilf); 22$lang_utils:announce(player, wttell, tostr(metitle, " ", $gender_utils:get_conj(sayverb, player), preppy, whotitle, ", \"%lang_encrypt\""), argstr); 23com = player:roll_against("command"); 24def = `who:roll_against("command") ! ANY => 1'; 25if (com && (!def)) 26blurb = (verb in {"com", "command"}) ? "<<<The command was *very* compelling.>>>" | "<<<The suggestion was *very* persuasive.>>>"; 27elseif (def && (!com)) 28blurb = (verb in {"com", "command"}) ? "<<<The command was not at all compelling.>>>" | "<<<The suggestion was not persuasive.>>>"; 29elseif (com && def) 30blurb = (verb in {"com", "command"}) ? "<<<The command was somewhat compelling.>>>" | "<<<The suggestion was somewhat persuasive.>>>"; 31else 32blurb = (verb in {"com", "command"}) ? "<<<The command was only mildly compelling.>>>" | "<<<The suggestion was mildly persuasive.>>>"; 33endif 34nomatch = `who:tell(blurb) ! ANY => 1'; 35if (nomatch) 36player:tell("<<<Good practice.>>>"); 37else 38player:tell(blurb); 39endif
dig
Referenced by
none
Source
1"Calls 'this:special_dig_verb()' if one exists, or passes to an object's 'dig' verb."; 2if (dobj != this) 3if ($object_utils:has_callable_verb(dobj, verb)) 4return dobj:(verb)(@args); 5endif 6return player:tell("Dig where?"); 7endif 8if (`((this.dig_level - 4) + player.wielded.dig_level) > 0 ! ANY => 0') 9if (this:_hole()) 10return player:tell("There's already a hole here."); 11else 12$you:say_action("%N %<digs> into %l."); 13`this:special_dig_verb() ! E_VERBNF => ""'; 14hole = $object_utils:isa(this, $terrain) ? {player.x_loc, player.y_loc} | {1, 1}; 15this.holes = setadd(this.holes, hole); 16this.fakes = setadd(this.fakes, "hole"); 17$scheduler:schedule(86400 / this.dig_level, this, "fill_hole", {hole}); 18endif 19else 20player:tell("You try to burrow, but can't seem to dig here."); 21endif
who_location_msg
Referenced by
- #15:who_location_msg line 1:
$player_start:who_location_msg
Source
1return (parent(player) in {$rpgamer, `$local.guest ! ANY => $guest'}) ? `this.location:title() ! ANY => pass(@args)' | pass(@args);
fill_hole
Referenced by
none
Source
1if ((!caller_perms().wizard) && (caller_perms() != this.owner)) 2return E_PERM; 3endif 4this.holes = setremove(this.holes, args[1]); 5this.fakes = this.holes ? this.fakes | setremove(this.fakes, "hole");
hit fight punch kick stun disable shoot a*ttack
Referenced by
none
Source
No program (verb defined but unprogrammed).