"A dump of #18754 on Sun Dec 17 13:52:07 1995 PST @create #9296 named rpx generic light source:rpx generic light source,ball of brightness @prop #18754."fuel_packets" 68 r @prop #18754."home" #16020 rc @prop #18754."burning_desc" "A small translucent orb, furiously shedding light on the scene." rc @prop #18754."burning" 0 r @prop #18754."max_charges" 0 "" @prop #18754."candlefeet" 1 rc @prop #18754."heart" #48923 rc ;;#18754.("help_msg") = {} ;;#18754.("encumbrance") = 1 ;;#18754.("manufactured") = 768182547 ;;#18754.("condition") = 100 ;;#18754.("key") = 0 ;;#18754.("aliases") = {"rpx generic light source", "ball of brightness"} ;;#18754.("description") = "A small translucent orb." ;;#18754.("object_size") = {8814, 819192358} @verb #18754:"description" this none this @program #18754:description if (this.burning) return this.burning_desc; else return pass(@args); endif . @verb #18754:"douse ex*tinguish" this none none rx @program #18754:douse if (!$local.rpg:trusted()) return E_PERM; endif if ((player.location != this.location) && (this.location != player)) player:tell("You cannot reach ", this.name, " from there."); return; endif if (!this.burning) player:tell("The ", this.name, " is not lit."); return; endif "OK, actually do the dousing."; this.burning = 0; $you:say_action("%N % a %t.", player, this); if ($local.rpg:trusted_verb(this.location, "illumination_check")) this.location:illumination_check(); endif if ($local.rpg:trusted_verb(this.location.location, "illumination_check")) this.location.location:illumination_check(); endif this.heart:remove(this); "DR 22-MAR-94 -- Fixed permissions check bug and added location check, cleaned up the logic for better readability."; "DR 06-AUG-94 -- Added heart functionality."; "Profane 28-FEB-95 -- s/$object_utils:has_verb/$local.rpg:trusted_verb/1-$"; "Profane 4-MAR-95 -- changed message announcing to $you:say_action. Maybe others will actually SEE the message now."; . @verb #18754:"light" this none none rxd @program #18754:light if (callers() && (!$local.rpg:trusted(caller_perms()))) return E_PERM; endif if ((player.location != this.location) && (this.location != player)) player:tell("You can't reach ", this.name, " from there."); return; endif if (this.burning) player:tell("The ", this.name, " is already lit."); return; endif if (this.fuel_packets < 1) player:tell("The damn thing needs to be recharged. It doesn't work!"); return; endif this.fuel_packets = this.fuel_packets - 1; this.burning = 1; "Miles 5/21/94 made both .burning and .fuel_packets !c"; $you:say_action("%N % a %t.", player, this); if ((!$object_utils:isa(this.location, $room)) && valid(this.location.location) ) if ($local.rpg:trusted_verb(this.location.location, "illumination_check")) this.location.location:illumination_check(); endif elseif ($local.rpg:trusted_verb(this.location, "illumination_check")) this.location:illumination_check(); endif this.heart:add(this); "DR 22-MAR-94 - Added location check, rewrote for clarity."; "DR 06-AUG-94 -- Added functionality for the heart."; "DR 14-SEP-94 -- Fixed permissions bug."; "Profane 28-FEB-95 -- s/$object_utils:has_verb/$local.rpg:trusted_verb/1-$"; "Profane 4-MAR-95 -- changed message anouncing to a $you:say_action. Maybe others will actually SEE the message now."; . @verb #18754:"light(old)" this none none r @program #18754:light(old) if (this.fuel_packets > 0) if (this.fuel_packets == 1) this.fuel_packets = 0; else this.fuel_packets = this.fuel_packets - 1; endif if (this.burning < 1) this.burning = 1; this.location:announce(player.name, " lights the ", this.name); player:tell("You light the ", this.name); if ($object_utils:has_verb(this.location, "illumination_check")) this.location:illumination_check(); else if ($object_utils:has_verb(this.location.location, "illumination_check")) this.location.location:illumination_check(); endif endif else player:tell("The ", this.name, " is already lit."); endif else player:tell("The damn thing needs to be recharged. It doesn't work!"); endif . @verb #18754:"tell_condition" this none this rx @program #18754:tell_condition if (this.fuel_packets == 0) player:tell(("The " + this.name) + " is on its last legs!"); elseif (this.fuel_packets == this.max_charges) player:tell("The ", this.name, " is spiffy and new!"); return; else factor = this.max_charges / this.fuel_packets; if (factor > 1) if (factor > 2) player:tell(("The " + this.name) + " is looking quite exhausted."); else player:tell(("The " + this.name) + " is starting to look a bit tired."); endif endif endif . @verb #18754:"possible_glimmer" this none this rx @program #18754:possible_glimmer if (#46:trust()) if ((random(100) > 95) && $object_utils:has_callable_verb(args[1], "echo")) args[1]:echo("You notice a glimmer of light from somewhere nearby. Watch for more."); endif endif . @verb #18754:"condition" this none this rx @program #18754:condition factor = 0; if (this.max_charges) factor = 100 / this.max_charges; endif if (!factor) factor = 1; endif return this.fuel_packets * factor; "DR 22-MAR-94 - Originated. Sort of a stopgap, since max_charges>100 is not well handled."; . @verb #18754:"destroy" this none this @program #18754:destroy if (!$local.rpg:trust()) return E_PERM; endif if (this:locate(player) == this:location()) player:tell("The ", this.name, " crumbles to dust."); player.location:announce(player.name, "'s ", this.name, " crumbles to dust!"); else this.location:announce("A ", this.name, " quietly returns to dust."); endif this.owner:_recycle(this); if ($local.rpg:trusted_verb(this.location, "illumination_check")) this.location:illumination_check(); else if ($local.rpg:trusted_verb(player.location, "illumination_check") && (this.location == player)) player.location:illumination_check(); endif endif "DR 18-MAY-94 Moved from throwable to light source, where it belongs, added security check."; "Profane 2-MAR-95 13:33EST - s/$local.rpg:trusted()/$local.rpg:trust()/1 && s/$object_utils:has_verb/$local.rpg:trusted_verb/1-$ -- make security actually work"; . @verb #18754:"cpr" this none this rx @program #18754:cpr "then modified to do traditional RPG security check."; "Recompute order, then jump-start the heart."; if (!$local.rpg:trust()) return E_PERM; endif this.heart:add(this); . @verb #18754:"pulse" this none this @program #18754:pulse if (!$local.rpg:trust()) return E_PERM; endif if (this.burning) this:possible_glimmer(); endif . @verb #18754:"get(old)" this none none r @program #18754:get(old) oldloc = this.location; pass(@args); if (this.location != oldloc) if (!this.location.opaque) return; endif if ($object_utils:has_verb(this.location.location, "illumination_check")) this.location.location:illumination_check(); return; endif endif . @verb #18754:"moveto" this none this @program #18754:moveto db = $local.rpg; dest = args[1]; doll = db:get_doll(place = this.location); if ((valid(dest) && (valid(doll) && (dest.location == place))) && (!(dest.owner in db.gms))) return E_PERM; elseif ((!valid(place = this.location)) || (!valid(dest))) ok = db:trust(); elseif (place.location in {dest, dest.location}) ok = db:trust(place.owner, place); elseif (place == dest.location) ok = db:trust(dest); else ok = db:trust(); endif if (!ok) return E_PERM; else pass(dest); if ((((!valid(where = this.location)) || (where == place)) || $code_utils:verb_or_property(where, "opaque")) || 0) elseif ($local.rpg:trusted_verb(where, "illumination_check")) where:illumination_check(); elseif (valid(where = this.location.location) && $local.rpg:trusted_verb(wher e, "illumination_check")) where:illumination_check(); endif endif "Profane 4-MAR-95 13:00EST -- Added."; . "***finished***