"**A dump of the Adventurers Database (#46) on Sun Dec 17 09:43:27 1995 PST @create $room named Adventurers Database:Adventurers,Database @prop #46."recycler" #4489 rc @prop #46."established" {} rc ;;#46.("established") = {#10889, #3118, #15, #4292, #50, #68, #14, #2693, #7003, #19845, #12538} @prop #46."seconds_min" 1 rc @prop #46."ticks_min" 5000 rc @prop #46."exporters" {} rc ;;#46.("exporters") = {#2, #67, #2487, #6349, #78, #3920, #3685, #2612, #6336, #31783, #122, #2957, #49853, #58016, #50636, #47, #61050} @prop #46."sheet_level" {} rc ;;#46.("sheet_level") = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 0, 1, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 2, 2, 0, 1, 2, 1, 2, 1, 2, 0, 1, 2, 2, 0, 1, 1, 0, 1, 2, 1, 0, 0, 0} @prop #46."sheet_atts" {} rc ;;#46.("sheet_atts") = {#19148, #19184, #19226, #19230, #19231, #19235, #19243, #19316, #19343, #19856, #19835, #32039, #19804, #5781, #25257, #5784, #6512, #6162, #5056, #5967, #60852, #76229, #7790, #19984, #6175, #6178, #6176, #19943, #9080, #7565, #7144, #7096, #19941, #6232, #19895, #29862, #6499, #6451, #6357, #19988, #19989, #19985, #32772, #32773, #7750, #8108, #6562, #6564, #36555, #22707, #29732, #9097, #32771, #6275, #24330, #17076, #4649, #24345, #24346, #25664, #50023, #7607, #32775, #6531, #7689, #32774, #7649, #32783, #32781, #32755, #32759, #32760, #9064, #9092, #29441, #18671, #32758, #32757, #32762, #32761, #4631, #2763, #4728, #32776, #32779, #32780, #32778, #9903, #81749} @prop #46."gms" {} rc ;;#46.("gms") = {#14, #420, #540, #4292, #15, #3118, #10889, #1449, #6853, #34876, #31829, #1370, #37114, #43860, #21077, #2693, #7003, #68, #19845, #50459, #37972, #30246, #45743, #46102, #49925, #57140, #34435, #58456, #50040, #2819, #50224, #49397, #61219, #65711, #56872, #62871, #73979, #59447, #45216, #66257, #63546, #49967, #85293, #30788, #89395, #91447, #50222, #98723, #90864, #94368, #93228, #87516, #80845, #49807, #47818, #90731, #82267, #100806} @prop #46."costs" {} rc ;;#46.("costs") = {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} @prop #46."dolls" {} rc @prop #46."attdeps" {} rc ;;#46.("attdeps") = {{{}, {"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", 2 "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"}, {}}} @prop #46."atts" {} rc ;;#46.("atts") = {"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", "ecacc", "ecto", "gadget", "etrap", "throw", "furn", "wclim", "scim", "natweap", "claw", "tenta", "teeth", "kat1", "kat2", "tclimb", "knives", "dagger", "time", "slow", "force", "forcewall", "baxe", "baxe1", "baxe2", "drive", "bike", "pushbike", "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"} @prop #46."pcs" {} rc @prop #46."ticks_divider" 20000 rc @prop #46."seconds_divider" 5 rc @prop #46."foreground" 0 rc @prop #46."rpg_lag" {} rc ;;#46.("rpg_lag") = {31, 28, 48, 38, 11, 5, 16, 1, 22, 14} @prop #46."rpg_lag_length" 20 rc @prop #46."rpg_lag_sum" 214 rc @prop #46."grand_masters" {} rc ;;#46.("grand_masters") = {#86740, #2693, #19845, #34876, #43860, #30788, #7003, #82267} @prop #46."lag_standard" 50 rc @prop #46."min_command_interval" 1 rc @prop #46."doll" #74 rc @prop #46."equipment" #517 rc @prop #46."weapon" #82 rc @prop #46."armour" #418 rc @prop #46."vacuum" #10161 rc @prop #46."monster" #259 rc @prop #46."dungeon" #258 rc @prop #46."skill_object" #19051 r @prop #46."spell_object" #22517 r @prop #46."skills" #34595 r @prop #46."shield" #3451 r @prop #46."attributes" {} r ;;#46.("attributes") = {#19148, #19184, #19343, #19226, #19230, #19243, #19235, #19231, #19316} @prop #46."toady" #58456 rc @prop #46."money" #57000 r @prop #46."cemetery" #1131 rc @prop #46."missile_weapon" #8816 r @prop #46."hand_and_a_half" #2521 r @prop #46."grabber" #52766 r @prop #46."combat_skill" #10330 r @prop #46."natural_weapon" #50181 r @prop #46."staff" #331 r @prop #46."thing" #517 r @prop #46."body_area" #15623 r @prop #46."magic_db" #328 r @prop #46."corpse" #2803 r @prop #46."container" #9338 r @prop #46."dispenser" #52766 r @prop #46."private_gms" {} rc ;;#46.("private_gms") = {#68, #61050} @prop #46."gear" #75122 r @prop #46."fists" #9130 r @prop #46."blunt_weapons" {} r ;;#46.("blunt_weapons") = {#9130, #159, #331, #874, #957, #3451, #21543, #52610, #3791, #53625, #3640, #10466, #370, #5506, #29147, #27735, #4878} @prop #46."wooden_weapons" {} r ;;#46.("wooden_weapons") = {#159, #331, #874, #957, #3451, #21543, #52610, #3791, #53625, #3640, #10466, #370, #5506, #29147, #27735, #4878} @prop #46."leather_armour" {} r ;;#46.("leather_armour") = {#22586, #1247, #40308, #20253, #69882, #60614, #64134, #11636, #47326} @prop #46."light_source" #18754 r @prop #46."clock" #1140 r @prop #46."logging_att_changes" 20 r @prop #46."att_change_log" {} "" @prop #46."fishy" {} "" @prop #46."spies" {} "" @prop #46."no_log_atts" {} r ;;#46.("no_log_atts") = {"act", "aggressor", "last_attack"} @prop #46."exit" #11286 r @prop #46."reap_protected_pcs" {} "" @prop #46."dungeon_rooms" {} r ;;#46.("dungeon_rooms") = {#258, #35120, #28001} ;;#46.("free_entry") = 0 ;;#46.("entrances") = {#75} ;;#46.("blessed_task") = 1143385450 ;;#46.("exits") = {#98} ;;#46.("key") = #2693 ;;#46.("aliases") = {"Adventurers", "Database"} ;;#46.("description") = "The database room is a chaotic jumble of filing cabinets, video screens, loose bits of paper and rows of little dolls hung up on hooks. Little hooded men run around whispering to each other, checking the screens, searching through random files and tossing papers in all directions." ;;#46.("object_size") = {90577, 819192179} @verb #46:"create_pc" this any none rxd @program #46:create_pc ":create_pc(OBJ who) => OBJ doll"; "Makes a new doll and assigns it to WHO. Called by #46:def_pc()"; if (caller_perms() in this.gms) pc = args[1]; if ($nothing == (doll = this:get_doll(pc))) doll = this.recycler:_create(this.doll); doll.name = pc.name + "'s Voodoo Doll"; doll.aliases = {doll.name, "Voodoo Doll", "doll"}; doll.character = pc; this.pcs = listappend(this.pcs, pc); this.dolls = listappend(this.dolls, doll); endif doll.last_action = time(); return doll; else return E_PERM; endif "Profane - 1/30/95 7:30EST - added comment"; . @verb #46:"roll" this any none rxd @program #46:roll ":roll() => NUM"; "LRPG's standard roll; range of -52 to 152, median 52."; return args[1] - ((((((random(35) + random(35)) + random(35)) + random(35)) + random(35)) + random(35)) - 58); . @verb #46:"def_pc" this any none rxd @program #46:def_pc ":def_pc(OBJ who) => OBJ doll"; "Create a new doll for WHO and assign it initial abilities."; if (!(((caller == $nothing) && (player in this.gms)) || (caller.owner in this.gms))) return $nothing; endif pc = args[1]; doll = this:create_pc(pc); rol_se = random(4); rol_da = random(4); rol_ie = random(3); rol_pe = random(4); strength = (4 + rol_se) + random(3); end = (4 + rol_se) + random(3); dex = (4 + rol_da) + random(3); agl = (4 + rol_da) + random(3); int = (4 + random(4)) + rol_ie; pcn = (4 + rol_pe) + random(3); emp = (4 + rol_pe) + rol_ie; wil = (4 + random(4)) + random(3); app = (4 + random(4)) + random(3); total = (((((((strength + end) + dex) + agl) + int) + pcn) + emp) + wil) + app; gen = 225 + (3 * (68 - total)); doll.str = strength; doll.end = end; doll.dex = dex; doll.agl = agl; doll.int = int; doll.pcn = pcn; doll.emp = emp; doll.wil = wil; doll.app = app; doll.inj = 0; doll.pot = gen; return doll; "Profane - 1/30/95 7:34EST - fixed use of `STR' as variable and added comment."; . @verb #46:"train" this any none rxd @program #46:train ":train(player, attribute-list)"; "Attempt to improve each of player's attributes in 'attribute-list'."; "=> E_NONE if player isn't an Illuminatus."; "=> E_QUOTA if player has no potential."; "=> n where 'n' is the number of courses completed."; if (!this:trusted(caller_perms())) return E_PERM; elseif (!valid(doll = this:get_doll(pc = args[1]))) return E_NONE; elseif (!(pot = doll.pot)) return E_QUOTA; endif total = 0; for attnam in (atts = args[2]) oldatt = doll.(attnam); cost = this.costs[oldatt + 1]; if ((!pot) || (cost > pot)) return total; else doll.(attnam) = oldatt + 1; doll.pot = pot = doll.pot - cost; total = total + 1; endif endfor return total; "Quinn 11-AUG-93 0645: Re-written w/comments; removed messages; return meaningful values; see Academy Room (#146@LMOO) for example interpretation of results."; . @verb #46:"die" this any none rxd @program #46:die "kill a doll -- i.e., remove player/monster from RPG"; if (!this:trust()) return E_PERM; endif doll = args[1]; me = doll.character; for item in (me.contents) this:time_stop(3); if ($object_utils:isa(item, this.thing)) "drop all adventure gear, or eject it"; if (me.location:acceptable(item)) item:moveto(me.location); else item:moveto(this.cemetery); endif endif endfor for item in ({@doll.aggressor, @valid(me.location) ? me.location.contents | {}}) "remove this guy from the aggressor list of everyone, too"; this:time_stop(3); if (valid(them = this:get_doll(item))) them.aggressor = setremove(them.aggressor, me); endif endfor for item in (doll.claimed_objects) "Remove claim data from objects."; this:time_stop(3); if (valid(item) && $object_utils:isa(item, #517)) item.claimed_by = $nothing; endif endfor this:time_stop(3); "flush the doll"; this.recycler:_recycle(doll); if ($object_utils:has_property(me, "home")) "finally, try to move the player home."; me:moveto(me.home); if (me.location != me.home) me:moveto($player_start); endif endif "grump 6/20/93: add coment, clean up, etc."; "DR 27-APR-94 -- Changed 'accept' to 'acceptable', now use 'me' to remove from other players' acceptable lists."; "Profane 1-APR-95 1040EST - s/this/me/18 as per Dred, added claim-removing bit."; . @verb #46:"get_doll" none none none rxd @program #46:get_doll ":get_doll(OBJ who) => OBJ doll"; "return a PC's doll object."; if (n = args[1] in this.pcs) return this.dolls[n]; else return #-1; endif "Profane- 1/30/95 7:37EST- added comment."; . @verb #46:"sh*eet" this none this @program #46:sheet ":sheet(who) -- tell player numerical info about WHO's LRPG stats."; "Modified 12/9/92 to simplify security dr"; if (!this:trust()) return E_PERM; endif if (typeof(args[1]) == OBJ) who = args[1]; else who = $string_utils:match(args[1], {@players(), @$object_utils:descendants(th is.monster)}, "aliases"); endif if (who == $ambiguous_match) player:tell("Ambiguous character."); return; elseif (who == $failed_match) player:tell("No such character."); return; elseif (who == $nothing) player:tell("No character specified."); return; elseif (who in this.dolls) doll = who; who = doll.character; else doll = this:get_doll(who); if (doll == $nothing) player:tell("No such adventurer."); return; endif endif player:tell("Player: ", who.name, " (", who, ") Doll: ", doll, (who in this.gms) ? " *** GameMaster ***" | ""); player:tell(); suff = ""; s = " "; atts = this.sheet_atts; h = this.sheet_level; for q in [1..length(atts)] this:time_stop(); z = doll.(atts[q].aliases[1]); if (z) zs = $string_utils:right(tostr(z), 2); else zs = " "; endif if (suff == "") for k in [1..h[q]] suff = suff + s; endfor endif skill = this:match_skill(atts[q]); 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)) + ") "; if (q == length(atts)) player:tell(suff); player:tell(); elseif ((h[q] == -2) && (h[q + 1] == 0)) player:tell(suff); player:tell(); suff = ""; elseif (h[q] != (h[q + 1] - 1)) player:tell(suff); suff = ""; endif endfor player:tell(who.name, " hates ", $string_utils:english_list($list_utils:map_pro p(doll.aggressor, "name")), ". ", who.psc, " is in ", who.location.name, " (", who.location, ")."); player:tell("Physical Damage: ", doll.inj, " Psychic Damage: ", doll.ins, " Experience: ", this:exp(who), (doll.size == 10) ? "" | (" Size: " + tostr(doll.size))); "DR 26-APR-94 -- For some reasons, lines 38 and 51 were mysteriously broken, I fixee. But how did that happen?"; "DR 14-MAY-94 -- OK, Q changed sheet_atts back to objectnumbers as they had been...wish he'd fixed the sheet verb again too. Done."; . @verb #46:"look_gear(old)" this none this @program #46:look_gear(old) ":look_gear(who) -- Tell player info on what 'who' has readied."; who = args[1]; if (!valid(doll = this:get_doll(who))) return E_INVARG; endif rpg_thing = this.thing; special = wearing = {}; for elm in (doll.wearing) if (!$object_utils:isa(elm, rpg_thing)) doll.wearing = setremove(doll.wearing, elm); else if (msg = elm:look_gear_msg(doll)) special = {@special, msg}; endif if (elm:hide_from_look_gear(doll)) "...ignore it..."; else wearing = {@wearing, elm}; endif endif endfor if (wearing) wearing_msg = $string_utils:pronoun_sub("%N % protected by %t.", who, wearing); else wearing_msg = $string_utils:pronoun_sub("%N % wearing no visible armour.", who); endif wielding = {}; for elm in (doll.wielding) if (!$object_utils:isa(elm, rpg_thing)) doll.wielding = setremove(doll.wielding, elm); else if (msg = elm:look_gear_msg(doll)) special = {@special, msg}; endif if (elm:hide_from_look_gear(doll)) "...ignore it..."; else wielding = {@wielding, elm}; endif endif endfor if (!wielding) wielding_msg = $string_utils:pronoun_sub(" %S % wielding nothing, armed only with %p %t.", who, doll.natural_weapons); elseif (length(wielding) < 3) wm = ((wielding[1]:title() + " in ") + who.pp) + ((doll.hands == 1) ? " only hand" | " primary hand"); if (length(wielding) > 1) wm = ((((wm + " and ") + wielding[2]:title()) + " in ") + who.pp) + " secondary hand"; endif wielding_msg = $string_utils:pronoun_sub((" %S % wielding " + wm) + ".", who); else wielding_msg = $string_utils:pronoun_sub((" %S % wielding " + $string_utils:title_list(wielding)) + ".", who); endif player:tell(wearing_msg + wielding_msg); if (special) player:tell($string_utils:from_list(special, " ")); endif "Quinn 31-JUL-93 2247-ET: Re-written to use modern core verbs; minor changes to variable choice; inclusion of ALL things wielded if more than 2"; "Quinn 10-AUG-93 0226-ET: Hacked to print 'only' hand instead of 'primary' if the character has only one hand."; "Quinn 12-AUG-94 1418-ET: Check :hide_from_look_gear returning true, and do not show weapon if so. Messages now support verb conj/plural players, and are more informative, including support for natural weapons. Remove !rpg_thing equipment."; "Quinn 12-AUG-94 1554-ET: Added :look_gear_msg verb check for special display of certain equipment."; "Quinn 26-SEP-94 0938-ET: Stuck .crest in shield:look_gear_msg. Items MUST define a :hide_from_look_gear returning true if they wish to be excluded from the mundane listing, even if they define a :look_gear_msg."; . @verb #46:"look_health" this none this @program #46:look_health ":look_health(character) -- Tell player the degree of character's injury, insanity, and fatigue."; if ((doll = this:get_doll(what = args[1])) == $nothing) return E_NONE; endif inj = doll.inj; end = doll.end; if (inj == 0) plus = ", but "; text = "seems uninjured"; elseif (inj < 0) text = plus = ""; elseif (inj < end) plus = ", and "; text = "has slight injuries"; elseif (inj < (end * 3)) plus = ", and "; text = "is wounded"; elseif (inj < (end * 5)) plus = ", and "; text = "is severely wounded"; else plus = ", and "; text = "is wounded nigh unto death"; endif ins = doll.ins; wil = doll.wil; if (ins > (wil * 3)) text = (((text + plus) + "is obviously near the end of ") + what.pp) + " rope"; elseif (ins > wil) text = (text + plus) + "has clearly been under severe stress recently"; elseif (ins) text = (text + plus) + "looks somewhat emotionally fatigued"; endif fat = doll.fat; STR = doll.str; ftext = ""; if (fat > (STR * 5)) ftext = ((" " + what.psc) + " ") + "is exhausted near the point of collapse."; elseif (fat > (STR * 3)) ftext = ((((" " + what.psc) + " ") + "seems to have been pushing ") + what.pp) + " body to its limits lately."; elseif (fat > STR) ftext = ((" " + what.psc) + " ") + "looks somewhat listless and could use a rest."; elseif (fat) ftext = ((" " + what.psc) + " ") + "seems a little tired."; endif special = efx = {}; for effect in ({@doll.combat_effects, @doll.magic_effects, @doll.death_effects} ) if (typeof(effect) == LIST) efx = {@efx, @effect}; endif endfor for elm in (efx) if (msg = $code_utils:verb_or_property(elm, "look_health_msg", doll)) special = setadd(special, msg); endif endfor if (storms = $local.rpg.magic_db:print_storms(what)) special = {@special, @storms}; endif if (special) special = " " + $string_utils:from_list(special, " "); else special = ""; endif player:tell(what.name, " ", text, ".", ftext, special); "Profane 13-MAR-95 22:20EST - Added magic_effects to list of things to check for look_health_msg stuph"; "StarDancer 12-NOV-95 01:34EST - put in a check to make sure all above items 're lists."; "Profane 17-Dec-95 1219EST -- (re)added printing of storms."; . @verb #46:"trust" this none this @program #46:trust ":trust([NUM start position in callers()], [OBJ thing to check], ...) => true or false."; "Check each verb in callers() stack (starting at the start position, if specified); if verb owner is a GM (or an exporter), or is one of the objects provided in the arguments, return true."; "Putting $nothing in the arguments automatically trusts. N.B. This verb stops once it finds _one_ trustworthy calling verb, it does not check if _all_ calling verbs are trustworthy."; if (args && (typeof(n = args[1]) == NUM)) c = callers()[n + 2..length(callers())]; args = listdelete(args, 1); elseif (length(callers()) < 2) c = {}; "4/23/93-keeps one-caller verbs from automatically trusting--Phantom"; else c = callers()[2..length(callers())]; endif exs = this.exporters; gms = this.gms; ok = {@gms, @args}; for y in (c) if ((z = y[3]) in ok) return 1; elseif (!(z in exs)) if (player == caller_perms()) player:tell("RPG security violation! Aborted."); endif return 0; endif endfor "...hacked this to trust if player in exporters --Quinn (07-MAY-93)..."; return (player in {@ok, @exs}) || ($nothing in args); "Profane- 1/30/95 7:50EST - Added comment."; . @verb #46:"compile_sheet" this none this r @program #46:compile_sheet if (!$local.rpg:is_grandmaster(caller_perms())) return E_PERM; endif dg = ag = an = a0 = {}; for k in [1..length(this.attdeps)] y = this.attdeps[k]; att = this.atts[k]; if (att in this.attributes) an = listappend(an, att); elseif (y[2]) ag = listappend(ag, att); dg = listappend(dg, y[2][1]); else a0 = listappend(a0, att); endif endfor h = {}; a = {@an, @a0}; for k in [1..length(an)] h = {@h, -2}; endfor for k in [1..length(a0)] h = {@h, 0}; endfor while (ag != {}) dd = aa = {}; for k in [1..length(ag)] if (q = dg[k] in a) a = listappend(a, ag[k], q); h = listappend(h, h[q] + 1, q); else aa = {@aa, ag[k]}; dd = {@dd, dg[k]}; endif endfor ag = aa; dg = dd; endwhile this.sheet_atts = a; this.sheet_level = h; . @verb #46:"weight" this none this @program #46:weight ":weight(OBJ character, [OBJ doll]) => NUM total encumbrance of character"; enc = 0; dude = args[1]; doll = (length(args) > 1) ? args[2] | this:get_doll(dude); gms = this.gms; for foo in ($object_utils:all_contents(dude)) if (info = $object_utils:has_callable_verb(foo, "encumbrance")) if (info[1].owner in gms) "Object with verb is owned by a GameMaster."; enc = enc + foo:encumbrance(doll); endif endif endfor return enc; "Profane- 1/30/95 20:00EST - eliminated need for passing doll as 2nd arg."; "Profane- 2/1/95 19:57EST - OK, so I broke it. Now if you pass a second arg, it'll use that, otherwise jes get_doll on the first arg."; . @verb #46:"time_trouble" this none this @program #46:time_trouble return $command_utils:running_out_of_time(); "Why all the crap below, you ask? Beats the fuck outta me. --Quinn (25-APR-93)"; if (this.foreground && (this.foreground != task_id())) this.foreground = 0; endif if ((seconds_left() > this.seconds_divider) || (ticks_left() > this.ticks_divider)) this.foreground = task_id(); endif if (this.foreground) return (ticks_left() < (this.ticks_min + this.ticks_divider)) || (seconds_left() < (this.seconds_min + this.seconds_divider)); else return (ticks_left() < this.ticks_min) || (seconds_left() < this.seconds_min) ; endif . @verb #46:"time_stop maybe_stop_time" this none this @program #46:time_stop ":maybe_stop_time([seconds]) -- LRPG's suspend_if_needed."; if ($command_utils:running_out_of_time()) this:stop_time(@args); endif . @verb #46:"match_skill match_stat" this none this rx @program #46:match_skill ":match_skill(OBJ|STR skill_reference) => OBJ skill_object || bad_match"; if (typeof(skill = this.skills.(ref = args[1])) == OBJ) return skill; elseif (typeof(ref) == OBJ) return $object_utils:isa(ref, this.skill_object) ? ref | $failed_match; elseif ((object = $code_utils:toobj(ref)) != E_TYPE) return $object_utils:isa(object, this.skill_object) ? object | $failed_match; else return $string_utils:match(ref, this.skills:contents(), "aliases"); endif . @verb #46:"resolve" this none this @program #46:resolve ":resolve(character, skill, mod[, no-imp])"; "'character' should be a character object, and NOT a doll."; "'skill' should be a string reference to an LRPG skill."; "'mod' should be a number modifying this roll."; "'no-imp' is a dummy arg which, if given, prevents advancement with this roll."; "Returns a number. Anything above Zero is generally considered a success, while anything Zero and below is a failure."; "Will break into a traceback if skill is a $failed_match, which is probably more helpful that returning E_INVARG and having to track down an E_TYPE."; if (this:trusted(caller_perms())) skill = this:match_skill(args[2]); return skill:resolve(args[1], @args[3..length(args)]); else return E_PERM; endif "Quinn 29-JUL-93 0605-ET: Cleaned it up a bit, added documentation, and allowed for passing of the 'no-improvement' dummy arg."; . @verb #46:"find_chars" this none this @program #46:find_chars ":find_chars(where)"; "Return a list of {{dolls}, {characters}} in 'where'."; who = {}; dolls = {}; things = {}; where = args[1]; if ($object_utils:has_verb(where, "same_time")) for q in (where:same_time()) who = {@who, q, @q:contents()}; endfor else who = listinsert(where:contents(), where); endif for foo in (who) if (valid(doll = this:get_doll(foo))) things = listappend(things, foo); dolls = listappend(dolls, doll); endif endfor return {things, dolls}; "Quinn 28-AUG-93 0052: Hacked to use :contents."; . @verb #46:"exp" this none this @program #46:exp ":exp(character) -> Numeric representation of character's overall LRPG experience."; if (!this:trust()) return E_PERM; endif exp = 0; skills = this.skills.contents; doll = this:get_doll(args[1]); attributes = this.attributes; for skill in (skills) if (!(skill in attributes)) exp = exp + (doll.(skill:property_name()) * skill.learn); endif endfor return exp; . @verb #46:"gmlist" this none this @program #46:gmlist names = {}; for p in (this.gms) if (is_player(p)) names = listinsert(names, tostr(p.name, " (", p, ")"), random(length(names) + 1)); endif endfor names = {@names, "", ""}; su = $string_utils; output = args; for i in [1..length(names) / 3] j = 3 * i; output = {@output, tostr(" ", su:left(names[j - 2], 25), su:left(names[j - 1], 25), names[j])}; endfor return output; . @verb #46:"check_notification" this none this rx @program #46:check_notification ":check_notification(OBJ|LIST to_be_notified, STR notify_verb, LIST args)"; "New check_notification hacked by Quinn 03-JAN-93."; "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."; if (!this:trusted(caller_perms())) return E_PERM; endif verbname = args[2]; argslist = args[3]; if (verbname[1..7] != "notify_") return E_PERM; endif for object in ((typeof(x = args[1]) == LIST) ? x | {x}) this:maybe_stop_time(); if (this:trusted_verb(object, verbname)) object:(verbname)(@argslist); endif endfor "Profane 13-APR-95 14:20EST - Added :trusted_verb check, thus adding 46 ticks per notify call.."; . @verb #46:"trusted" this none this @program #46:trusted ":trusted(OBJ player) -> True if player is a trusted by the RPG."; trusted = {@this.gms, @this.exporters}; return args ? args[1] in trusted | trusted; . @verb #46:"look_encumbrance" this none this @program #46:look_encumbrance ":look_encumbrance(who) -- Tell player info on what `who' is carrying."; what = args[1]; if ((doll = this:get_doll(what)) > $nothing) enc = doll:encumbrance(); if (enc == 0) text = "is completely unencumbered"; elseif (enc < 3) text = tostr("bears ", what.pp, " light load with ease"); elseif (enc < 5) text = tostr("carries ", what.pp, " equipment with minor effort"); elseif (enc < 7) text = tostr("struggles somewhat with the bulk of ", what.pp, " load"); elseif (enc < 10) text = tostr("struggles wearily with the weight of ", what.pp, " belongings"); else text = tostr("staggers breathlessly under the weight of ", what.pp, " load"); endif player:tell(what.name, " ", text, "."); endif . @verb #46:"stop_time" this none this @program #46:stop_time ":stop_time([seconds])"; "Suspends for given seconds, recording new rpg-lag sample."; if (!this:trusted(caller_perms())) return E_PERM; endif time = time(); suspend(seconds = args ? args[1] | 0); this.rpg_lag = lag = {@listdelete(this.rpg_lag, 1), (time() - time) - seconds}; this.rpg_lag_sum = $math_utils:sum(@lag); . @verb #46:"is_grandmaster is_grand_master" this none this @program #46:is_grandmaster ":is_grandmaster(who) => True if given player is an identity of Grand_Master, with the power to modify the LRPG core."; return args[1] in this.grand_masters; . @verb #46:"match_char*acter" this none this @program #46:match_character ":match_character(string[, player])"; "Find an illuminatus matching the given string. First check for a literal object reference, then try player's matching routines, and finally resort to $string_utils:match_player."; "=> {#character, #doll} -- If a match was found."; "=> $failed_match|$ambiguous_match -- If not."; string = args[1]; who = (length(args) > 1) ? args[2] | player; if (valid(doll = this:get_doll(char = $code_utils:toobj(string)))) return {char, doll}; elseif (valid(char = who:my_match_object(string)) && valid(doll = this:get_doll(char))) return {char, doll}; elseif (valid(char = $string_utils:match_player(string)) && valid(doll = this:get_doll(char))) return {char, doll}; else return {char, doll}; endif "Added by Quinn 28-JUL-93 at 1113-ET."; . @verb #46:"character_match_failed" this none this @program #46:character_match_failed ":character_match_failed({character, doll}, string)"; "If :character_match result is a failure, print messages explaining why. Else, return 0."; char = args[1][1]; doll = args[1][2]; string = args[2]; if (!valid(char)) if (string in {"#-2", "$ambiguous_match"}) player:tell(tostr(string, " is an abstraction, you silly goose.")); elseif (!string) player:tell("You must give the name of a Bovine Illuminatus."); elseif (char == $failed_match) player:tell(tostr("No-one here answers to \"", string, "\".")); elseif (char == $ambiguous_match) player:tell(tostr("I don't know which \"", string, "\" you mean.")); elseif (!valid(match_result)) player:tell(tostr(match_result, " doesn't exist.")); endif elseif (!valid(doll)) player:tell("The BI database can find no information on ", $string_utils:nn(c har), "."); else return 0; endif return 1; . @verb #46:"look_health(old)" this none this @program #46:look_health(old) what = args[1]; if ((doll = this:get_doll(what)) > $nothing) if (doll.inj == 0) plus = ", but "; text = "seems uninjured"; elseif (doll.inj < 0) text = plus = ""; elseif (doll.inj < doll.end) plus = ", and "; text = "has slight injuries"; elseif (doll.inj < (3 * doll.end)) plus = ", and "; text = "is wounded"; elseif (doll.inj < (5 * doll.end)) plus = ", and "; text = "is severely wounded"; else plus = ", and "; text = "is wounded nigh unto death"; endif if (doll.ins > (3 * doll.wil)) text = (((text + plus) + "is obviously near the end of ") + what.pp) + " rope"; elseif (doll.ins > doll.wil) text = (text + plus) + "has clearly been under severe stress recently"; elseif (doll.ins) text = (text + plus) + "looks somewhat emotionally fatigued"; endif player:tell(what.name, " ", text, "."); endif . @verb #46:"trusted_verb trusted_property" this none this rx #58142 @program #46:trusted_verb "Copied from Grand_Master (#2693):trusted_verb Sun Oct 9 10:00:39 1994 PDT"; "Copied from Quinn (#19845):trusted_verb Sun Feb 6 16:02:53 1994 PST"; ":trusted_verb/property(OBJ object, STR verbname | STR propname)"; "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."; "--WIZARDLY and !d--"; object = args[1]; name = args[2]; ou = $object_utils; if (verb == "trusted_property") if (ou:has_property(object, name)) where = {object}; else return E_PROPNF; endif else if (!(where = ou:has_callable_verb(object, name))) return E_VERBNF; endif endif object = where[1]; info = (verb == "trusted_verb") ? verb_info(object, name) | property_info(objec t, name); if (info) return info[1] in $local.rpg.gms; else return info; endif "Isagi 100894 11:00P Fixed feature that caused E_VERBNF to be returned if there was no verb, but there was a property."; . @verb #46:"combat_sub" this none this rx @program #46:combat_sub ":combat_sub(msg, attacker, defender, location, severity[, object])"; "%n -> attacker %d -> target"; "%w -> location-string. %b -> severity-string."; "%t -> 'object', or the calling object (usually armour or weapon)."; msg = args[1]; msg = strsub(strsub(msg, "%w", args[4] || "nowhere"), "%b", args[5] || "hit"); if (index(msg, "%")) attacker = args[2]; target = args[3]; object = (typeof(args[6]) == OBJ) ? args[6] | caller; return $string_utils:pronoun_sub(msg, attacker, object, attacker.location, target); else "...caller has subbed already..."; return msg; endif . @verb #46:"match_monster" this none this @program #46:match_monster ":match_monster(string)"; "Return all monsters matching the given string. Note this does not return any invalid objects as a resuly status, but instead a list of valid matches."; "-> {} $failed_match"; "-> {monster} one match"; "-> {monster, monster, etc} $ambiguous_match"; "Use the result in conjunction with :monster_match_failed."; "Note also that we use the RPG Sweeper's list of monsters, saving the huge tick cost of a :descendants(~monster)."; return $match_utils:match_list(args[1], this.vacuum.monsters); . @verb #46:"monster_match_failed" this none this rx @program #46:monster_match_failed ":monster_match_failed(match-result, string[, w/numbers])"; "Report to 'player' the result of the given match specs. Print out names of all ambiguous monster-matches, using :title_list by default, and :name_and_number_list if w/numbers is given and true."; string = args[2]; if (!string) player:tell("You need to give the name of some monster."); return 1; endif result = args[1]; if (!result) player:tell("I can't find a monster answering to \"", string, "\"."); elseif (length(result) == 1) return 0; else vrb = args[3] ? "name_and_number_list" | "title_list"; player:tell("I don't know whether you mean ", $string_utils:(vrb)(result, "nobody", " or "), "."); endif return 1; . @verb #46:"weight(old)" this none this @program #46:weight(old) ":weight(character, character-doll)"; enc = 0; doll = args[2]; gms = this.gms; for foo in ($object_utils:all_contents(dude = args[1])) if (info = $object_utils:has_callable_verb(foo, "encumbrance")) if (info[1].owner in gms) "Object with verb is owned by a GameMaster."; enc = enc + foo:encumbrance(doll); endif endif endfor return enc; . @verb #46:"core_objects" this none this @program #46:core_objects ":core_objects()"; "Return a list of all properties on this which point to major objects in the LambdaMOO RPG."; o = {}; for p in (properties(this)) v = this.(p); if (typeof(v) == OBJ) o = {@o, {p, v}}; endif endfor return o; . @verb #46:"register_sheet_stat" this none this @program #46:register_sheet_stat ":register_sheet_stat(stat_object, after_this_stat[, column])"; "This method allows relatively easy insertion of a new RPG stat (skill or attribute) into the sheet format lists."; ""; "stat_object"; "...is the dbref of the new stat."; "after_this_stat"; "...points to the stat which the new stat will directly follow on the sheet lists. It may be either a string or a dbref."; ""; "column"; "The column in which the new stat will be displayed is, by default, automatically chosen: the first if the previous stat is in the last column; otherwise, the next column to the right. If column is given, that will be used instead."; if (!this:is_grand_master(caller_perms())) return E_PERM; endif atts = this.sheet_atts; levels = this.sheet_level; stat = this:match_stat(args[1]); prev = this:match_stat(args[2]); if ((!valid(stat)) || (!valid(prev))) return E_INVARG; endif i = prev in atts; if (!i) return E_PROPNF; endif if (length(args) > 2) new_level = tonum(args[3]); else p_level = levels[i]; new_level = (p_level < 2) ? p_level + 1 | 0; endif this.sheet_atts = listappend(atts, stat, i); this.sheet_level = listappend(levels, new_level, i); return i + 1; . @verb #46:"unregister_sheet_stat" this none this @program #46:unregister_sheet_stat ":unregister_sheet_stat(stat_object)"; "Remove the given stat reference from the sheet formatting lists."; if (!this:is_grand_master(caller_perms())) return E_PERM; endif atts = this.sheet_atts; levels = this.sheet_level; stat = this:match_stat(args[1]); i = stat in atts; if (!i) return E_NONE; endif this.sheet_atts = listdelete(atts, i); this.sheet_level = listdelete(levels, i); . @verb #46:"trusted_property(old)" this none this rx @program #46:trusted_property(old) "Copied from Adventurers Database (#46):trusted_property by Nosredna (#2487) Sat Oct 8 19:46:47 1994 PDT"; "Copied from Quinn (#19845):trusted_verb Sun Feb 6 16:02:53 1994 PST"; ":trusted_verb/property(object, verbname|propname)"; "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."; "--WIZARDLY and !d--"; object = args[1]; name = args[2]; if (!(where = $object_utils:has_callable_verb(object, name))) return E_VERBNF; endif object = where[1]; info = (verb == "trusted_verb") ? verb_info(object, name) | property_info(objec t, name); if (info) return info[1] in $local.rpg.gms; else return info; endif . @verb #46:"trusted_verb(old)" this none this rx #2487 @program #46:trusted_verb(old) "Copied from Adventurers Database (#46):trusted_verb by Nosredna (#2487) Sun Oct 9 10:00:06 1994 PDT"; "Copied from Quinn (#19845):trusted_verb Sun Feb 6 16:02:53 1994 PST"; ":trusted_verb/property(object, verbname|propname)"; "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."; "--WIZARDLY and !d--"; object = args[1]; name = args[2]; if (!(where = $object_utils:has_callable_verb(object, name))) return E_VERBNF; endif object = where[1]; info = (verb == "trusted_verb") ? verb_info(object, name) | property_info(objec t, name); if (info) return info[1] in $local.rpg.gms; else return info; endif . @verb #46:"look_gear" this none this rx @program #46:look_gear ":look_gear(who) -- Tell player info on what 'who' has readied."; who = args[1]; if (!valid(doll = this:get_doll(who))) return E_INVARG; endif rpg_thing = this.thing; special = wearing = {}; for elm in (doll.wearing) if (!$object_utils:isa(elm, rpg_thing)) doll.wearing = setremove(doll.wearing, elm); else if (msg = elm:look_gear_msg(doll)) special = {@special, msg}; endif if (elm:hide_from_look_gear(doll)) "...ignore it..."; else wearing = {@wearing, elm}; endif endif endfor if (wearing) wearing_msg = $string_utils:pronoun_sub("%N % protected by %t.", who, wearing); else wearing_msg = $string_utils:pronoun_sub("%N % wearing no visible armour.", who); endif wielding = {}; for elm in (doll.wielding) if (!$object_utils:isa(elm, rpg_thing)) doll.wielding = setremove(doll.wielding, elm); else if (msg = elm:look_gear_msg(doll)) special = {@special, msg}; endif if (elm:hide_from_look_gear(doll)) "...ignore it..."; else wielding = {@wielding, elm}; endif endif endfor if (!wielding) wielding_msg = $string_utils:pronoun_sub(" %S % wielding nothing, armed only with %p %t.", who, doll.natural_weapons); elseif ((wielding != {}) && who.animal) wielding_msg = $string_utils:pronoun_sub(tostr(" %S % armed with ", $string_utils:title_list(wielding), "."), who); elseif (length(wielding) < 3) wm = (wielding[1]:title() + " in ") + ((doll.hands == 1) ? "%p only hand" | ((wielding[1].hands == 2) ? "two hands" | "%p primary hand")); if (length(wielding) > 1) wm = (((wm + " and ") + wielding[2]:title()) + " in ") + ((wielding[2].hand s == 2) ? "two hands" | (("%p " + $string_utils:english_ordinal(wielding[1].ha nds + wielding[2].hands)) + " hand")); endif wielding_msg = $string_utils:pronoun_sub((" %S % wielding " + wm) + ".", who); else wielding_msg = $string_utils:pronoun_sub((" %S % wielding " + $string_utils:title_list(wielding)) + ".", who); endif player:tell(wearing_msg + wielding_msg); if (special) player:tell($string_utils:from_list(special, " ")); endif "Quinn 31-JUL-93 2247-ET: Re-written to use modern core verbs; minor changes to variable choice; inclusion of ALL things wielded if more than 2"; "Quinn 10-AUG-93 0226-ET: Hacked to print 'only' hand instead of 'primary' if the character has only one hand."; "Quinn 12-AUG-94 1418-ET: Check :hide_from_look_gear returning true, and do not show weapon if so. Messages now support verb conj/plural players, and are more informative, including support for natural weapons. Remove !rpg_thing equipment."; "Quinn 12-AUG-94 1554-ET: Added :look_gear_msg verb check for special display of certain equipment."; "Quinn 26-SEP-94 0938-ET: Stuck .crest in shield:look_gear_msg. Items MUST define a :hide_from_look_gear returning true if they wish to be excluded from the mundane listing, even if they define a :look_gear_msg."; "StarDancer 10-NOV-94 0035-ET: Added a `armed with' msg for monsters who's .animal prop is set 'cause most animals don have hands."; . @verb #46:"approve_att_change" this none this rx @program #46:approve_att_change ":log_att_change(player, {doll, attribute, new_value}, callers)"; "Return E_PERM if the given attribute change should not be permitted."; "(Right now this is used only to log stat changes. Set 'logging_att_changes' to the log length desired.)"; if (caller_perms() != $code_utils:verb_perms()) return E_PERM; endif len = this.logging_att_changes; if (((len > 1) && (!(args[2][2] in this.no_log_atts))) && (args[2][1].character in this.fishy)) "Since practically every time ya move, .act gets set, lets filter it out."; log = this.att_change_log; log = listinsert(log, {time(), @args}); log = log[1..min(length(log), len)]; this.att_change_log = log; endif return 1; . @verb #46:"view_att_log" this none this @program #46:view_att_log if (!(caller_perms() in {@this.grand_masters, @this.spies})) return E_PERM; else return {this.fishy, this.att_change_log}; endif . @verb #46:"add_doll" this none this @program #46:add_doll " add_doll(OBJ character, OBJ doll) -> BOOLEAN success may suspend"; "Adds doll to this.dolls and character to this.pcs, associated with"; "each other. The character may not have another doll already registered."; if (!this:trusted(caller_perms())) return E_PERM; endif character = args[1]; doll = args[2]; if (((!$object_utils:isa(doll, this.doll)) || (doll.character != character)) || (character in this.pcs)) return E_INVARG; endif $command_utils:suspend_if_needed(0); this.pcs = {@this.pcs, character}; this.dolls = {@this.dolls, doll}; return 1; "June 28, 1995 -- Slither, first version"; . @verb #46:"rm_pc" this none this @program #46:rm_pc " rm_pc(OBJ pc) => OBJ doll may suspend"; "Removes the (pc/doll) pair from this.pcs/this.dolls lists. Returns"; "the removed doll."; if (!this:trusted(caller_perms())) return E_PERM; endif pc = args[1]; $command_utils:suspend_if_needed(0); pos = pc in this.pcs; if (!pos) return E_INVARG; endif dolls = this.dolls; this.pcs = listdelete(this.pcs, pos); this.dolls = listdelete(dolls, pos); return dolls[pos]; "June 28, 1995 -- Slither, first version"; . @verb #46:"rm_doll" this none this @program #46:rm_doll " rm_doll(OBJ doll) => OBJ pc may suspend"; "Removes the (pc/doll) pair from this.pcs/this.dolls lists. Returns"; "the removed RPG character."; if (!this:trusted(caller_perms())) return E_PERM; endif doll = args[1]; $command_utils:suspend_if_needed(0); pos = doll in this.dolls; if (!pos) return E_INVARG; endif pcs = this.pcs; this.dolls = listdelete(this.dolls, pos); this.pcs = listdelete(pcs, pos); return pcs[pos]; "June 28, 1995 -- Slither, first version"; . @verb #46:"reap_protect_pc" this none this @program #46:reap_protect_pc " :reap_protect_pc(OBJ pc, NUM time, OBJ gm, STR comment) => BOOL changed"; "Keeps the player `pc' from having their doll reaped until after `time'."; "`gm' should be the gm to contact about this, and `comment' allows one"; "to explain any unusual circumstances. If the player is already protected,"; "then this call will replace the previous data."; if (!this:trusted(caller_perms())) return E_PERM; endif pc = args[1]; time = args[2]; if (((length(args) != 4) || (!is_player(pc))) || (time < time())) return E_INVARG; endif olddata = this.reap_protected_pcs; pos = pc in olddata[1]; if (pos) newpcs = olddata[1]; newpcdata = olddata[2]; newpcdata[pos] = listdelete(args, 1); else newpcs = {@olddata[1], pc}; newpcdata = {@olddata[2], listdelete(args, 1)}; endif this.reap_protected_pcs = {newpcs, newpcdata}; return 1; "July 31/95 Slither -- first version"; . @verb #46:"unreap_protect_pc" this none this @program #46:unreap_protect_pc " :unreap_protect_pc(OBJ pc)"; "Removes any RPG reap protection for pc"; if (!this:trusted(caller_perms())) return E_PERM; endif pc = args[1]; data = this.reap_protected_pcs; pos = pc in data[1]; if (pos) newpcs = listdelete(data[1], pos); newpcdata = listdelete(data[2], pos); this.reap_protected_pcs = {newpcs, newpcdata}; endif "July 31/95 Slither -- first version"; . @verb #46:"is_reap_protected" this none this @program #46:is_reap_protected " :is_reap_protected(OBJ pc) => LIST data "; "If pc is protected from the RPG reap, returns {time, gm, comment},"; "otherwise returns {}. 'time' is the time the pc is protected until,"; "and 'gm' is the gm to talk to about this, and 'comment' is any"; "comment that was provided about protecting this player."; pc = args[1]; pos = pc in this.reap_protected_pcs[1]; if (pos) data = this.reap_protected_pcs[2][pos]; if (data[1] < time()) this:unreap_protect_pc(pc); return {}; else return data; endif else return {}; endif "July 31/95 Slither -- first version"; . @verb #46:"cleanse_reap_protected_pcs" this none this @program #46:cleanse_reap_protected_pcs " :cleanse_reap_protected_pcs() may suspend"; "removes any invalid or useless entries from this.reap_protected_pcs"; for pc in (this.reap_protected_pcs[1]) $command_utils:suspend_if_needed(10); if (!is_player(pc)) "pc isn't a player anymore!"; this:unreap_protect_pc(pc); else rpp = this.reap_protected_pcs; pos = pc in rpp[1]; if (pos && (rpp[2][pos][1] < time())) "protection expired"; this:unreap_protect_pc(pc); endif endif endfor return 1; "July 31/95 Slither -- first version"; . @verb #46:"reap_protected_pcs" this none this @program #46:reap_protected_pcs " :reap_protected_pcs() => {LIST pcs, LIST pcdata} may suspend"; "returns data on all the pcs that are protected from the RPG reap."; "The data is in the following format:"; " pcs is a list of all the protected pcs"; " pcdata is a list such that pcdata[i] is the data about pcs[i],"; " and pcdata[i] is in the format {time, gm, comment}, where"; " time is the time the protection expires"; " gm is the gm who is listed as being the person to ask about this,"; " comment is any comment they made about this protection"; this:cleanse_reap_protected_pcs(); return this.reap_protected_pcs; "July 31/95 Slither -- first version"; . @verb #46:"rpg_announce" this none this @program #46:rpg_announce where = args[1]; args = listdelete(args, 1); for dude in (setremove(where:contents(), player)) is_player(dude) ? dude:tell(@args) | ""; endfor . @verb #46:"rpg_announce_all" this none this @program #46:rpg_announce_all where = args[1]; args = listdelete(args, 1); for dude in (where:contents()) is_player(dude) ? dude:tell(@args) | ""; endfor . @verb #46:"rpg_announce_all_but" this none this @program #46:rpg_announce_all_but where = args[1]; exclude = args[2]; text = (typeof(text = args[3..length(args)]) != LIST) ? {text} | text; contents = where:contents(); for l in (exclude) contents = setremove(contents, l); endfor for listener in (contents) is_player(listener) ? listener:tell(@text) | ""; endfor . @verb #46:"is_rpg_room" this none this rx @program #46:is_rpg_room "Copied from unseen object (#24874):is_rpg_room by Isagi (#21077) Sun Dec 17 02:47:50 1995 PST"; "Is_rpg_room, determines if the first argument is an room that supports Bovine Illuminati adventuring."; "Usage : #24874:is_rpg_room(OBJ location)"; location = args[1]; rpg_room_types = this.dungeon_rooms; rpg_room = 0; for type in (rpg_room_types) if ($object_utils:isa(location, type)) rpg_room = 1; endif endfor return rpg_room; . "***finished***