Sagebrush Inn Script

From Redwall MUCK Wiki


This is a script I wrote one day in 2004. It demonstrates build scripting (and some MPI) reasonably well, so feel free to try out bits and pieces to see how it works.


+newregion SageBrush Inn=$~env/ic=me:sagebrush

@set $sagebrush=wherename:~* The Sagebrush Inn *~

+reg sagebrush=me:sagebrush

@set $sagebrush=_msgmacs/wrap:{parse:line,{:1},{linewrap:{&line},{:2}, },\r,}

@set $sagebrush=_msgmacs/wrap2:{if:{:3},{parse:line,{:1},{linewrap:{&line},{:2},{:3}}},{tell:\{WRAP2\}: No wrap character specified.}}

@set $sagebrush=_msgmacs/rinstr:{subt:{add:{subt:{strlen:{:1}},{instr:{midstr:{:1},{strlen:{:1}},1},{midstr:{:2},-1,1}}},1},{subt:{strlen:{:2}},1}}

@set $sagebrush=_msgmacs/linewrap:{with:d,{:1},{with:w,{:2},{with:nl,1,{with:cl,{midstr:{&d},1,{&w}},{with:ft,,{if:{ne:{midstr:{&d},{add:{&w},1}},{:3}},{null:{set:cl,{if:{lt:{strlen:{&cl}},{&w}},{&cl},{midstr:{&cl},1,{rinstr:{&cl},{:3}}}}}}}{while:{le:{&nl},{strlen:{&d}}},{null:{set:nl,{if:{gt:{strlen:{&cl}},{&w}},{add:{rinstr:{&cl},{:3}},{&nl}},{add:{strlen:{&cl}},{&nl}}}}{if:{gt:{strlen:{&cl}},{&w}},{set:cl,{midstr:{&cl},1,{rinstr:{&cl},{:3}}}}}{set:ft,{&ft}{strip:{&cl}}\\r}{set:cl,{midstr:{&d},{&nl},{add:{&nl},{&w}}}}}}{eval:{&ft}}}}}}}

@set $sagebrush=_msgmacs/swidth:{if:{isnum:{prop:_prefs/screenwidth,me}},{abs:{prop:_prefs/screenwidth,me}},80}

@set $sagebrush=_msgmacs/fmtex:{wrap2:{:1},{swidth},\,}

@set $sagebrush=_msgmacs/regdesc:{if:{lt:{swidth},50},Error: Your screenwidth is too low for this description to be viewed properly. Please set it to a higher value.,{center:,{swidth},-}\r{if:{prop:desc},{wrap:{exec:desc},{swidth}},{if:{prop:rdesc/{ref:here}},{wrap:{exec:rdesc/{ref:here}}},You see nothing special.\r}}{center:, {swidth},-}}

@set $sagebrush=_msgmacs/maindesc:{regdesc}\r{center:Exits:,{swidth}}\r{parse:l,{fmtex:{parse:s,{lsort:{parse:x,{filter:x2,{exits:this},{not:{instr:{flags:{&x2}},D}}},{strip:{name:{&x}} {default:{exec:_extext,{&x}},}}}},{&s},\r,\, }},{center:{&l},{swidth}}}\r{center:,{swidth},-}

