Adventurers Database #46
Aliases: Adventurers, Database, rpg
68 verbs · 12 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
approve_att_change | this none this | rx | #46 | 24 |
view_att_log | this none this | | #46 | 5 |
add_doll | this none this | | #46 | 16 |
rm_pc | this none this | | #46 | 18 |
rm_doll | this none this | | #46 | 15 |
reap_protect_pc | this none this | | #46 | 26 |
unreap_protect_pc | this none this | | #46 | 14 |
is_reap_protected | this none this | | #46 | 19 |
cleanse_reap_protected_pcs | this none this | | #46 | 18 |
reap_protected_pcs | this none this | | #46 | 12 |
rpg_announce*_all | this none this | | #46 | 5 |
rpg_announce_all(older) | this none this | | #46 | 4 |
is_rpg_room | this none this | | #46 | 1 |
is_monster | this none this | | #46 | 1 |
rate_skill skill_rate | this none this | | #46 | 19 |
gmlist | this none this | | #46 | 6 |
rpg_lag | this none this | | #46 | 21 |
restore_pc | this none this | | #46 | 49 |
check_notification | this none this | | #46 | 20 |
trusted_verb trusted_property | this none this | rxd | #46 | 27 |
secure | this none this | | #46 | 8 |
secure_stack | this none this | | #46 | 19 |
merge_dolls | this none this | | #46 | 25 |
secure_x | this none this | | #46 | 6 |
sheet_text | this none this | | #46 | 39 |
slip_text | this none this | | #46 | 16 |
get_att | none none none | rxd | #46 | 6 |
sample_lag | this none this | | #46 | 29 |
gm_lag | this none this | | #46 | 1 |
check_doll | this none this | | #46 | 20 |
trusted_efunc | this none this | | #46 | 7 |
initiate_pc | this none this | rxd | #46 | 24 |
trusted_fefunc | this none this | | #46 | 14 |
log_error | this none this | | #46 | 16 |
fixpos | this none this | | #46 | 14 |
clean*_player_prop | this none this | | #46 | 18 |
pronoun_sub | this none this | | #46 | 82 |
say_action | this none this | rx | #46 | 82 |
rate*_weapon | this none this | | #46 | 21 |
compare_opponents | this none this | | #46 | 7 |
rank_pc | this none this | | #46 | 13 |
has_saved_doll | this none this | | #46 | 12 |
tell_damage | this none this | | #46 | 10 |
s_i_n | this none this | rx | #46 | 6 |
doll_exp | this none this | | #46 | 17 |
s_i_f_i_n suspend_in_for_if_needed | this none this | rx | #46 | 5 |
save_doll | this none this | | #46 | 66 |
rpg_announce_all_but | this none this | | #46 | 24 |
new_sheet | this none this | | #46 | 59 |
parents | this none this | | #46 | 7 |
is_fast_room | this none this | | #46 | 1 |
rpg_announce_all_but(old) | this none this | | #46 | 25 |
playertell_lines | this none this | | #46 | 8 |
train(old) | this none this | | #46 | 29 |
fixpos(old) | this none this | | #46 | 20 |
rm_doll(old) | this none this | | #46 | 17 |
do_reset | this none this | | #46 | 27 |
secure(old) | this none this | | #46 | 14 |
is_alive | this none this | rx | #46 | 5 |
say_audio | this none this | rx | #46 | 82 |
playershow | this none this | | #46 | 19 |
playertell | this none this | | #46 | 17 |
rpg_show_all_but | this none this | | #46 | 5 |
rpg_show*_all | this none this | | #46 | 0 |
playerannounce | this none this | | #46 | 19 |
erase_all_saved_dolls_for | this none this | | #46 | 18 |
wizmove | this none this | rxd | #46 | 19 |
respawn_non_pkp_pc | this none this | | #46 | 59 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
recycler | #46 | rc | — | #4489 |
seconds_min | #46 | rc | — | 1 |
ticks_min | #46 | rc | — | 5000 |
exporters | #46 | rc | — | {} |
sheet_level | #46 | rc | — | value (450 chars){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 0, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 0, 1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 2} |
sheet_atts | #46 | rc | — | value (1183 chars){#19148, #19184, #19226, #19230, #19231, #19235, #19243, #19316, #19343, #19804, #107205, #57444, #5781, #75899, #25257, #5784, #9080, #7565, #7144, #7096, #6232, #32762, #6175, #10590, #6178, #6176, #95126, #29862, #75056, #6499, #6451, #6357, #7689, #32774, #32783, #105206, #1587, #40790, #19988, #19989, #83399, #60852, #76229, #7790, #87015, #7607, #32775, #6531, #32761, #32781, #32755, #9064, #9092, #67571, #29441, #18671, #46377, #10887, #7127, #86906, #80069, #41175, #37142, #60016, #53375, #112382, #14725, #104445, #12289, #74835, #65756, #101109, #74932, #87759, #66624, #74393, #9097, #101146, #78716, #89057, #32773, #54026, #79154, #6564, #108033, #98619, #18688, #104447, #59643, #17251, #11401, #68846, #108598, #62036, #6275, #32771, #41289, #70784, #81055, #9903, #10923, #69062, #73102, #117341, #85976, #99395, #102024, #55012, #45809, #20936, #16045, #57478, #75817, #93140, #83431, #34688, #97757, #71258, #8108, #22707, #52130, #56377, #109701, #49020, #110969, #14497, #71490, #24840, #19856, #19835, #32039, #24330, #17076, #4649, #24346, #34155, #81749, #67393, #89199, #24345, #25664, #50023, #66562, #4631, #2763, #4728, #32776, #32779, #32780, #32778} |
gms | #46 | rc | — | value (363 chars){#2693, #34876, #43860, #21077, #19845, #37972, #58456, #49397, #61219, #93228, #47818, #106488, #77500, #105941, #106469, #106487, #104762, #46102, #98232, #82267, #87516, #45216, #49925, #68, #7003, #3118, #540, #14, #89395, #63546, #50222, #31829, #1449, #100806, #108850, #117389, #100337, #116601, #119377, #30788, #106189, #50367, #102427, #112369, #114701} |
costs | #46 | rc | — | {1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 8, 9, 10, 11, 13, 15, 17, 20, 24, 29, 35, 42, 50, 999999} |
dolls | #46 | rc | — | value (4711 chars){#1390, #3734, #3787, #4004, #4052, #4320, #8078, #18659, #23825, #18806, #31931, #41833, #41849, #32854, #28038, #29022, #51009, #26184, #51775, #17620, #16403, #52611, #24130, #51988, #53172, #20523, #26738, #29404, #13502, #31489, #49887, #52310, #54064, #29919, #29454, #24620, #47855, #57735, #41153, #27441, #55068, #37347, #34390, #50892, #56269, #55824, #48060, #21835, #3741, #16735, #31791, #51744, #61229, #35881, #62807, #44094, #67379, #73513, #71231, #73510, #32602, #55763, #3345, #69302, #68814, #4144, #72773, #4515, #72786, #65369, #65060, #84167, #12424, #61774, #13011, #89508, #75264, #88792, #80245, #56639, #90355, #97224, #97238, #97252, #97312, #28961, #97049, #9742, #66136, #58410, #100848, #52999, #51620, #70640, #71119, #91803, #8384, #3259, #33402, #5048, #2058, #71253, #69416, #57870, #8986, #10173, #52437, #8355, #76993, #93782, #87663, #60721, #13007, #60793, #28617, #96270, #11776, #43431, #76087, #97067, #93189, #47568, #101475, #88576, #92765, #82789, #98895, #23270, #49937, #58286, #7384, #79705, #61532, #94754, #67546, #68745, #5830, #62033, #27734, #81317, #48400, #96845, #67302, #55891, #14643, #3018, #56519, #95273, #75107, #84951, #102052, #58764, #77749, #16177, #11573, #70513, #86454, #70577, #71689, #81184, #89210, #70665, #97793, #60332, #103196, #11390, #100994, #64275, #106869, #104279, #54518, #10967, #64372, #7252, #35371, #77636, #90875, #84464, #5285, #46616, #79618, #94369, #7016, #2209, #51123, #92230, #3358, #30279, #100360, #5779, #30459, #107885, #96550, #73705, #48507, #70680, #64213, #111936, #22572, #55147, #5481, #59247, #61608, #57116, #103345, #9667, #13399, #91479, #92788, #17078, #101379, #112995, #96378, #1774, #81683, #90308, #16131, #100567, #21336, #13268, #72274, #102501, #45276, #20943, #55357, #2451, #2968, #75149, #27411, #11013, #100451, #50965, #74106, #113709, #90364, #54015, #87720, #79702, #62888, #94490, #108023, #113734, #109951, #34523, #72092, #111137, #74217, #24275, #90345, #88834, #56196, #79809, #24128, #82014, #69378, #91346, #14632, #74421, #59917, #91199, #105335, #53073, #24997, #49788, #115292, #95432, #28881, #70317, #90064, #45671, #86258, #6081, #59886, #69599, #8133, #94127, #95797, #36083, #87587, #98130, #90278, #67703, #110533, #104471, #111301, #17205, #98551, #103275, #104097, #19373, #108585, #113324, #81738, #14838, #75010, #110106, #38031, #4983, #115206, #96826, #63856, #83645, #91704, #86628, #10665, #49440, #61244, #55074, #53506, #74171, #102229, #4639, #63496, #78129, #90245, #81004, #66939, #50103, #106063, #89890, #89586, #45020, #101620, #108070, #45811, #42571, #112392, #109476, #71435, #75337, #72443, #67261, #114815, #67054, #11881, #81613, #73519, #55237, #107040, #68208, #18661, #98202, #112144, #87184, #69325, #115783, #111669, #99985, #4483, #2196, #82434, #43655, #14872, #10979, #96002, #94749, #89957, #17158, #10575, #102797, #104858, #118737, #23337, #99442, #103917, #22747, #97414, #107893, #106110, #109650, #116641, #66998, #33188, #106922, #53362, #92393, #16934, #94986, #91987, #78355, #55692, #93739, #54636, #72766, #112030, #62438, #54350, #52180, #113398, #44125, #16987, #114998, #116651, #2372, #69105, #84307, #51599, #38771, #44228, #68157, #114841, #106644, #58013, #101796, #100826, #54097, #51681, #33090, #54696, #93524, #118953, #55854, #68010, #58066, #115296, #55743, #88022, #15784, #57440, #52320, #68798, #71789, #17717, #53195, #81299, #55604, #89543, #80521, #118571, #82542, #91963, #9717, #113883, #111442, #59409, #97819, #8316, #94875, #51734, #94539, #4527, #68957, #102921, #115158, #3563, #112537, #14455, #92158, #51008, #94516, #63401, #16854, #86550, #103069, #46615, #9672, #11018, #113478, #56037, #61118, #90708, #95535, #108341, #66475, #12479, #74840, #88091, #59230, #64608, #116141, #50663, #65583, #77575, #121683, #107937, #66179, #96670, #75154, #84499, #3287, #32357, #11576, #83138, #121608, #105308, #15518, #74538, #12683, #40508, #69004, #60716, #57485, #14477, #76745, #59743, #81052, #37054, #51551, #13510, #16030, #114345, #114057, #59143, #58642, #95925, #118662, #64397, #119861, #11627, #60300, #72869, #103087, #113891, #47803, #87403, #114568, #66655, #72891, #117227, #104892, #59405, #31779, #120441, #43634, #72919, #96467, #15459, #109749, #51438, #98444, #16091, #52573, #10683, #108779, #81028, #86117, #65990, #43906, #117434, #113951, #97838, #85215, #70184, #102058, #39780, #14719, #71780, #112148, #56573, #121552, #8138, #105311, #30397, #60227, #76286, #71226, #103636, #4861, #9482, #73621, #54553, #56827, #111764, #54073, #111037, #114949, #117103, #72339, #58323, #26020, #80566, #120726, #91855, #58884, #57419, #95226, #119842, #23545, #65069, #15514, #116092, #110222} |
attdeps | #46 | rc | — | value (1781 chars){{{}, {"ohswd"}}, {{"agl", "agl", "agl", "pcn", "agl"}, {}}, {{"end", "end", "end", "wil", "end"}, {}}, {{}, {"melee"}}, {{"agl", "str", "agl"}, {}}, {{}, {"ohhfw"}}, {{}, {"melee"}}, {{}, {"melee"}}, {{}, {"thhft"}}, {{}, {"ohswd"}}, {{}, {"melee"}}, {{}, {"melee"}}, {{"melee", "agl", "pcn", "str"}, {}}, {{}, {"shield"}}, {{"int", "wil", "int"}, {}}, {{}, {"magic"}}, {{}, {"fire"}}, {{}, {"thhft"}}, {{"agl", "str", "wil", "agl", "str"}, {}}, {{"wil", "wil", "int", "wil", "pcn"}, {}}, {{"str", "agl", "end", "str"}, {}}, {{}, {"thhft"}}, {{}, {}}, {{}, {}}, {{}, {}}, {{}, {}}, {{}, {}}, {{}, {}}, {{}, {}}, {{}, {}}, {{}, {}}, {{}, {"ecto"}}, {{}, {"gadget"}}, {{"dex", "int", "pcn"}, {}}, {{}, {"ecto"}}, {{"agl", "str", "pcn"}, {}}, {{}, {"throw"}}, {{}, {"climb"}}, {{}, {"ohswd"}}, {{}, {"melee"}}, {{}, {"natweap"}}, {{}, {"natweap"}}, {{}, {"natweap"}}, {{"ohswd"}, {"kat"}}, {{"thswd"}, {"kat"}}, {{}, {"climb"}}, {{}, {}}, {{}, {"knives"}}, {{}, {"magic"}}, {{}, {"time"}}, {{}, {"magic"}}, {{}, {"force"}}, {{}, {"melee"}}, {{"ohhfw"}, {"baxe"}}, {{"thhft"}, {"baxe"}}, {{"dex", "pcn", "dex", "int"}, {}}, {{}, {"drive"}}, {{}, {"bike"}}, {{}, {"fire"}}, {{}, {"magic"}}, {{}, {"life"}}, {{}, {"knives", "melee"}}, {{}, {"longarms"}}, {{}, {"missiles"}}, {{"dex", "pcn", "dex"}, {}}, {{}, {"missiles"}}, {{}, {"drawbow"}}, {{}, {}}, {{}, {"spear"}}, {{}, {"javelin", "throw"}}, {{}, {"javelin", "melee"}}, {{}, {"missiles"}}, {{}, {"handguns"}}, {{"pcn", "wil", "pcn"}, {}}, {{}, {"observe"}}, {{}, {"observe"}}, {{}, {"throw"}}, {{"app", "wil", "emp"}, {}}, {{}, {"convince"}}, {{}, {"convince"}}, {{}, {"trick"}}, {{}, {"dagger", "throw"}}, {{}, {"dagger", "melee"}}, {{}, {"ohswd"}}, {{}, {"thhft"}}, {{}, {"fire"}}, {{}, {"gadget"}}, {{"dex", "emp", "wil"}, {}}} |
atts | #46 | rc | — | value (1309 chars){"brswd", "dodge", "shock", "ohswd", "melee", "club", "ohhfw", "thhft", "tclub", "rap", "kat", "thswd", "shield", "kites", "magic", "fire", "firebolt", "staff", "climb", "sanity", "swim", "scyth", "str", "end", "dex", "agl", "int", "emp", "wil", "pcn", "app", "gadget", "throw", "furn", "wclim", "scim", "natweap", "claw", "tenta", "teeth", "kat1", "kat2", "tclimb", "knives", "dagger", "time", "slow", "force", "forcewall", "baxe", "baxe1", "baxe2", "drive", "heat", "life", "heal", "sai", "crossbow", "longarms", "missiles", "drawbow", "longbow", "spear", "javelin", "javelin_throw", "javelin_melee", "handguns", "revolver", "observe", "notice", "search", "star", "convince", "persuade", "trick", "pray", "dagger_throw", "dagger_melee", "machete", "pick", "storm", "lockpick", "spellsing", "thieving", "teleport", "charm", "recall", "pacify", "stamina", "brawl", "moofu", "magic_theory", "creo", "intellego", "muto", "perdo", "rego", "corporem", "ignem", "vim", "animalem", "mentem", "aquam", "herbam", "imagonem", "terram", "depress", "calm_winds", "shatter", "windwall", "stinkcloud", "predict", "whip", "harden", "enchant", "biting_cloud", "barkskin", "hail", "lifelink", "stealskill", "mindprobe", "waterwhip", "iceshell", "dispel", "claim", "auram", "shocking_grasp", "unarmed", "greatsword", "summon"} |
pcs | #46 | rc | — | value (1230 chars){#1381, #3730, #3777, #4002, #4048, #1214, #8077, #17777, #19044, #4418, #13573, #4981, #10249, #16104, #21598, #15458, #7057, #5632, #26608, #35896, #52165, #40259, #2955, #42381, #53178, #53798, #45991, #31020, #45622, #40379, #40890, #51765, #51082, #44015, #55272, #6527, #8953, #50841, #36198, #20474, #48474, #22224, #7686, #39500, #16410, #53941, #53978, #22055, #51809, #57159, #56543, #61004, #9096, #102, #62858, #56299, #33020, #73468, #73054, #71798, #73373, #72883, #32401, #79574, #79214, #4142, #8954, #8952, #85990, #4677, #29929, #4375, #4186, #74798, #77819, #83797, #33931, #1383, #93374, #67730, #7151, #94799, #41501, #26450, #21252, #97587, #95558, #90796, #61620, #63670, #66635, #365, #819, #820, #1453, #2805, #2992, #3048, #3094, #3098, #3764, #3032, #3760, #3956, #4049, #4050, #7965, #10441, #11966, #2230, #15844, #15907, #15908, #15990, #12689, #86696, #103632, #73404, #58625, #87886, #88892, #83242, #8891, #1112, #20800, #1092, #69439, #66341, #104015, #98531, #1285, #1298, #1355, #1338, #1348, #1091, #1011, #76667, #87453, #1798, #1251, #9799, #9365, #7744, #75947, #52869, #4713, #1742, #6113, #5003, #4688, #12763, #1178, #1179, #79322, #1987, #2705, #2605, #41330, #15884, #63530, #52868, #6 |
Ancestry
Ancestors (nearest first): none
Children: none
Call graph
Source
approve_att_change
Referenced by
none
Source
1":log_att_change(player, {doll, attribute, new_value}, callers)"; 2"Return E_PERM if the given attribute change should not be permitted."; 3"(Right now this is used only to log stat changes. Set 'logging_att_changes' to the log length desired.)"; 4if (caller_perms() == this.owner) 5 {who, info, stack} = args; 6 {doll, att, val} = info; 7 if (is_player(char = doll.character) && ((char in this.fishy) || ((abs(val - doll.(att)) > 20) && (att != "inj")))) 8 if ((att in this.no_log_atts) || ((who in this.gms) && (char in this.gms))) 9 "... do nothing ..."; 10 "Since practically every time ya move, .act gets set, let's filter it out."; 11 elseif ((len = this.logging_att_changes) > 1) 12 log = listinsert(this.att_change_log, {time(), who, info, stack ? stack | callers()}, 1); 13 log = log[1..min($, len)]; 14 this.att_change_log = log; 15 endif 16 endif 17 {prog, object} = stack[1][3..4]; 18 if (((prog in this.probation) || (object in this.banned_from_mod)) || (att in this.unsettable_values)) 19 return E_PERM; 20 endif 21 return 1; 22else 23 return E_PERM; 24endif
view_att_log
Referenced by
none
Source
1if (!(caller_perms() in {@this.grand_masters, @this.spies})) 2 return E_PERM; 3else 4 return {this.fishy, this.att_change_log}; 5endif
add_doll
Referenced by
none
Source
1" add_doll(OBJ character, OBJ doll) -> BOOLEAN success may suspend"; 2"Adds doll to this.dolls and character to this.pcs, associated with"; 3"each other. The character may not have another doll already registered."; 4if (!this:trusted(caller_perms())) 5 return E_PERM; 6endif 7character = args[1]; 8doll = args[2]; 9if (((!$object_utils:isa(doll, this.doll)) || (doll.character != character)) || (character in this.pcs)) 10 return E_INVARG; 11endif 12$command_utils:suspend_if_needed(this.gm_lag); 13this.pcs = {@this.pcs, character}; 14this.dolls = {@this.dolls, doll}; 15return 1; 16"June 28, 1995 -- Slither, first version";
rm_pc
Referenced by
none
Source
1" rm_pc(OBJ pc) => OBJ doll may suspend"; 2"Removes the (pc/doll) pair from this.pcs/this.dolls lists. Returns"; 3"the removed doll."; 4if ((caller == this) || this:trusted(caller_perms())) 5 this:s_i_n(); 6 pos = args[1] in this.pcs; 7 if (pos) 8 dolls = this.dolls; 9 this.pcs = listdelete(this.pcs, pos); 10 this.dolls = listdelete(dolls, pos); 11 return dolls[pos]; 12 else 13 return E_INVARG; 14 endif 15else 16 return E_PERM; 17endif 18"June 28, 1995 -- Slither, first version";
rm_doll
Referenced by
none
Source
1" rm_doll(OBJ doll) => OBJ pc may suspend"; 2"Removes the (pc/doll) pair from this.pcs/this.dolls lists. Returns"; 3"the removed RPG character."; 4{doll} = args; 5this:secure(); 6this:s_i_n(); 7pos = doll in this.dolls; 8if (!pos) 9 return $object_utils:isa(doll, this.doll) ? 1 | E_INVARG; 10endif 11pcs = this.pcs; 12this.dolls = listdelete(this.dolls, pos); 13this.pcs = listdelete(pcs, pos); 14return pcs[pos]; 15"June 28, 1995 -- Slither, first version";
reap_protect_pc
Referenced by
none
Source
1" :reap_protect_pc(OBJ pc, NUM time, OBJ gm, STR comment) => BOOL changed"; 2"Keeps the player `pc' from having their doll reaped until after `time'."; 3"`gm' should be the gm to contact about this, and `comment' allows one"; 4"to explain any unusual circumstances. If the player is already protected,"; 5"then this call will replace the previous data."; 6if (!this:trusted(caller_perms())) 7 return E_PERM; 8endif 9pc = args[1]; 10time = args[2]; 11if (((length(args) != 4) || (!is_player(pc))) || (time < time())) 12 return E_INVARG; 13endif 14olddata = this.reap_protected_pcs; 15pos = pc in olddata[1]; 16if (pos) 17 newpcs = olddata[1]; 18 newpcdata = olddata[2]; 19 newpcdata[pos] = listdelete(args, 1); 20else 21 newpcs = {@olddata[1], pc}; 22 newpcdata = {@olddata[2], listdelete(args, 1)}; 23endif 24this.reap_protected_pcs = {newpcs, newpcdata}; 25return 1; 26"July 31/95 Slither -- first version";
unreap_protect_pc
Referenced by
- #46:is_reap_protected line 11:
this:unreap_protect_pc - #46:cleanse_reap_protected_pcs line 7:
this:unreap_protect_pc - #46:cleanse_reap_protected_pcs line 13:
this:unreap_protect_pc
Source
1" :unreap_protect_pc(OBJ pc)"; 2"Removes any RPG reap protection for pc"; 3if (!this:trusted(caller_perms())) 4 return E_PERM; 5endif 6pc = args[1]; 7data = this.reap_protected_pcs; 8pos = pc in data[1]; 9if (pos) 10 newpcs = listdelete(data[1], pos); 11 newpcdata = listdelete(data[2], pos); 12 this.reap_protected_pcs = {newpcs, newpcdata}; 13endif 14"July 31/95 Slither -- first version";
is_reap_protected
Referenced by
none
Source
1" :is_reap_protected(OBJ pc) => LIST data "; 2"If pc is protected from the RPG reap, returns {time, gm, comment},"; 3"otherwise returns {}. 'time' is the time the pc is protected until,"; 4"and 'gm' is the gm to talk to about this, and 'comment' is any"; 5"comment that was provided about protecting this player."; 6pc = args[1]; 7pos = pc in this.reap_protected_pcs[1]; 8if (pos) 9 data = this.reap_protected_pcs[2][pos]; 10 if (data[1] < time()) 11 this:unreap_protect_pc(pc); 12 return {}; 13 else 14 return data; 15 endif 16else 17 return {}; 18endif 19"July 31/95 Slither -- first version";
cleanse_reap_protected_pcs
Referenced by
- #46:reap_protected_pcs line 10:
this:cleanse_reap_protected_pcs
Source
1" :cleanse_reap_protected_pcs() may suspend"; 2"removes any invalid or useless entries from this.reap_protected_pcs"; 3for pc in (this.reap_protected_pcs[1]) 4 $command_utils:suspend_if_needed(10); 5 if (!is_player(pc)) 6 "pc isn't a player anymore!"; 7 this:unreap_protect_pc(pc); 8 else 9 rpp = this.reap_protected_pcs; 10 pos = pc in rpp[1]; 11 if (pos && (rpp[2][pos][1] < time())) 12 "protection expired"; 13 this:unreap_protect_pc(pc); 14 endif 15 endif 16endfor 17return 1; 18"July 31/95 Slither -- first version";
reap_protected_pcs
Referenced by
none
Source
1" :reap_protected_pcs() => {LIST pcs, LIST pcdata} may suspend"; 2"returns data on all the pcs that are protected from the RPG reap."; 3"The data is in the following format:"; 4" pcs is a list of all the protected pcs"; 5" pcdata is a list such that pcdata[i] is the data about pcs[i],"; 6" and pcdata[i] is in the format {time, gm, comment}, where"; 7" time is the time the protection expires"; 8" gm is the gm who is listed as being the person to ask about this,"; 9" comment is any comment they made about this protection"; 10this:cleanse_reap_protected_pcs(); 11return this.reap_protected_pcs; 12"July 31/95 Slither -- first version";
rpg_announce*_all
Referenced by
none
Source
1":rpg_announce(<OBJ location>, <LIST/STR args to pass to tell>) -> As a regular room:announce for location, but only spews to non-sleeping players."; 2{where, @string} = args; 3this:secure(); 4this:rpg_announce_all_but(where, (verb == "rpg_announce") ? {player} | {}, @string); 5"THX1138 (#105941) - Sun Apr 19, 1998 - Changed code to send to this:rpg_announce_all_but() to save on maintaining identical code.";
rpg_announce_all(older)
Referenced by
none
Source
1":rpg_announce_all(<OBJ location>, <LIST/STR args to pass to tell>) -> As a regular room:announce for location, but only spews to non-sleeping players."; 2{where, @string} = args; 3this:rpg_announce_all_but(where, {}, @string); 4"THX1138 (#105941) - Sun Apr 19, 1998 - Changed code to send to this:rpg_announce_all_but() to save on maintaining identical code.";
is_rpg_room
Referenced by
- #12631:_who's_gaming line 15:
#46:is_rpg_room
Source
1return this.object_db:(verb)(@args);
is_monster
Referenced by
- #46:check_notification line 14:
this:is_monster - #54585:waif line 20:
#46:is_monster
Source
1return this.object_db:(verb)(@args);
rate_skill skill_rate
Referenced by
- #46:sheet_text line 29:
this:rate_skill - #46:sheet_text line 30:
this:rate_skill
Source
1":rate_skill(NUM score, NUM max possible score) => STR word rating of score compared with max"; 2{score, max} = args; 3if ((score < 0) || (max < 1)) 4 return "subhuman"; 5else 6 names = this.rate_words; 7 point_spread = max / (length(names) - 3); 8 if (point_spread) 9 score = score / point_spread; 10 score = score ? score | 1; 11 else 12 excess = (length(names) - max) - 3; 13 names = names[1..($ - 3) - (excess - (excess / 2))]; 14 names = names[(excess / 2) || 1..$]; 15 endif 16 score = (score > length(names)) ? length(names) | score; 17 score = score ? score | 1; 18 return names[score]; 19endif
gmlist
Referenced by
none
Source
1rpg_helpers = #58390:group_members(); 2help_names = {}; 3for who in (rpg_helpers) 4 help_names = (valid(who) && is_player(who)) ? {@help_names, $string_utils:nn(who)} | help_names; 5endfor 6return $string_utils:columnize(help_names, 3);
rpg_lag
Referenced by
none
Source
1":rpg_lag() => How much are we delaying RPG actions to control lag?"; 2return this.gm_lag; 3"THX July 23, 1998 - Bypass this dog's breakfast of Irin's code that uses scads of ticks."; 4try 5 if (q = queued_tasks()) 6 n = 1; 7 while ((n <= length(q)) && (q[n][2] <= (time() - 1000000))) 8 n = n + 1; 9 endwhile 10 a = q[n][2]; 11 if (a == 0) 12 return this.min_command_interval; 13 endif 14 lag = min(time() - a, 3600); 15 return max(this.min_command_interval, (10 * lag) / this.lag_standard); 16 else 17 return this.min_command_interval; 18 endif 19except x (ANY) 20 return this.min_command_interval; 21endtry
restore_pc
Referenced by
none
Source
1":restore_pc(who, doll) => restores doll to who, saving their other doll."; 2{who, newdoll} = args; 3this:secure(); 4{rpg_doll, player_start, death_db} = {this.doll, this.player_start, this.death_db}; 5if ((!is_player(who)) || (!$object_utils:isa(newdoll, rpg_doll))) 6 return E_NACC; 7endif 8if (newdoll.character != who) 9 return E_INVARG; 10endif 11if (n = newdoll in this.dolls) 12 return E_NONE; 13endif 14if (n = who in this.pcs) 15 this:save_doll(this.dolls[n]); 16elseif ((!(caller in {this.magic_db, this.object_db.hack_db})) && player_start:is_banned(who)) 17 player:tell("Have the player to be restored go the the Initiation Chamber first."); 18 return E_INVIND; 19endif 20if ((who in this.macro_users) && (caller_perms() != this.owner)) 21 return player:tell("Only Grand_Master can restore an indicted macro user."); 22endif 23banned = player_start.banned_for_life; 24for t in (this.saved_dolls) 25 if ((parent(t) != rpg_doll) || (t.character in banned)) 26 this.saved_dolls = setremove(this.saved_dolls, t); 27 endif 28endfor 29this.pcs = {@this.pcs, who}; 30this.dolls = {@this.dolls, newdoll}; 31this.saved_dolls = setremove(this.saved_dolls, newdoll); 32this.object_db.CAP_corrector:correct_doll(newdoll); 33death_db.corpse_dolls = setremove(death_db.corpse_dolls, newdoll); 34this.guild_db:restore_guilds(newdoll); 35this.puzzle_log:restore_puzzles(newdoll); 36for x in (newdoll.natural_weapons) 37 this.object_db.natweap_db:remove_natweap(newdoll, x); 38endfor 39newdoll.resurrected = time(); 40return newdoll; 41"THX 27-Mar-1997 -- Added splurge to remove newdoll from this.saved_dolls ... to save time for manually restoring PCs when searching through the list."; 42"Profane 8-APR-97 1618PST -- return newdoll"; 43"Mooshie (#106469) - Tue Jan 13, 1998 - guild DB and puzzle log hook."; 44"THX (#105941) - Mon Jan 26, 1998 - Added a blurb to clean out this.saved_dolls which needs to be done only occasionally."; 45"THX (#105941) - Wed Feb 18, 1998 - Added a requirement that the player to be restored must already have a voodoo doll. This will prevent banned players from using registered seconds."; 46"THX (#105941) - Mon Nov 1, 1999 - Added a call to the CAP_corrector upon rebirth."; 47"THX (#105941) - Fri Jun 1, 2001 - Allow hack_db to resurrect as well as magic_db."; 48"Hannibal (#104762) - Wed July 25, 2001 - Set newdoll.resurrected to time()."; 49"Hydros (#106189) - Tue Mar 15, 2005 - Removed all natural weapons that might be lingering on the doll--because mailed fists were sticking around.";
check_notification
Referenced by
none
Source
1this:secure(); 2return this.notifier:check_notification(@args); 3"Route to RPG notifier."; 4":check_notification(OBJ|LIST to_be_notified, STR notify_verb, LIST args)"; 5"The verb now accepts a list as an arg, no longer checks :get_doll, and justspews the data, ignoring whether its a valid doll OR object."; 6if (!this:trusted(caller_perms())) 7 return E_PERM; 8endif 9{x, verbname, argslist} = args; 10if (verbname[1..7] != "notify_") 11 return E_PERM; 12endif 13for object in ((typeof(x) == LIST) ? x | {x}) 14 if (this:is_monster(object)) 15 value = `object:(verbname)(@argslist) ! ANY'; 16 endif 17endfor 18"New check_notification hacked by Quinn 03-JAN-93."; 19"Profane 13-APR-95 14:20EST - Added :trusted_verb check, thus adding 46 ticks per notify call.."; 20"THX 13-FEB-97: Version 1.8.0 update, de-ticked and removed Profane's grudging :trusted_verb check in favour of an is_monster check.";
trusted_verb trusted_property
Referenced by
none
Source
1":trusted_verb/property(OBJ object, STR verbname | STR propname)"; 2"Return true if the indicated verb/property is owned by a player in $local.rpg.gms. Return 0 if it is not, or an error if the arguments are invalid."; 3"--WIZARDLY--"; 4{object, name} = args; 5if (verb == "trusted_property") 6 if ($object_utils:has_property(object, name)) 7 where = object; 8 else 9 return E_PROPNF; 10 endif 11else 12 if (`{where} = $object_utils:has_callable_verb(object, name) ! ANY => 0') 13 "... do nothing ... "; 14 else 15 return E_VERBNF; 16 endif 17endif 18try 19 {info, @extra} = (verb == "trusted_verb") ? verb_info(where, name) | property_info(where, name); 20 return info in this.gms; 21except error (ANY) 22 return error[1]; 23endtry 24"Copied from Grand_Master (#2693):trusted_verb Sun Oct 9 10:00:39 1994 PDT"; 25"Copied from Quinn (#19845):trusted_verb Sun Feb 6 16:02:53 1994 PST"; 26"Isagi 100894 11:00P Fixed feature that caused E_VERBNF to be returned if there was no verb, but there was a property."; 27"THX1138 02-16-97 10:00EST - Got rid of needless assignments and handled everything with scatter assignments to improve readability and to reduce _indexing_ into lists that were _created_ a few lines previously.";
secure
Referenced by
- #46:rm_doll line 5:
this:secure - #46:rpg_announce*_all line 3:
this:secure - #46:restore_pc line 3:
this:secure - #46:check_notification line 1:
this:secure - #46:merge_dolls line 2:
this:secure - #46:sheet_text line 3:
this:secure - #46:log_error line 3:
this:secure - #46:pronoun_sub line 15:
this:secure - #46:say_action line 15:
this:secure - #46:rate*_weapon line 4:
this:secure - #46:compare_opponents line 1:
this:secure - #46:tell_damage line 5:
this:secure - #46:doll_exp line 2:
this:secure - #46:save_doll line 1:
this:secure - #46:rpg_announce_all_but line 6:
this:secure - #46:playertell_lines line 3:
this:secure - #46:train(old) line 6:
this:secure - #46:say_audio line 15:
this:secure - #46:playershow line 2:
this:secure - #46:playertell line 2:
this:secure - #46:rpg_show_all_but line 3:
this:secure - #46:playerannounce line 2:
this:secure - #46:respawn_non_pkp_pc line 2:
this:secure
Source
1":secure() => raise E_PERM if we don't like the look of whoever called your verb (i.e., a builtin, or non-GM permed verb called you.)"; 2if (callers()[2][3] in this.gms) 3 return; 4endif 5(caller_perms() in this.ex_gms) ? kill_task(task_id()) | raise(E_PERM, "RPG Security Violation!"); 6"Profane 1-APR-97 1708PST -- added bit for command-line verbs"; 7"Irin Thu Apr 3 12:33:06 1997 PST -- Unceremoniously sent the code for command-line verbs to #46:secure_x(). Thus saving 1 tick."; 8"THX (#105941) - Fri Mar 23, 2001 - Added ex_gm check IFF the verb's about to raise an error.";
secure_stack
Referenced by
none
Source
1":secure_stack([trust builtin at end]) => Check if all calling verbs up to and incuding the first verb not of the same name and location are GM permed. the optional argument, if true, means that we would trust a builtin to be the first caller in this."; 2"The idea with this verb is to make just one security check for a whole bunch of callers. Put the security check on the root verb (example, #258:enterfunc). Then, all the other enterfuncs which call #258:enterfunc (example: #9505:enterfunc) can just 'pass(@args)' first. We reach the root of the secure stack, make the security check, raise an error if it failed, otherwise all the code in the stack is secure. Cool, huh?"; 3{?trust_builtin = 0} = args; 4gms = this.gms; 5callers = callers(); 6calling_object = callers[1][1]; 7calling_verb = callers[1][2]; 8for caller in (callers[2..$]) 9 if ((caller[1] == calling_object) && (caller[2] == calling_verb)) 10 if (caller[3] in gms) 11 else 12 raise(E_PERM, "RPG Security Violation. Insecure stack verb."); 13 endif 14 elseif ((caller[3] in gms) || (((trust_builtin && caller[2]) && (caller[3] == #-1)) && (caller[4] == #-1))) 15 return; 16 else 17 raise(E_PERM, "RPG Security Violation. Insecure stack caller."); 18 endif 19endfor
merge_dolls
Referenced by
none
Source
1":merge_dolls(new, old) => Merge stats on 'old' with 'new'. Recycle 'old'."; 2this:secure(); 3{new, old, ?numer = 2} = args; 4doll = this.doll; 5if ((((((parent(new) != doll) || (parent(old) != doll)) || (new.character != old.character)) || (!(old in this.saved_dolls))) || (!(new in this.dolls))) || (numer < 1)) 6 "Checking that all dolls and doll.characters are properly aligned, and that the mixing ratio is at least 1:1."; 7 return E_INVARG; 8endif 9denom = numer + 1; 10for skill in ($object_utils:descendants_suspended(this.skill_object)) 11 sk = skill.aliases[1]; 12 try 13 hi = max(old.(sk), new.(sk)); 14 lo = min(old.(sk), new.(sk)); 15 new.(sk) = ((numer * hi) + lo) / denom; 16 except (ANY) 17 "darn. Somebody made a skillobject without a prop on the doll. Owell."; 18 endtry 19 $command_utils:suspend_if_needed(this.gm_lag); 20endfor 21this.guild_db:restore_guilds(old); 22this.puzzle_log:restore_puzzles(old); 23this.saved_dolls = setremove(this.saved_dolls, old); 24return 1; 25"Mooshie (#106469) - Tue Jan 13, 1998 - Restore old guild/puzzle info.";
secure_x
Referenced by
none
Source
1":secure() => raise E_PERM if we don't like the look of whoever caller your verb (i.e., a builtin, or non-GM permed verb called you."; 2if (`callers()[2][3] ! E_RANGE => player' in this.gms) 3 return; 4endif 5raise(E_PERM, "RPG Security Violation!"); 6"Profane 1-APR-97 1708PST -- added bit for command-line verbs";
sheet_text
Referenced by
- #46:slip_text line 12:
this:sheet_text
Source
1":sheet_text(OBJ doll, [NUM type of sheet]) -> LIST text containing info on who's skills and whatnot."; 2"Types: 1 = Basic (words, left column only); 2 = Intermediate (words, no zeros), 3 = Advanced (words, all), 4 = Arcane (numbers, all)"; 3this:secure(); 4{doll, ?type = 1} = args; 5if (parent(doll) != this.doll) 6 raise(E_INVARG, "Error: Non-doll passed to :sheet_text"); 7endif 8who = doll.character; 9{su, cu} = {$string_utils, $command_utils}; 10atts = this.sheet_atts; 11lev = this.sheet_level; 12text = {}; 13len = length(atts); 14sec = su:space((type < 4) ? 12 | 25); 15loc = 0; 16q = 1; 17fit = (type < 4) ? 12 | 3; 18while (q <= len) 19 cu:suspend_if_needed(lag = this.gm_lag, "Suspending the generation of ", who.name, "'s statistics. Will resume shortly. [approx. ", lag, " seconds]"); 20 line = ""; 21 att = atts[q]; 22 val = doll.(att.aliases[1]); 23 i = lev[q]; 24 if (((i == 0) || (type > 2)) || (val && (type > 1))) 25 for x in [1..i] 26 line = line + sec; 27 endfor 28 sum = doll:total(att); 29 valword = (type < 4) ? this:rate_skill(val, 25) | tostr(val); 30 sumword = (type < 4) ? this:rate_skill(sum, doll:potential_total(att)) | tostr(sum); 31 line = ((((line + su:left((length(att.name) < 15) ? att.name | att.name[1..14], 15)) + (val ? su:right(valword, fit) | su:space(fit))) + " (") + su:right(sumword, fit)) + ") "; 32 endif 33 q = q + 1; 34 if (line) 35 text = {@text, line}; 36 endif 37endwhile 38return text; 39"Profane 15-APR-97 1112PST -- hacked up old verb to create different versions.";
slip_text
Referenced by
none
Source
1":slip_text(OBJ chracter) -> return list of text for a slip of parchment"; 2{who, ?type = 1} = args; 3if (!this:trusted(caller_perms())) 4 return E_PERM; 5elseif (!this:trusted(caller.owner)) 6 caller.owner:tell("You may as well recycle ", $string_utils:nn(caller), ". You ain't gonna get anything out of it."); 7 return E_PERM; 8elseif (!valid(doll = this:get_doll(who))) 9 return {"NO INFORMATION FOUND ON SUBJECT"}; 10elseif ((player in this.gms) || (this.gm_lag < this.idle_threshold)) 11 text = {tostr("Agent : ", crypt(caller.name), "--", caller), tostr("Date : ", who:ctime() || ctime()), tostr("Player: ", who.name, " (", who, ") Doll: ", doll, (who in this.gms) ? " *** GameMaster ***" | ""), ""}; 12 text = {@text, @this:sheet_text(doll, type)}; 13 return text; 14else 15 return player:tell("The MOO is too busy to generate sheet stats at the moment. Try when LambdaMOO is less lagged."); 16endif
get_att
Referenced by
none
Source
1{att} = args; 2if (caller_perms() in this.gms) 3 return (att in this.no_view) ? (caller_perms() in this.grand_masters) ? this.(att) | {} | `this.(att) ! ANY => {}'; 4else 5 return E_PERM; 6endif
sample_lag
Referenced by
- #46:sample_lag line 22:
this:sample_lag
Source
1if (!(caller_perms() in this.grand_masters)) 2 return E_PERM; 3endif 4lag = (time() - this.last_lag_sample) - 15; 5this.lag_samples = {lag, @this.lag_samples[1..3]}; 6"Now compute the current lag and store it in a property, instead of computing it in :current_lag, which is called a hundred times a second."; 7thislag = max(0, (time() - this.last_lag_sample) - this.lag_sample_interval); 8if (thislag > 3600) 9 "more than an hour, probably the lag sampler stopped"; 10 this.current_lag = 0; 11else 12 samples = this.lag_samples; 13 sum = 0; 14 cnt = 0; 15 for x in (listdelete(samples, 1)) 16 sum = sum + x; 17 cnt = cnt + 1; 18 endfor 19 this.current_lag = max(thislag, samples[1], samples[2], sum / cnt); 20endif 21fork (15) 22 this:sample_lag(); 23endfork 24this.last_lag_sample = time(); 25lag_samples = setremove(this.lag_samples, max(@this.lag_samples)); 26this.gm_lag = $login.checkpoint_in_progress + (min(240, max(@lag_samples, $login.current_lag / 2) / 4) * this.object_db.lag_beast.alive); 27"THX 17-Jun-1997 -- Ripped this code offa $login and reconfigured for G_M's usage."; 28"THX (#105941) - Tue Nov 17, 1998 - Added a line to truncate the largest of G_M's lag samples ... let's try to ignore transient spikes. Also truncate the lag at 240 seconds which is backing off enough for bloody well anyone."; 29"THX (#105941) - Wed Dec 20, 2000 - Added $login.checkpoint_in_progress straight in ... so His Eminence will back off an additional second during checkpoint.";
gm_lag
Referenced by
none
Source
1return this.gm_lag;
check_doll
Referenced by
none
Source
1"Usage: check_doll(OBJ doll [, INT hands needed [, boolean sleeping ok? [, boolean resting ok? [, STR sleep msg [, STR rest msg [, STR not-enough hands msg ]]]]])"; 2{doll, ?hands = 0, ?sleeping = 0, ?resting = 0, ?sleep_msg = "You dream of doing great things.", ?rest_msg = "You should probably get off your can before trying that.", ?hand_msg = "You seem to have run out of hands necessary for that."} = args; 3who = doll.character; 4if (sleeping) 5 if (resting) 6 if (doll:long_enough()) 7 if (msg = doll.paralyzed) 8 who:tell((typeof(msg) == STR) ? msg | "You're paralyzed. Knock it off."); 9 elseif (is_player(who) && (`idle_seconds(who) ! ANY => 301' > 300)) 10 who:tell("Try doing that when you're actually at the keyboard, eh?"); 11 endif 12 else 13 who:tell("It will take at least ", tostr((doll.last_attack - time()) + rpg:rpg_lag()), " seconds to recover."); 14 endif 15 elseif (`who.location:resting() ! E_VERBNF => 0') 16 who:tell(rest_msg); 17 endif 18elseif (`who.location:sleeping() ! E_VERBNF => 0') 19 who:tell(sleep_msg); 20endif
trusted_efunc
Referenced by
none
Source
1"Usage: trusted_efunc()"; 2"Called from an :exitfunc or :enterfunc to make sure that it's either a) being called legitimately from something moving in or out of the room, or b) being called by GM perms."; 3if (length(calls = callers()) > 1) 4 {it, name, prog, @rest} = calls[2]; 5 return ((it == caller) || (prog in this.gms)) || ((!valid(it)) && (name in {"move", "recycle"})); 6endif 7return 0;
initiate_pc
Referenced by
none
Source
1"Check the bloodline of the player. If E is ok, call this:def_pc()."; 2if (caller == (start = #88)) 3 {pc} = args; 4 if ((pc in connected_players()) && (pc.location == start)) 5 banned = {@start.banned_for_life, @$list_utils:slice(start.banned, 1)}; 6 cr = $local.second_char_registry; 7 all_chars = cr:is_shared_char(pc) ? cr:shared_owners(pc) | cr:all_chars(pc); 8 for t in (all_chars) 9 if (t in banned) 10 if (pos = pc in this.pcs) 11 this.pcs = listdelete(this.pcs, pos); 12 this.dolls = listdelete(this.dolls, pos); 13 endif 14 return; 15 endif 16 endfor 17 (pc in this.pcs) || this:def_pc(pc); 18 endif 19else 20 return E_PERM; 21endif 22"Wizard permissions required."; 23"THX1138 (#105941) - Mon Jan 26, 1998 - Added this code to prevent secondary characters of LRPG-banned characters from getting new dolls."; 24"THX1138 (#105941) - Thu May 21, 1998 - subst /this.player_start/#88/ to prevent any chance of hacking the caller here.";
trusted_fefunc
Referenced by
none
Source
1"Usage: trusted_fefunc()"; 2"Stands for trusted fertile efunc. Does the same thing as #332:secure_efunc, but is for use when called by a fertile room parent. It needs to check for :enterfunc/:exitfunc verbs defined on children, which adds ticks."; 3if ((len = length(calls = callers())) > 2) 4 original = callers[1][1]; 5 for call in (calls) 6 {it, name, prog, @rest} = call; 7 if ((prog in gms) || ((!valid(it)) && (name in {"move", "recycle"}))) 8 return 1; 9 elseif (it != original) 10 return 0; 11 endif 12 endfor 13endif 14return 0;
log_error
Referenced by
none
Source
1"Snagged from Irin (#106049):log_error Wed Mar 11 21:22:49 1998 PST"; 2"RPG:log_error(STR/LIST error) => Report some sort of funky error to appropriate parties."; 3this:secure(); 4{error} = args; 5error = (typeof(error) == LIST) ? error | {error}; 6error = {ctime(), $string_utils:nn(caller), $string_utils:nn(caller_perms()), @error}; 7this.errors = listappend(this.errors, error); 8return; 9if (length(this.errors) > 10) 10 msg = {}; 11 for n in (this.errors) 12 msg = {@msg, @n, ""}; 13 endfor 14 $mail_agent:send_message(this, this.owner, "Some errors.", msg); 15 this.errors = {}; 16endif
fixpos
Referenced by
- #46:say_action line 32:
this:fixpos - #46:say_action line 61:
this:fixpos - #46:say_action line 74:
this:fixpos - #46:say_audio line 32:
this:fixpos - #46:say_audio line 62:
this:fixpos - #46:say_audio line 78:
this:fixpos
Source
1"$local.rpg version of ... $you:fixpos(string, pronoun)"; 2"This is horribly dwimmy. E.g. %x's gets turned into your, %X's gets turned into Your, and %X'S gets turned into YOUR. --Nosredna"; 3{string, pronoun} = args; 4if (!index(string, "'s")) 5 return string; 6endif 7{prefix, letter} = {pronoun[1..$ - 1], pronoun[$]}; 8{lowercase, uppercase} = {"abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"}; 9upper = prefix + uppercase[index(lowercase, letter)]; 10allupper = upper + "'S"; 11upper = upper + "'s"; 12lower = (prefix + lowercase[index(lowercase, letter)]) + "'s"; 13return strsub(strsub(strsub(string, lower, "your", 1), upper, "Your", 1), allupper, "YOUR", 1); 14"THX (#105941) - Thu Oct 12, 2000 - Copied this from Brack's (#90845) version of $you.";
clean*_player_prop
Referenced by
none
Source
1"Copied from THX_utils (#99799):clean by THX1138 (#105941) Wed May 20 11:17:02 1998 PDT"; 2"Verb cleans out props containing lists of players. Doll-less and invalid objects are removed."; 3"To get this to work for you, you need to copy this verb to your utilities."; 4{object, property} = args; 5if ((caller_perms() != (owner = this.owner)) || (property in {"dolls", "pcs"})) 6 return E_PERM; 7 "... special check to protect this.dolls and this.pcs from accidents ..."; 8endif 9current = object.(property); 10newlist = {}; 11for t in (current) 12 if (valid(this:get_doll(t))) 13 newlist = setadd(newlist, t); 14 else 15 owner:tell($string_utils:nn(t), " has no doll."); 16 endif 17endfor 18object.(property) = newlist;
pronoun_sub
Referenced by
- #46:say_action line 32:
this:pronoun_sub - #46:say_action line 44:
this:pronoun_sub - #46:say_action line 48:
this:pronoun_sub - #46:say_action line 61:
this:pronoun_sub - #46:say_action line 74:
this:pronoun_sub - #46:say_audio line 32:
this:pronoun_sub - #46:say_audio line 43:
this:pronoun_sub - #46:say_audio line 47:
this:pronoun_sub - #46:say_audio line 62:
this:pronoun_sub - #46:say_audio line 78:
this:pronoun_sub
Source
1"Pronoun (and other things) substitution. See 'help pronouns' for details."; 2"syntax: $string_utils:pronoun_sub(text[,who[,thing[,location[,dobj[,iobj]]]]])"; 3"%s,%o,%p,%q,%r => <who>'s pronouns. <who> defaults to player."; 4"%n,%d,%i,%t,%l,%% => <who>, dobj, iobj, <thing>, location and %"; 5"<thing> defaults to caller; <location> defaults to who.location"; 6"%S,%O,%P,%Q,%R, %N,%D,%I,%T,%L have corresponding capitalized substitutions."; 7" %[#n], %[#d], ... => <who>, dobj, etc.'s object number"; 8"%(foo) => <who>.foo and %(Foo) => <who>.foo capitalized. %[dfoo] => dobj.foo, etc.."; 9"%<foo> -> whatever <who> does when normal people foo. This is determined by calling :verb_sub() on the <who>."; 10"%<d:foo> -> whatever <dobj> does when normal people foo."; 11{string, ?who = player, ?thing = caller, ?where = $nothing, ?dobject = dobj, ?iobject = iobj} = args; 12"if (caller != this)"; 13" return E_PERM;"; 14"endif"; 15this:secure(); 16where = valid(where) ? where | (valid(who) ? who.location | where); 17"set_task_perms($no_one);"; 18if (typeof(string) == LIST) 19 plines = {}; 20 for line in (string) 21 plines = {@plines, this:(verb)(line, who, thing, where)}; 22 endfor 23 return plines; 24endif 25old = tostr(string); 26new = ""; 27objspec = "nditl"; 28objects = {who, dobject, iobject, thing, where}; 29prnspec = "sopqrSOPQR"; 30prprops = {"ps", "po", "pp", "pq", "pr", "Ps", "Po", "Pp", "Pq", "Pr"}; 31oldlen = length(old); 32while ((prcnt = index(old, "%")) && (prcnt < oldlen)) 33 s = old[k = prcnt + 1]; 34 if ((s == "<") && (gt = index(old[k + 2..$], ">"))) 35 "handling %<verb> "; 36 gt = (gt + k) + 1; 37 vb = old[k + 1..gt - 1]; 38 vbs = who; 39 if ((length(vb) > 2) && (vb[2] == ":")) 40 " %<d:verb>"; 41 vbs = objects[index(objspec, vb[1]) || 1]; 42 vb = vb[3..$]; 43 endif 44 vb = $object_utils:has_verb(vbs, "verb_sub") ? vbs:verb_sub(vb) | this:(verb)(vb, vbs); 45 new = (new + old[1..prcnt - 1]) + vb; 46 k = gt; 47 else 48 cp_args = {}; 49 if (brace = index("([", s)) 50 if (!(w = index(old[k + 1..oldlen], ")]"[brace]))) 51 return new + old; 52 else 53 p = old[prcnt + 2..(k = k + w) - 1]; 54 if (brace == 1) 55 "%(property)"; 56 cp_args = {who, p}; 57 elseif (p[1] == "#") 58 "%[#n] => object number"; 59 s = (o = index(objspec, p[2])) ? tostr(objects[o]) | (("[" + p) + "]"); 60 elseif (!(o = index(objspec, p[1]))) 61 s = ("[" + p) + "]"; 62 else 63 " %[dproperty] "; 64 cp_args = {objects[o], p[2..w - 1], strcmp(p[1], "a") < 0}; 65 endif 66 endif 67 elseif (o = index(objspec, s)) 68 passed = is_player(objects[o]) ? "name" | ""; 69 cp_args = {objects[o], passed, strcmp(s, "a") < 0}; 70 elseif (w = index(prnspec, s, 1)) 71 cp_args = {who, prprops[w]}; 72 elseif (s == "#") 73 s = tostr(who); 74 elseif (s != "%") 75 s = "%" + s; 76 endif 77 new = (new + old[1..prcnt - 1]) + ((!cp_args) ? s | ((typeof(sub = $string_utils:_cap_property(@cp_args)) != ERR) ? sub | (("%(" + tostr(sub)) + ")"))); 78 endif 79 old = old[k + 1..oldlen]; 80 oldlen = oldlen - k; 81endwhile 82return new + old;
say_action
Referenced by
none
Source
1"$local.rpg:say_action(message [,who, thing, where, excluding whom, highlight whom])"; 2"announce 'message' with pronoun substitution as if it were just "; 3" $local.rpg:rpg_announce_all($string_utils:pronoun_sub(message, who, thing, where)); "; 4"except that who (player), dobj, and iobj get modified messages, with the appropriate use of 'you' instead of their name."; 5"who default player"; 6"thing default object that called this verb"; 7"where default who.location"; 8"excluding default {}"; 9"highlighting default nobody (otherwise the argument given will see eir messages with `damage highlighting')"; 10"(This differs from $you:say_action in that only bystanding non-sleeping players will get messages.)"; 11{msg, ?who = player, ?thing = caller, ?where = who.location, ?excluding = {}, ?highlight = 0} = args; 12if (where in this.silent_rooms) 13 return; 14endif 15this:secure(); 16{s_u, you} = {$string_utils, $you}; 17if (typeof(msg) == LIST) 18 tell = ""; 19 for x in (msg) 20 tell = tell + ((typeof(x) == STR) ? x | x[random($)]); 21 endfor 22else 23 tell = msg; 24endif 25spew = {tell, tell, tell}; 26if (i = highlight in {who, dobj, iobj}) 27 doll = this:get_doll(highlight); 28 options = this.rpg_options; 29 {start, finish} = options:get(doll.rpg_options, "highlighting") ? options:get(doll.rpg_options, "highlights") || options.highlights_default | {"", ""}; 30 spew[i] = tostr(start, tell, finish); 31endif 32this:playershow(who, this:pronoun_sub(this:fixpos(spew[1], "%n"), you, thing, where)); 33exclude = {dobj, who, iobj, @excluding}; 34for t in (where.contents) 35 if ((t in exclude) || (!valid(tdoll = this:get_doll(t)))) 36 elseif (tdoll:cannot_see()) 37 exclude = {@exclude, t}; 38 elseif (tdoll:cannot_resolve()) 39 exclude = {@exclude, t}; 40 hazy = {@hazy, t}; 41 endif 42endfor 43this:s_i_n(); 44this:rpg_show_all_but(where, exclude, this:pronoun_sub(tell, who, thing, where)); 45if (hazy) 46 {dstow, istow} = {dobj, iobj}; 47 ((dobj in this.pcs) || is_player(dobj)) && (dobj = this.somebody); 48 this:rpg_show_all_but(where, $set_utils:diff(where.contents, hazy), this:pronoun_sub(tell, this.someone, thing, where)); 49 {dobj, iobj} = {dstow, istow}; 50endif 51if ((`is_player(dobj) ! E_TYPE, E_INVIND' && (!(dobj in {who, @excluding}))) && (dobj.location == where)) 52 ddoll = this:get_doll(dobj); 53 {dstow, istow} = {dobj, iobj}; 54 if (valid(ddoll) && ddoll:cannot_resolve()) 55 active = this.someone; 56 ((iobj in this.pcs) || is_player(iobj)) && (iobj = this.somebody); 57 else 58 active = who; 59 endif 60 dobj = you; 61 this:playershow(dstow, this:pronoun_sub(this:fixpos(spew[2], "%d"), active, thing, where)); 62 {dobj, iobj} = {dstow, istow}; 63endif 64if ((`is_player(iobj) ! E_TYPE, E_INVIND' && (!(iobj in {who, dobj, @excluding}))) && (iobj.location == where)) 65 idoll = this:get_doll(iobj); 66 {dstow, istow} = {dobj, iobj}; 67 if (valid(idoll) && idoll:cannot_resolve()) 68 active = this.someone; 69 ((dobj in this.pcs) || is_player(dobj)) && (dobj = this.somebody); 70 else 71 active = who; 72 endif 73 iobj = you; 74 this:playershow(istow, this:pronoun_sub(this:fixpos(spew[3], "%i"), active, thing, where)); 75 {dobj, iobj} = {dstow, istow}; 76endif 77"Profane (#30788) - Tue Dec 30, 1997 - only do tells to dobj/iobj if they're players."; 78"Mooshie (#106469) - Tue Jan 6, 1998 - Added `excluded' option. An update from $you."; 79"THX (#105941) - Fri Jun 12, 1998 - Changed call from s_u:pronoun_sub to this:pronoun_sub everywhere and commented out old ugly hack for <who>. This calls player.name instead of player:title which should save a few ticks and improve readability."; 80"Profane (#30788) - Sat Jun 20, 1998 - hack for damage highlighting"; 81"Profane (#30788) - Sun Jun 4, 2000 - insert `yadda/location = where' conditions for spewing messages to iobj, dobj"; 82"THX (#105941) - Mon Jun 25, 2001 - Changed to exclude those who cannot see and alter the messages to those who cannot_resolve to Someone and Somebody Else.";
rate*_weapon
Referenced by
none
Source
1"$local.rpg:rate*_weapon(OBJ weapon, [LIST {attacker, defender}])"; 2"=> rating"; 3"Rate an rpg weapon based on certain mathematical criteria."; 4this:secure(); 5x = this.pcs[$]; 6{weap, ?foes = {x, x}} = args; 7if (!$object_utils:isa(weap, this.weapon)) 8 return E_INVARG; 9endif 10{x, y} = foes; 11boost = 20 - (10 * weap.hands); 12if ($object_utils:has_verb(weap, "critical_hit") != {this.weapon}) 13 boost = boost + 15; 14endif 15if ($object_utils:has_verb(weap, "critical_miss") != {this.weapon}) 16 boost = boost - 7; 17endif 18basic = `(((min(weap:attack(x, y), 50) + max(-25, weap:parry(x, y, weap) / 3)) - max(-25, weap:dodgable(x, y))) - max(-25, weap:parryable(x, y))) - weap:slowness(x, y) ! ANY => 25'; 19expert = `(((weap:dam(x, y) + weap:special_damage(x, y)) + max(-5, weap:pierce(x, y))) - max(0, weap:pen(x, y))) + (30 / max(1, weap:con(x, y))) ! ANY => 25' + boost; 20return abs(expert) * (expert + basic); 21"@Moved from spiderknight (#348):rate by THX1138 (#105941) Mon Jul 13 08:25:54 1998 PDT";
compare_opponents
Referenced by
none
Source
1this:secure(); 2{protag, antag} = args; 3if (valid(pdoll = this:get_doll(protag)) && valid(adoll = this:get_doll(antag))) 4 return {this:rank_pc(pdoll, protag, antag), this:rank_pc(adoll, antag, protag)}; 5else 6 player:tell("Both arguments must be LambdaRPG participants."); 7endif
rank_pc
Referenced by
- #46:compare_opponents line 4:
this:rank_pc - #46:compare_opponents line 4:
this:rank_pc
Source
1if (caller == this) 2 {doll, who, whoelse} = args; 3 rank = weapon = 0; 4 look_thru = doll.wielding ? doll.wielding | doll.natural_weapons; 5 for t in (look_thru) 6 temp = rank; 7 rank = max(rank, max(1, this:rate_weapon(t, {who, whoelse}) / 55) * doll:total(t.skill)); 8 weapon = (temp == rank) ? weapon | t; 9 endfor 10 return {rank, weapon}; 11else 12 return E_PERM; 13endif
has_saved_doll
Referenced by
none
Source
1{?who = $nothing} = args; 2doll = this.doll; 3dolls = pcs = {}; 4for t in (this.saved_dolls) 5 if (((valid(t) && (parent(t) == doll)) && `is_player(t.character) ! E_TYPE') && ((time() - t.last_action) < 2000000)) 6 dolls = {@dolls, t}; 7 pcs = {@pcs, t.character}; 8 else 9 this.saved_dolls = setremove(this.saved_dolls, t); 10 endif 11endfor 12return valid(who) ? (who in pcs) ? dolls[who in pcs] | $nothing | pcs;
tell_damage
Referenced by
none
Source
1"Usage: tell_damage(OBJ who, @STR damage strings)"; 2"Will highlight the damage string before sending it to the recipient--as appropriate."; 3{who, @msg} = args; 4if (valid(doll = this:get_doll(who))) 5 this:secure(); 6 options = this.rpg_options; 7 {start, finish} = options:get(doll.rpg_options, "highlighting") ? options:get(doll.rpg_options, "highlights") || options.highlights_default | {"", ""}; 8 this:playertell(who, start, @msg, finish); 9endif 10"THX (#105941) - Mon Jun 5, 2000 - Check that the doll is valid since improvement checks call this code too.";
s_i_n
Referenced by
- #46:rm_pc line 5:
this:s_i_n - #46:rm_doll line 6:
this:s_i_n - #46:say_action line 43:
this:s_i_n - #46:save_doll line 20:
this:s_i_n - #46:save_doll line 48:
this:s_i_n
Source
1if ((ticks_left() < 7500) || (seconds_left() < 2)) 2 {?long = this.gm_lag} = args; 3 (caller_perms() == this.owner) && suspend(long); 4endif 5"suspends if ticks left is under 6000 or if secs left is under 2"; 6"THX (#105941) - Fri Jan 1, 1999 - This is G_M's version of $command_utils:suspend_if_needed(). NB: Use rpg:s_i_f_i_n() when doing conditional suspends in for-loops.";
doll_exp
Referenced by
- #46:save_doll line 7:
this:doll_exp - #46:save_doll line 8:
this:doll_exp
Source
1":doll_exp(doll) -> Numeric representation of doll's overall LRPG experience."; 2this:secure(); 3{doll, ?augment = 0} = args; 4exp = 0; 5if (valid(doll) && (parent(doll) == this.doll)) 6 skills = this.skills.contents; 7 attributes = this.attributes; 8 for skill in (skills) 9 if (!(skill in attributes)) 10 exp = exp + (doll.(skill.aliases[1]) * skill.learn); 11 endif 12 endfor 13 if (augment) 14 exp = (exp * 2) * max(doll.magic_theory, doll.melee); 15 endif 16endif 17return exp;
s_i_f_i_n suspend_in_for_if_needed
Referenced by
- #46:do_reset line 15:
this:s_i_f_i_n - #46:do_reset line 22:
this:s_i_f_i_n - #46:respawn_non_pkp_pc line 7:
this:s_i_f_i_n - #2693:chexx line 5:
#46:s_i_f_i_n - #2693:chexx line 7:
#46:s_i_f_i_n - #2693:chexx line 16:
#46:s_i_f_i_n - #2693:wha line 4:
#46:s_i_f_i_n - #2693:wha line 8:
#46:s_i_f_i_n
Source
1if ((ticks_left() < 2400) || (seconds_left() == 1)) 2 (caller_perms() == this.owner) && suspend(0); 3endif 4"suspends if ticks left is under 3600 or if secs left is under 1."; 5"THX (#105941) - Fri Jan 1, 1999 - This version of :suspend_if_needed(0) is to be used in for-loops in the core if the effects required are fairly immediate. In other words, this is a quick and dirty way of gaining some more ticks and seconds.";
save_doll
Referenced by
- #46:restore_pc line 15:
this:save_doll
Source
1this:secure(); 2{doll} = args; 3if ((is_player(who = doll.character) && (who == who.owner)) && (parent(doll) == this.doll)) 4 saved = who in $list_utils:map_prop(this.saved_dolls, "character"); 5 if (saved) 6 s_d = this.saved_dolls[saved]; 7 current = (this:doll_exp(doll) + (5 * doll.pot)) + (99 * $math_utils:sum($list_utils:map_arg(doll, "get_att", $list_utils:slice($list_utils:map_prop(this.attributes, "aliases"), 1)))); 8 test = (this:doll_exp(s_d) + (5 * s_d.pot)) + (99 * $math_utils:sum($list_utils:map_arg(s_d, "get_att", $list_utils:slice($list_utils:map_prop(this.attributes, "aliases"), 1)))); 9 if (current > test) 10 this.saved_dolls[saved]:moveto(this.cemetery); 11 this.saved_dolls = listdelete(this.saved_dolls, saved); 12 "Only save ONE DOLL PER PLAYER, thank you drive through."; 13 "Only save a new doll if it has more exp than the old one. Yes, this does not take into account basic stat fluctuations. deal."; 14 saved = 0; 15 endif 16 endif 17else 18 return E_INVARG; 19endif 20this:s_i_n(); 21for weapon in (doll.wielding) 22 weapon:do_unwield(who); 23endfor 24for armour in (doll.wearing) 25 armour:do_remove(who); 26endfor 27doll.wielding = doll.wearing = {}; 28for item in (doll.schedule) 29 if (item in doll.schedule) 30 doll.schedule = setremove(doll.schedule, item); 31 {q1, q2, time, q4} = item; 32 this.toady:call_verb(q1, q2, {doll, @q4}); 33 endif 34endfor 35for item in (doll.claimed_objects) 36 valid(`item.claimed_by ! ANY => $nothing') && item:unclaim_for(item.claimed_by); 37endfor 38doll.paralyzed = 0; 39if (n = doll in this.dolls) 40 this.dolls = listdelete(this.dolls, n); 41 this.pcs = listdelete(this.pcs, n); 42endif 43doll:write_misc_note("Guilds", (guildb = this.guild_db):guilds_for(who)); 44guildb:reset_for(who); 45puzzles = (puzzle_log = this.puzzle_log):solved(who); 46times = {}; 47for puzzle in (puzzles) 48 this:s_i_n(); 49 times = {@times, puzzle_log:has_solved(who, puzzle)}; 50endfor 51doll:write_misc_note("Puzzles", {puzzles, times}); 52puzzle_log:reset_for(who); 53if (doll == this.object_db.suit_doll) 54 return; 55elseif (saved) 56 this.saved_dolls = {@this.saved_dolls, doll}; 57 this.death_db.corpse_dolls = setadd(this.death_db.corpse_dolls, doll); 58else 59 (who == this.owner) || (this.saved_dolls = listappend(setremove(this.saved_dolls, doll), doll)); 60 this.saved_dolls = {@this.saved_dolls[max(1, $ - 80)..$]}; 61endif 62((doll in this.dolls) || (doll in this.saved_dolls)) || doll:moveto(this.cemetery); 63"THX (#105941) - Sat Mar 21, 1998 - Still save macro users' dolls. Prevent all but G_M from restoring in restore_pc instead. Stop G_M from getting a doll saved .... waste of quota"; 64"Profane (#30788) - Mon Jan 11, 1999 - consider pot and att totals when deciding which doll to save."; 65"THX (#105941) - Tue Nov 2, 1999 - Changed to temporarily save the doll associated with a corpse. This doll will be removed by player_corpse:rot() if the player isn't resurrected first."; 66"THX (#105941) - Mon Apr 16, 2001 - Put a hack in so that the doll associated with the suit of armour doesn't get into saved_dolls.";
rpg_announce_all_but
Referenced by
- #46:rpg_announce*_all line 4:
this:rpg_announce_all_but - #46:rpg_announce_all(older) line 3:
this:rpg_announce_all_but - #46:say_audio line 43:
this:rpg_announce_all_but - #46:say_audio line 47:
this:rpg_announce_all_but
Source
1":rpg_announce_all_but(<OBJ location>, <LIST things not to announce to>, <LIST/STR args to pass to tell>) -> As a regular room:announce_all_but for location, but only spews to non-sleeping players who are not in the exclude list."; 2{where, exclude, @text} = args; 3if (where in this.silent_rooms) 4 return; 5endif 6this:secure(); 7"New silent entry detection:"; 8"if (i = `$list_utils:iassoc_new(task_id(), where.unannounced) ! ANY')"; 9" where.unannounced = listdelete(where.unannounced, i);"; 10"endif"; 11text = (typeof(text) == LIST) ? text | {text}; 12exclude = {@exclude, @this.silent_players}; 13for dude in (where.contents) 14 if (dude in connected_players()) 15 (dude in exclude) || this:playertell(dude, @text); 16 elseif ((mon = `dude.tell_forward ! E_PROPNF => {}') && (dude.owner in this.gms)) 17 exclude = (valid(doll = dude.doll) && doll:cannot_hear()) ? setadd(exclude, dude) | exclude; 18 for t in (mon) 19 (dude in exclude) || t:tell(" (", dude.name, ") ", @text); 20 endfor 21 endif 22endfor 23"THX (#105941) - Mon Feb 15, 1999 - Changed call to where:notify_player() if caller_perms() are trusted."; 24"THX (#105941) - Mon Jun 25, 2001 - Added a check for monitored monsters who cannot hear.";
new_sheet
Referenced by
none
Source
1":sheet(who, [about_what]) -- tell player numerical info about WHO's LRPG stats."; 2if (!this:trust()) 3 return E_PERM; 4endif 5{who, ?what = 0} = args; 6doll = this:get_doll(who); 7if (doll == $nothing) 8 player:tell("No such adventurer."); 9 return; 10endif 11sheet = {}; 12sheet = {tostr("Player: ", who.name, " (", who, ") Doll: ", doll, (who in this.gms) ? " *** GameMaster ***" | "")}; 13sheet = {@sheet, ""}; 14suff = ""; 15s = " "; 16atts = this.sheet_atts; 17h = this.sheet_level; 18if (what == "combat") 19 atts = atts[1..55]; 20 h = h[1..55]; 21elseif (what == "magic") 22 atts = atts[56..100]; 23 h = h[56..100]; 24elseif (what == "miscl") 25 atts = atts[101..$]; 26 h = h[101..$]; 27endif 28for q in [1..length(atts)] 29 this:time_stop(); 30 z = doll.(atts[q].aliases[1]); 31 if (z) 32 zs = $string_utils:right(tostr(z), 2); 33 else 34 zs = " "; 35 endif 36 if (suff == "") 37 for k in [1..h[q]] 38 suff = suff + s; 39 endfor 40 endif 41 skill = this:match_skill(atts[q]); 42 if (what == "magic") 43 suff = ((((suff + $string_utils:left((length(skill.aliases[1]) < 13) ? skill.aliases[1] | skill.aliases[1][1..12], 13)) + zs) + " (") + $string_utils:right(tostr(doll:total(atts[q])), 3)) + ") "; 44 else 45 suff = ((((suff + $string_utils:left((length(skill.name) < 13) ? skill.name | skill.name[1..12], 13)) + zs) + " (") + $string_utils:right(tostr(doll:total(atts[q])), 3)) + ") "; 46 endif 47 if (q == length(atts)) 48 sheet = {@sheet, suff, ""}; 49 elseif ((h[q] == -2) && (h[q + 1] == 0)) 50 sheet = {@sheet, suff, ""}; 51 suff = ""; 52 elseif (h[q] != (h[q + 1] - 1)) 53 sheet = {@sheet, suff}; 54 suff = ""; 55 endif 56endfor 57sheet = {@sheet, tostr(who.name, " hates ", $string_utils:english_list($list_utils:map_prop(doll.aggressor, "name")), ". ", who.psc, " is in ", who.location.name, " (", who.location, ").")}; 58sheet = {@sheet, tostr("Physical Damage: ", doll.inj, " Psychic Damage: ", doll.ins, " Experience: ", this:exp(who), (doll.size == 10) ? "" | (" Size: " + tostr(doll.size)))}; 59player:tell_lines_suspended(sheet);
parents
Referenced by
none
Source
1{what} = args; 2ret = {}; 3while (valid(what = parent(what))) 4 ret = {@ret, what}; 5endwhile 6return ret; 7"THX (#105941) - Wed Feb 24, 1999 - This is a bit speedier than $object_utils:ancestors() ... only for one object though.";
is_fast_room
Referenced by
- #46:playershow line 7:
this:is_fast_room - #46:playertell line 5:
this:is_fast_room - #46:playerannounce line 7:
this:is_fast_room
Source
1return $object_utils:isoneof(args[1], this.fast_rooms);
rpg_announce_all_but(old)
Referenced by
none
Source
1":rpg_announce_all_but(<OBJ location>, <LIST things not to announce to>, <@(LIST of STRs)/STR args to pass to tell>) -> As a regular room:announce_all_but for location, but only spews to non-sleeping players who are not in the exclude list."; 2{where, exclude, @text} = args; 3if (where in this.silent_rooms) 4 return; 5endif 6text = (typeof(text) == LIST) ? text | {text}; 7exclude = {@exclude, @this.silent_players}; 8for dude in (where.contents) 9 if (dude in connected_players()) 10 (dude in exclude) || dude:tell(@text); 11 elseif ((mon = `dude.tell_forward ! E_PROPNF => {}') && (dude.owner in this.gms)) 12 for t in (mon) 13 (dude in exclude) || t:tell(" (", dude.name, ") ", @text); 14 endfor 15 endif 16endfor 17for room in (`where.tell_forward ! E_PROPNF => {}') 18 for dude in (room.contents) 19 if (dude in connected_players()) 20 (dude in exclude) || dude:tell(" (from ", where.name, ") ", @text); 21 endif 22 endfor 23endfor 24"Profane 1-DEC-96 1229PST - s/is_player/connected_players, move exclusion check to conditional, added comment"; 25"THX (#105941) - Mon Apr 27, 1998 - Commented the Silent 'port stuff. Let room:announce() handle it. This verb is for speed.";
playertell_lines
Referenced by
none
Source
1"Usage: playertell_lines(OBJ player, LIST|STR line(s) of text)"; 2"Sends all provided lines through this:playertell (to consolidate line-wrapping code and the like)."; 3this:secure(); 4{who, lines} = args; 5(typeof(lines) != LIST) && (lines = {lines}); 6for line in (lines) 7 this:playertell(who, line); 8endfor
train(old)
Referenced by
none
Source
1":train(player, attribute-list)"; 2"Attempt to improve each of player's attributes in 'attribute-list'."; 3"=> E_NONE if player isn't an Illuminatus."; 4"=> E_QUOTA if player has no potential."; 5"=> n where 'n' is the number of courses completed."; 6this:secure(); 7{pc, atts} = args; 8if (!valid(doll = this:get_doll(pc))) 9 return E_NONE; 10elseif (!(pot = doll.pot)) 11 return E_QUOTA; 12endif 13total = 0; 14for attnam in (atts) 15 "oldatt = doll.(attnam);"; 16 oldatt = doll:get_unmod_att(attnam); 17 cost = this.costs[oldatt + 1]; 18 if ((!pot) || (cost > pot)) 19 return total; 20 else 21 doll.(attnam) = oldatt + 1; 22 doll.pot = pot = doll.pot - cost; 23 total = total + 1; 24 endif 25endfor 26return total; 27"Quinn 11-AUG-93 0645: Re-written w/comments; removed messages; return meaningful values; see Academy Room (#146@LMOO) for example interpretation of results."; 28"THX 20-FEB-1997 -- Scatter assignment. Whee."; 29"Profane (#30788) - Wed May 19, 1999 - Use :unmod_att";
fixpos(old)
Referenced by
none
Source
1"Copied from Irin (#106049):fixpos Thu Mar 12 11:34:15 1998 PST"; 2{string, fix} = args; 3up = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}; 4down = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}; 5allupper = ""; 6upper = ""; 7lower = ""; 8for n in [1..length(fix)] 9 if ((i = fix[n] in up) || (i = fix[n] in up)) 10 upper = upper + up[i]; 11 lower = lower + down[i]; 12 else 13 upper = upper + fix[n]; 14 lower = lower + fix[n]; 15 endif 16endfor 17allupper = upper + "'S"; 18upper = upper + "'s"; 19lower = lower + "'s"; 20return strsub(strsub(strsub(string, lower, "your", 1), upper, "Your", 1), allupper, "YOUR", 1);
rm_doll(old)
Referenced by
none
Source
1" rm_doll(OBJ doll) => OBJ pc may suspend"; 2"Removes the (pc/doll) pair from this.pcs/this.dolls lists. Returns"; 3"the removed RPG character."; 4if (!this:trusted(caller_perms())) 5 return E_PERM; 6endif 7doll = args[1]; 8$command_utils:suspend_if_needed(this.gm_lag); 9pos = doll in this.dolls; 10if (!pos) 11 return $object_utils:isa(doll, this.doll) ? 1 | E_INVARG; 12endif 13pcs = this.pcs; 14this.dolls = listdelete(this.dolls, pos); 15this.pcs = listdelete(pcs, pos); 16return pcs[pos]; 17"June 28, 1995 -- Slither, first version";
do_reset
Referenced by
none
Source
1"Kill that guest's RPG doll, as appropriate."; 2if (parent(caller) != $local.guest) 3 return E_PERM; 4elseif (valid(gdoll = this:get_doll(caller))) 5 {odb, cemetery, loc} = {this.object_db, this.cemetery, caller.location}; 6 is_rpg = odb:is_rpg(loc); 7 "drop RPG items only in dungeons. Nice and tidy"; 8 for item in (caller.contents) 9 if (odb:is_corpse(item)) 10 item:moveto(this.cinder); 11 elseif (odb:is_thing(item)) 12 dest = (is_rpg && loc:acceptable(item)) ? loc | cemetery; 13 item:moveto(dest); 14 endif 15 this:s_i_f_i_n(); 16 endfor 17 for person in ({@gdoll.aggressor, @valid(loc) ? loc.contents | {}}) 18 "clear aggressor lists"; 19 if (valid(pdoll = this:get_doll(person))) 20 pdoll.aggressor = setremove(pdoll.aggressor, caller); 21 endif 22 this:s_i_f_i_n(); 23 endfor 24 "kill the doll"; 25 this.recycler:_recycle(gdoll); 26endif 27"THX (#105941) - Mon Nov 27, 2000 - Added to replace the code on $local.guest:do_reset() that was antiquated.";
secure(old)
Referenced by
none
Source
1":secure() => raise E_PERM if we don't like the look of whoever called your verb (i.e., a builtin, or non-GM permed verb called you.)"; 2if (callers()[2][3] in this.gms) 3 return; 4 "if (callers()[$][4] == #1)"; 5 " \"verb has gone thru huh processing; feature verb.\";"; 6 " if ($set_utils:intersection($list_utils:slice(callers(), 3), setremove($list_utils:slice($local.rpg.player_start.banned, 1), $local.rpg.owner)))"; 7 " \"Certain banned people like to make cheating/macro FOs. Sorry.\";"; 8 " raise(E_PERM, \"RPG Security Violation!\");"; 9 " endif"; 10 "endif"; 11endif 12raise(E_PERM, "RPG Security Violation!"); 13"Profane 1-APR-97 1708PST -- added bit for command-line verbs"; 14"Irin Thu Apr 3 12:33:06 1997 PST -- Unceremoniously sent the code for command-line verbs to #46:secure_x(). Thus saving 1 tick.";
is_alive
Referenced by
none
Source
1{doll} = args; 2if (is_player(char = doll.character)) 3 return char in this.pcs; 4endif 5return char.alive;
say_audio
Referenced by
none
Source
1"$local.rpg:say_audio(message [,who, thing, where, excluding whom, highlight whom])"; 2"announce 'message' with pronoun substitution as if it were just "; 3" $local.rpg:rpg_announce_all($string_utils:pronoun_sub(message, who, thing, where)); "; 4"except that who (player), dobj, and iobj get modified messages, with the appropriate use of 'you' instead of their name."; 5"who default player"; 6"thing default object that called this verb"; 7"where default who.location"; 8"excluding default {}"; 9"highlighting default nobody (otherwise the argument given will see eir messages with `damage highlighting')"; 10"(This differs from $you:say_action in that only bystanding non-sleeping players will get messages. This version added to handle audible messages ... blindness or deafness can now be a factor.)"; 11{msg, ?who = player, ?thing = caller, ?where = who.location, ?excluding = {}, ?highlight = 0} = args; 12if (where in this.silent_rooms) 13 return; 14endif 15this:secure(); 16{s_u, you} = {$string_utils, $you}; 17if (typeof(msg) == LIST) 18 tell = ""; 19 for x in (msg) 20 tell = tell + ((typeof(x) == STR) ? x | x[random($)]); 21 endfor 22else 23 tell = msg; 24endif 25spew = {tell, tell, tell}; 26if (i = highlight in {who, dobj, iobj}) 27 doll = this:get_doll(highlight); 28 options = this.rpg_options; 29 {start, finish} = options:get(doll.rpg_options, "highlighting") ? options:get(doll.rpg_options, "highlights") || options.highlights_default | {"", ""}; 30 spew[i] = tostr(start, tell, finish); 31endif 32this:playertell(who, this:pronoun_sub(this:fixpos(spew[1], "%n"), you, thing, where)); 33exclude = {dobj, who, iobj, @excluding}; 34for t in (where.contents) 35 if ((t in exclude) || (!valid(tdoll = this:get_doll(t)))) 36 elseif (tdoll:cannot_hear()) 37 exclude = {@exclude, t}; 38 elseif (tdoll:cannot_see() || tdoll:cannot_resolve()) 39 exclude = {@exclude, t}; 40 blind = {@blind, t}; 41 endif 42endfor 43this:rpg_announce_all_but(where, exclude, this:pronoun_sub(tell, who, thing, where)); 44if (blind) 45 {dstow, istow} = {dobj, iobj}; 46 ((dobj in this.pcs) || is_player(dobj)) && (dobj = this.somebody); 47 this:rpg_announce_all_but(where, $set_utils:diff(where.contents, blind), this:pronoun_sub(tell, this.someone, thing, where)); 48 {dobj, iobj} = {dstow, istow}; 49endif 50if ((`(dobj in this.pcs) || is_player(dobj) ! E_TYPE, E_INVIND' && (!(dobj in {who, @excluding}))) && (dobj.location == where)) 51 ddoll = this:get_doll(dobj); 52 if (valid(ddoll) && ddoll:cannot_hear()) 53 else 54 {dstow, istow} = {dobj, iobj}; 55 if (valid(ddoll) && (ddoll:cannot_see() || ddoll:cannot_resolve())) 56 active = this.someone; 57 ((iobj in this.pcs) || is_player(iobj)) && (iobj = this.somebody); 58 else 59 active = who; 60 endif 61 dobj = you; 62 this:playertell(dstow, this:pronoun_sub(this:fixpos(spew[2], "%d"), active, thing, where)); 63 {dobj, iobj} = {dstow, istow}; 64 endif 65endif 66if ((`is_player(iobj) ! E_TYPE, E_INVIND' && (!(iobj in {who, dobj, @excluding}))) && (iobj.location == where)) 67 idoll = this:get_doll(iobj); 68 if (valid(idoll) && idoll:cannot_hear()) 69 else 70 {dstow, istow} = {dobj, iobj}; 71 if (valid(idoll) && (idoll:cannot_see() || idoll:cannot_resolve())) 72 active = this.someone; 73 ((dobj in this.pcs) || is_player(dobj)) && (dobj = this.somebody); 74 else 75 active = who; 76 endif 77 iobj = you; 78 this:playertell(istow, this:pronoun_sub(this:fixpos(spew[3], "%i"), active, thing, where)); 79 {dobj, iobj} = {dstow, istow}; 80 endif 81endif 82"THX (#105941) - Tue Jun 5, 2001 - Added.";
playershow
Referenced by
- #46:say_action line 32:
this:playershow - #46:say_action line 61:
this:playershow - #46:say_action line 74:
this:playershow
Source
1":playershow(OBJ who, STR or STRs @msg) - calls notify(who, tostr(@msg)) if who is a player and if who is in a descendant of $local.rpg.dungeon."; 2(caller == this) || this:secure(); 3{who, @msg} = args; 4where = who.location; 5if (valid(doll = this:get_doll(who)) && doll:cannot_see()) 6 return; 7elseif (is_player(who) && this:is_fast_room(where)) 8 msg = strsub(tostr(@msg), "xch_mudtext", "xch mudtext"); 9 if ((ll = who.linelen) > 0) 10 for line in ($player:linesplit(msg, ll)) 11 where:notify_player(who, line); 12 endfor 13 else 14 where:notify_player(who, msg); 15 endif 16else 17 who:tell(@msg); 18endif 19"Mooshie (#106469) - Sat Oct 9, 1999 - Checking if 'caller == this' first should save indexing ticks for the many calls routed through :rpg_announce* verbs and :playertell_lines.";
playertell
Referenced by
- #46:tell_damage line 8:
this:playertell - #46:rpg_announce_all_but line 15:
this:playertell - #46:playertell_lines line 7:
this:playertell - #46:say_audio line 32:
this:playertell - #46:say_audio line 62:
this:playertell - #46:say_audio line 78:
this:playertell
Source
1":playertell(OBJ who, STR or STRs @msg) - calls notify(who, tostr(@msg)) if who is a player and if who is in a descendant of $local.rpg.dungeon."; 2(caller == this) || this:secure(); 3{who, @msg} = args; 4where = who.location; 5if (is_player(who) && this:is_fast_room(where)) 6 msg = strsub(tostr(@msg), "xch_mudtext", "xch mudtext"); 7 if ((ll = who.linelen) > 0) 8 for line in ($player:linesplit(msg, ll)) 9 where:notify_player(who, line); 10 endfor 11 else 12 where:notify_player(who, msg); 13 endif 14else 15 who:tell(@msg); 16endif 17"Mooshie (#106469) - Sat Oct 9, 1999 - Checking if 'caller == this' first should save indexing ticks for the many calls routed through :rpg_announce* verbs and :playertell_lines.";
rpg_show_all_but
Referenced by
- #46:say_action line 44:
this:rpg_show_all_but - #46:say_action line 48:
this:rpg_show_all_but - #46:rpg_show_all_but line 4:
this:rpg_show_all_but
Source
1":rpg_show(<OBJ location>, <LIST/STR args to pass to tell>) -> As a regular room:show for location, but only spews to non-sleeping players."; 2{where, @string} = args; 3this:secure(); 4this:rpg_show_all_but(where, (verb == "rpg_show") ? {player} | {}, @string); 5"THX (#105941) - Sun Jun 24, 2001 - Changed code to send to this:rpg_show_all_but() to save on maintaining identical code.";
rpg_show*_all
Referenced by
none
Source
No program (verb defined but unprogrammed).
playerannounce
Referenced by
none
Source
1":playerannounce(OBJ who, STR or STRs @msg) - calls notify(who, tostr(@msg)) if who is a player and if who is in a descendant of $local.rpg.dungeon. Checks doll:cannot_hear() before proceeding."; 2(caller == this) || this:secure(); 3{who, @msg} = args; 4where = who.location; 5if (valid(doll = this:get_doll(who)) && doll:cannot_hear()) 6 return; 7elseif (is_player(who) && this:is_fast_room(where)) 8 msg = strsub(tostr(@msg), "xch_mudtext", "xch mudtext"); 9 if ((ll = who.linelen) > 0) 10 for line in ($player:linesplit(msg, ll)) 11 where:notify_player(who, line); 12 endfor 13 else 14 where:notify_player(who, msg); 15 endif 16else 17 who:tell(@msg); 18endif 19"THX (#105941) - Mon Jul 2, 2001 - Added.";
erase_all_saved_dolls_for
Referenced by
none
Source
1"Removed all the back up voodoo dolls of `who' from this.saved_dolls."; 2"Yeah, yeah, this scenario is rare, but possible."; 3(rpg = $local.rpg):secure(); 4if (!(caller_perms() in this.grand_masters)) 5 return E_PERM; 6else 7 {who} = args; 8 for x in (this.saved_dolls) 9 rpg:s_i_f_i_n(); 10 if (`x.character ! E_PROPNF => $nothing' == who) 11 this.saved_dolls = setremove(this.saved_dolls, x); 12 this.dolls = setremove(this.dolls, x); 13 "We also recycle the doll(s)."; 14 x:moveto(this.cemetery); 15 endif 16 endfor 17endif 18"Hydros (#106189) - Mon Mar 7, 2005 - Added. Currently for use with Alaria (#35896):restore.";
wizmove
Referenced by
none
Source
1"Copied from Hydros (#106189):wmove at Tue Apr 12 12:11:30 2005 PDT"; 2"A wizardly move for His Eminence's RPG. Only specific objects, and specific verbs on those objects, are approved to call this, and these should be rare."; 3"NOTE to GameMasters: to access this verb, contact Grand_Master, (or an incarnation thereof). This wizardly code is not to be taken lightly and His Eminence frowns on abuse of forced movement code--i.e., you taste crunchy with ketchup."; 4"NB: If the teleported object is a player, e will receive RPG exitshock unless, after the move, you :announce eir name to the room, (e.g. `<moved.name> teleports in.')."; 5(rpg = $local.rpg):secure(); 6{moved, newloc} = args; 7if (!rpg.object_db:is_rpg_room(moved.location)) 8 "Only callable while `moved' target is within the RPG."; 9 return E_PERM; 10else 11 "Only specific verbs on specific objects can call this movement into play."; 12 if ((x = $list_utils:assoc(caller, rpg.approved_wizmoves, 1)) && (callers()[1][2] == x[2])) 13 "If move() fails for any reason, we simply eject them from the RPG (:eject_basic() being owned by Heathcliff somewhere down the line.)"; 14 `move(moved, newloc) ! E_RECMOVE, E_NACC => moved.location:_eject(moved)'; 15 else 16 return E_PERM; 17 endif 18endif 19"Hydros (#106189) - Tue Apr 12, 2005 - Added, soon to be owned by Nosredna (#2487).";
respawn_non_pkp_pc
Referenced by
none
Source
1"Instantly respawn a non-PKP PC in eir .home. A perk for volunteering into the playerkilling realm."; 2this:secure(); 3{doll} = args; 4who = doll.character; 5loc = who.location; 6for item in ({@doll.aggressor, @valid(loc) ? loc.contents | {}}) 7 this:s_i_f_i_n(); 8 if (valid(them = this:get_doll(item))) 9 them.aggressor = setremove(them.aggressor, who); 10 endif 11endfor 12for t in (doll.armour_effects) 13 if (parent(t) == this.doll) 14 doll:remove_teammate(t); 15 t:remove_teammate(doll); 16 endif 17endfor 18doll.inj = 50 + random(25); 19doll.ins = 50 + random(25); 20doll.fat = 50 + random(25); 21tot = 0; 22costs = this.costs; 23for att in (this.attributes) 24 val = doll.(att.aliases[1]); 25 for n in [1..min(val, 25)] 26 tot = tot + costs[n]; 27 endfor 28endfor 29{lop, pop} = {600, 2}; 30if (tot > lop) 31 for att in (this.attributes) 32 a = att.aliases[1]; 33 if ((tot > (2 * lop)) || (random(pop) == 2)) 34 doll.(a) = min(max(doll.(a) - 1, 12 + random(5)), doll.(a)); 35 endif 36 endfor 37endif 38if (doll.app > 11) 39 doll.app = doll.app - 1; 40endif 41count = 0; 42countlist = {}; 43for x in ($list_utils:randomly_permute(who.contents)) 44 if (this.object_db:is_thing(x)) 45 count = count + 1; 46 if (`who.location:acceptable(x) ! ANY => 0') 47 `x:moveto(who.location) ! ANY'; 48 countlist = setadd(countlist, x.name); 49 endif 50 if (count >= 3) 51 break; 52 endif 53 endif 54endfor 55this.magic_db:teleport(doll, who.home, (rpcm = this.death_db.respawn_pc_msgs)[1], rpcm[2], rpcm[3], rpcm[4]); 56if (countlist != {}) 57 who:tell(("You dropped your " + $string_utils:english_list(countlist)) + " where you died."); 58endif 59"Copied from Hydros (#106189):respawn_non_pkp_pc at Sun Oct 16 14:18:30 2005 PDT";