"A dump of #9338 on Sun Dec 17 13:50:46 1995 PST @create #75122 named generic RPG container:generic RPG container @prop #9338."percent" 0 r @prop #9338."max" 0 r ;;#9338.("manufactured") = 768182547 ;;#9338.("condition") = 100 ;;#9338.("odrop_failed_msg") = "% to drop %t but fails!" ;;#9338.("odrop_succeeded_msg") = "% %t." ;;#9338.("otake_succeeded_msg") = "% up %t." ;;#9338.("key") = 0 ;;#9338.("aliases") = {"generic RPG container"} ;;#9338.("description") = "A non-weapon, non-armour piece of equipment that an end user of the system (player) might use in a VR way." ;;#9338.("object_size") = {5945, 819192328} @verb #9338:"encumbrance" this none this @program #9338:encumbrance ".percent is amount of encumbrance offset by the container."; ".max is the maximum amount of encumbrance that can be offset."; if ($local.rpg:trusted(this.owner)) offset = ($local.rpg:weight(this, args[1]) * this.percent) / 100; return -min(offset, this.max); else return 0; endif "Quinn 01-AUG-93 0212: Hacked to be a bit more readable; added comments."; . @verb #9338:"acceptable" this none this @program #9338:acceptable "Hacked to allow kids of $thing (including $local.rpg.equipment) only."; return $object_utils:isa(args[1], $thing); "return !(is_player(args[1]) || valid(#46:get_doll(args[1])));"; . @verb #9338:"pu*t ins*ert st*ore ca*che" any in this rxd @program #9338:put if ((!(caller in {this, player})) && (!$local.rpg:trusted(caller_perms()))) player:tell("See Grand_Master about remote calls to this verb."); elseif ((this.location != player) && (this.location != player.location)) player:tell("You don't have ", this.name, " with you."); elseif (!valid(doll = $local.rpg:get_doll(player))) player:tell(this.name, " seems to have some sort of childproof lock."); elseif (!this:is_unlocked_for(player)) player:tell(this.name, " seems to be locked."); elseif (dobjstr in {"all", "everything"}) this:transfer_all(verb, player); elseif ($command_utils:object_match_failed(dobj, dobjstr)) return; elseif (dobj.location != player) player:tell("You don't have that."); else dobj:moveto(this); if (dobj.location == this) player:tell("You store ", dobj.name, " in ", this.name, "."); player.location:announce(player.name, " stores ", dobj.name, " in ", this.name, "."); doll:invite(doll.slowness / 2); else player:tell("You can't seem to fit ", dobj.name, " into ", this.name, "."); endif endif "Quinn 01-AUG-93 0325: Hacked to handle 'all'."; . @verb #9338:"re*move ex*tract rec*over ge*t" any from this rxd @program #9338:remove dobj = $match_utils:match(dobjstr, this.contents); if ((!(caller in {this, player})) && (!$local.rpg:trusted(caller_perms()))) player:tell("See Grand_Master about remote calls to this verb."); elseif (!(this.location in {player, player.location})) player:tell("You don't have ", this.name, " with you."); elseif (!valid(doll = $local.rpg:get_doll(player))) player:tell(this.name, " seems to have some sort of childproof lock."); elseif (!this:is_unlocked_for(player)) player:tell(this.name, " seems to be locked."); elseif (dobjstr in {"all", "everything"}) this:transfer_all(verb, this); elseif ($command_utils:object_match_failed(dobj, dobjstr)) return; elseif (dobj.location != this) player:tell(this.name, " doesn't contain ", dobj.name, "."); elseif ((!$object_utils:isa(dobj, $local.rpg.equipment)) || dobj:ok_exchange(th is, player)) dobj:moveto(player); if (dobj.location == player) player:tell("You remove ", dobj.name, " from ", this.name, "."); player.location:announce(player.name, " removes ", dobj.name, " from ", this.name, "."); doll:invite(doll.slowness / 2); else player:tell("You can't seem to get ", dobj.name, " out of ", this.name, "."); endif endif "Quinn 01-AUG-93 0325: Hacked to handle 'all', and to check :ok_exchange."; . @verb #9338:"look_self" this none this @program #9338:look_self pass(@args); this:tell_contents(this:contents()); "Quinn 01-AUG-93 0219: Re-written, cleaned up; will eliminate improper calls to :contents after informing those who've programmed the verbs."; "Quinn 01-DEC-93 0219: oH screw it. Just made a call to :tell_contents. Let the tbks report the sorry folk who used :contents wrong."; . @verb #9338:"transfer_all" this none this @program #9338:transfer_all ":transfer_all(verb, from) -- Handle cache/retrieve 'all' or 'everything'."; "'verb' each object in the contents of 'from'."; db = $local.rpg; if (!db:trusted(caller_perms())) return E_PERM; endif xfer = args[1]; from = args[2]; equipment = $local.rpg.equipment; if (contents = setremove(from.contents, this)) while (contents && (this.location in {player, player.location})) if ($object_utils:isa(contents[1], equipment)) this:(xfer)(dobjstr = (dobj = contents[1]).name); endif if ((seconds_left() < 2) || (ticks_left() < 8000)) db:stop_time(0); endif contents = listdelete(contents, 1); endwhile else player:tell(from.name, " is empty", valid(db:get_doll(from)) ? "-handed." | "."); endif "Quinn 01-AUG-93 0326: Added."; "Quinn 09-AUG-93 0735: Changed to xfer RPG equipment only."; . @verb #9338:"exitfunc" this none this rx @program #9338:exitfunc "Hack to bring back objects stolen by puppets 'ported into packs."; what = args[1]; if (what.location.location == this) what:moveto(this); endif . @verb #9338:"tell_contents" this none this @program #9338:tell_contents ":tell_contents([contents]) -- Show what's inside the container."; contents = args ? args[1] | this:contents(); player:tell(this:title(), " contains ", $string_utils:title_list(contents), "."); . "***finished***