@set $sagebrush_msgmacs/table:{null:{for:i,1,{add:{if:{mod:{count:{:1},{:4}},{div:{:3},{:2}}},1,0},{div:{count:{:1},{:4}},{div:{:3},{:2}}}},1,{with: {for:i2,{&i},{if:{gt:{add:{&i},{div:{:3},{:2}}},{count:{:1},{:4}}},{count:{:1},{:4}},{div:{:3},{:2}}},1,{left:{sublist:{:1},{&i2},{&i2},{:4}},{

{table:list,field width,table width,input delimiter}

---

@dig Entrance Hall=$sagebrush=$sagebrush:entry=indoors

@set $sagebrush:entry=display_exits:no

@desc $sagebrush:entry={maindesc}

@set $sagebrush:entry=desc:This entrance hallway to the posh Sagebrush Inn rather belies the elegance and charm of the establishment, for, while it is not a complete wreck by any stretch of the imagination, it is nonetheless quite the worse for wear. Papers lay strewn about, and the floor, once a beautifully stained cherry wood, is marked and grooved, faded and worn from the inexorable assault of time upon its aging grain. Sparsely furnished and lit with candles guttering doggedly but dimly in their sconces, it seems that, despite its slightly shabby upkeep, this is the central nexus for a bustling inn.\rOn the northeast side of the hallways stands a heavily scratched counter, {if:{dbeq:{loc:$pierre},this},behind which the mouse concierge\, {name:$pierre}\, stands in deference to your patronage.,abandoned at present\, but with a bell you could 'ring' for service.} On the front of the counter hangs a 'sign'.\r{exec:desc2}

@set $sagebrush:entry=desc2:Through the doorway to the east lies the common room, from which the sounds of merrymaking issue, among them the clink of glasses and the raucous laughter of vermin and goodbeasts alike. The south doorway leads into the library, and a locked door on the southwest wall leads into the proprietor's office, where no doubt Wytethorn retires to at night.

@set $sagebrush:entry=_details/sign;help:{list:sign}

lsedit $sagebrush:entry=sign

.del ^ $

+---------------------------------------------+

| ~@ Sagebrush Inn: Help @~ |

|=============================================|

| Welcome to the Sagebrush Inn. Commands: |

| - ring: calls Pierre to the counter |

| - rooms: lists rooms in the inn |

| - request : checks you in |

| - returnkey: checks you out |

| - roomhelp: displays more verbose help |

| - innhelp: displays inn commands |

|_____________________________________________|

.end

@act roomhelp=$sagebrush=$sagebrush:act/roomhelp=$nothing

@succ $sagebrush:act/roomhelp={list:succ}

lsedit $sagebrush:act/roomhelp=succ

.del ^ $

+------------------------------------------------------------------------------+

| ~@ Sagebrush Inn: Room Help @~ |

|==============================================================================|

| The Sagebrush Inn currently offers a selection of four beautifully |

| furnished rooms, each with a unique theme and tailored to the varying |

| needs of our customers. |

| |

| Room checkin and checkout (and related): **note: Entrance Hall Only** |

| - ring (Call Pierre to the front counter to check out a room) |

| - rooms (Display room availability information) |

| - request (Check into the specified room, if it is available) |

| - returnkey (Check out) |

| - lead (Tell Wesley to lead you to your room) |

| |

| In-room commands: |

| - lock/unlock (Lock or unlock the door to your room, to allow others in |

| or keep them out. Door locks automatically on your exit. |

| Note that you can also use +ride to bring players into |

| your room. [see '+help +ride']) |

| - sweep [] (Sweep someone from your room, or sweep all sleepers) |

| - @link me=here (Set the room as your home) |

| |

| Help for using the pillow fight commands (in rooms with 'Bed' objects), |

| is available with the 'pillow' command. |

| Additional commands may be added later. |

|______________________________________________________________________________|

.end

@dig Library=$sagebrush=$sagebrush:library=indoors

@set $sagebrush:library=display_exits:no

@desc $sagebrush:library={maindesc}

@set $sagebrush:library=desc:Shelf after shelf, ten in all, fill out this room, each of them fairly teeming with books. Together they lend an air of dignity and elegance to the cozy room. A number of comfortable-looking armchairs are set around the room, perfect for dipping into ancient lore or more recent texts, for exploring both the world of the imagination and of fact. The sound from the common room is muffled here, absorbed by the book-lined 'shelves', which create a barrier between you and the world, ensconce even the most casual of passers-by in a separate realm. At points along the wall, there are 'carvings' and 'artifacts', bits and pieces from Wytethorn's past.\rThe air here is musty, thick with the scent of aged parchment, redolent, naturally, of books. Occasionally, a draft from the hallway relieves the heavy air, but it always settles again soon.\rA doorway leads back to the entrance hall of the inn.

smell #set $sagebrush:library=The air is musty, thick with the scent of old books and tattered scrolls. Occasionally, a draft from the hallway relieves the heavy air, but it always settles again soon.

@set $sagebrush:library=_details/shelves:Perusing the shelves, a number of titles catch your eye, candidates for further investigation:\r\r... Titles Forthcoming ...

@set $sagebrush:library=_details/carvings:You glance carefully at the carvings and see that they are unfinished at present.

@set $sagebrush:library=_details/artifacts:The artifacts are currently hidden from view.

@create Comfortable Chair=$sagebrush:library=$sagebrush:obj/comfychair

@desc $sagebrush:obj/comfychair=A deep, comfortable chair.

@dig Common Room=$sagebrush=$sagebrush:commonroom=indoors

@set $sagebrush:commonroom=display_exits:no

@desc $sagebrush:commonroom={maindesc}

@set $sagebrush:commonroom=desc:The common room is the center of activity for the inn, perpetually bursting with life, alive at all times with singing and drinking and merrymaking and all the attendant smells and sounds. Four sturdy oak tables dominate the large but stuffy room, built with the single-minded purpose of longevity. These long wooden structures, and their accompanying benches, set the tone for the room, because while they are not ornate, not fashioned with beauty in mind, the nicks and marks down its old surface exude character. Each chink and chip, each sullied corner or patched-up leg bears witness to the ages that the inn has traversed. A bar fills the west side of the room{if:{and:{contains:$wesley,here},{awake:$wesley}},\, currently tended by Wesley}, and in more or less the center of everything is an open space on the floor. On one wall is a message board, for anybeast to make an announcement.\r{exec:desc2}

@set $sagebrush:commonroom=desc2:The smell of cheap ale and smoke clings perpetually to the stuffy air here, as much a part of the environment here as anything, not unpleasant, but always present.

smell #set $sagebrush:commonroom=Though a breeze flows steadily through the room, the smell of cheap ale and smoke clings always to this place and to its contents.

@set $sagebrush:commonroom=_arrive/footsteps:,1},{null:{foreach:p,{contents:$libbies},{tell:You hear footsteps from the room above.,{&p}}}}}

@dig Office=$sagebrush=$sagebrush:office=indoors

@set $sagebrush:office=display_exits:no

@desc $sagebrush:office={maindesc}

@set $sagebrush:office=desc:The proprietor's office is simply furnished, utilitarian in design, with a sturdy but unadorned desk set squarely in the middle. Despite its functional design, this office is not without its simple beauty. The polished wood floor stands in contrast to the largely simplistic decor. Likewise, the pillars carved into the corners recall an older time, lend an air of regal pulchritude to the place. It is is a blending of the old and the new.\rThree doors lead out of this small office.

@dig Bedroom=$sagebrush=$sagebrush:bedroom=indoors

@set $sagebrush:bedroom=display_exits:no

@desc $sagebrush:bedroom={maindesc}

@set $sagebrush:bedroom=desc:A small but tidy bedroom. A small bookshelf holds a few of Tristram's treasured favorites, heirlooms, perhaps, from long ago. The bed is small and lonely, occupying most of the western wall. A small rectangular hole in the wall lets light pass into the room from outside.

@dig Second Floor=$sagebrush=$sagebrush:floor2=indoors

@set $sagebrush:floor2=display_exits:no

@desc $sagebrush:floor2={maindesc}

@set $sagebrush:floor2=desc:A long, narrow hallway stretches out before you, decked out not with extravagance but with simple, discriminating taste. It is evident here how the Sagebrush Inn has achieved its considerable renown for luxury and comfort. Despite being alongside a main thoroughfare, here anybeast might be entranced by the prospect of affluent splendor that the inn affords. A rug is laid out down the length of the hall, thick and soft beneath even the most calloused of paws. Decorating the walls at intervals are small trinkets, heirlooms, no doubt, from the innkeeper's, Tristram Wytethorn's, illustrious past. Candles, several of them, cast a dreamy spell on the room, a light that falters now, then flickers, then steels itself and shines again with renewed strength.\rAn alcove opens up on the west side of the hall. A door there enters the Babblecreek Bungalow, and there the stairs to the floor below reside. Along the east wall are doors leading into the other three elegant {exec:desc2}

@set $sagebrush:floor2=desc2:rooms of the Sagebrush Inn, each as fine as the last: The Nightfrost Suite, the Elmwood Room, and the Sagebrush Den.

@dig Kitchen=$sagebrush=$sagebrush:kitchen=indoors

@set $sagebrush:kitchen=display_exits:no

@desc $sagebrush:kitchen={maindesc}

@set $sagebrush:kitchen=desc:The ample cooking space of the Sagebrush Inn is replete with all manner of cooking implements, from the exotic to the mundane. There are three counters here, each bedecked with fruits and fish and plants, pots and knives and pans, and each with a floating cabinet above, secured to the ceiling. Every possible amenity that the head chef might need is present in this room.\rA swinging door to the west leads into the common room, where the din of countless patrons rings out perpetually above the clatter and clank of the kitchen. A cool breeze flows into the often stuffy kitchen from outside. There, through the eastern door, lies the garden.

smell #set $sagebrush:kitchen=The air always smells good in the kitchen.

@

@set $sagebrush:elmwood=display_exits:no

@desc $sagebrush:elmwood={maindesc}

+reg $sagebrush:ewroom=$sagebrush:elmwood

@set $sagebrush:elmwood=_innkey:$ewkey

@set $sagebrush:elmwood=desc:The darkened hues of this plant-themed room offer a therapeutic reprieve from the daily grind. Though the occasional loud sound will impose itself dimly on your consciousness, here, in this room, the Elmwood Room, you are largely cushioned from the crass cacophony of the outside world. Two trees, each the height of the ceiling, rise up on either side of the door, consummating your passage into this quiet, sacred realm.\rA large double bed stands as an island of restfulness in the sea of greens and blues. {if:{not:{prop:_pillowfight?,$obj/bed1}},Piled high with pillows,Though the covers and pillows are in a bit of disarray from a recent pillow fight\, nevertheless}, its enticing draw can be quite irresistible to the sleepy dibbun or the sore-limbed warrior alike. Truly this is luxury.

smell #set $sagebrush:elmwood=The scent of plants, of sap and nectar, swims lightly about this room, not too strong, but providing instead a soothing base.

@dig Nightfrost Suite=$sagebrush=$sagebrush:nightfrost=indoors

@set $sagebrush:nightfrost=display_exits:no

@desc $sagebrush:nightfrost={maindesc}

+reg $sagebrush:nfroom=$sagebrush:nightfrost

@set $sagebrush:nightfrost=_innkey:$nfroom

@set $sagebrush:nightfrost=desc:The icy blue decor of this room calls quickly to mind the name, and, indeed, the cool, crystalline look of the ensemble here could chill anybeast to the bone even in the dead of summer, were it not for the fireplace. The chuckling fire, roaring in yellow and white and red, merrily staves off the cruel bite of winter and lends a strong but beautiful light to the room. Furthering the winter theme are beautiful glass sconces on the walls, each delicately made, each sheltering a tiny, flickering flame.\rA dark blue bed, wide and vast to tired eyes, stands in luxuriant contrast to the rest of the room, piled high with thick coverlets and deep pillows. A pair of slippers rests at the foot of the bed, a courtesy detail for those whose paws need pampering.

@dig Sagebrush Den=$sagebrush=$sagebrush:sagebrush=indoors

@set $sagebrush:sagebrush=display_exits:no

@desc $sagebrush:sagebrush={maindesc}

+reg $sagebrush:sbroom=$sagebrush:sagebrush

@set $sagebrush:sbroom=_innkey:$sbkey

@set $sagebrush:sagebrush=desc:Furnished everywhere in cherry wood and mahogany, this elegant room reflects the tastes of its namesake. Though the bed is done up with towering pillows and thick covers, it is the oversized armchair that beckons most strongly. Upholstered with leather and ensconced in a little alcove, it offers rest from the daily toil. Nearby, a bookshelf, redolent of pine, stands against the wall. Atop it is a small, complimentary pouch of tobacco.\rA fireplace is situated opposite the chair, ready at any time to fight off the pangs of cold that sometimes penetrate this far into the inn.

@dig Babblecreek Bungalow=$sagebrush=$sagebrush:babble=indoors

@set $sagebrush:babble=display_exits:no

@desc $sagebrush:babble={maindesc}

+reg $sagebrush:bcroom=$sagebrush:babble

@set $sagebrush:bcroom=_innkey:$bckey

@set $sagebrush:babble=desc:Named for the babbling creek that is directly outside, the Babblecreek Bungalow gives the sense of being far removed from the bustle of daily life, while in the very heart of a busy inn. A large opening in the north wall affords a view of the creek gurgling past, allows the coolness of the outdoor air to filter in. The design of this room merges the comforts of contemporary life with the beauty of the natural world outside. Ivy climbs up the stone walls, and rain dribbles now and then from the window. A large, comfortable bed faces towards the window, piled with pillows and very enticing. Though this room is not for everybeast, it is certainly a refreshing change of pace for most.

@dig Garden=$sagebrush=$sagebrush:garden=outdoors

@set $sagebrush:garden=display_exits:no

@desc $sagebrush:garden={maindesc}

@set $sagebrush:garden=desc:The outdoor air smells faintly of cabbages and carrots. Indeed, in their spare time, the cooks enjoy planting small crops of their own, out in the fresh air, away from the stuffiness of the kitchens. Trees rise majestically around this open square, looming just far enough away to allow light to reach the small, fenced-in garden.

@set $sagebrush:garden=_connect/groggy:}

@dig Wine Cellar=$sagebrush=$sagebrush:winecellar=indoors

@set $sagebrush:winecellar=display_exits:no

@desc $sagebrush:winecellar={maindesc}

@set $sagebrush:winecellar=desc:The cluttered wine cellar is far removed from the elegance and charm of the rest of the inn, dark and dim and dank as it is. It is not without its charm, however. Three long, wooden shelves recede into the darkness of the low-ceilinged room, each bearing numerous wine-barrels. The air, though moist with the mildew of age, bears on it the scents of elderberry and cordial, dandelion and damson, mingling together in delicious dance.{if:{contains:*Asriel,here},\rAsriel is here\, {if:{awake:*asriel},busily tasting wines and making sure they're ready,sleeping soundly on his cot}}.

smell #set $sagebrush:winecellar=The air, though moist with the mildew of age, bears on it the scents of elderberry and cordial, dandelion and damson, mingling together in delicious dance.

@create Wine Barrel=$sagebrush:winecellar=$sagebrush:obj/barrel

@tel $sagebrush:obj/barrel=$sagebrush:winecellar

@lock $sagebrush:obj/barrel=$~noone

@fail $sagebrush:obj/barrel=It's a bit too awkward to lift.

@desc $sagebrush:obj/barrel=One of the wine barrels sits open on the floor. You can take a 'sip' if you're discreet about it, or you could 'roll barrel ' to move it.

@act sip=$sagebrush:obj/barrel=$sagebrush:obj/barrel/act/sip=$nothing

@succ $sagebrush:obj/barrel/act/sip=You take a sip from the wine barrel. {if:{gt:{prop:_swigs/{ref:me},here},3},Woah there\, buddy. Lay off the drink!,{lrand:Potent stuff!|Not bad!|Bit sour!,|}}{null:{store:{add:{prop:_swigs/{ref:me},here},1},_swigs/{ref:me},here}}

@osucc $sagebrush:obj/barrel/act/sip=takes a sip from the wine barrel.

@set $sagebrush:winecellar=_depart/clearsips:}

@act roll barrel=$sagebrush:obj/barrel=$sagebrush:obj/barrel/rollbarrel=$nothing

@succ $sagebrush:obj/barrel/rollbarrel={if:{and:{not:{istype:{&arg},bad}},{istype:{&arg},exit}},{if:{locked:$obj/barrel,{&arg}},{default:{exec:_barrelfail,{&arg}},You cannot roll the barrel that way.},You roll the barrel towards {name:{links:{&arg}}}.{null:{force:$pierre,@tel $obj/barrel={links:{&arg}}},{otell:{name:me} rolls the wine barrel towards {name:{links:{&arg}}}.,here},{otell:{name:me} rolls the wine barrel into the room from {name:here}.,{links:{&arg}}}}},I don't see that exit here.}

@dig Basement=$sagebrush=$sagebrush:basement=indoors

@set $sagebrush:basement=display_exits:no

@desc $sagebrush:basement={maindesc}

@set $sagebrush:basement=desc:The smell of mold lingers heavily in the languid air, recalling the generations that have passed silently by in darkness here. A small cast-iron lantern, swinging now and again from an unfelt wind, yields but a little light, casting long shadows across the depths of this dark place. Within its small pool of amber light is a door with the name 'Libbie' painted across its slightly beaten face. Further down the corridor are doors into the other staff rooms, and far north down the length of this unlit, unloved basement is the wine cellar.

smell #set $sagebrush:basement=The air of this darkened hallway is thick with the scent of mildew and mold. Not the most sanitary of conditions, but the employees seem to have made the best of the situation.

@dig Libbie's Room=$sagebrush=$sagebrush:libbies=indoors

@set $sagebrush:libbies=display_exits:no

@desc $sagebrush:libbies={maindesc}

@set $sagebrush:libbies=desc:A heady perfume fills the air of this ample, cube-shaped room, staving off the smell of mildew and mold that pervades the rest of the basement. Indeed, the decor of the cozy little place seems designed, point by point, to contrast to the drab dreariness of the rest of this floor.\rCarpets blanket the bare floor and walls, lending a slightly exotic look to the cubbyhole, and the gently swaying lantern nurses a tender flame that compounds this effect. The bed, otherwise an unremarkable pallet, is piled with a seemingly impossible number of pillows, some of which have lost their fluff, but others of which are fairly bursting at the seams.

+lock $sagebrush:libbies=abode=*Libbie

@set $sagebrush:libbies=_innkey:$libkey

@dig Asriel's Cubbyhole=$sagebrush=$sagebrush:asriels=indoors

@set $sagebrush:asriels=display_exits:no

@desc $sagebrush:asriels={maindesc}

@set $sagebrush:asriels=desc:This room seems little more than an extension of the wine cellar, separated as it is by a thin, wooden partition. Still, its resident seems to have made the best of a meager condition, padding the walls with old hay mattresses, worn out from use in the inn's luxurious rooms. Though the stuffing is largely gone, they seem to suit Asriel's needs. The other furnishings in this room are similarly austere, largely utilitarian. A cot sits in the corner, worn from considerable use. A small lamp, candle aglow, rests on a small stand beside it, proffering a dim light for the benefit of those present.\rThe air smells faintly of elderberry wine and raspberry cordial.

smell #set $sagebrush:asriels=The air smells faintly of elderberry wine and raspberry cordial.

@set $sagebrush:asriels=_innkey:$askey

@dig Lisa's Room=$sagebrush=$sagebrush:lisas=indoors

@set $sagebrush:lisas=display_exits:no

@desc $sagebrush:lisas={maindesc}

@set $sagebrush:lisas=desc:Set the 'desc' property.

@set $sagebrush:lisas=_innkey:$liskey

@dig Morolt's Room=$sagebrush=$sagebrush:morolts=indoors

@set $sagebrush:morolts=display_exits:no

@desc $sagebrush:morolts={maindesc}

@set $sagebrush:morolts=desc:Description pending the return of Riverdale's sanity.

@set $sagebrush:morolts=_innkey:$morkey

=

@create Babblecreek Bungalow Key=$pierre=$sagebrush:bckey

+reg sb/bckey=$sagebrush:bckey

@drop $sagebrush:bckey={null:{delprop:_/lok,this}}

@create Elmwood Room Key=$pierre=$sagebrush:ewkey

+reg sb/ewkey=$sagebrush:ewkey

@drop $sagebrush:ewkey={null:{delprop:_/lok,this}}

@create Nightfrost Suite Key=$pierre=$sagebrush:nfkey

+reg sb/nfkey=$sagebrush:nfkey

@drop $sagebrush:nfkey={{null:{delprop:_/lok,this}}

@create Sagebrush Den Key=$pierre=$sagebrush:sbkey

+reg sb/sbkey=$sagebrush:sbkey

@drop $sagebrush:sbkey={null:{delprop:_/lok,this}}

+lock $sagebrush=jumpout=!$sb/bckey&!$sb/ewkey&!$sb/nfkey&!$sb/sbkey

@link $sb/bckey=$pierre

@link $sb/ewkey=$pierre

@link $sb/nfkey=$pierre

@link $sb/sbkey=$pierre

==

@create Counter==$sagebrush:frontcounter

@door $sagebrush:entry=[LIB] Library;lib;library;li;libary=$sagebrush:ex/1=$sagebrush:library=[EH] Entrance Hall;eh;hall;out;ou;entrance;entrance hall=$sagebrush:ex/2

@succ $sagebrush:ex/1=You enter the library.

@osucc $sagebrush:ex/1=enters the library.

@odrop $sagebrush:ex/1=arrives from the entrance hall.

@succ $sagebrush:ex/2=You step into the entrance hall.

@osucc $sagebrush:ex/2=steps out into the entrance hall.

@odrop $sagebrush:ex/2=arrives from the direction of the library.

@door $sagebrush:entry=[CR] Common Room;cr;common;commons;common room;croom;commonroom=$sagebrush:ex/3=$sagebrush:commonroom=[EH] Entrance Hall;hall;out;eh;o;entrance hall=$sagebrush:ex/4

@succ $sagebrush:ex/3=You enter the common room.

@osucc $sagebrush:ex/3=enters the common room.

@odrop $sagebrush:ex/3=arrives from the common room.

@succ $sagebrush:ex/4=You step into the entrance hall.

@osucc $sagebrush:ex/4=steps into the entrance hall.

@odrop $sagebrush:ex/4=arrives from the common room.

@door $sagebrush:entry=[O] Office;o;office;off;of;offi=$sagebrush:ex/5=$sagebrush:office=[EH] Entrance Hall;eh;hall;out;o;entrance hall=$sagebrush:ex/6

@create Riverdale's Skeleton Key==$sagebrush:officekey

+reg sb/skeletonkey=$sagebrush:officekey

@lock $sagebrush:ex/5=$sb/skeletonkey

@succ $sagebrush:ex/5={if:{locked:me,this},You enter the proprietor's office.,You unlock the door to the proprietor's office and enter.}

@osucc $sagebrush:ex/5={if:{locked:me,this},enters the proprietor's office.,unlocks the door to the proprietor's office and enters.}

@odrop $sagebrush:ex/5=enters from the hallway outside.

@fail $sagebrush:ex/5=The door to the proprietor's office is locked.

@ofail $sagebrush:ex/5=tries to enter the proprietor's office.

@succ $sagebrush:ex/6=You step into the entrance hall.{null:{otell:The office door swings open\, and {name:me} emerges.,{links:this},me}}

@osucc $sagebrush:ex/6=steps back into the entrance hall.

@door $sagebrush:entry=[UP] Upstairs;up;upstairs;ups;stairs;us=$sagebrush:ex/7=$sagebrush:floor2=[DS] Downstairs;ds;down;do;d;downstairs;eh;entrance;entrance hall;hall=$sagebrush:ex/8

@succ $sagebrush:ex/7=You ascend the creaking stairs to the second floor.

@osucc $sagebrush:ex/7=ascends to the second floor.

@odrop $sagebrush:ex/7=arrives from the entrance hall below.

@succ $sagebrush:ex/8=You descend to the entrance hall.

@osucc $sagebrush:ex/8=descends the creaking staircase to the hallway below.

@odrop $sagebrush:ex/8=arrives from the second floor.

@door $sagebrush:commonroom=[K] Kitchen;k;ki;kit;kitc;kitch;kitche;kitchen=$sagebrush:ex/9=$sagebrush:kitchen=[CR] Common Room;cr;common;commons;common room;commonroom;croom=$sagebrush:ex/10

@succ $sagebrush:ex/9=You enter the kitchen through the swinging door.

@osucc $sagebrush:ex/9=enters the kitchen.

@odrop $sagebrush:ex/9=enters from the common room.

@succ $sagebrush:ex/10=You step back into the common room.

@osucc $sagebrush:ex/10=heads to the common room through the swinging door.

@odrop $sagebrush:ex/10=arrives from the kitchen through the swinging door.

@door $sagebrush:floor2=[NF] Nightfrost Suite;nf;nightfrost;night frost;nightfrost suite;nfs=$sagebrush:ex/11=$sagebrush:nightfrost=[O] Out;o;ou;out=$sagebrush:ex/12

@desc $sagebrush:ex/11=A beautiful oak door leading into the {name:{links:this}}. A small sign indicates that it is currently {with:occ,{occupied?:{name:{links:this}}},{if:{&occ},occupied by {name:{&occ}}. The door appears to be {if:{exec:_isdooropen?},unlocked,locked},unoccupied}}.

@set $sagebrush:ex/11=_extext:{if:{exec:_isdooropen?},}

@lock $sagebrush:ex/11=$sb/nfkey|$sb/skeletonkey|_isdooropen?:1|$sb/liskey

@set $sagebrush:ex/11=_isdooropen?:{prop:_isdooropen?,{sublist:{links:this},1,1}}

+lock $sagebrush:ex/11=rider-enable=$~anyone

@fail $sagebrush:ex/11=You do not have the key.

@succ $sagebrush:ex/11={if:{or:{exec:_isdooropen?},{locked:me,this}},You enter the Nightfrost Suite.,You unlock the door to the Nightfrost Suite and enter.}

@osucc $sagebrush:ex/11={if:{or:{exec:_isdooropen?},{locked:me,this}},enters the Nightfrost Suite.,unlocks the door to the Nightfrost Suite and enters.}

@odrop $sagebrush:ex/11=enters from the hallway.

@succ $sagebrush:ex/12=You step back into the hallway.

@osucc $sagebrush:ex/12=steps back into the hallway.

@odrop $sagebrush:ex/12=steps out of the Nightfrost Suite.

@door $sagebrush:floor2=[EW] Elmwood Room;ew;er;eroom;elmwood;elm wood;elm;elmroom;elmwood room=$sagebrush:ex/13=$sagebrush:elmwood=[O] Out;o;ou;out=$sagebrush:ex/14

@desc $sagebrush:ex/13=A beautiful oak door leading into the {name:{links:this}}. A small sign indicates that it is currently {with:occ,{occupied?:{name:{links:this}}},{if:{&occ},occupied by {name:{&occ}}. The door appears to be {if:{exec:_isdooropen?},unlocked,locked},unoccupied}}.

@set $sagebrush:ex/13=_extext:{if:{exec:_isdooropen?},}

@lock $sagebrush:ex/13=$sb/ewkey|$sb/skeletonkey|_isdooropen?:1|$sb/liskey

@set $sagebrush:ex/13=_isdooropen?:{prop:_isdooropen?,{sublist:{links:this},1,1}}

+lock $sagebrush:ex/13=rider-enable=$~anyone

@fail $sagebrush:ex/13=You do not have the key.

@succ $sagebrush:ex/13={if:{or:{exec:_isdooropen?},{locked:me,this}},You enter {name:{sublist:{links:this},1,1}}.,You unlock the door to {name:{sublist:{links:this},1,1}} and enter.}

@osucc $sagebrush:ex/13={if:{or:{exec:_isdooropen?},{locked:me,this}},enters {name:{sublist:{links:this},1,1}}.,unlocks the door to {name:{sublist:{links:this},1,1}} and enters.}

@odrop $sagebrush:ex/13=enters from the hallway.

@succ $sagebrush:ex/14=You step back into the hallway.

@osucc $sagebrush:ex/14=steps back into the hallway.

@odrop $sagebrush:ex/14=emerges from the Elmwood Room.

@door $sagebrush:floor2=[SB] Sagebrush Den;ss;sd;den;sb;special;sagebrush;sbs;sbspecial=$sagebrush:ex/15=$sagebrush:sagebrush=[O] Out;o;ou;out=$sagebrush:ex/16

@desc $sagebrush:ex/15=A beautiful oak door leading into the {name:{links:this}}. A small sign indicates that it is currently {with:occ,{occupied?:{name:{links:this}}},{if:{&occ},occupied by {name:{&occ}}. The door appears to be {if:{exec:_isdooropen?},unlocked,locked},unoccupied}}.

@set $sagebrush:ex/15=_extext:{if:{exec:_isdooropen?},}

@lock $sagebrush:ex/15=$sb/sbkey|$sb/skeletonkey|_isdooropen?:1|$sb/liskey

@set $sagebrush:ex/15=_isdooropen?:{prop:_isdooropen?,{sublist:{links:this},1,1}}

+lock $sagebrush:ex/15=rider-enable=$~anyone

@fail $sagebrush:ex/15=You do not have the key.

@succ $sagebrush:ex/15={if:{or:{exec:_isdooropen?},{locked:me,this}},You enter {name:{sublist:{links:this},1,1}}.,You unlock the door to {name:{sublist:{links:this},1,1}} and enter.}

@osucc $sagebrush:ex/15={if:{or:{exec:_isdooropen?},{locked:me,this}},enters {name:{sublist:{links:this},1,1}}.,unlocks the door to {name:{sublist:{links:this},1,1}} and enters.}

@odrop $sagebrush:ex/15=enters from the hallway.

@succ $sagebrush:ex/16=You step back into the hallway.

@osucc $sagebrush:ex/16=steps back into the hallway.

@odrop $sagebrush:ex/16=emerges from the Sagebrush Den.

@door $sagebrush:floor2=[BC] Babblecreek Bungalow;bb;bc;babble;babblecreek;bungalow=$sagebrush:ex/17=$sagebrush:babble=[O] Out;o;ou;out=$sagebrush:ex/18

@desc $sagebrush:ex/17=A beautiful oak door leading into the {name:{links:this}}. A small sign indicates that it is currently {with:occ,{occupied?:{name:{links:this}}},{if:{&occ},occupied by {name:{&occ}}. The door appears to be {if:{exec:_isdooropen?},unlocked,locked},unoccupied}}.

@set $sagebrush:ex/17=_extext:{if:{exec:_isdooropen?},}

@lock $sagebrush:ex/17=$sb/bckey|$sb/skeletonkey|_isdooropen?:1|$sb/liskey

@set $sagebrush:ex/17=_isdooropen?:{prop:_isdooropen?,{sublist:{links:this},1,1}}

+lock $sagebrush:ex/17=rider-enable=$~anyone

@fail $sagebrush:ex/17=You do not have the key.

@succ $sagebrush:ex/17={if:{or:{exec:_isdooropen?},{locked:me,this}},You enter {name:{sublist:{links:this},1,1}}.,You unlock the door to {name:{sublist:{links:this},1,1}} and enter.}

@osucc $sagebrush:ex/17={if:{or:{exec:_isdooropen?},{locked:me,this}},enters {name:{sublist:{links:this},1,1}}.,unlocks the door to {name:{sublist:{links:this},1,1}} and enters.}

@odrop $sagebrush:ex/17=enters from the hallway.

@succ $sagebrush:ex/18=You step back into the hallway.

@osucc $sagebrush:ex/18=steps back into the hallway.

@odrop $sagebrush:ex/18=emerges from the Babblecreek Bungalow.

@door $sagebrush:library=[O] Office;o;of;off;offi;office;po=$sagebrush:ex/19=$sagebrush:office=[LIB] Library;lib;libr;libra;librar;library;libary=$sagebrush:ex/20

@lock $sagebrush:ex/19=$sb/skeletonkey

@succ $sagebrush:ex/19={if:{locked:me,this},You enter the proprietor's office.,You unlock the door to the proprietor's office and enter.}

@osucc $sagebrush:ex/19={if:{locked:me,this},enters the proprietor's office.,unlocks the door to the proprietor's office and enters.}

@odrop $sagebrush:ex/19=enters from the library.

@fail $sagebrush:ex/19=The door to the proprietor's office is locked.

@ofail $sagebrush:ex/19=tries to enter the proprietor's office.

@succ $sagebrush:ex/20=You step into the library.{null:{otell:The office door swings open\, and {name:me} emerges.,{links:this},me}}

@osucc $sagebrush:ex/20=steps back into the library.

@door $sagebrush:office=[B] Bedroom;b;be;bed;bedroom;br;broom=$sagebrush:ex/21=$sagebrush:bedroom=[O] Office;o;of;off;offi;offi;offic;office=$sagebrush:ex/22

@succ $sagebrush:ex/21=You enter the boudoir.

@osucc $sagebrush:ex/21=enters the bedroom.

@odrop $sagebrush:ex/21=arrives from the office.

@succ $sagebrush:ex/22=You enter the office.

@osucc $sagebrush:ex/22=enters the office.

@odrop $sagebrush:ex/22=arrives from the bedroom.

@door $sagebrush:kitchen=[G] Garden;g;ga;gar;gard;garde;garden=$sagebrush:ex/23=$sagebrush:garden=[BI] Back Inside;bi;in;inside;back;back inside;k;ki;kit;kitc;kitch;kitche;kitchen=$sagebrush:ex/24

@succ $sagebrush:ex/23=You step outside to the garden.

@osucc $sagebrush:ex/23=steps outside to the garden.

@odrop $sagebrush:ex/23=emerges from the inn.

@succ $sagebrush:ex/24=You go back into the inn.

@osucc $sagebrush:ex/24=goes back into the inn.

@odrop $sagebrush:ex/24=arrives from the garden outside.

@door $sagebrush:kitchen=[WC] Wine Cellar;wc;wine;winecellar;cellar;wine cellar;wcellar;cell;win;ds;down=$sagebrush:ex/25=$sagebrush:winecellar=[K] Kitchen;k;ki;kit;kitc;kitch;kitche;kitchen;us;up;upstairs=$sagebrush:ex/26

@lock $sagebrush:ex/26=toodrunk?:0&!$obj/barrel

@set $sagebrush:ex/26=toodrunk?:{eq:{dice:{if:{gt:{prop:_swigs/{ref:me},here},3},2,{if:{prop:_swigs/{ref:me},here},4,0}}},1}

@fail $sagebrush:ex/26=You stumble into the wall, missing the exit. Ah, well. You know what they say about trying again.

@ofail $sagebrush:ex/26=tries to leave, but {pronouns:%s} stumbles into the wall!

@succ $sagebrush:ex/25=You descend the creaky old stairs to the wine cellar.

@osucc $sagebrush:ex/25=descends the stairs to the wine cellar.

@odrop $sagebrush:ex/25=descends from the kitchen above.

@succ $sagebrush:ex/26=You go back up to the kitchen.

@osucc $sagebrush:ex/26=goes back upstairs to the kitchen.

@door $sagebrush:entry=[B] Basement;ds;b;ba;bas;base;bm;basement;down;d=$sagebrush:ex/27=$sagebrush:basement=[US] Upstairs;us;up;u;upstairs;eh;entry;back;ba=$sagebrush:ex/28

@succ $sagebrush:ex/27=You descend the creaking staircase to the dark basement.

@osucc $sagebrush:ex/27=descends the creaking staircase to the basement.

@odrop $sagebrush:ex/27=arrives from the entrance hall above.

@lock $sagebrush:ex/28=!$obj/barrel

@succ $sagebrush:ex/28=You climb the stairs to the entry hall.

@osucc $sagebrush:ex/28=goes back up the stairs to the entry hall.

@odrop $sagebrush:ex/28=emerges from the door to the basement.

@create Libbie's Key=$libbies=$sagebrush:libkey

+reg sb/libkey=$sagebrush:libkey

@desc $sagebrush:libkey=A small key, fashioned from bronze, it appears to be rather old, but it still feels strong. It will let you into Libbie's room.

@door $sagebrush:commonroom=[LR] Libbie's Room;lr;libbie;libbie's room;lroom;lib;libr;libroom=$sagebrush:ex/29=$sagebrush:libbies=[O] Out;o;ou;out=$sagebrush:ex/30

@set $sagebrush:ex/29=dark

@set $sagebrush:ex/29=_extext:{if:{exec:_isdooropen?},}

@set $sagebrush:ex/29=_extext:{if:{exec:_isdooropen?},}

@lock $sagebrush:ex/29=$sb/libkey|$sb/skeletonkey|_isdooropen?:1

@set $sagebrush:ex/29=_isdooropen?:{prop:_isdooropen?,{sublist:{links:this},1,1}}

+lock $sagebrush:ex/29=rider-enable=$~anyone

@fail $sagebrush:ex/29=You do not have the key.

@succ $sagebrush:ex/29={if:{or:{exec:_isdooropen?},{locked:me,this}},You enter {name:{sublist:{links:this},1,1}} through the trapdoor.,You unlock the trapdoor to {name:{sublist:{links:this},1,1}} and enter.}

@osucc $sagebrush:ex/29=disappears from view behind the bar!

@succ $sagebrush:ex/30=You climb through the trap door into the bar.

@osucc $sagebrush:ex/30=climps up to the bar above.

@odrop $sagebrush:ex/30=emerges from behind the bar.

@door $sagebrush:basement=[WC] Wine Cellar;wc;wine;winecellar;cellar;wcell;wce;wcel;w c=$sagebrush:ex/31=$sagebrush:winecellar=[DB] Deeper into Basement;db;deeper;deep;dbase;dbasement;deeper into basement=$sagebrush:ex/32

@succ $sagebrush:ex/32=You go south into the deep

@create Asriel's Key==$sagebrush:askey

+reg sb/askey=$sagebrush:askey

@desc $sagebrush:askey=A small key, fashioned from bronze, it appears to be rather old, but it still feels strong. It will let you into Asriel's cubbyhole.

@door $sagebrush:winecellar=[AC] Asriel's Cubbyhole;ac;asriel;cubby;asriel's cubby;cubbyhole;ach=$sagebrush:ex/33=$sagebrush:asriels=[WC] Wine Cellar;wc;wine;winecellar;cellar;wcell;wce;wcel;w c;o;ou;out=$sagebrush:ex/34

@set $sagebrush:ex/33=_extext:{if:{exec:_isdooropen?},}

@lock $sagebrush:ex/33=$sb/askey|$sb/skeletonkey|_isdooropen?:1

@set $sagebrush:ex/33=_isdooropen?:{prop:_isdooropen?,{sublist:{links:this},1,1}}

+lock $sagebrush:ex/33=rider-enable=$~anyone

@fail $sagebrush:ex/33=You do not have the key.

@succ $sagebrush:ex/33={if:{or:{exec:_isdooropen?},{locked:me,this}},You enter {name:{sublist:{links:this},1,1}}.,You unlock the door to {name:{sublist:{links:this},1,1}} and enter.}

@osucc $sagebrush:ex/33={if:{or:{exec:_isdooropen?},{locked:me,this}},enters {name:{links:this}}.,unlocks the door to Asriel's Cubbyhole and enters.}

@succ $sagebrush:ex/34=You leave {name:{loc:this}}.

@osucc $sagebrush:ex/34=steps back into the wine cellar.

@odrop $sagebrush:ex/34=emerges from Asriel's Cubbyhole.

@create Lisa's Key=$sagebrush:lisas=$sagebrush:liskey

+reg sb/liskey=$sagebrush:liskey

@desc $sagebrush:liskey=A small key, fashioned from bronze, it appears to be rather old, but it still feels strong. It will let you into Lisa's room.

@door $sagebrush:basement=[LIS] Lisa's Room;lis;lisroom;lir;lisa's room=$sagebrush:ex/35=$sagebrush:lisas=[O] Out;o;ou;out;b;ba;bas;base;bm;basem;baseme;basemen;basement=$sagebrush:ex/36

@set $sagebrush:ex/35=_extext:{if:{exec:_isdooropen?},}

@lock $sagebrush:ex/35=$sb/liskey|$sb/skeletonkey|_isdooropen?:1

@set $sagebrush:ex/35=_isdooropen?:{prop:_isdooropen?,{sublist:{links:this},1,1}}

+lock $sagebrush:ex/35=rider-enable=$~anyone

@fail $sagebrush:ex/35=You do not have the key.

@succ $sagebrush:ex/35={if:{or:{exec:_isdooropen?},{locked:me,this}},You enter {name:{sublist:{links:this},1,1}}.,You unlock the door to {name:{sublist:{links:this},1,1}} and enter.}

@osucc $sagebrush:ex/35={if:{or:{exec:_isdooropen?},{locked:me,this}},enters {name:{links:this}}.,unlocks the door to Lisa's room and enters.}

@odrop $sagebrush:ex/35=arrives from the basement.

@succ $sagebrush:ex/36=You step back into the basement.

@osucc $sagebrush:ex/36=steps back into the basement.

@odrop $sagebrush:ex/36=arrives from {name:{loc:this}}.

@create Morolt's Key=$sagebrush:morolts=$sagebrush:morkey

+reg sb/morkey=$sagebrush:morkey

@desc $sagebrush:morkey=A small key, fashioned from bronze, it appears to be rather old, but it still feels strong. It will let you into Morolt's room.

@door $sagebrush:basement=[MR] Morolt's Room;mr;morolt;morolt's;morolt's room;mor=$sagebrush:ex/37=$sagebrush:morolts=[O] Out;o;ou;out;b;ba;bas;base;bm;basem;baseme;basemen;basement=$sagebrush:ex/38

@set $sagebrush:ex/37=_extext:{if:{exec:_isdooropen?},}

@lock $sagebrush:ex/37=$sb/morkey|$sb/skeletonkey|_isdooropen?:1

@set $sagebrush:ex/37=_isdooropen?:{prop:_isdooropen?,{sublist:{links:this},1,1}}

+lock $sagebrush:ex/37=rider-enable=$~anyone

@fail $sagebrush:ex/37=You do not have the key.

@succ $sagebrush:ex/37={if:{or:{exec:_isdooropen?},{locked:me,this}},You enter {name:{sublist:{links:this},1,1}}.,You unlock the door to {name:{sublist:{links:this},1,1}} and enter.}

@osucc $sagebrush:ex/37={if:{or:{exec:_isdooropen?},{locked:me,this}},enters {name:{links:this}}.,unlocks the door to Morolt's room and enters.}

@odrop $sagebrush:ex/37=enters from the basement.

@succ $sagebrush:ex/38=You step back into the basement.

@osucc $sagebrush:ex/38=steps back into the basement.

@odrop $sagebrush:ex/38=emerges from {name:{loc:this}}.

@door $sagebrush:commonroom=[LR] Libbie's Room;lr;libbie=$sagebrush:trapdoor1=$sagebrush:libbies=up=$sagebrush:ex/trapdoor2

@succ $sagebrush:trapdoor1=You drop through the trapdoor into Libbie's Room below.

@osucc $sagebrush:trapdoor1=drops out of sight!

@odrop $sagebrush:trapdoor1=drops down from the common room through the trap door.

lsedit $sagebrush=map1

.del ^ $

             +---------------+----+ - - - - - -
             |               | ||||            |
             |               |    |
             |               |    |            |
             |             o |    |
             |            ---|    |   Garden   |

+-------------+ o| | |

| P | | | R | |

| -----| o|#

             |           |   |    |            |

| o|L +----+ - - - - - -

|+ | ---|

+--------+____+ o |

        |____|
        |____|               |
        +----+---------------+

.end

lsedit $sagebrush=map-1

.del ^ $

             +--------+-------+---+
             |Asriel's|       |||||
             |  Cubby       A     |
             |________|__  _______|
             | Morolt        |
             |________|      |
             | Lisa         _|___
             |        |    |     |
             |________|    |#    |
             |Empty   |    |Lib- |
             |   Room |    | bie |
             |        |    |_____|
        +____+----  --+      |
        |____|               |
        |____|               |
        +----+---------------+

.end

lsedit $sagebrush=map2

.del ^ $

             +----+--------------+
             |    |              |
             |    |      NF      |
             |                   |
             |    |              |
             |    +--------------+

+--------+----+ | |

| | | SB |

| | |

| BC | |

| | +----------+---+

| | | |

+--------+____+ | |

        |____|         EW    |
        |____|    |          |
        +----+----+----------+

.end

@set $sagebrush:library=_innfloor:1

@set $sagebrush:entry=_innfloor:1

@set $sagebrush:commonroom=_innfloor:1

@set $sagebrush:garden=_innfloor:1

@set $sagebrush:kitchen=_innfloor:1

@set $sagebrush:office=_innfloor:1

@set $sagebrush:bedroom=_innfloor:1

@set $sagebrush:floor2=_innfloor:2

@set $sagebrush:sbroom=_innfloor:2

@set $sagebrush:nfroom=_innfloor:2

@set $sagebrush:bcroom=_innfloor:2

@set $sagebrush:ewroom=_innfloor:2

@set $sagebrush:basement=_innfloor:-1

@set $sagebrush:libbies=_innfloor:-1

@set $sagebrush:asriels=_innfloor:-1

@set $sagebrush:winecellar=_innfloor:-1

@set $sagebrush:lisas=_innfloor:-1

@set $sagebrush:morolts=_innfloor:-1

==

@set $sagebrush=info/rooms:Babblecreek Bungalow:bc|Elmwood Room:ew|Nightfrost Suite:nf|Sagebrush Den:sb

@set $sagebrush=_msgmacs/roomsstat:{exec:mpi/roomsstat}

@set $sagebrush=mpi/roomsstat:{parse:r,{prop:info/rooms},{if:{dbeq:{loc:${sublist:{&r},2,2,:}key},$pierre},{sublist:{&r},1,1,:}:0,{sublist:{&r},1,1,:}:{prop:_who,${sublist:{&r},2,2,:}key}},|}

@set $sagebrush=_msgmacs/occupied?:{with:ocroom,,{if:{null:{foreach:r,{prop:info/rooms},{if:{smatch:{&r},{:1}*:*},{set:ocroom,{&r}}},|}}{&ocroom},{if:{dbeq:{loc:${sublist:{&ocroom},2,2,:}key},$pierre},0,{prop:_who,${sublist:{&ocroom},2,2,:}key}},#-1}}

@set $sagebrush=_msgmacs/hasroom?:{with:hsrtemp,,{with:myroom,,{if:{null:{foreach:r,{prop:info/rooms},{if:{not:{dbeq:{loc:{set:hsrtemp,${sublist:{&r},2,2,:}key}},$pierre}},{if:{dbeq:{prop:_who,{&hsrtemp}},{:1}},{set:myroom,{&r}}}},|}}{&myroom},{&myroom},0}}}

@set $sagebrush=_msgmacs/matchkey:{if:{isdbref:{:1}},{with:mykey,,{if:{null:{foreach:r,{prop:info/rooms},{if:{dbeq:{:1},${sublist:{&r},2,2,:}key},{set:mykey,{&r}}},|}}{&mykey},{&mykey},0}},0}

@act rooms=$sagebrush=$sagebrush:act/rooms=$nothing

@succ $sagebrush:act/rooms=+-------------------------------------------+\r| ~@ Sagebrush Inn: Room Board @~ |\r|===========================================|\r{parse:r,{roomsstat},|{with:tmp,{if:{sublist:{&r},2,2,:},{name:{sublist:{&r},2,2,:}},Unoccupied},{left: {sublist:{&r},1,1,:},{subt:42,{strlen:{&tmp}}}}{&tmp} |},|,\r}\r|___________________________________________|{if:{dbeq:{loc:me},$entry},\r{center:- {if:{hasroom?:{ref:me}},Type 'return' to return your key.,Type 'request ' to check in.} -,45}}

@desc $sagebrush:act/rooms={exec:_/sc}

@act innhelp=$sagebrush=$sagebrush:act/innhelp=$nothing

@succ $sagebrush:act/innhelp={list:succ}

@desc $sagebrush:act/innhelp={list:succ}

lsedit $sagebrush:act/innhelp=succ

.del ^ $

+------------------------------------------------------------------------------+

| ~@ Sagebrush Inn: Help @~ |

|==============================================================================|

| Welcome to the Sagebrush Inn, owned and operated by Tristram Wytethorn, |

| originally conceived and constructed by his uncle Riverdale Fleetfoot, and |

| serving creatures of all sizes, shapes, and vocations. |

| |

| The following commands are available within the inn: |

| - innhelp (Display this help screen) |

| - innstaff (Display staff list) |

| - rooms (Display rooms and availability) |

| - roomhelp (Display help for checking out and using rooms) |

| - innwho (Display all players and zombies in the inn, awake and asleep) |

| - innmap (Display a map of the floor you're currently on) |

| - pillow (Display pillow fight commands) |

| - lifetime (Display lifetime pillow fight leaders) |

| - innwall (Shout a message to everyone in the inn [staff]) |

|______________________________________________________________________________|

.end

@act lock=$sagebrush=$sagebrush:act/lock=$nothing

@desc $sagebrush:act/lock=Syntax: lock\r\rThis command, used from inside your room, will lock the door so that no one can come in (unless s/he has a master key or if you've given him or her yours). By default, your door will be locked.\r\rSee also: unlock, roomhelp

@succ $sagebrush:act/lock={if:{prop:_innkey,here},{if:{or:{contains:{prop:_innkey,here},me},{nearby:{prop:_innkey,here},me},{contains:$officekey,me}},{if:{prop:_isdooropen?,here},You lock the door to your room.{null:{otell:{name:me} locks the door to the {name:here} from within.,{links:{ref:out}}},{otell:{name:me} locks the door.,here},{store:0,_isdooropen?,here}},The door is already locked. Type 'unlock' to unlock it.},Permission denied: You do not have the key!},You are not in a room.}

@act unlock=$sagebrush=$sagebrush:act/unlock=$nothing

@desc $sagebrush:act/unlock=Syntax: unlock\r\rThis command, used from inside your room, will unlock the door, allowing others to come in. Note that when you leave, the door will lock again automatically UNLESS you are not carrying the key. Be careful! You don't want interlopers poking about in your room!\r\rSee also: lock, roomhelp

@succ $sagebrush:act/unlock={if:{prop:_innkey,here},{if:{or:{contains:{prop:_innkey,here},me},{nearby:{prop:_innkey,here},me},{contains:$officekey,me}},{if:{not:{prop:_isdooropen?,here}},You unlock the door to your room.{null:{otell:{name:me} unlocks the door to the {name:here} from within.,{links:{ref:out}}},{otell:{name:me} unlocks the door.,here},{store:1,_isdooropen?,here}},The door is already unlocked. Type 'lock' to lock it.},Permission denied: You do not have the key!},You are not in a room.}

@set $sagebrush=_depart/lockdoor:,{if:{contains:{prop:_innkey,here},me},{if:{contains:me,this},You lock the door behind you.}{null:{store:0,_isdooropen?,here},{otell:{pronouns:%n locks the door behind %o.},here},{otell:{pronouns:%n locks the door to the {name:here}.},{links:{ref:out}}}}}}

@act innwall=$sagebrush=$sagebrush:act/innwall=$nothing

@succ $sagebrush:act/innwall={null:{foreach:r,{contents:{loc:this},room},{foreach:p,{contents:{&r},player},{tell:SBI: {name:me} announces\, "{&arg}",{&p}}}}}

@act innwho=$sagebrush=$sagebrush:act/innwho=$nothing

@succ $sagebrush:act/innwho={parse:r,{contents:{loc:this},room},{with:tmp,{filter:item,{contents:{&r}},{or:{instr:{flags:{&item}},P},{instr:{flags:{&item}},Z}}},{if:{&tmp},{name:{&r}}:\r {commas:{parse:do,{&tmp},{name:{&do}}{if:{instr:{flags:{&do}},Z},} ({if:{eq:{idle:{&do}},-1},Asleep,Awake})}}\r}},\r,}

@act innstaff=$sagebrush=$sagebrush:act/innstaff=$nothing

@succ $sagebrush:act/innstaff={list:succ}

@desc $sagebrush:act/innstaff={list:succ}

lsedit $sagebrush:act/innstaff=succ

.del ^ $

+------------------------------------------------------------------------------+

| ~@ Sagebrush Inn: Staff @~ |

|==============================================================================|

| The Sagebrush Inn hires several employees from varying backgrounds, |

| putting its money where its mouth is by strictly adhering to its non- |

| discriminatory staffing policy. Whether you're staying in a room or |

| shmoozing at the bar, these friendly beasts will help make your experience |

| the best possible. |

| |

| TRISTRAM WYTETHORN, the innkeeper, comes from a line of pioneering and |

| strong squirrels. He recently revived the inn after inheriting it. |

| ASRIEL, our wine keeper, is of slightly less prestigious pedigree, but |

| that has not hampered this fox's ability to find and select the best |

| wines for our customers. Visit him in the wine cellar! |

| LIBBIE, our barkeeper, is young and full of energy. She's got a good paw |

| for mixing drinks, and she's always inventive. Toss her a tip; she's |

| earned it! |

| LISA, our maid, has enough work without the inn's patrons clowning around, |

| so please, PLEASE pick up after yourself. |

| MOROLT was recently hired as our bouncer.

| ROGUE SCALLION, formerly a chef at Riverdale Fleetfoot's inn, is a veteran |

| cook, favoring spicier dishes but always willing to experiment. He has |

| been working for Wytethorn's family ever since he hung up his sailor's |

| cap. (RP'ed by Riverdale) |

| PIERRE, our concierge, mans the front counter. Though a bit testy at |

| times, this Dormouse is truly interested in making your stay pleasant. |

| (RP'ed by Wytethorn) |

| WESLEY, the bellweasel, will be glad to lead you to your room or provide |

| other services. (RP'ed by Riverdale) |

| |

| If you want to come work for us, talk to Wytethorn; we'd be glad to find |

| a place for you. |

|______________________________________________________________________________|

.end

@act innmap;imap;map=$sagebrush=$sagebrush:act/innmap=$nothing

@succ $sagebrush:act/innmap={null:{set:arg,{default:{&arg},{prop:_innfloor,here}}}}{if:{propdir:map{&arg}#/,$sbpar},{list:map{&arg}},No such map.}

@set $sagebrush=floor1-rooms:$entry $library $commonroom $kitchen $garden

@set $sagebrush=_depart/checkout:},{with:room,{hasroom?:{ref:me}},{if:{&room},{null:{force:$pierre,@tel ${sublist:{&room},2,2,:}key=me}{tell:You check out of the Sagebrush Inn. ** PLEASE CHECK OUT PROPERLY NEXT TIME!! **}{store:1,_pissed/{ref:me},$entry}}}}}}}}

@act request=$sagebrush:entry=$sagebrush:act/request=$nothing

@succ $sagebrush:act/request={if:{&arg},{if:{dbeq:{loc:$pierre},here},{if:{not:{instr:{flags:me},Z}},{with:room,,{if:{null:{foreach:r,{prop:info/rooms,$sagebrush},{if:{smatch:{&r},{&arg}*:*},{set:room,{&r}}},|}}{&room},{if:{not:{hasroom?:{ref:me}}},{if:{not:{occupied?:{sublist:{&room},1,1,:}}},{force:$pierre,{exec:mesg/success}}{force:$pierre,@tel ${sublist:{&room},2,2,:}key=$frontcounter}{force:$pierre,@lock ${sublist:{&room},2,2,:}key=me|{ref:me}}{null:{store:{ref:me},_who,${sublist:{&room},2,2,:}key},{store:{sublist:{&room},2,2,:},_tmp/{add:{secs},60},this}}{null:{delay:60,{lit:{if:{dbeq:{loc:${prop:_tmp/{secs}}key},$frontcounter},{force:$pierre,:pockets the {name:${prop:_tmp/{secs}}key}.}{force:$pierre,@tel ${prop:_tmp/{secs}}key=me}}}}},{force:$pierre,{exec:mesg/occupied}}},{force:$pierre,{exec:mesg/tworooms}}},{force:$pierre,{exec:mesg/nosuchroom}}}},{exec:mesg/nozombies}},{exec:mesg/pierregone}},Syntax: request ; see the 'rooms' board for available rooms.}

@set $sagebrush:act/request=mesg/nosuchroom::smiles faintly to {name:me}, "I am afraid, {if:{eq:{prop:~sex,me},female},madam,sir}, that we do not have a room here by that name. Please check our 'rooms' board."

@set $sagebrush:act/request=mesg/success::bobs his head slowly. He withdraws a key and places it on top of the counter for {name:me}. "Please enjoy your stay at the Sagebrush Inn, {if:{eq:{prop:~sex,me},female},madam,sir}. {if:{dbeq:{loc:$wesley},here},{name:$wesley}\, our bellweasel\, will be glad to 'take ' for you and 'lead' you to your room.,{name:$wesley}\, our bellweasel\, will be happy to assist you when he returns.} (OOC: Type 'get counter={name:${sublist:{&room},2,2,:}key}'){null:{force:$wesley,+ride quit}{force:$wesley,+ride offer {name:me}}}

@set $sagebrush:act/request=mesg/tworooms::frowns, "It appears you already are staying in a room here, {if:{eq:{prop:~sex,me},female},madam,sir}."

@set $sagebrush:act/request=mesg/occupied::smiles a faint, supercilious smile at {name:me}, "That room is already occupied. Please check our 'rooms' board to see which are currently available."

@set $sagebrush:act/request=mesg/nozombies:Pierre leans over the counter and sneers derisively at you\, "I'm afraid\, {if:{eq:{prop:~sex,me},female},madam,sir}\, we don't allow your kind to check in here. Please take your patronage elsewhere." (No zombies\, please.)

@set $sagebrush:act/request=mesg/pierregone:Pierre is not here at the moment. Please wait until he returns or 'ring' the bell.

@act ring=$sagebrush:entry=$sagebrush:act/ring=$nothing

@lock $sagebrush:act/ring=canring:1

@set $sagebrush:act/ring=canring:{if:{lt:{prop:rings/{ref:me}},10},1,0}

@fail $sagebrush:act/ring=You may no longer ring the bell.

@succ $sagebrush:act/ring={null:{tell:You ring the bell on the counter for Pierre.},{otell:{name:me} rings the bell on the counter.}}{if:{dbeq:{loc:$pierre},here},{force:$pierre,{eval:{select:{store:{add:1,{prop:rings/{ref:me}}},rings/{ref:me},this},ringbell}}},{if:{or:{eq:{idle:$pierre},-1},{gt:{idle:$pierre},599}},{null:{delay:3,{lit:{if:{not:{dbeq:{loc:$pierre},here}},{force:$pierre,home}{force:$pierre,:comes bustling in.}{null:{delay:2,{lit:{force:$pierre,:looks around\, "May I help someone?"}}}}}}}},{tell:{name:me} rings the bell for service.,$pierre}}}

lsedit $sagebrush:act/ring=ringbell

.del ^ $

pose looks up at {name:me} icily, "If it pleases {if:{eq:{prop:~sex,me},female},madam,sir}, do not ring the bell when I am already here."

pose coughs politely and glares at {name:me} coldly.

pose clenches his paw but does not look up.

pose pounds his little paw against the counter but refuses to look up at {name:me}.

pose looks up at {name:me} furiously.

pose squeaks at {name:me}, "WHAT DO YOU WANT?"

pose bats {name:me} away from the bell.

pose squeaks, "I will not have you make a mockery of me, /{if:{eq:{prop:~sex,me},female},MADAM,SIR}/!"

pose moves the bell away from {name:me}'s paw. He does not look up but says, "Please stop, {if:{eq:{prop:~sex,me},female},madam,sir}."

pose squeaks, "That's it! No more bell for you!"

.end

@link $sagebrush:pierre=$sagebrush:entry

@act lead=$sagebrush:entry=$sagebrush:act/lead=$nothing

@succ $sagebrush:act/lead={if:{dbeq:{loc:$wesley},here},{with:key,{hasroom?:me},{if:{&key},{if:{contains:${sublist:{&key},2,2,:}key,me},{null:{force:$wesley,:says cheerily\, "Follow me\, please\, {if:{eq:{prop:~sex,me},female},ma'am,sir}."}{force:$wesley,up}{store:{sublist:{&key},2,2,:},_leadingwhere,$floor2},{if:{prop:~/+ride/leading/{subst:{ref:me},#,},$wesley},{delay:1,{lit:{null:{force:$wesley,{prop:_leadingwhere,$floor2}}{delay:2,{lit:{null:{force:$wesley,:bows out.}{force:$wesley,+ride quit}{force:$wesley,home}}}}}}},{store:{ref:me},_leading,$floor2}}},{null:{force:$wesley,:says cheerily\, "You don't seem to have your key\, {if:{eq:{prop:~sex,me},female},ma'am,sir}."}}},{null:{force:$wesley,:says cheerily\, "You must 'request' a room first\, {if:{eq:{prop:~sex,me},female},ma'am,sir}."}}}},Please wait for Wesley to return.}

@set $sagebrush:floor2=_arrive/leadon:,{if:{dbeq:{prop:_leading,this},me},{null:{force:$wesley,:gestures to {name:me}. "Follow me\, please."},{force:$wesley,{prop:_leadingwhere,$floor2}},{delay:2,{lit:{null:{force:$wesley,+ride quit},{store:,_leading,$floor2},{store:,_leadingwhere,$floor2},{delay:2,{lit:{null:{force:$wesley,out},{delay:1,{lit:{null:{force:$wesley,ds}}}}}}}}}}}}}

@act return;return key;returnkey=$sagebrush:entry=$sagebrush:act/return=$nothing

@succ $sagebrush:act/return={with:tmp,,{if:{set:tmp,{hasroom?:{ref:me}}},{if:{dbeq:{loc:${sublist:{&tmp},2,2,:}key},me},{if:{dbeq:{loc:$pierre},here},{force:$pierre,:smiles graciously to {name:me}: "Thank you\, {if:{eq:{prop:~sex,me},female},madam,sir}\, for choosing Sagebrush Inn. Please come again."},You place the {name:${sublist:{&tmp},2,2,:}key} on the counter.},{if:{dbeq:{loc:$pierre},here},{force:$pierre,:frowns distressedly at {name:me}. "You're lucky we found your key\, {if:{eq:{prop:~sex,me},female},ma'am,sir}. Please have it on paw next time you check out."},You check out\, quietly hoping that someone will find your key.}}{force:$pierre,@tel ${sublist:{&tmp},2,2,:}key=me},{if:{dbeq:{loc:$pierre},here},{force:$pierre,:smiles faintly at {name:me}\, "I'm afraid\, {if:{eq:{prop:~sex,me},female},madam,sir}\, you are not checked into a room.},You are not checked into a room.}}}

@drop $sagebrush:entry={with:tmp,{matchkey:{ref:{&arg}}},{if:{&tmp},{force:$pierre,take {&arg}}{null:{delay:2,{lit:{force:$pierre,:glares at {name:me} and picks up the dropped key.}}}}}}

==

@create Message Board=$sagebrush:commonroom=$sagebrush:obj/mboard

@act read=$sagebrush:obj/mboard=$sagebrush:obj/mboard/act/read=$nothing

@act post=$sagebrush:obj/mboard=$sagebrush:obj/mboard/act/post=$nothing

@act delete=$sagebrush:obj/mboard=$sagebrush:obj/mboard/act/delete=$nothing

@act viewboard;vb;view;vp=$sagebrush:obj/mboard=$sagebrush:obj/mboard/act/vp=$nothing

@tel $sagebrush:obj/mboard=$sagebrush:commonroom

@desc $sagebrush:obj/mboard={wrap:{exec:desc},70}

@set $sagebrush:obj/mboard=desc:A large wooden board fills one wall of the room. To it are tacked countless pieces of parchment. You can 'view' the most recent messages. You may also 'post' a new message of your own.

@sdesc $sagebrush:obj/mboard=The ({name:this}) - +help {name:this}

+help #set $sagebrush:obj/mboard=lsedit $sagebrush:obj/mboard=+help

.del ^ $

+------------------------------------------------------------------------------+

| ~@ Sagebrush Inn: Message Board Help @~ |

|==============================================================================|

| Commands: |

| read (Display information and body text for the specified |

| message, as well as any follow-up comments.) |

| view/vp [] (List messages on a given 'page', where each page |

| includes ten messages. Without an argument, this |

| will display the first page.) |

| post [/]=[]= (Post a comment on the |

| given message, if it exists. Valid modifiers: A, |

| post anonymously) |

| post == (Post a new message on the board.) |

| delete (Remove a message from public display, if either you |

| are the original author, or if you are a moderator.) |

|______________________________________________________________________________|

.end

@set $sagebrush:obj/mboard=mods:Riverdale Wytethorn

@set $sagebrush=_msgmacs/mesgauth:{if:{instr:{:1},/},{prop!:mesg/{strip:{sublist:{:1},1,1,/}}/comment/{strip:{sublist:{:1},2,2,/}}/author,$obj/mboard},{prop!:mesg/{strip:{:1}}/author}}

@set $sagebrush=_msgmacs/mesgname:{if:{instr:{:1},/},{prop!:mesg/{strip:{sublist:{:1},1,1,/}}/comment/{strip:{sublist:{:1},2,2,/}}/title,$obj/mboard},{prop!:mesg/{strip:{:1}}/title}}

@set $sagebrush=_msgmacs/mod?:{lmember:{prop!:mods,$obj/mboard},{name:{:1}}, }

@succ $sagebrush:obj/mboard/act/post={lexec:post}

lsedit $sagebrush:obj/mboard/act/post=post

.del ^ $

{with:dir,,{with:sub,{strip:{sublist:{&arg},1,1,=}},{with:mods,{strip:{sublist:{&arg},2,2,=}},{with:text,{sublist:{&arg},3,3,=},{if:{and:{&sub},{&text},{smatch:{&arg},*=*=*}},{if:{instr:{&sub},/},{with:postn,{strip:{sublist:{&sub},1,1,/}},{null:{set:sub,{sublist:{&sub},2,2,/}}}{if:{and:{isnum:{&postn}},{propdir:mesg/{&postn}/,$obj/mboard}},{if:{prop:mesg/{&postn}/allowcomments,$obj/mboard},{null:{set:dir,mesg/{&postn}/comment/{add:{count:{listprops:mesg/{&postn}/comment/,$obj/mboard}},1}/}{if:{not:{&sub}},{set:sub,Re: {mesgname:{&postn}}}}}Comment posted.,Post does not allow comments.},There is no such post!}},

{null:{set:dir,mesg/{add:{count:{listprops:mesg/,$obj/mboard}},1}/}}Message posted.}{if:{&dir},{null:{store:{&sub},{&dir}title,$obj/mboard},{store:{if:{instr:{&mods},A},#-1,{name:me}},{&dir}author,$obj/mboard},{store:{if:{instr:{&mods},N},0,1},{&dir}allowcomments,$obj/mboard},{store:{secs},{&dir}date,$obj/mboard},{store:{&text},{&dir}text,$obj/mboard}}},{exec:posthelp}}}}}}

.end

@set $obj/mboard/act/post=posthelp:Syntax:\r post =[]=\r post /[]==\r\rThe first syntax posts a new message on the message board, with the subject . Valid modifiers for this syntax are: A, post anonymously; N, disallow comment. The second syntax posts a comment on the specified message (#). Valid modifiers: A, post anonymously.

@succ $sagebrush:obj/mboard/act/read={null:{set:arg,{strip:{&arg}}}}{with:tmp,,{if:{propdir:mesg/{&arg}/,$obj/mboard},{left:,70,-}\r {left: {prop:mesg/{&arg}/title,$obj/mboard},{subt:68,{strlen:{set:tmp,{if:{eq:{prop:mesg/{&arg}/author,$obj/mboard},#-1},Anonymous,{prop:mesg/{&arg}/author,$obj/mboard}}}}}}{&tmp}\r{right:Posted: {ftime:%D, %l:%M %p,{prop:mesg/{&arg}/date,$obj/mboard}},69}\r{left:,70,- }\r{wrap:{prop:mesg/{&arg}/text,$obj/mboard},70}{left:,70,-}{if:{propdir:mesg/{&arg}/comment/,$obj/mboard},\r Comments:\r{parse:com,{listprops:mesg/{&arg}/comment/,$obj/mboard}, {prop:{&com}/title,$obj/mboard} ({subst:{prop:{&com}/author,$obj/mboard},#-1,Anonymous})\r{prop:{&com}/text,$obj/mboard}\r}},No such message.}}

@succ $sagebrush:obj/mboard/act/vp={with:tmp,{&arg},{null:{set:arg,{add:{mult:{subt:{if:{isnum:{&arg}},{abs:{&arg}},1},1},10},1}}}{if:{propdir:mesg/{&arg}/,$obj/mboard},{null:{tell:{left:,55,-}}{with:deleted,0,{with:i,{&arg},{while:{and:{propdir:mesg/{&i}/,$obj/mboard},{lt:{&i},{add:{&arg},10}}},{if:{prop:mesg/{&i}/deleted,$obj/mboard},{inc:deleted},{tell:{right:{&i},3}. {midstr:{left:{prop:mesg/{&i}/title,$obj/mboard},50},1,29} {left:{subst:{prop:mesg/{&i}/author,$obj/mboard},#-1,Anonymous},10} {count:{listprops:mesg/{&i}/comment/,$obj/mboard}} Comment(s)}}{inc:i}}{if:{propdir:mesg/{&i}/,$obj/mboard},{tell:## Continued on 'view {add:{default:{&tmp},1},1}'}}}{tell:{right:READ # to read a message---,55,-}\r{&deleted} message{if:{ne:{&deleted},1},s} erased.}}},No such page.}}

@succ $sagebrush:obj/mboard/act/delete={if:{propdir:mesg/{&arg}/,$obj/mboard},{if:{or:{lmember:{prop:mods,$obj/mboard},{name:me}},{eq:{prop:mesg/{&arg}/author},{name:me}}},You delete message {&arg}.{null:{foreach:p,{listprops:mesg/{&arg}/,$obj/mboard},{store:{prop:{&p},$obj/mboard},deleted/{&arg}/{subst:{&p},mesg/{&arg}/,},$obj/mboard}},{delprop:mesg/{&arg}/,$obj/mboard},{store:1,mesg/{&arg}/deleted,$obj/mboard}},Permission denied.},No such message.}

=

@create Bed=$sagebrush:elmwood=$sagebrush:obj/bed1

@lock $sagebrush:obj/bed1=$~noone

@tel $sagebrush:obj/bed1=$sagebrush:elmwood

@set $sagebrush:obj/bed1=_pillows:5

@desc $sagebrush:obj/bed1={lexec:beddesc,$obj/bed1}

lsedit $sagebrush:obj/bed1=beddesc

.del ^ $

A big, fluffy bed. {if:{lmember:{prop:_inbed},{ref:me}, },You are comfortably ensconced in the pillows{if:{gt:{count:{prop:_inbed}},1},\, {name:{strip:{subst:{prop:_inbed},{ref:me},}}} beside you}. You can 'get up' at any time.,{if:{count:{prop:_inbed}, },{commas:{subst:{prop:_inbed}, ,\r},and,v,{name:{&v}}} {if:{gt:{count:{prop:_inbed}, },1},are lying in bed.,is lying in the bed. You can 'lie down' as well.},No one is lying in the bed. You may 'lie down'.}} There are {prop:_pillows} pillow{if:{ne:{prop:_pillows},1},s} on the bed{if:{prop:_pillowfight?},

{if:{prop:_bedside},{if:{dbeq:{prop:_bedside},me},. You can 'throw pillow at '.,\, and {name:{prop:_bedside}} is currently behind the bed. You can try to 'steal bed' from him/her. There {with:n,{subt:{default:{prop:_totalpillows},5},{prop:_pillows}},{if:{ne:{&n},1},are,is} {&n} pillow{if:{ne:{&n},1},s} on your side. You can 'throw pillow at '.}},. No one is currently behind the bed\, so you can 'steal bed'. There {with:n,{subt:{default:{prop:_totalpillows},5},{prop:_pillows}},{if:{ne:{&n},1},are,is} {&n} pillow{if:{ne:{&n},1},s} on your side. You can 'throw pillow at '.}} See 'pillowstat' for the current score or type 'clean up' to end the fight.,. You can 'throw pillow at ' to initiate a pillow fight.}

.end

@act lie down=$sagebrush:obj/bed1=$sagebrush:obj/bed1/liedown=$nothing

@succ $sagebrush:obj/bed1/liedown={lexec:liedown,$obj/bed1}

lsedit $sagebrush:obj/bed1=liedown

.del ^ $

{if:{prop:_pillowfight?},You can't lie down during a pillow fight! Type 'clean up' to end the game.,{if:{lmember:{prop:_inbed},{ref:me}, },You are already lying down on the bed.,{if:{gt:{count:{prop:_inbed}, },1},You hop into the bed. {with:rand,{lrand:{prop:_inbed}, },{null:{otell:{name:me} hops on the bed.,here,me}{otell:{name:{&rand}} falls out of the bed!,here,{&rand}}{tell:{&rand},{name:me} pushes you out of the bed!}{store:{strip:{subst:{prop:_inbed},{&rand},}} {ref:me},_inbed}}},You hop into the bed.{null:{otell:{name:me} hops into the bed.,here,me}{store:{strip:{prop:_inbed} {ref:me}},_inbed}}}}}

.end

@act get up=$sagebrush:obj/bed1=$sagebrush:obj/bed1/getup=$nothing

@succ $sagebrush:obj/bed1/getup={lexec:getup,$obj/bed1}

lsedit $sagebrush:obj/bed1=getup

.del ^ $

{if:{lmember:{prop:_inbed},{ref:me}, },You get up.{null:{otell:{name:me} gets up out of the bed.}{store:{strip:{subst:{prop:_inbed},{ref:me},}},_inbed}},You aren't in the bed!}

.end

@set $sagebrush:elmwood=_depart/leavebed:,{ref:me}, },You get up out of the bed.{null:{otell:{name:me} gets up out of the bed.}{store:{strip:{subst:{prop:_inbed,$obj/bed1},{ref:me},}},_inbed,$obj/bed1}}}

@set $sagebrush:elmwood=_depart/surrenderbed:,{if:{dbeq:{prop:_bedside,$obj/bed1},me},You surrender the bed as you leave.{null:{otell:{name:me} surrenders the bed as {pronouns:%s} leaves.,here}{store:,_bedside,$obj/bed1}}}}

@act throw pillow at=$sagebrush:obj/bed1=$sagebrush:obj/bed1/throwpillow=$nothing

@lock $sagebrush:obj/bed1/throwpillow=_holdfire:0

@set $sagebrush:obj/bed1/throwpillow=_holdfire:{lt:{subt:{secs},{prop:_lastgame,$obj/bed1}},11}

@fail $sagebrush:obj/bed1/throwpillow=GAME ENDED. PLEASE HOLD YOUR FIRE!

@succ $sagebrush:obj/bed1/throwpillow={lexec:throwpillow,$obj/bed1}

lsedit $sagebrush:obj/bed1=throwpillow

.del ^ $

{with:tmp2,,

{if:{and:{not:{istype:{&arg},bad}},{contains:{&arg},here}},{if:{or:{istype:{&arg},player},{instr:{flags:{&arg}},Z}},{if:{not:{prop:_pillowfight?}},You initiate a pillow fight!{null:{otell:{name:me} initiates a pillow fight!,here,me},{delprop:_pillowstat/}{store:yes,_pillowfight?},{store:{ref:me},_bedside},{if:{prop:_inbed},{otell:{name:me}'s sudden activity makes everyone fall out of bed,here,#-1}{store:,_inbed}}}}

{with:tmp,,{if:{or:{and:{not:{istype:{prop:_bedside},bad}},{set:tmp,{dbeq:{prop:_bedside},me}},{gt:{prop:_pillows},0}},{and:{not:{&tmp}},{gt:{subt:{default:{prop:_totalpillows},5},{prop:_pillows}},0}}},{null:{tell:You hurl a pillow at {name:{&arg}}!}

{store:{add:{prop:_thrown/{ref:me},$sbpar},1},_thrown/{ref:me},$sbpar}

{otell:{if:{eq:{set:tmp2,{subt:{secs},{prop:_lastpillow/{ref:me}}}},1},{eval:{lrand:{list:rapidpillow}}},{if:{gt:{prop:_pillowstat/{ref:me}/damage},99},{eval:{lrand:{list:pillowtired}}},{if:{eq:{&tmp2},11},'s pillow spins directly into {name:{&arg}}'s {lrand:leg arm shoulder stomach, }{null:{dodirect:{ref:me}},{dodam:{ref:{&arg}},2}},{if:{gt:{&tmp2},5},{eval:{lrand:{list:pillow1}}},{eval:{lrand:{list:pillow2}}}}}}},here,#-1},{store:{secs},_lastpillow/{ref:me}}

{if:{dbeq:{&arg},me},{store:{add:{prop:_pillowstat/{ref:me}/suicidal},1},_pillowstat/{ref:me}/suicidal}}{store:{add:{prop:_pillowstat/{ref:{&arg}}/attemptson},1},_pillowstat/{ref:{&arg}}/attemptson}{if:{&tmp},{store:{subt:{prop:_pillows},1},_pillows},{store:{add:{prop:_pillows},1},_pillows}}},There are no pillows on your side!}},No such player or zombie here!},I don't see that here.}}

.end

@set $sagebrush:obj/bed1=_msgmacs/endstreak:{if:{gt:{prop:_pillowstat/{:1}/streak,$obj/bed1},3},{otell:{name:me}'s << {prop:_pillowstat/{:1}/streak,$obj/bed1}-PILLOW RAMPAGE HAS ENDED! >>,here,#-1}}{store:0,_pillowstat/{:1}/streak,$obj/bed1}

@set $sagebrush:obj/bed1=_msgmacs/dodam:{if:{and:{gt:{store:{add:{prop:_pillowstat/{:1}/damage,$obj/bed1},{:2}},_pillowstat/{:1}/damage,$obj/bed1},99},{lt:{subt:{prop:_pillowstat/{:1}/damage},{:2}},100}},{otell:{name:me}'s shot makes << {name:{:1}} HEAVILY INJURED! >>,here,#-1}}

@set $sagebrush:obj/bed1=_msgmacs/dodirect:{store:{add:{prop:_pillowstat/{:1}/direct,$obj/bed1},{if:{gt:{store:{add:{prop:_pillowstat/{:1}/streak,$obj/bed1},1},_pillowstat/{:1}/streak,$obj/bed1},3},{if:{lt:{subt:{prop:_pillowstat/{:1}/streak,$obj/bed1},1},4},{null:{otell:{name:{:1}} is on a << PILLOW RAMPAGE! >>,here,#-1}}}2,1}},_pillowstat/{:1}/direct,$obj/bed1}

@set $sagebrush:obj/bed1=_msgmacs/dograze:{store:{add:{prop:_pillowstat/{:1}/graze,$obj/bed1},1},_pillowstat/{:1}/graze,$obj/bed1}{store:0,_pillowstat/{:1}/streak,$obj/bed1}{endstreak:{:1}}

@set $sagebrush:obj/bed1=_msgmacs/domiss:{store:{add:{prop:_pillowstat/{:1}/miss,$obj/bed1},1},_pillowstat/{:1}/miss,$obj/bed1}{store:{add:{prop:_pillowstat/{:2}/dodge,$obj/bed1},1},_pillowstat/{:2}/dodge,$obj/bed1}{endstreak:{:1}}

@set $sagebrush:obj/bed1=_msgmacs/damstat:{with:calctmp,{div:{mult:{prop:_pillowstat/{:1}/damage,$obj/bed1},10},2},{if:{gt:{strlen:{&calctmp}},1},{midstr:{&calctmp},1,{subt:{strlen:{&calctmp}},1}}}.{midstr:{&calctmp},-1}}

lsedit $sagebrush:obj/bed1=pillow1

.del ^ $

's pillow hits {name:{&arg}} squarely in the head.{null:{dodam:{ref:{&arg}},3},{dodirect:{ref:me}}}

's pillow slams into {name:{&arg}}'s shoulder.{null:{dodam:{ref:{&arg}},2},{dodirect:{ref:me}}}

's pillow grazes {name:{&arg}}.{null:{dograze:{ref:me}},{dodam:{ref:{&arg}},1}}

's pillow misses {name:{&arg}}.{null:{domiss:{ref:me},{ref:{&arg}}}}

's pillow lands at {name:{&arg}}'s feet.{null:{domiss:{ref:me},{ref:{&arg}}}}

.end

lsedit $sagebrush:obj/bed1=rapidpillow

.del ^ $

's pillow flies right by {name:{&arg}}{null:{domiss:{ref:me},{ref:{&arg}}}}

's pillow hurtles into the wall behind {name:{&arg}}.{null:{domiss:{ref:me},{ref:{&arg}}}}

's pillow zips past {name:{&arg}}.{null:{domiss:{ref:me},{ref:{&arg}}}}

{if:{eq:{dice:10},1},'s pillow slams into {name:{&arg}}'s jaw!{null:{dodam:{ref:{&arg}},3},{dodirect:{ref:me}}},'s pillow grazes {name:{&arg}}'s {lrand:shoulder neck thigh, }.{null:{dograze:{ref:me}},{dodam:{ref:{&arg}},1}}}

.end

lsedit $sagebrush:obj/bed1=pillow2

.del ^ $

's pillow misses {name:{&arg}}.{null:{domiss:{ref:me},{ref:{&arg}}}}

's pillow slams into the wall, a clean miss.{null:{domiss:{ref:me},{ref:{&arg}}}}

's pillow grazes {name:{&arg}}'s {lrand:arm ear leg head, }.{null:{dograze:{ref:me}},{dodam:{ref:{&arg}},1}}

's pillow lands squarely at {name:{&arg}}'s feet.{null:{domiss:{ref:me},{ref:{&arg}}}}

's pillow flies up against the ceiling.{null:{domiss:{ref:me},{ref:{&arg}}}}

's pillow hits {name:{&arg}} in the chest.{null:{dodam:{ref:{&arg}},2},{dodirect:{ref:me}}}

.end

lsedit $sagebrush:obj/bed1=pillowtired

.del ^ $

's pillow grazes {name:{&arg}}'s {lrand:arm ear leg head, }.{null:{dograze:{ref:me}},{dodam:{ref:{&arg}},1}}

's pillow grazes {name:{&arg}}'s {lrand:arm ear leg head, }.{null:{dograze:{ref:me}},{dodam:{ref:{&arg}},1}}

's pillow flops to the ground.{null:{domiss:{ref:me},{ref:{&arg}}}}

's pillow hits {name:{&arg}} lightly in the {lrand:chest leg, }.{null:{dodam:{ref:{&arg}},1},{dodirect:{ref:me}}}

{if:{eq:{dice:10},1},'s pillow bounces off the ceiling and slams into {name:{&arg}}'s head.{null:{dodirect:{ref:me}},{dodam:{ref:{&arg}},3}},'s pillow flies into a wall.}

's pillow spins off and hits the {lrand:wall door ceiling floor, }.

.end

@set $sagebrush:obj/bed1=_msgmacs/pilscore:{add:{mult:{:5},5},{mult:{subt:{add:{mult:10,{:1}},{mult:5,{:2}},{mult:-7,{:3}}},{:4}},10}}

@act clean up=$sagebrush:obj/bed1=$sagebrush:obj/bed1/cleanup=$nothing

@succ $sagebrush:obj/bed1/cleanup={lexec:cleanup,$obj/bed1}

lsedit $sagebrush:obj/bed1=cleanup

.del ^ $

{if:{prop:_pillowfight?},You end the pillow fight. Type 'pillowstat' for the results!{null:{otell:{name:me} ends the pillow fight.\r<< Type 'pillowstat' for the results! >>,here},{store:,_pillowfight?}{store:{secs},_lastgame}{store:,_bedside},{store:{default:{prop:_totalpillows},5},_pillows},

{with:tmp,,{with:tmp2,,{foreach:p,{listprops:_pillowstat/},{store:{add:{prop:{set:tmp,_lifetimescores/{subst:{&p},_pillowstat/,}}/score,$sbpar},{set:tmp2,{pilscore:{prop:{&p}/direct},{prop:{&p}/graze},{prop:{&p}/miss},{prop:{&p}/damage},{prop:{&p}/dodge}}}},{&tmp}/score,$sbpar}{if:{gt:{&tmp2},{prop:_pillowhigh,$sbpar}},{store:{&tmp2},_pillowhigh,$sbpar}{store:{subt:{&p},_pillowstat/,},_pillowhighn,$sbpar}}{store:{add:{prop:{&tmp}/direct,$sbpar},{prop:{&p}/direct}},{&tmp}/direct,$sbpar}{store:{add:{prop:{&tmp}/graze,$sbpar},{prop:{&p}/graze}},{&tmp}/graze,$sbpar}{store:{add:{prop:{&tmp}/miss,$sbpar},{prop:{&p}/miss}},{&tmp}/miss,$sbpar}{store:{add:{prop:{&tmp}/dodge,$sbpar},{prop:{&p}/dodge}},{&tmp}/dodge,$sbpar}{store:{add:{prop:{&tmp}/damage,$sbpar},{prop:{&p}/damage}},{&tmp}/damage,$sbpar}}}}},There is no pillow fight going on.}

.end

@act pillowstat;pillows;ps=$sagebrush:obj/bed1=$sagebrush:obj/bed1/pillowstat=$nothing

@succ $sagebrush:obj/bed1/pillowstat={lexec:pillowstat,$obj/bed1}

lsedit $sagebrush:obj/bed1=pillowstat

.del ^ $

{if:{prop:_pillowfight?},Printing stats for current fight:,Printing stats for last fight:}\r

{with:innoc,,{with:mosthits,,{with:mosthitsn,,{with:mostthrows,,{with:mostthrowsn,,{with:mostatt,,{with:mostattn,,{with:moststeals,,{with:moststealsn,,{with:onehit,,{with:bedknob,,{with:bedknobn,,

+---------------------------------------------------------------+\r

| ~@ Sagebrush Inn: Pillow Fight Stats @~ |\r

|===============================================================|\r

| Name | Hits Grazes Misses Acc Dam Ddgs Score |\r

|---------------------------------------------------------------|\r

{parse:p,{listprops:_pillowstat/},| {with:acc,,{with:dir,{abs:{prop:{&p}/direct}},{with:graze,{abs:{prop:{&p}/graze}},{with:miss,{abs:{prop:{&p}/miss}},{with:tot,{add:{&miss},{&graze},{&dir}},{midstr:{left:{name:{subst:{&p},_pillowstat/,}},9},1,9} | {center:{&dir},7} {center:{&graze},8} {center:{&miss},6}{center:{set:acc,{div:{add:{mult:{&dir},100},{mult:{&graze},50}},{add:{&dir},{&graze},{&miss}}}}%,7}{center:{damstat:{subst:{&p},_pillowstat/,}},5}{center:{abs:{prop:{&p}/dodge}},6}{right:{pilscore:{&dir},{&graze},{&miss},{prop:{&p}/damage},{prop:{&p}/dodge}},8}

{null:{if:{gt:{&tot},{&mostthrowsn}},{set:mostthrowsn,{&tot}}{set:mostthrows,{subst:{&p},_pillowstat/,}}}{if:{gt:{prop:{&p}/bedsteal},{&moststealsn}},{set:moststealsn,{prop:{&p}/bedsteal}}{set:moststeals,{subst:{&p},_pillowstat/,}}}{if:{gt:{prop:{&p}/bedlost},{&bedknobn}},{set:bedknobn,{prop:{&p}/bedlost}}{set:bedknob,{subst:{&p},_pillowstat/,}}}{if:{gt:{prop:{&p}/attemptson},{&mostattn}},{set:mostattn,{prop:{&p}/attemptson}}{set:mostatt,{subst:{&p},_pillowstat/,}}}{if:{gt:{&dir},{&mosthitsn}},{set:mosthitsn,{&dir}}{set:mosthits,{subst:{&p},_pillowstat/,}}}{if:{and:{eq:{&tot},1},{eq:{&dir},1}},{set:onehit,{subst:{&p},_pillowstat/,}}}{if:{and:{&tot},{gt:{subt:{prop:_lastgame},{prop:_lastpillow/{subst:{&p},_pillowstat/,}}},60}},{store:{subst:{&p},_pillowstat/,},_tmp/quitter}}

{if:{gt:{prop:{&p}/suicidal},{prop:_tmp/suicn}},{store:{prop:{&p}/suicidal},_tmp/suicn}{store:{subst:{&p},_pillowstat/,},_tmp/suic}}{if:{and:{eq:{&tot},0},{prop:{&p}/damage}},{set:innoc,{subst:{&p},_pillowstat/,}}}}

}}}}} |}\r|{left:,63,-}|\r

{if:{not:{prop:_pillowfight?}},| {left:Most Aggressive: {name:{&mostthrows}},30} {left:Most Successful: {name:{&mosthits}},30} |\r

| {left:Most Victimized: {if:{&mostatt},{name:{&mostatt}},-No one-},30} {left:One-Hit-Wonder: {if:{&onehit},{name:{&onehit}},-No one-},30} |\r

| {left:Bed Thief: {if:{&moststeals},{name:{&moststeals}},-No one-},30} {left:Bed Knob: {if:{&bedknob},{name:{&bedknob}},-No one-},30} |\r

{if:{or:{&innoc},{prop:_tmp/suic}},| {left:{if:{prop:_tmp/suic},Most Suicidal: {name:{prop:_tmp/suic}}},30} {left:{if:{&innoc},Innocent Bystander: {name:{&innoc}}},30} |\r}

{if:{prop:_tmp/quitter},| {left:Quitter: {name:{prop:_tmp/quitter}},61} |\r}

|{left:,63,_}|}}}}}}}}}}}}}

{null:{delprop:_tmp/}}

.end

@act pillowhints;phints=$sagebrush=$sagebrush:act/pillowhints=$nothing

@succ $sagebrush:act/pillowhints={list:succ}

lsedit $sagebrush:act/pillowhints=succ

.del ^ $

+-------------------------------------------------------------+

| ~@ Sagebrush Inn: Pillow Fight @~ |

|=============================================================|

| Scoring Info: |

| Direct Hit: +100 score |

| - Headshot: +1.5 dam; Normal: +1 dam; Light: +.5 dam |

| Graze: +50 score |

| - +.5 dam |

| Miss: -70 score |

| - +1 dodge |

| Dodge: +5 score |

| Damage: -20 score |

| |

| TIP: Take it slow; the faster you go, the more you'll |

| miss your target. Even in the heat of battle, your |

| quiet diligence should pay off. Also, use the |

| guaranteed 'snipe' shot to secure a 'Pillow Rampage' |

| when possible. |

| |

| Pillow Rampage: If you land four direct hits in a row, |

| your pillow rampage will begin. All subsequent, |

| consecutive hits (including the fourth) will add 200 |

| points to your score. |

| |

| Heavy Damage: Once you reach 50 damage points, you will |

| be less likely to throw powerful shots. |

| |

| Bed Bonus: You receive an additional 50 points for each |

| minute you hold onto the bed during the course of the |

| game, up to 250 points. |

|_____________________________________________________________|

.end

@act stealbed;steal bed=$sagebrush:obj/bed1=$sagebrush:obj/bed1/stealbed=$nothing

@succ $sagebrush:obj/bed1/stealbed={lexec:stealbed,$obj/bed1}

lsedit $sagebrush:obj/bed1=stealbed

.del ^ $

{with:dam,{prop:_pillowstat/{prop:_bedside}/damage},{if:{prop:_pillowfight?},{if:{prop:_bedside},{if:{dbeq:{prop:_bedside},me},You are already at the bed!,{if:{gt:{subt:{secs},{prop:_stealatt/{ref:me}}},9},

{null:{store:{secs},_stealatt/{ref:me}}}{if:{eq:{dice:{if:{gt:{&dam},100},2,{if:{lt:{&dam},20},4,3}}},1},You steal the bed from {name:{prop:_bedside}}!{null:{otell:{name:me} steals the bed from {name:{prop:_bedside}}!,here},{store:{add:{prop:_pillowstat/{prop:_bedside}/bedlost},1},_pillowstat/{prop:_bedside}/bedlost}{store:{ref:me},_bedside},{store:{add:{prop:_pillowstat/{ref:me}/bedsteal},1},_pillowstat/{ref:me}/bedsteal}},You try to steal the bed from {name:{prop:_bedside}} and fail.{null:{store:{add:{prop:_pillowstat/{ref:me}/bedlost},1},_pillowstat/{ref:me}/bedlost},{otell:{name:me} attempts to steal the bed from {name:{prop:_bedside}} and fails.}}},Please wait before trying again.}},You steal the bed.{null:{store:{add:{prop:_pillowstat/{ref:me}/bedsteal},1},_pillowstat/{ref:me}/bedsteal},{store:{ref:me},_bedside}}},There is no pillow fight going on.}}

.end

@act leavebed;leave bed=$sagebrush:obj/bed1=$sagebrush:obj/bed1/leavebed=$nothing

@succ $sagebrush:obj/bed1/leavebed={lexec:leavebed,$obj/bed1}

lsedit $sagebrush:obj/bed1=leavebed

.del ^ $

{if:{prop:_pillowfight

@act snipe=$sagebrush:obj/bed1=$sagebrush:obj/bed1/snipe=$nothing

@succ $sagebrush:obj/bed1/snipe={lexec:snipe,$obj/bed1}

lsedit $sagebrush:obj/bed1=snipe

.del ^ $

{if:{prop:_pillowfight?},{if:{prop:_pillowstat/{ref:me}/snipe?},You have already sniped someone once during this game.,{if:{not:{istype:{&arg},bad}},{if:{or{istype:{&arg},player},{instr:{flags:{&arg}},Z}},{with:tmp,,{if:{or:{and:{set:tmp,{dbeq:{prop:_bedside},me}},{gt:{prop:_pillows},0}},{and:{not:{&tmp}},{gt:{subt:{default:{prop:_totalpillows},5},{prop:_pillows}},0}}},{null:{tell:You snipe {name:{&arg}} with a pillow! It slams into {pronouns:%p,{&arg}} head. Pow!}{otell:{name:me} snipes {name:{&arg}} with a pillow! It slams into {pronouns:%p,{&arg}} head. Pow!,here},{store:{add:{prop:_pillowstat/{ref:{&arg}}/attemptson},1},_pillowstat/{ref:{&arg}}/attemptson}{if:{&tmp},{store:{subt:{prop:_pillows},1},_pillows},{store:{add:{prop:_pillows},1},_pillows}},{store:1,_pillowstat/{ref:me}/snipe?},{dodam:{ref:{&arg}},4},{dodirect:{ref:me}}},There are no pillows on your side!}},That is not a player or zombie!},I don't see that here.}},There is no pillow fight going on.}

.end

@act pillowhelp;pillow=$sagebrush=$sagebrush:act/pillow=$nothing

@succ $sagebrush:act/pillow={list:help}

lsedit $sagebrush:act/pillow=help

.del ^ $

+-------------------------------------------------------------+

| ~@ Sagebrush Inn: Pillow Fight @~ |

|=============================================================|

| While the Sagebrush Inn does not endorse this gross |

| misuse of the facilities or any other unconscionable |

| abuse of the pillows provided, for those patrons whose |

| interest may not be allayed, the commands for engaging in |

| pillow fights are outlined here. Any injuries or damages |

| resulting from such fights are the sole responsibilities |

| of the participants. |

| |

| All rooms with 'Bed's in them can use these: |

| - pillowhelp (Display this screen) |

| - throw pillow at (Throw pillow/initiate game) |

| - snipe (Powerful headshot - once per game) |

| - steal bed (Take control of the bed & its pillows) |

| - clean up (End current game) |

| - pillowstat/ps (Display scores and stats, displays |

| descriptive titles after game is ended) |

| Available anywhere in the inn: |

| - lifetime (Display top lifetime stats) |

| - lifetime (Display lifetime chart sorted by |

| ) |

| ANY BUGS SHOULD BE REPORTED TO RIVERDALE. |

|_____________________________________________________________|

.end

@act lifetime=$sagebrush=$sagebrush:act/lifetime=$nothing

@succ $sagebrush:act/lifetime={lexec:succ}

lsedit $sagebrush:act/lifetime=succ

.del ^ $

+-----------------------------------------------------------------+\r

| ~@ Sagebrush Inn: Lifetime Pillow Fight Stats @~ |\r

|=================================================================|\r

| Name | Hits Grazes Misses Dam Ddgs Score |\r

|-----------------------------------------------------------------|\r

{null:{set:arg,{if:{lmember:score hits grazes misses damage dodges,{&arg}, },{subst:{subst:{subst:{subst:{&arg},hits,direct},grazes,graze},misses,miss},dodges,dodge},score}}}{with:i,0,{parse:p,{sublist:{lsort:{listprops:_lifetimescores/,$sbpar},p1,p2,{gt:{prop:{&p2}/{&arg},$sbpar},{prop:{&p1}/{&arg},$sbpar}}},1,15},{null:{inc:i}}| {midstr:{left:{right:{&i}.,3} {name:{subst:{&p},_lifetimescores/,}},13},1,13} | {center:{prop:{&p}/direct,$sbpar},6} {center:{prop:{&p}/graze,$sbpar},8} {center:{prop:{&p}/miss,$sbpar},8} {center:{with:calctmp,{div:{mult:{prop:{&p}/damage,$sbpar},10},2},{if:{gt:{strlen:{&calctmp}},1},{midstr:{&calctmp},1,{subt:{strlen:{&calctmp}},1}}}.{midstr:{&calctmp},-1}},5} {center:{prop:{&p}/dodge,$sbpar},6} {right:{prop:{&p}/score,$sbpar},9} |}}\r

|-----------------------------------------------------------------|\r

| {left:All-Time High Score: {prop:_pillowhigh,$sbpar} by {name:{prop:_pillowhighn,$sbpar}},63} |\r

|_________________________________________________________________|

.end