Treasure Chest Feature Object #6565
Aliases: Treasure Chest Feature Object, treasure chest, chest, FO
6 verbs · 11 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
@short | any none none | rxd | #6565 | 37 |
short_alias | this none this | | #6565 | 16 |
@silver @gold @copper | none none none | rxd | #6565 | 34 |
@mn @magic*numbers | none none none | rxd | #6565 | 35 |
gather_monsters | this none this | | #6565 | 11 |
monster*s @monster*s | any any any | rxd | #6565 | 55 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
exempt | #6565 | rc | — | {#23065, #50841, #12650} |
usage | #6565 | | — | not readable (E_PERM) |
users | #6565 | | — | value (3971 chars){#1370, #1449, #22630, #23279, #23570, #24929, #29209, #31040, #35076, #37636, #41057, #41178, #42871, #43860, #45216, #46102, #30246, #46738, #47241, #49551, #49916, #49943, #50020, #50163, #50173, #50222, #50224, #50231, #50247, #50287, #50413, #50503, #50666, #52451, #53311, #53595, #54879, #54909, #55127, #56054, #56266, #57140, #57421, #57799, #57936, #58091, #58786, #58793, #58806, #59132, #59324, #59447, #59622, #59630, #59667, #60189, #60603, #60826, #61219, #61992, #62646, #62668, #63625, #64729, #66130, #66257, #68077, #69976, #71111, #74428, #78041, #78047, #70967, #50505, #67439, #59560, #67062, #85166, #63546, #81861, #85077, #81934, #85431, #65189, #73451, #64046, #85061, #84984, #86836, #69513, #87929, #88148, #57838, #87750, #88231, #88511, #87361, #50290, #87416, #88296, #78610, #88038, #89123, #53702, #86441, #90685, #90731, #80578, #59436, #91352, #90132, #88346, #87354, #94616, #94456, #80422, #94368, #89337, #58420, #91345, #50636, #92475, #89391, #97851, #96662, #61233, #98048, #98232, #58026, #91798, #96953, #86232, #97792, #98764, #47818, #89480, #99064, #97613, #98263, #99949, #101185, #100289, #86080, #87010, #96925, #101547, #91224, #87516, #94965, #99063, #103703, #89153, #103168, #91177, #63635, #97340, #87188, #82267, #91812, #104467, #103032, #104762, #87196, #98152, #101651, #96788, #101504, #100314, #105788, #106037, #105066, #103966, #106308, #90441, #104202, #104207, #103685, #105290, #35391, #93228, #106541, #103920, #105159, #105770, #71781, #84169, #103390, #93100, #104137, #92973, #103911, #103158, #100806, #90323, #107682, #106260, #100164, #100337, #100521, #103615, #108850, #107629, #103523, #106938, #108108, #109107, #97170, #108431, #102021, #79220, #100936, #109048, #108140, #107509, #109600, #108816, #106488, #109120, #90331, #110199, #108214, #87545, #110660, #106587, #101687, #107730, #97084, #107609, #96899, #106487, #110129, #108294, #85862, #110779, #106115, #111967, #102292, #94951, #112066, #112052, #88076, #91774, #111949, #107413, #110565, #62713, #100674, #112743, #110000, #112673, #112968, #112903, #106854, #112823, #110280, #113081, #100173, #72264, #109030, #49807, #112997, #113549, #101594, #108147, #59254, #105276, #113686, #113862, #87951, #108893, #113391, #113935, #88456, #113937, #110215, #109506, #109226, #113727, #38441, #113967, #106189, #114382, #112369, #102591, #103689, #113310, #110586, #114702, #114732, #99401, #113418, #112478, #113841, #113800, #110805, #105473, #115124, #113235, #106273, #98705, #114874, #91113, #114928, #115397, #112190, #112837, #113956, #113955, #114546, #107610, #115630, #115502, #108590, #64985, #116031, #114859, #107807, #116385, #87593, #116358, #116339, #57658, #107998, #107189, #114652, #116729, #116640, #115595, #116473, #88395, #115937, #116886, #115200, #117004, #105941, #116305, #109546, #112649, #117381, #112886, #117470, #117139, #117649, #116376, #109271, #77500, #2693, #98580, #116883, #96778, #118143, #117486, #114233, #57402, #118459, #118526, #118248, #109395, #118720, #115432, #117766, #94530, #118672, #118864, #118890, #117345, #118740, #117038, #118973, #114413, #119269, #72941, #119177, #86275, #86050, #118018, #119424, #118153, #119429, #119469, #112473, #116082, #110787, #115366, #112971, #118985, #116369, #115390, #107576, #87760, #119257, #111890, #110002, #119701, #119884, #111987, #119940, #107618, #119956, #119492, #118360, #115834, #120144, #119958, #120227, #118730, #118861, #120260, #114206, #118487, #119899, #120420, #119554, #120546, #109288, #105326, #120749, #119906, #114670, #121095, #114174, #121149, #121083, #121241, #121456, #121464, #113754, #120791, #120804, #121358, #121648, #121651, #87625, #121188, #121865, #109911, #121895, #121640, #106468, #121816, #121976, #121965, #121852, #115805, #102427, #121386, #48961, #122104, #122359, #119265, #122354, #122410, #114072, #110582, #122428, #122423, #118977, #42395, #119530, #122453, #122460, #122491, #122601, #122644} |
users_last_updated | #6565 | | — | 770718276 |
help_msg | #6565 | | — | value (663 chars){"@gold @silver @copper", " Returns a list of all RPG monsters that are active and carrying", " gold, silver, or copper.", " ", "@mn @magic*numbers ", " Returns a list on all numbers 4 digits or less that can be", " requested from the Recycling Center (#4455) and the", " Magic Number Repository (#5000), both owned by yduJ.", " ", "@short <name or alias | here or no args | me>", " Returns the shortest names for all objects for the args given.", "", "@monster*s monster*s <all | GM | list of GMs>", " The arg \\\"all\\\" shows all RPG monsters, which is a long list.", " If more than one GM is named, separate them by a space."} |
feature_verbs | #6565 | | — | {} |
guest_ok | #6565 | | — | 1 |
key | #6565 | | — | not readable (E_PERM) |
aliases | #6565 | | — | {"Treasure Chest Feature Object", "treasure chest", "chest", "FO"} |
description | #6565 | | — | "@silver/@gold @magic*numbers/@mn @short" |
object_size | #6565 | | — | {12818, 1141286651} |
Ancestry
Ancestors (nearest first): none
Children: none
Call graph
Source
@short
Referenced by
none
Source
1" syntax: @short <player name or alias>"; 2" @short <me> for all items in player's contents"; 3" @short <here> for all objects in player's location"; 4" @short same as <here>"; 5this:update_usage(verb, player); 6if (((argstr == "") || (argstr == "here")) || (argstr == "me")) 7 if (argstr == "me") 8 where = player.contents; 9 player:tell("List of the shortest names for all objects that you are carrying:"); 10 else 11 where = player.location.contents; 12 player:tell("List of the shortest names for all players and objects in ", player.location.name, ":"); 13 endif 14 namelist = {}; 15 sortlist = {}; 16 for item in (where) 17 namelist = listappend(namelist, (item.name + " ==> ") + #6565:short_alias(item)); 18 endfor 19 if ((where == player.contents) && (namelist == {})) 20 player:tell(""); 21 player:tell($string_utils:space(20) + "You are not carrying anything."); 22 return; 23 endif 24 sortlist = $list_utils:sort(namelist); 25 player:tell_lines($string_utils:columnize(sortlist, 1)); 26 return; 27endif 28target = $string_utils:match_player(dobjstr); 29if ((target == $nothing) || (target == $failed_match)) 30 player:tell(argstr, " has not been identified as a player."); 31 return; 32endif 33if (target == $ambiguous_match) 34 player:tell("There is more than one player with a name closely matching ", argstr, ". Please be more specific."); 35 return; 36endif 37player:tell("The shortest alias of ", target.name, " is ", #6565:short_alias(target), ".");
short_alias
Referenced by
- #6565:@short line 17:
#6565:short_alias - #6565:@short line 37:
#6565:short_alias
Source
1"short_alias(obj) returns the shortest alias of obj <objnum>."; 2"the object's name takes precedence over an equally short alias."; 3if (!valid(target = args[1])) 4 return E_INVARG; 5endif 6retval = target.name; 7if ((typeof(target.aliases) == LIST) && (target.aliases != {})) 8 n = length(retval); 9 for x in (target.aliases) 10 if ((k = length(x)) < n) 11 n = k; 12 retval = x; 13 endif 14 endfor 15endif 16return retval;
@silver @gold @copper
Referenced by
none
Source
1"List of all RPG monsters that are active and carrying gold, silver or copper."; 2this:update_usage(verb, player); 3if (verb == "@gold") 4 coin = #32571; 5 coinstr = "gold"; 6elseif (verb == "@silver") 7 coin = #52944; 8 coinstr = "silver"; 9elseif (verb == "@copper") 10 coin = #42076; 11 coinstr = "copper"; 12endif 13found = 0; 14moneylist = $object_utils:descendants(coin); 15player:tell("List of RPG monsters that are active and carrying ", coinstr, ":"); 16player:tell(""); 17for money in (moneylist) 18 $command_utils:suspend_if_needed(0); 19 if (valid(money.location) && valid(money.location.location)) 20 who = money.location; 21 where = who.location; 22 if (((($object_utils:isa(who, $local.rpg.monster) && who.alive) && valid($local.rpg:get_doll(who))) && (!(who in this.exempt))) && (where != $local.rpg.cemetery)) 23 found = 1; 24 x = (" (" + tostr(who)) + ")"; 25 y = (" (" + tostr(where)) + ")"; 26 player:tell(who.name, x, " at ", where.name, y, " carries ", money.name, "."); 27 endif 28 endif 29endfor 30if (!found) 31 player:tell($string_utils:right("Sorry, none found.", 60)); 32else 33 player:tell($string_utils:space(13, "-")); 34endif
@mn @magic*numbers
Referenced by
none
Source
1"Returns numbers 4 digits or less found in the Recycling Center (#4455)"; 2"and the Magic Number Repository (#5000), both owned by yduJ."; 3alist = mlist = {}; 4su = $string_utils; 5p1 = $recycler.contents; 6p2 = #5000.contents; 7where = {@p1, @p2}; 8for n in (where) 9 if (n < #10000) 10 mlist = {@mlist, n}; 11 endif 12 if ($command_utils:running_out_of_time()) 13 suspend(1); 14 endif 15endfor 16mlist = $list_utils:sort_suspended(1, mlist); 17player:tell(su:space(74, "-")); 18player:tell("Magic Numbers - four digits or less:"); 19player:tell(); 20if (mlist == {}) 21 player:tell("None available yet, sorry."); 22else 23 for m in (mlist) 24 if (m in p2) 25 alist = {@alist, tostr(m, "*")}; 26 else 27 alist = {@alist, tostr(m)}; 28 endif 29 $command_utils:suspend_if_needed(5); 30 endfor 31 player:tell_lines(su:columnize_suspended(1, alist, 5)); 32 player:tell(); 33 player:tell("'request <number> from #4455' (numbers marked with an * are in #5000)"); 34endif 35player:tell(su:space(29, "-"), " finished ", su:space(35, "-"));
gather_monsters
Referenced by
- #6565:monster*s line 8:
this:gather_monsters
Source
1m_list = s_list = {}; 2monsters = $local.rpg.vacuum.monsters; 3for m in (monsters) 4 if ($local.rpg:get_doll(m) != #-1) 5 m_name = tostr(#7123:name_or_alias(m, 16), " (", m, ")"); 6 m_list = {@m_list, {m, m_name}}; 7 endif 8 $command_utils:suspend_if_needed(0); 9endfor 10s_list = $list_utils:sort_alist_suspended(0, m_list, 2); 11return s_list;
monster*s @monster*s
Referenced by
none
Source
1"Syntax: monsters <all | GM | list of GMs>"; 2this:update_usage(verb, player); 3su = $string_utils; 4if (!args) 5 player:tell_lines($code_utils:verb_documentation()); 6 return; 7elseif (argstr == "all") 8 monsters = this:gather_monsters(); 9else 10 gms = listdelete($command_utils:player_match_result($string_utils:match_player(args), args), 1); 11 if (!gms) 12 return; 13 endif 14 m_list = {}; 15 all_monsters = $local.rpg.vacuum.monsters; 16 for m in (all_monsters) 17 if (($local.rpg:get_doll(m) != #-1) && (m.owner in gms)) 18 m_name = tostr(#7123:name_or_alias(m, 16), " (", m, ")"); 19 m_list = {@m_list, {m, m_name}}; 20 endif 21 $command_utils:suspend_if_needed(0); 22 endfor 23 if (!m_list) 24 return player:tell("No RPG monsters found owned by the player(s) named."); 25 endif 26 monsters = $list_utils:sort_alist_suspended(0, m_list, 2); 27endif 28suspend(0); 29player:tell(" Monster's Name", su:space(12), "Owner", su:space(10), "Location", su:space(22), "Entry"); 30player:tell("----------------", su:space(10), "-------", su:space(8), "----------", su:space(21), "-----"); 31for i in [1..length(monsters)] 32 monster = monsters[i][1]; 33 name = monsters[i][2]; 34 owner = #7123:name_or_alias(monster.owner, 12); 35 if (!valid(monster.location)) 36 loc = "** nowhere ** (#-1)"; 37 teleport = "----"; 38 else 39 where = monster.location; 40 if ($object_utils:isa(where, $room)) 41 teleport = where:acceptable(player) ? "open" | "locked"; 42 else 43 teleport = "----"; 44 endif 45 loc = tostr(#7123:name_or_alias(where, 22), " (", where, ")"); 46 endif 47 player:tell(su:left(name, 26), su:left(owner, 14), su:left(loc, 32), teleport); 48 $command_utils:suspend_if_needed(0); 49endfor 50if ((L = length(monsters)) == 1) 51 player:tell(su:space(16, "-")); 52 player:tell(" ", tostr(L), " total"); 53else 54 player:tell(su:space(29, "-"), " ", tostr(L), " monsters total ", su:space(29, "-")); 55endif