"A dump of Grand_Master on Sun Dec 17 14:27:58 1995 PST @create #4122 named Grand_Master:Grand_Master,GrandMaster,G_M,GM @prop #2693."gm_self_msg" "You make %d into a GameMaster." rc @prop #2693."gm_victim_msg" "Grand_Master bonks you with Black Pudding, knocking you down. When you get back up, you realize that you are now a GameMaster!" rc @prop #2693."broken_monsters" {} rc @prop #2693."recycled_items" {} rc @prop #2693."locked_items" {} rc @prop #2693."purge_item" #-1 rc @prop #2693."login_tell" {} c @prop #2693."data" 57739 rc @prop #2693."who" #30788 rc @prop #2693."people" {} rc ;;#2693.("people") = {#86740, #19845, #2693, #43860, #21077, #30788, #7003, #82267} @prop #2693."gm_other_msg" "Grand_Master bonks %d with Black Pudding, knocking %[dpo] down. When %[dps] gets back up, you realize that %[dps] is now a GameMaster!" rc @prop #2693."ungm_other_msg" "Mystic energies crackle about %d, stripping %[dpo] of %[dpp] GameMaster status." rc @prop #2693."ungm_victim_msg" "Mystic energies crackle about you, stripping you of your GameMaster status." rc @prop #2693."ungm_self_msg" "You strip %d of %[dpp] GameMaster status." rc @prop #2693."miscreants" {} r @prop #2693."x" {} rc ;;#2693.("x") = {{#82, 20925, 0, 1989}, {{#418, 3522, 0, 86}}} @prop #2693."grep_objects" {} rc ;;#2693.("grep_objects") = {#74, #46, #10161, #10078, #52766, #328, #1387, #19051, #517, #258, #259, #146, #5011, #44604, #22023} @prop #2693."spamverbs" {} rc ;;#2693.("spamverbs") = {"attack", "enterfunc", "invite"} @prop #2693."cleanse" #1131 rc @prop #2693."attribute_changes" {} "" @prop #2693."deathlog" {} "" @prop #2693."cheaters" {} "" @prop #2693."options_to_set" {} rc ;;#2693.("options_to_set") = {"paranoid", "brief", "edit_options", "display_options", "build_options", "prog_options", "mail_options"} @prop #2693."error_msgs" {} "" @prop #2693."rpg_utils" #61176 rc @verb #2693:"description" this none this @program #2693:description if (this.who in this.people) return ((pass(@args) + " At present he is under the control of his '") + this.who.name) + "' personality."; else return pass(@args) + " At present, he appears slightly confused as to which spirit is motivating him, and he would appreciate you asking him."; endif . @verb #2693:"disfunc" this none this @program #2693:disfunc this.who = #-1; this:unfiddle_options(); pass(@args); . @verb #2693:"confunc" this none this @program #2693:confunc if (valid(caller_perms()) && (!(caller in {#0, this}))) return E_PERM; else this:notes(); this:notify("Remember to use `me '."); " return pass(@args)"; endif "31-JAN-95 DR -- Took out pass(@args) to save time logging in."; . @verb #2693:"test" any any any rxd @program #2693:test skills = {}; for k in ({@children(#82), @children(#2521), @children(#8816), @children(#10898), @children(#3451)}) if (typeof(k.skill) == STR) skills = setadd(skills, k.skill); else this:tell(k, ".skill ->> \"", k.skill, "\" does this make sense to you?"); endif endfor total = 0; for doll in (#46.dolls) max = 0; for y in (skills) if ((tot = doll:total(y)) > max) max = tot; endif endfor val = $trig_utils:aexp(357 * max) * $trig_utils:sqrt(((doll.str + #76.dam) * doll.size) * doll.end); this:tell(doll.name, " --> ", total = total + ((val + (#10078.pcnte / 2)) / #10078.pcnte)); suspend(0); endfor player:tell(#2693.data = total); . @verb #2693:"title" none none none rxd @program #2693:title return pass(@args) + (valid(this.who) ? (" [" + this.who.name) + "]" | ""); . @verb #2693:"purge_dolls" any none none @program #2693:purge_dolls count = 0; for doll in (#46.dolls) if ((time() - doll.last_action) > 15552000) count = count + 1; player:tell("Killing ", doll.name, "."); if (!args) fork (0) #46:die(doll); endfork endif endif endfor player:tell("Purge complete."); player:tell(count, " dolls killed."); . @verb #2693:"make" any to any rxd @program #2693:make skill = dobj; number = tonum(iobjstr); skill.injury = #46.inj_penalty[number]; skill.insanity = #46.ins_penalty[number]; skill.encumbrance = #46.enc_penalty[number]; skill.learn = #46.learn[number]; . @verb #2693:"insal" any with any rxd @program #2693:insal dobj.aliases = {iobjstr, @dobj.aliases}; player:tell(dobj.aliases[1]); . @verb #2693:"pch" any none none rxd @program #2693:pch player:tell(dobjstr in properties(#74)); . @verb #2693:"fix_weapons" any none none rxd @program #2693:fix_weapons for weapon in ($object_utils:descendants(dobj)) weapon.skill = #46:match_skill(weapon.skill); suspend(0); endfor player:tell("All done, I think."); . @verb #2693:"notches" none none none rxd @program #2693:notches for notch in (#1131.notches) if (#46:time_trouble()) suspend(15); endif doll = #46:get_doll(notch[1]); if (valid(doll) && (notch[1] in $object_utils:descendants(#259))) doll.death = doll.death + 1; endif for killer in (notches[2]) doll = #46:get_doll(killer); if (valid(doll)) doll.kills = doll.kills + 1; endif endfor endfor suspend(15); #1131.notches = #1131.notches[length(#1131.notches) - 25..length(#1131.notches) ]; player:tell("***** complete *****"); . @verb #2693:"hunt" none none none rxd @program #2693:hunt for foo in (#1131.notches) if (foo[1] == #14) player:tell(foo in #1131.notches); for killer in (foo[2]) player:tell(killer.name); endfor player:tell("End of killers."); endif endfor . @verb #2693:"@gm @ungm" any none none @program #2693:@gm "Feh, just use the ORB @gm verb and save this dupe code in case someone wants to play with it."; return #44604:(verb)(@args); if (!#46:trust()) this.miscreants = setadd(this.miscreants, {player, time(), verb, @args}); player:tell("Bagged trying to ", verb, "."); return E_PERM; endif dobj = valid(dobj) ? dobj | $string_utils:match_player(dobjstr); if ($command_utils:player_match_failed(dobj, dobjstr)) "...failed match..."; return E_INVARG; else use = verb[2..length(verb)]; #46.gms = (use == "gm") ? setadd(#46.gms, dobj) | setremove(#46.gms, dobj); $object_utils:has_callable_verb(dobj.location, "announce_all_but") ? dobj.location:announce_all_but({dobj, this}, $string_utils:pronoun_sub(this.(u se + "_other_msg"))) | ""; dobj:tell($string_utils:pronoun_sub(this.(use + "_victim_msg"))); this:tell($string_utils:pronoun_sub(this.(use + "_self_msg"))); for GM in (setremove(setremove(#46.gms, this), dobj)) GM:tell(dobj.name, " has been ", (use == "gm") ? "granted" | ("stripped of " + $gender_utils:get_pronoun("p", dobj)), " GameMaster status by ", this:title(), "."); endfor endif "8/10/95 Slither -- put in the call to $gender_utils so the blasted thing won't traceback when dobj doesn't have a gender."; . @verb #2693:"@login" any any any @program #2693:@login "This verb leaves a message that is shown to Grand_Master when he logs in, thus letting us communicate minor updates, etc. to each other. -- Phantom"; "Usage: @login -- see current login messages"; " @login -- add a login message"; if (argstr) this.login_tell = listappend(this.login_tell, ((valid(this.who) ? this.who.name | this.name) + ": ") + argstr); this:tell("Message ", length(this.login_tell), " added."); else this:notes(); endif . @verb #2693:"@clear-log*in" any none none @program #2693:@clear-login if (dobjstr) this.login_tell = listdelete(this.login_tell, number = tonum(dobjstr)); this:tell("Login message ", number, " removed."); else this.login_tell = {}; this:tell("All login messages removed."); endif . @verb #2693:"rpg_item_purge" this none this @program #2693:rpg_item_purge if (player == this) object = this.purge_item; for thing in (setremove($object_utils:descendants(object), #47796)) suspend(0); place = thing.location; if ((((!valid(place)) || (!$object_utils:isa(place, #9338))) && (!$object_utils:isa(place, #259))) && (!(is_player(place) && (place in #46.pcs)))) if (#10161:unique(thing)) if (thing.owner == #2693) thing:moveto(#1138); else if (thing.owner:accept(thing)) thing:moveto(thing.owner); endif endif else #6565:_recycle(thing); endif endif endfor this:tell("Recycled all improperly placed children of ", object.name, " (", object, ")."); endif . @verb #2693:"mail_manage" any none none @program #2693:mail_manage if (!(dobjstr in {"notify", "forward"})) player:tell("Usage: mail_manage notify"); player:tell(" or mail_manage forward"); return; endif for guy in (#9551.("mail_" + dobjstr)) if (!(((guy in #46.gms) || (guy in #9551.readers)) || (guy == #9551))) #9551:("delete_" + dobjstr)(guy); endif endfor . @verb #2693:"mine_check" none none none @program #2693:mine_check locked = monsters = {}; for creature in ($object_utils:descendants(#259)) if (ticks_left() < 1000) suspend(5); endif for thing in (creature.mine) if (valid(thing)) if (creature:accept(thing)) thing:moveto(creature); else monsters = setadd(monsters, creature); locked = setadd(locked, thing); endif endif endfor endfor this.locked_items = locked; this.broken_monsters = monsters; this:tell("Finished checking .mine properties of descendants of generic monster (#259)."); . @verb #2693:"list" any on any @program #2693:list if ((valid(iobj) && $object_utils:has_property(iobj, dobjstr)) && (typeof(subject = iobj.(dobjstr)) == LIST)) for item in (subject) if ((typeof(item) == OBJ) && valid(item)) player:tell(item.name, " (", item, ")"); else player:tell(item); endif endfor else player:tell("\"", argstr, "\" is not a proper argument."); player:tell("Usage: list on "); endif . @verb #2693:"doll_clear" none none none @program #2693:doll_clear for doll in (#46.dolls) if (ticks_left() < 50) suspend(5); endif doll.wielding = {}; doll.wearing = {}; endfor . @verb #2693:"notes" this none this @program #2693:notes if (caller_perms() in {this, @this.people}) if (this.login_tell) for msg_num in [1..length(this.login_tell)] this:tell(msg_num, "--", this.login_tell[msg_num]); this:tell(); endfor else this:tell("No login messages."); endif endif . @verb #2693:"cleanse" any none none @program #2693:cleanse "Copied from Phantom (#12538):cleanse Sun Mar 21 00:47:23 1993 PST"; if ((typeof(dobj) == OBJ) && valid(dobj)) count = 0; for item in (dobj.contents) if (ticks_left() < 1000) suspend(3); endif if ((#517 in (parents = $object_utils:ancestors(item))) && (!#10161:unique(item))) if (this.cleanse != #161) item:moveto(this.cleanse); else if (#331 in parents) item:moveto(#1401); elseif ((#82 in parents) || (#418 in parents)) item:moveto(#161); elseif (#9350 in parents) item:moveto(#9355); endif endif count = count + 1; endif endfor player:tell(dobj.name, " (", dobj, ") has been cleansed of RPG player items."); player:tell($string_utils:capitalize($string_utils:english_number(count)), " (", $string_utils:group_number(count), ") item", (count == 1) ? "" | "s", " sent to ", this.cleanse.name, " (", this.cleanse, ")."); else player:tell("\"", dobjstr, "\" is not a proper argument."); endif . @verb #2693:"@gmshout" any any any @program #2693:@gmshout title = this:title(); for guy in (setremove({@#46.gms, @this.include}, this)) if ((!(guy in this.exclude)) && (guy in connected_players())) guy:tell(">", title, "< ", argstr); endif endfor . @verb #2693:"@include @exclude" any any any @program #2693:@include "Used in conjunction with @gmshout. Makes certain to @include (@exclude) certain people in a @gmshout. By default, all GMs are included, though Wizard-GMs might not wish to be caught up in RPG invitations."; "Usage: @include --- tells you who is currently @included"; " @include foo --- @includes foo in @gmshout"; " @include foo foo2 --- @includes foo and foo2 (each foo you specify :) in @gmshout"; " @include !foo --- removes foo (or list of foos) from those @included"; " @include all --- clears the .exclude list"; "Analogous usage with @exclude."; "Not yet finished..."; verbname = verb[2..length(verb)]; if (!args) player:tell(this.(verbname) ? (((($string_utils:english_list($list_utils:map_ prop(this.(verbname), "name")) + " ") + ((length(this.(verbname)) > 1) ? "are" | "is")) + " on your .") + verbname) + " list for the @gmshout." | (("Nobody is on your ." + verbname) + " list for the @gmshout.")); endif . @verb #2693:"me" any none none @program #2693:me "me -- Sets Grand_Master's identity for this session."; "Now additionaly sets G_M's options to those of - Profane 2/1/95 20:11EST"; if (!dobjstr) player:tell("You are currently controlled by your ", $string_utils:nn(this.wh o), " personality."); elseif (!valid(x = $string_utils:match(dobjstr, gms = this.people, "name", gms, "aliases"))) player:tell("That isn't one of Grand_Master's identities."); else player:tell("You set Grand_Master's identity to ", $string_utils:nn(this.who = x), "."); this:fiddle_options(); endif . @verb #2693:"queued_tasks kill_task" this none this @program #2693:queued_tasks "Verbs for use by Grand_Master's other-selves."; "This could be done more elegantly, but I'd rather not right now."; cp = caller_perms(); if ((!(cp in this.people)) && (!((verb == "queued_tasks") && $local.rpg:trusted (cp)))) return E_PERM; elseif (verb == "queued_tasks") return queued_tasks(); elseif (verb == "kill_task") return kill_task(args[1]); endif "6/15/95 Slither -- allowed GMs to get the task queue."; . @verb #2693:"old_notch" this none this xd @verb #2693:"peval" this none this xd @program #2693:peval "people-eval for grand_masters"; return (caller_perms() in this.people) ? eval(args[1]) | E_PERM; . @verb #2693:"_create _recycle" this none this rx @program #2693:_create "Allow Grand_Master and its various incarnations to create and recycle objects owne by His Eminency."; if ((!$perm_utils:controls(caller_perms(), this)) && (!$local.rpg:is_grandmaste r(caller_perms()))) return E_PERM; endif if (verb == "_recycle") "Prevent accidental recycling of worthwhile objects."; doomed = args[1]; if (((properties(doomed) || verbs(doomed)) || children(doomed)) && (!$command_utils:yes_or_no($string_utils:nn(doomed) + " has verbs, properties, and/or children. Are you sure you want to recycle it?"))) player:tell("Praise be! ", $string_utils:nn(doomed), " has been saved!"); return ((c = callers())[length(c)][2] in {"@create", "@destroy"}) ? kill_task(task_id()) | 0; endif endif return pass(@args); . @verb #2693:"@code" any any any r @program #2693:@code "Copied from Quinn (#19845):@code Thu Feb 25 19:32:44 1993 PST"; if (!(spec = $code_utils:parse_verbref(args[1]))) player:notify("Usage: @code :"); return; endif object = player:my_match_object(spec[1]); if ($command_utils:object_match_failed(object, spec[1])) return; endif what = object; vname = spec[2]; while ((what != $nothing) && ((code = verb_code(what, vname)) == E_VERBNF)) what = parent(what); endwhile if (code == E_VERBNF) player:notify("That object does not define that verb."); elseif (typeof(code) == ERR) player:notify(tostr("Error getting verbcode: ", code)); elseif (code == {}) player:notify("That verb has not been programmed."); else if (what != object) player:notify(tostr("Object ", object, " does not define that verb, but its ancestor ", what, " does.")); endif info = verb_info(what, vname); vargs = verb_args(what, vname); if (index(vargs[2], "/")) vargs = listset(vargs, $code_utils:short_prep(vargs[2]), 2); endif player:notify(tostr("@verb ", what, ":", $string_utils:print(info[3]), " ", $string_utils:from_list(vargs, " "), " ", info[2])); player:notify(tostr("@prog ", what, ":", vname)); player:notify_lines(code); player:notify("."); endif . @verb #2693:"@props @properties" any none none r @program #2693:@props "Copied from Quinn (#19845):@props Sat Feb 27 23:26:31 1993 PST"; "@properties -- a list of the readable properties on `object'"; dobj = player:my_match_object(dobjstr); if ($command_utils:object_match_failed(dobj, dobjstr)) return; endif props = properties(dobj); set_task_perms(player); if (props) names = {}; for p in (props) value = property_info(dobj, p); names = {@names, value ? p | value}; endfor else names = props; endif player:tell(";properties(", dobj, ") => ", $string_utils:print(names)); "...oh btw: i KNOW this allows people to read my properties. don't care..."; . @verb #2693:"record_attribute_change" this none this xd @program #2693:record_attribute_change ":record_attribute_change(cp, att, val, time)"; "{character, player, perms, attribute, value, time}"; trusted = {@this.people, #43860, #37114, cc = caller.character, #31829, #21077, #30048, #10889, #3118}; boring = {"aggressor", "act"}; if (((((is_player(cc) && (cc != #52165)) && (cc.owner != player)) && (!(args[2] in boring))) && (args[1] != this)) && ((player in #46.gms) && (!(player in trusted)))) info = {cc, player, @args, time()}; this.attribute_changes = listappend(this.attribute_changes, info); endif . @verb #2693:"gac gdl" this none this @program #2693:gac "attribute-changes: {character, player, perms, attribute, newvalue, time}"; "death-logs: {victim-character, perms, killer, time}"; "This is not intended for use as a public verb and the values above may change at any time."; "When attribute changes are concerned, the `player' is, in most cases, the culprit. Many changes use my (Quinn's) perms, so don't start screaming that I'm changing everyone's stats."; if (!$local.rpg:trusted(caller_perms())) return E_PERM; endif res = (verb == "gac") ? this.attribute_changes | this.deathlog; if ((l = length(res)) > 75) res = res[l - 74..l]; endif return res; "DR 20-APR-94 -- Added perms check."; "Slither 6/14/95 -- truncated result if long"; . @verb #2693:"record_death" this none this xd @program #2693:record_death ":record_death(cp[, whoby]) -- {victim, perms, killer, time}"; args = {@args, player}; this.deathlog = listappend(this.deathlog, {caller.character, @args[1..2], time()}); . @verb #2693:"reset_logs" this none this @program #2693:reset_logs if (caller_perms() in this.people) this.deathlog = this.attribute_changes = {}; endif . @verb #2693:"old_improve(from#74)" this any none rxd @program #2693:old_improve(from#74) if (!#46:trust()) return E_PERM; endif if (pos = (skill = args[1]) in #46.atts) if (((ease = #46.learn[pos]) > 0) && (random(ease) == 1)) skillval = this.(skill); if (skillval < random(25)) this.(skill) = this.(skill) + 1; elseif (random(500) > this.total) this.total = this.total + 1; this.pot = this.pot + 1; endif elseif ((deps = {@#46.attdeps[pos][1], @#46.attdeps[pos][2]}) != {}) this:improve(deps[random(length(deps))]); endif endif . @verb #2693:"old_total(from#74)" this any none rxd @program #2693:old_total(from#74) if (!#46:trust()) return E_PERM; endif attloc = (attnam = args[1]) in #46.atts; skill = this.(attnam); deps = #46.attdeps[attloc]; for att in (deps[1]) skill = skill + this.(att); endfor for att in (deps[2]) skill = skill + this:total(att); endfor return skill; . @verb #2693:"old_resolve(from#46)" this none this @program #2693:old_resolve(from#46) if (!(caller_perms() in #46.gms)) return E_PERM; elseif (valid(doll = #46:get_doll(args[1]))) n = (att = args[2]) in #46.atts; pen = (((4 + (#46.inj_penalty[n] * doll.inj)) + (#46.ins_penalty[n] * doll.ins)) + ((z = #46.enc_penalty[n]) ? (z * doll:encumbrance()) / 10 | 0)) / 10; res = this:roll(doll:total(att) + args[3]) - pen; if (((res > -20) && (res < (20 - pen))) && (length(args) == 3)) doll:improve(att); endif doll.last_action = time(); return res; else return -200; endif . @verb #2693:"def_att(from#46)" any any any rxd @program #2693:def_att(from#46) if (!(player in {#2693, @#2693.players})) return E_PERM; endif skill = args[1]; raw = (length(args) > 1) ? args[2] | {}; total = (length(args) > 2) ? args[3] | {}; learn = (length(args) > 3) ? args[4] | 8; if (typeof(raw) == STR) raw = {raw}; endif if (typeof(total) == STR) total = {total}; endif if (total) penc = pinj = pins = 0; for y in (total) pinj = pinj + #46.inj_penalty[y in #46.atts]; pins = pins + #46.ins_penalty[y in #46.atts]; penc = penc + #46.enc_penalty[y in #46.atts]; endfor pins = (pins + (length(total) / 2)) / length(total); pinj = (pinj + (length(total) / 2)) / length(total); penc = (penc + (length(total) / 2)) / length(total); elseif (length(args) < 5) player:tell("Remember to set the injury and insanity penalties"); pinj = pins = penc = 0; endif old = skill in this.atts; if (old == 0) this.atts = listappend(this.atts, skill); this.attdeps = listappend(this.attdeps, {raw, total}); this.learn = listappend(this.learn, learn); this.inj_penalty = listappend(this.inj_penalty, (length(args) < 5) ? pinj | args[5]); this.ins_penalty = listappend(this.ins_penalty, (length(args) < 6) ? pins | args[6]); this.enc_penalty = listappend(this.enc_penalty, (length(args) < 7) ? penc | args[7]); return 1; else this.attdeps = listset(this.attdeps, {raw, total}, old); if (length(args) > 3) this.learn = listset(this.learn, learn, old); endif if (length(args) > 4) this.inj_penalty = listset(this.inj_penalty, args[5], old); endif if (length(args) > 5) this.ins_penalty = listset(this.ins_penalty, args[6], old); endif if (length(args) > 6) this.enc_penalty = listset(this.enc_penalty, args[7], old); endif return 2; endif . @verb #2693:"set_lrn(from#46)" none none none rxd @program #2693:set_lrn(from#46) if ((((caller == #-1) && (player != this.owner)) && (!player.wizard)) || (((caller > #-1) && (caller.owner != this.owner)) && (!caller.owner.wizard))) return 0; endif skill = args[1]; if (typeof(skill) != STR) return 0; else learn = args[2]; pos = skill in #46.atts; if (pos) #46.learn = listset(#46.learn, learn, pos); return 1; else #46.atts = listappend(#46.atts, skill); #46.learn = listappend(#46.learn, learn); #46.attdeps = listappend(#46.attdeps, {}); return 2; endif endif . You sense that Guest is looking for you in Atrium. He pages, "Hello" @verb #2693:"del_att(from#46)" this none this @program #2693:del_att(from#46) skill = args[1]; n = skill in this.atts; if (((caller == #-1) && (!(player in this.gms))) || ((caller != #-1) && (!(caller.owner in this.gms)))) player:tell("Permission denied by role-playing system."); return; endif if (n == 0) player:tell("No such skill."); return; endif this.atts = listdelete(this.atts, n); this.attdeps = listdelete(this.attdeps, n); this.learn = listdelete(this.learn, n); if (skill in properties(#74)) delete_property(#74, skill); player:tell("Attribute \"", skill, "\" deleted from database and dolls."); else player:tell("Attribute \"", skill, "\" deleted from database, not present on dolls."); endif . @verb #2693:"grep_and_replace" this none this rx @program #2693:grep_and_replace "Copied from Quinn (#19845):grep_and_replace Thu Aug 19 10:41:25 1993 PDT"; ":grep_and_replace(object|object_list, sublist[, prompt])"; "Regex search-and-replace."; "If 'prompt' is not given or true, ask yes-or-no before changing each verb."; if (caller_perms() != this.owner) "... for where I'm NOT a wizard ..."; return E_PERM; endif set_task_perms(caller_perms()); subsets = args[2]; prompt = {@args, 1}[3]; maxsub = 6; for object in ((typeof(o = args[1]) == LIST) ? o | {o}) objchanged = 0; for x in [0..(lv = length(verbs(object))) - 1] names = verb_info(object, v = tostr(x))[3]; changes = {}; for l in [1..length(code = verb_code(object, v))] for set in (subsets) sc = maxsub; verbchanged = 0; while ((rm = rmatch(line = code[l], set[1])) && ((sc = sc - 1) > 0)) subs = rm[3]; for i in [1..length(set) / 3] index = set[i * 2]; redex = set[(i * 2) + 1]; code[l] = line = tostr(line[1..max(subs[index][1] - 1, 1)], redex, line[min(subs[index][2] + 1, ll = length(line))..ll]); endfor verbchanged = verbchanged + 1; endwhile endfor if (verbchanged) changes = {@changes, {l, line}}; endif if ($command_utils:running_out_of_time()) player:notify(tostr("... Suspending after ", $string_utils:nn(object), " (", x, "/", lv - 1, ")")); suspend(random(2) - 1); endif endfor if (changes) player:notify(tostr(";", object, ":", names)); for set in (changes) player:notify(tostr($string_utils:right(set[1], 4), ": ", set[2])); endfor if (prompt && (!$command_utils:yes_or_no("Change this verb?"))) player:notify("**** Aborted."); elseif (r = set_verb_code(object, v, code)) player:notify("**** Failed: " + r[1]); for line in (listdelete(r, 1)) player:notify(" " + line); endfor elseif (changes) objchanged = objchanged + 1; endif endif endfor player:notify(tostr("---- ", objchanged, " changes to ", $string_utils:nn(o bject), ".")); endfor . @verb #2693:"@name" any is any @program #2693:@name "Copied from Quinn (#19845):@name Wed Sep 1 11:19:35 1993 PDT"; "@name object as newname -- Changes objects name without buggering with aliases."; if (caller != this) player:tell("@copy #19845:@name to me."); return E_PERM; elseif (!(dobjstr && iobjstr)) player:tell("@name is "); return E_ARGS; endif object = player:my_match_object(dobjstr); if ($command_utils:player_match_failed(object, dobjstr)) "...you foolish swine! choose a valid object!..."; return E_INVARG; elseif (typeof(result = object:set_name(iobjstr)) == ERR) player:tell("Couldn't set the name of ", $string_utils:nn(object), " => ", result, "."); return result; else player:tell("Name of ", $string_utils:nn(object), " set to \"", object.name, "\"."); return 1; endif . @verb #2693:"@sweeplog @sweep-log" any none none rxd @program #2693:@sweeplog "@sweep-log [num] -- Show RPG vacuum cleaner performance stats."; " Optional arg limits the output to the last 'num' sweeps."; header = tostr($string_utils:centre("Start Time", 28), " ", "Duration", " ", "Recycled", " ", "Remaining", " ", "Doomed"); lengthlog = length(sweeplog = #10161.sweep_log); range = dobjstr ? min(lengthlog, tonum(dobjstr)) | lengthlog; for info in (sweeplog[1..range]) msg = {}; for i in (info[6]) msg = {@msg, tostr(" ", i[1], " ", i[2] ? "(DOOMED)" | "", " while in ", $string_utils:name_and_number_list(i[3]), ".")}; endfor line = tostr(player:ctime(info[1]), " ", $string_utils:right($time_utils:dhm s(info[2] - info[1]), 8), " ", $string_utils:right(tostr(info[4]), 8), " ", $string_utils:right(tostr(info[3] - info[4]), 9), " ", $string_utils:right(tos tr(info[5]), 6)); player:tell_lines({header, line, "", @msg, "", ""}); endfor player:tell("----- End Sweep-Log"); . @verb #2693:"@propedit .propedit" any any any r @program #2693:@propedit "Copied from Quinn (#19845):@propedit Mon Sep 27 12:14:46 1993 PDT"; set_task_perms(player); if (caller != this) "...hack since i lack wizperms here..."; return E_PERM; endif if (!(spec = $code_utils:parse_propref(dobjstr))) player:tell("Usage: ", verb, " . [as string|list]"); elseif ($command_utils:object_match_failed(object = player:my_match_object(spec [1]), spec[1])) "...no matching object..."; elseif ((value = object.(propname = spec[2])) == E_PROPNF) "...property doesn't exist..."; player:tell("That object does not have that property definition."); elseif ((dt = typeof(value)) == ERR) "...some other kind of error..."; player:tell("(", value, ") Command aborted."); elseif ((!(dt in {STR, LIST})) || ((dt == LIST) && ((value != {}) && (typeof(value[1]) != STR)))) "...only allow players to edit a string or list a list of strings..."; player:tell(object.name, "(", object, ").", propname, " is not a string or a list of strings."); else save_as = (prepstr == "as") ? index(iobjstr, "str") ? STR | (index(iobjstr, "list") ? LIST | dt) | dt; as_str = (save_as == STR) ? " as a single string." | " as a list of strings."; propref = tostr(object.name, "(", object, ").", propname); player:tell("Now entering text to ", propref, as_str); if (lines = $command_utils:read_lines()) result = object.(propname) = (save_as == STR) ? $string_utils:from_list(lin es) | lines; if (typeof(result) == ERR) player:tell("(", result, ") Property not written to."); else player:tell("Text written to ", propref, as_str); endif endif endif . @verb #2693:"clear_equipment" this none this rx @program #2693:clear_equipment ":clear_equipment(@classes)"; "Clears all property values identical to those on their parent."; if (!$local.rpg:is_grandmaster(caller_perms())) return E_PERM; endif total = {}; for w in (args) cleared = already = changed = 0; properties = properties(w); for o in (d = $object_utils:descendants_suspended(w)) for p in (properties) if ((ticks_left() < 100) || (seconds_left() < 2)) suspend(1 + random(5)); player:tell("... suspending ", w, ":", o in d, "/", length(d), "-(", cleared, "c)-(", changed, "o)-(", already, "a)"); endif if (is_clear_property(o, p)) already = already + 1; elseif (o.(p) == parent(o).(p)) clear_property(o, p); cleared = cleared + 1; else changed = changed + 1; endif endfor endfor player:tell(cleared, " properties of ", $string_utils:nn(w), " cleared."); player:tell(already, " were already clear."); player:tell(changed, " were genuinely opaque."); total = {@total, {w, cleared, already, changed}}; endfor return total; . @verb #2693:"@desc*ribe" any as any @program #2693:@describe "@describe as "; "Describe the given object with the text of 'description'. You may use the caret (^) character to represent line breaks in your description text."; set_task_perms(player); dobj = player:my_match_object(dobjstr); if ($command_utils:object_match_failed(dobj, dobjstr)) return E_INVARG; endif desc = index(iobjstr, "^") ? $string_utils:explode(iobjstr, "^") | iobjstr; if (e = dobj:set_description(desc)) player:notify(("Description for " + $string_utils:nn(dobj)) + " set."); elseif (e == E_PERM) player:notify(("You aren't allowed to set the description of " + $string_utils:nn(dobj)) + "."); else player:notify(tostr("Couldn't set the description of ", $string_utils:nn(dobj ), ": ", e)); endif . @verb #2693:"@showdeaths" any none none xd @program #2693:@showdeaths if (!$local.rpg:trust()) return; endif who = $string_utils:match_player(args[1]); if ($command_utils:player_match_failed(who, args[1])) return; endif for each in (this.deathlog) if (each[1] == who) player:tell("Vicitim: ", tostr(each[1]), " Perms: ", tostr(each[2]), " Killer: ", tostr(each[3]), " Time: ", ctime(each[4])); endif endfor player:tell(verb, " complete."); . @verb #2693:"sheet(backup)" this none this @program #2693:sheet(backup) "Modified 12/9/92 to simplify security dr"; if (!this:trust()) player:tell("From this:sheet."); return; 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 suff = ((((suff + $string_utils:left((length(atts[q].name) < 13) ? atts[q].name | atts[q].name[1..12], 13)) + zs) + " (") + $string_utils:right(t ostr(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))); . @verb #2693:"_chparent" any to any xd @program #2693:_chparent "Extra code to facilitate creating RPG objects."; if (length(callers()) != 1) return E_PERM; endif if (((caller_perms() == this) && (callers()[1][2] == "@chparent")) && (callers()[1][1] == this)) $code_utils:verb_or_property(args[2], "make_fertile"); endif return pass(@args); . @verb #2693:"mail_forward" this none this @program #2693:mail_forward return setremove(setremove($local.rpg.grand_masters, this), #34876); . @verb #2693:"grep" this none this rx @program #2693:grep "Copied from Quinn (#19845):grep Mon Jul 11 22:18:34 1994 PDT"; ":grep(object|object_list, regex-string)"; if (caller_perms() != this.owner) "... for where I'm NOT a wizard ..."; return E_PERM; endif set_task_perms(caller_perms()); string = args[2]; for object in ((typeof(o = args[1]) == LIST) ? o | {o}) total = 0; for x in [0..(lv = length(verbs(object))) - 1] names = verb_info(object, v = tostr(x))[3]; found = {}; for l in [1..length(code = verb_code(object, v))] if (m = match(line = code[l], string)) found = {@found, {l, line}}; endif if ($command_utils:running_out_of_time()) player:notify(tostr("... Suspending after ", $string_utils:nn(object), " (", x, "/", lv - 1, ")")); suspend(random(2) - 1); endif endfor if (found) player:notify(tostr(";", object, ":", names)); for set in (found) player:notify(tostr($string_utils:right(set[1], 4), ": ", set[2])); endfor endif endfor player:notify(tostr("---- Found ", total, " occurences in ", $string_utils:nn(object), ".")); endfor . @verb #2693:"@par*ents" any none none rx @program #2693:@parents "'@parents ' - List and its ancestors, all the way back to the Root Class (#1)."; if (!dobjstr) player:notify(tostr("Usage: ", verb, " ")); return; else o = $string_utils:match_object(dobjstr, this.location); endif if (!$command_utils:object_match_failed(o, dobjstr)) player:notify($string_utils:names_of({o, @$object_utils:ancestors(o)})); endif . @verb #2693:"i inv*entory" none none none rxd @program #2693:i "Copied from Sick's Slightly Sick Player Class (#40099):inventory by Sickness (#57140) Sun Jan 29 19:09:04 1995 PST"; stuff = player:contents(); short = long = {}; width = player:linelen(); objlen = length(tostr(max_object())); for thing in (stuff) name = tostr($string_utils:right(thing, objlen), " ", thing:title()); if (length(name) < (width / 2)) short = {@short, name}; else long = {@long, name}; endif endfor player:tell_lines((short || long) ? {"Carrying:", @$string_utils:columnize(shor t, 2, width), @long} | {"You are empty-handed."}); "... Dred 5/26/94, empty-handed bit"; "... Written by Sick, 7 Jan 93"; . @verb #2693:"fiddle_options" this none this rx @program #2693:fiddle_options ":fiddle_options() -- set the options in this.options_to_set to the values of this.who's options."; if (caller != this) return E_PERM; elseif (!((who = this.who) in this.people)) this:unfiddle_options(); else for option in (this.options_to_set) what = (typeof(x = who.(option)) == ERR) ? parent(this).(option) | x; this.(option) = what; endfor this:set_linelength(who.linelen, 1); this:notify(("Options set to those of " + $string_utils:nn(who)) + "."); endif . @verb #2693:"unfiddle_options" this none this rx @program #2693:unfiddle_options ":unfiddle_options() -- make all the options in this.options_to_set clear."; if (caller != this) return E_PERM; else for option in (this.options_to_set) clear_property(this, option); endfor this:set_linelength(parent(this).linelen, 1); if (this in connected_players()) this:notify("Options reset to default."); endif endif . @verb #2693:"read_error_msgs" this none this @program #2693:read_error_msgs if (caller_perms() in {this, @this.people}) return this.error_msgs; endif . @verb #2693:"report_error" this none this @program #2693:report_error if (caller_perms() == this) this.error_msgs = {@this.error_msgs, args[1]}; return 1; else return E_PERM; endif . @verb #2693:"@clear_error_msgs" none none none rxd @program #2693:@clear_error_msgs if (player in {this, @this.people}) this.error_msgs = {}; return 1; else return E_PERM; endif . "***finished***