Fix a few more minor bugs
This commit is contained in:
parent
656bf2f9f5
commit
4f10ce205a
9 changed files with 1359 additions and 697 deletions
|
|
@ -57,15 +57,17 @@ class CmdHint(MuxCommand):
|
|||
return "<< Sorry, the hint system for this area has not been created, yet. >>"
|
||||
|
||||
narrative = room_hints.get('narrative')
|
||||
hints = room_hints['hints']
|
||||
if narrative:
|
||||
narrative = sub(r"\n", " ", narrative)
|
||||
hints = room_hints.get('hints')
|
||||
|
||||
if not search_string or search_string == "":
|
||||
hint = hints['default']
|
||||
hint = hints.get('default')
|
||||
else:
|
||||
hint = hints[search_string]
|
||||
hint = hints.get(search_string)
|
||||
|
||||
narrative = sub(r"\n", " ", narrative)
|
||||
hint = sub(r"\n", " ", hint)
|
||||
if hint:
|
||||
hint = sub(r"\n", " ", hint)
|
||||
|
||||
return self.display_hint(narrative, hint, cleaned)
|
||||
|
||||
|
|
|
|||
|
|
@ -472,10 +472,10 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
|
|||
Return a list of puppets in the current location.
|
||||
Only used for calling hooks on the animatronic dolls.
|
||||
"""
|
||||
return [ puppet
|
||||
for puppet in self.location.contents
|
||||
if puppet.is_typeclass("typeclasses.puppets.Puppet")
|
||||
or puppet.is_typeclass("typeclasses.puzzles.StoryCube")
|
||||
return [puppet
|
||||
for puppet in self.location.contents
|
||||
if puppet.is_typeclass("typeclasses.puppets.Puppet")
|
||||
or puppet.is_typeclass("typeclasses.puzzles.StoryCube")
|
||||
]
|
||||
|
||||
def at_post_move(self, past_location, move_type="move", **kwargs):
|
||||
|
|
|
|||
|
|
@ -231,7 +231,10 @@ class Object(ObjectParent, ContribRPObject):
|
|||
"""
|
||||
Search for something globally.
|
||||
"""
|
||||
return super().search(searchdata, global_search=True)
|
||||
results = super().search(searchdata, global_search=True, quiet=True)
|
||||
if isinstance(results, list):
|
||||
return results[0]
|
||||
return results
|
||||
|
||||
def has(self, item):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -138,10 +138,7 @@ class Letter(Readable):
|
|||
self.cmdset.add_default(CmdSetBook)
|
||||
|
||||
def at_pre_drop(self, dropper):
|
||||
if dropper.location.key == "Dabbler's House":
|
||||
dropper.msg(f"You throw your {self.get_display_name(dropper)} into the fire and burn it.")
|
||||
else:
|
||||
dropper.msg(f"You throw your {self.get_display_name(dropper)} away.")
|
||||
dropper.msg(f"You throw your {self.get_display_name(dropper)} away.")
|
||||
self.delete()
|
||||
|
||||
|
||||
|
|
@ -156,8 +153,8 @@ class Book(Readable):
|
|||
reader.announce_action("$You() $conj(read) $pron(your) book.")
|
||||
|
||||
def at_pre_drop(self, reader):
|
||||
if reader.location.key == "Dabbler's House":
|
||||
reader.msg("You drop the book, but it flaps its pages, and flies back to a section on the shelf.")
|
||||
if reader.location.key == "Cozy House":
|
||||
reader.msg("You drop the book, but flapping its pages, flies back to its section on a shelf.")
|
||||
self.delete()
|
||||
else:
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@ This fascinating potion can create a dream-like state while awake, including vis
|
|||
|
||||
The moonberries grow under conifers, and I find I often have to travel to one of the islands on the Lavender Sea to collect these. Dreamshades (Lunara Mycelium) feed on floating dreams, and often congregate where dreamers sleep.
|
||||
|
||||
I have found Gigglecaps growing on well drained, rocky soil and even on rocks. Tickleweed loves the frothy, bubbly water that comes from the meadow's waterfall. This place too is where I collect the fizzy water.
|
||||
|
||||
I’ve noticed Pixies often dance in the marshlands to the East, but are often invisible except in the evenings. I’ve attempted to discuss a trade for pixie dust, but often luck out as they often pay more attention to their choreography than any trinkets I could produce.
|
||||
|
||||
|wProcedure|n
|
||||
|
|
@ -49,5 +47,26 @@ Step 2. |gadd|n all ingredients to the cauldron
|
|||
Step 3. |gcreate|n the potion by stirring the potion clockwise for exactly seven rotations
|
||||
Step 4. |gbottle|n the concoction into a vial
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|bPuck's Revenge|n
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
A lovely prank, if one can be tempted to down this brown, but sparkly concoction.
|
||||
|
||||
|wIngredients|n
|
||||
|
||||
- Moonlit Whiskers
|
||||
- Donkeytail Grass
|
||||
- Whirlwind Leaves
|
||||
- Starlit Dewdrops
|
||||
|
||||
I call the whimsical grass that the resembles the tail of a donkey and grows in the Feywild prairies, |wDonkeytail|n, . It has a faint, sweet aroma, and provides a playful essence to the potion, enhancing the transformation and giving the drinker a temporary sense of carefree joy.
|
||||
|
||||
The silvery whiskers from the elusive Moonlit Cat, who only appears under certain lunar occurrences. Challenging to acquire without her consent, but necessary for the secrets it imparts.
|
||||
|
||||
The leaves from the Whirlwind tree perpetually dance and twirl as if caught in a breeze. They emit a soft, melodic sound when held. These infuse the potion with a sense of lightness, making the transformation feel like a joyful dance rather than a mere change.
|
||||
|
||||
Collect at dawn, the tiny dewdrops that glimmer like stars, from the petals of the Celestial Blossoms. This water enhances the potion's magical properties, filling it with whimsical adventures.
|
||||
|
||||
# End
|
||||
|bNote: This is still a work in progress... What do you think of this idea? You would gather herbs and whatnot, put them in the cauldron and then make potions! Seems intriguing...|n
|
||||
|
|
|
|||
|
|
@ -101,11 +101,7 @@ Keep in mind that some exits may not be available until you |glook|n for them (b
|
|||
"locks": "read:all()",
|
||||
"text": """When you created your account, my game creates a character with the same name. If you want to rename yourself, you create a new character. Follow these steps.
|
||||
|
||||
First, delete your introductory letter, using the |gburn|n command:
|
||||
|
||||
|gburn letter|n
|
||||
|
||||
Next, leave your current character by typing:
|
||||
Leave your current character by typing:
|
||||
|
||||
|gooc|n
|
||||
|
||||
|
|
|
|||
289
world/hints.yaml
289
world/hints.yaml
|
|
@ -19,34 +19,146 @@ boulder_top:
|
|||
getting them out of my way? They make quite the rope mesh making
|
||||
it hard to find my food.
|
||||
|
||||
frog_meadow:
|
||||
narrative: >-
|
||||
"<< Psst. ^ Heya. ^ Down here. ^ Ribbit... ^ Hey buddy. >>"
|
||||
You << stoop ^ look down ^ bend down >> and see
|
||||
a << tiny ^ small ^ >> << green ^ >> frog
|
||||
with a << teeny ^ >> << gold ^ >> crown. It says,
|
||||
"<< I see ya gawking. ^ You look confused. ^ Need some help? >> {0}"
|
||||
And with that, he hops away.
|
||||
;;
|
||||
A << flock ^ couple >> of crows fly into the meadow.
|
||||
One of them, hops << next to ^ near >> you.
|
||||
"<< I see ya gawking. ^ You look confused. ^ Need some help? >> {0}"
|
||||
;;
|
||||
A cricket, sporting a nice top hat and waistcoat, eyes you curiously.
|
||||
"You seem << confused ^ bewildered ^ befuddled ^ disoriented ^ perplexed >>,"
|
||||
it says. "Perhaps I can help. {0}
|
||||
Hope that helps. Good-bye << and good luck ^ >>."
|
||||
And with a mighty jump, hops to the other side of the << meadow ^ field >>.
|
||||
hints:
|
||||
default: >-
|
||||
The |Ybeast|n over there is << actually ^ quite >> friendly,
|
||||
but scared of everything and everyone.
|
||||
That's why he doesn't venture in to the forest.
|
||||
That, and he loves the fizzy water from the |Ystream|n.
|
||||
beast: >-
|
||||
The beast doesn't like new people. Sometimes you can |Yfeed|n him
|
||||
to get 'im to warm up to you. Sometimes takes a bit of food for him
|
||||
to trust you.
|
||||
feed: >-
|
||||
|YBerries|n are good, but he loves Dabbler's |Yscones|n.
|
||||
Just hard to get into his house.
|
||||
berries: You'll find a bush of them to the west in the Grotto.
|
||||
scones: Dabbler lives in a tree to the west, behind a red door.
|
||||
stream: Yes, the fizzy water is drinkable, so you can |Ycollect|n some.
|
||||
collect: To collect the water, you will need a |Ybottle|n.
|
||||
bottle: You want to |gfill bottle|n to collect the water.
|
||||
|
||||
lair:
|
||||
hints:
|
||||
default: >-
|
||||
This is the bedroom for the |wBig Hairy Beast|n, and little
|
||||
else. Eventually, I will expand this room into something more
|
||||
interesting, but at the moment, pretend there is a |wPardon our
|
||||
Dust|n sign or something.
|
||||
|/|/Of course I will install a secret door here, but not yet.
|
||||
|
||||
mellow_marsh:
|
||||
narrative: >-
|
||||
The << purple ^ large ^ >> heron
|
||||
<< gives you a sideways glance ^ raises a feathery eyebrow ^ stops its hunting >>,
|
||||
and << mentions ^ says >>, "{0}" ;;
|
||||
"Hrm," says the << purple ^ large ^ >> heron.
|
||||
"You seem << puzzled ^ confused ^ perplexed >>. {0}" ;;
|
||||
"You seem << puzzled ^ confused ^ perplexed >>,"
|
||||
says the << purple ^ large ^ >> heron. "{0}" ;;
|
||||
hints:
|
||||
default: >-
|
||||
Perhaps you can |Ylasso|n the legs, er, stilts, so they don't
|
||||
run off? Then, you can |Yjump|n in.
|
||||
lasso: If you don't have a rope, perhaps strong greenery, like |Yvines|n?
|
||||
vines: I flew over a |Yboulder|n once. It was covered in vines.
|
||||
boulder: >-
|
||||
I think the boulder was north and west of here, in the forest,
|
||||
in the Grove of the Matriarchs.
|
||||
jump: >-
|
||||
Yeah, your legs are too short, and your featherless arms can't
|
||||
lift you. Perhaps you should find something to |Ylaunch|n you
|
||||
higher in the air?
|
||||
launch: Yeah, launch, as in a |Ypole|n or something.
|
||||
pole: Those reeds are pretty tall. You could possibly use them.
|
||||
river: Wizards come her to |Ycollect|n the river water for use in potions.
|
||||
collect: To collect the water, you will need a |Ybottle|n.
|
||||
bottle: You want to |gfill bottle|n to collect the water.
|
||||
|
||||
homey_hut:
|
||||
narrative: >-
|
||||
A wolf skull << attached to ^ on >> the wall says, "{0}." ;;
|
||||
A wood carving of a small demon, << attached to ^ on >> the wall says, "{0}."
|
||||
hints:
|
||||
default: >-
|
||||
I can see you might need |Ylight|n in the dark dungeons across
|
||||
the sea. Of course, to travel there, you need to |Ycall|n for a
|
||||
boat. But be quick, before the lady of the house wakes up!
|
||||
light: >-
|
||||
You can |gget|n a |gtorch|, and when you need it, |glight|n it.
|
||||
call: >-
|
||||
Don't worry about stealing, as you can |gget|n the |ghorn|n.
|
||||
The sea mist will create another.
|
||||
|
||||
lazy_dock:
|
||||
narrative: >-
|
||||
The << black ^ large ^ >> raven
|
||||
<< gives you a sideways glance ^ raises a feathery eyebrow ^
|
||||
looks curiously at you >>, and
|
||||
<< mentions ^ says ^ croaks >>, "{0}"
|
||||
hints:
|
||||
default: >-
|
||||
Docks are good for |Yfishing|n and traveling by |Yboat|n.
|
||||
fishing: >-
|
||||
If you dare catch a |Yfish|n, use repeat the commands |gcast|n
|
||||
and |greel|n.
|
||||
fish: You can get rid of obnoxious fish using the |gthrow|n command.
|
||||
boat: A magical boat appears here, but only if you |Ycall|n it.
|
||||
call: To call the boat, |gblow|n a |Yhorn|n.
|
||||
swamp: I think the swamp is called |wMellow Marsh|n.
|
||||
horn: >-
|
||||
The mystical south wind gathers the mystical mist from the sea
|
||||
to create a calling horn. Trampolina's hut in the |Yswamp|n
|
||||
often is a conduit for the creation of these horns. Good luck
|
||||
getting in there.
|
||||
|
||||
grotto:
|
||||
narrative: >-
|
||||
A << flock ^ couple >> of sparrows fly into the berrybush.
|
||||
One of them, hops << next to ^ near >> you. It says,
|
||||
"<< I see that expression. ^ You look confused. ^ Need some help? >>"
|
||||
<< Turning its head ^ Hopping to a higher branch >>, it says, "{0}"
|
||||
Soon the flock flee for other bushes.
|
||||
;;
|
||||
A << yellow ^ orange ^ large ^ >> butterfly lands on your shoulder.
|
||||
"You look like you << could use some ^ need ^ would like some >> help,"
|
||||
it says, "{0}" As it flies away, it says, "Good luck!"
|
||||
;;
|
||||
A <<little ^ >> goblin walks down the footpath, and starts picking berries.
|
||||
"Hiya," he says. "I see ya << staring ^ gawking >>, so I'll give ya a
|
||||
bit o' advice. {0}"
|
||||
When finished, he says, "Hope that helps."
|
||||
And retreats back down the path with his bucket of berries.
|
||||
A << flock ^ couple >> of sparrows fly into the berrybush. One of
|
||||
them, hops << next to ^ near >> you. It says, "<< I see that
|
||||
expression. ^ You look confused. ^ Need some help? >>" << Turning
|
||||
its head ^ Hopping to a higher branch >>, it says, "{0}" Soon the
|
||||
flock flee for other bushes. ;;
|
||||
A << yellow ^ orange ^ large ^ >> butterfly lands on your
|
||||
shoulder. "You look like you << could use some ^ need ^ would like
|
||||
some >> help," it says, "{0}" As it flies away, it says, "Good
|
||||
luck!" ;;
|
||||
A <<little ^ >> goblin walks down the footpath, and starts picking
|
||||
berries. "Hiya," he says. "I see ya << staring ^ gawking >>, so
|
||||
I'll give ya a bit o' advice. {0}" When finished, he says, "Hope
|
||||
that helps." And retreats back down the path with his bucket of
|
||||
berries.
|
||||
hints:
|
||||
default: >-
|
||||
That |Ydoor|n leads to an interesting place, but the |Yknocker|n
|
||||
won't let you in without knowing the |Ysecret|n. So try to talk to it.
|
||||
won't let you in without knowing the |Ysecret|n. So try to talk
|
||||
to it.
|
||||
knocker: >-
|
||||
While not good at listening, he can't talk with that |Yring|n in
|
||||
his mouth.
|
||||
ring: Since it has it, you will want to |gget ring from knocker|n
|
||||
door: That door leads to |wDabbler's House|n.
|
||||
secret: >-
|
||||
If you say the secret |Ypassword|n, the |Yknocker|n will let you in.
|
||||
If you say the secret |Ypassword|n, the |Yknocker|n will let you
|
||||
in.
|
||||
password: >-
|
||||
The |Yknocker|n knows the password, but might give you a
|
||||
|Yhint|n if you ask for one.
|
||||
|
|
@ -96,6 +208,53 @@ cramped_kitchen:
|
|||
Then after you have a |Yteacup|n, you can |gpour|n yourself a cup.
|
||||
teacup: The cabinet is full of cups, so |gget teacup|n.
|
||||
|
||||
secret_room:
|
||||
narrative: >-
|
||||
The << wee ^ small >> << demon ^ imp ^ helper >>
|
||||
<< perched ^ roosting ^ poised >> on its iron stand looks
|
||||
<< curiously ^ quizically ^ inquisitively >> at you. |/|/
|
||||
You << then ^ >> hear a voice in your head.
|
||||
"<< Wondering I see. ^ Curious? ^ Overwhelmed? >> {0}"
|
||||
hints:
|
||||
default: >-
|
||||
Can't figure out how to use the |Ycauldron|n and the |Ytools|n
|
||||
in this secret alchemical lab to creation |Ypotions|n?
|
||||
Here you can learn to bewitch the mind and ensnare the senses,
|
||||
bottle fame, brew glory and even put a stopper in death.
|
||||
death:
|
||||
WHAT DID YOU SAY?
|
||||
|
||||
The small imp squeaks, and attempts to be small.
|
||||
|
||||
REMEMBER WHO HAS THE ULTIMATE SAY AROUND HERE.
|
||||
|
||||
The perched imp nods emphatically.
|
||||
potions: >-
|
||||
Find the potions and their |Yingredients|n in the grimoire... er,
|
||||
large brown |Ybook|n there. I suggest, making the potions |win order|n.
|
||||
book: >-
|
||||
While the book stays here, you can |gread|n it to learn the
|
||||
|Yingredients|n to add to the |Ycauldron|n. Just follow the
|
||||
|Ysequence|n of commands to make the potion.
|
||||
cauldron: >-
|
||||
Place the specific |Yingredients|n listed in the grimoire... er,
|
||||
large brown |Ybook|n there.
|
||||
You do know how to |gread|n a |gbook|n, right?
|
||||
tools: >-
|
||||
Don't worry about the tools right now. Just the |Ysequence|n of
|
||||
commands.
|
||||
ingredients: >-
|
||||
The alchemical components necessary for transubstantiation and
|
||||
the creation of potions are located around the area. Once you
|
||||
have all the ingredients, follow the |Ysequence|n of commands to
|
||||
make a potion.
|
||||
sequence: >-
|
||||
First, |gempty|n the cauldron. |/
|
||||
After you have |wgathered|n a component, |gadd|n the component. |/
|
||||
With all the ingredients, |gcreate|n the concoction.
|
||||
I will tell you if it is right. |/
|
||||
Finally, |gbottle|n it in the empty vials.
|
||||
|
||||
bedroom:
|
||||
hints:
|
||||
default: >-
|
||||
|
|
@ -107,96 +266,6 @@ bedroom:
|
|||
prairie:
|
||||
hints:
|
||||
default: >-
|
||||
This place should have a sign that reads, |wUnder Construction|n,
|
||||
as nothing much happens here now ... well, except for the gift you
|
||||
received as a reward for finding this place.
|
||||
|
||||
frog_meadow:
|
||||
narrative: >-
|
||||
"<< Psst. ^ Heya. ^ Down here. ^ Ribbit... ^ Hey buddy. >>"
|
||||
You << stoop ^ look down ^ bend down >> and see
|
||||
a << tiny ^ small ^ >> << green ^ >> frog
|
||||
with a << teeny ^ >> << gold ^ >> crown. It says,
|
||||
"<< I see ya gawking. ^ You look confused. ^ Need some help? >> {0}"
|
||||
And with that, he hops away.
|
||||
;;
|
||||
A << flock ^ couple >> of crows fly into the meadow.
|
||||
One of them, hops << next to ^ near >> you.
|
||||
"<< I see ya gawking. ^ You look confused. ^ Need some help? >> {0}"
|
||||
;;
|
||||
A cricket, sporting a nice top hat and waistcoat, eyes you curiously.
|
||||
"You seem << confused ^ bewildered ^ befuddled ^ disoriented ^ perplexed >>,"
|
||||
it says. "Perhaps I can help. {0}
|
||||
Hope that helps. Good-bye << and good luck ^ >>."
|
||||
And with a mighty jump, hops to the other side of the << meadow ^ field >>.
|
||||
hints:
|
||||
default: >-
|
||||
The |Ybeast|n over there is << actually ^ quite >> friendly,
|
||||
but scared of everything and everyone.
|
||||
That's why he doesn't venture in to the forest.
|
||||
That, and he loves the fizzy water from the |Ystream|n.
|
||||
beast: >-
|
||||
The beast doesn't like new people. Sometimes you can |Yfeed|n him
|
||||
to get 'im to warm up to you. Sometimes takes a bit of food for him
|
||||
to trust you.
|
||||
feed: >-
|
||||
|YBerries|n are good, but he loves Dabbler's |Yscones|n.
|
||||
Just hard to get into his house.
|
||||
berries: You'll find a bush of them to the west in the Grotto.
|
||||
scones: Dabbler lives in a tree to the west, behind a red door.
|
||||
stream: Yes, the fizzy water is drinkable, so you can |Ycollect|n some.
|
||||
collect: To collect the water, you will need a |Ybottle|n.
|
||||
bottle: You want to |gfill bottle|n to collect the water.
|
||||
|
||||
lair:
|
||||
hints:
|
||||
default: >-
|
||||
This is the bedroom for the |wBig Hairy Beast|n, and little else.
|
||||
Eventually, I will expand this room into something more interesting, but
|
||||
at the moment, pretend there is a |wPardon our Dust|n sign or something.
|
||||
|
||||
mellow_marsh:
|
||||
narrative: >-
|
||||
The << purple ^ large ^ >> heron
|
||||
<< gives you a sideways glance ^ raises a feathery eyebrow ^
|
||||
stops its hunting >>, and
|
||||
<< mentions ^ says >>, "{0}"
|
||||
hints:
|
||||
default: >-
|
||||
Perhaps you can |Ylasso|n the legs, er, stilts, so they don't run off?
|
||||
Then, you can |Yjump|n in.
|
||||
lasso: If you don't have a rope, perhaps strong greenery, like |Yvines|n?
|
||||
vines: I flew over a |Yboulder|n once. It was covered in vines.
|
||||
boulder: >-
|
||||
I think the boulder was north and west of here, in the forest, in
|
||||
the Grove of the Matriarchs.
|
||||
jump: >-
|
||||
Yeah, your legs are too short, and your featherless arms can't lift you.
|
||||
Perhaps you should find something to |Ylaunch|n you higher in the air?
|
||||
launch: Yeah, launch, as in a |Ypole|n or something.
|
||||
pole: Those reeds are pretty tall. You could possibly use them.
|
||||
river: Wizards come her to |Ycollect|n the river water for use in potions.
|
||||
collect: To collect the water, you will need a |Ybottle|n.
|
||||
bottle: You want to |gfill bottle|n to collect the water.
|
||||
|
||||
# Add a Raven to the Dock so that it can give hints?
|
||||
lazy_dock:
|
||||
narrative:
|
||||
The << black ^ large ^ >> raven
|
||||
<< gives you a sideways glance ^ raises a feathery eyebrow ^
|
||||
looks curiously at you >>, and
|
||||
<< mentions ^ says ^ croaks >>, "{0}"
|
||||
hints:
|
||||
default: >-
|
||||
Docks are good for |Yfishing|n and traveling by |Yboat|n.
|
||||
fishing: >-
|
||||
If you dare catch a |Yfish|n, use repeat the commands |gcast|n and |greel|n.
|
||||
fish: You can get rid of obnoxious fish using the |gthrow|n command.
|
||||
boat: A magical boat appears here, but only if you |Ycall|n it.
|
||||
call: To call the boat, |gblow|n a |Yhorn|n.
|
||||
horn: >-
|
||||
The mystical south wind gathers the mystical mist from the sea
|
||||
to create a calling horn. Trampolina's hut in the |Yswamp|n often
|
||||
is a conduit for the creation of these horns. Good luck getting in
|
||||
there.
|
||||
swamp: I think the swamp is called |wMellow Marsh|n.
|
||||
This place should have a sign that reads, |wUnder
|
||||
Construction|n, as nothing much happens here now ... well, except
|
||||
for the gift you received as a reward for finding this place.
|
||||
|
|
|
|||
|
|
@ -12,34 +12,101 @@ proc expectit {pattern} {
|
|||
}
|
||||
timeout {
|
||||
puts "Error: Expected response '$pattern' not received."
|
||||
send "quit\n"
|
||||
exit 1
|
||||
}
|
||||
eof {
|
||||
puts "Error: Connection closed unexpectedly."
|
||||
send "quit\n"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Start the SSH session
|
||||
# spawn ssh -p 4004 user@howardabrams.com
|
||||
# Handle the password prompt
|
||||
# expectit "password:"
|
||||
# send "\r" ; # Send an empty password
|
||||
#
|
||||
# or
|
||||
spawn telnet localhost 4000
|
||||
proc dont_expect {trigger pattern} {
|
||||
send "look\n"
|
||||
puts "NOTE: At this point, ** $pattern ** should not be here!"
|
||||
}
|
||||
|
||||
# Get command line parameters
|
||||
set there [lindex $argv 0] ; # First parameter (boolean) here/there
|
||||
set tutorial [lindex $argv 1] ; # Second parameter (optional) yes/no
|
||||
set create [lindex $argv 2] ; # Third parameter (optional) yes/no
|
||||
|
||||
if {$there eq "there"} {
|
||||
spawn ssh -p 4004 user@howardabrams.com
|
||||
# Handle the un-used password prompt:
|
||||
expectit "password:"
|
||||
send "\r" ; # Send an empty password
|
||||
} else {
|
||||
spawn telnet localhost 4000
|
||||
}
|
||||
|
||||
# Handle the prompt after logging in
|
||||
expectit "After you've logged in Enter"
|
||||
send "connect guest beourguest\n"
|
||||
|
||||
if {$create eq "true"} {
|
||||
send "create rob backinqa\n"
|
||||
expectit "Is this what you intended?"
|
||||
send "y\n"
|
||||
expectit "You can now log with the command"
|
||||
}
|
||||
|
||||
send "connect rob backinqa\n"
|
||||
|
||||
if {$create eq "true"} {
|
||||
expectit "begin creating your character"
|
||||
send "\n"
|
||||
|
||||
expectit "Let's begin with a two or three word description"
|
||||
send "spry goblin\n"
|
||||
|
||||
expectit "Specifying the gender"
|
||||
send "n\n"
|
||||
|
||||
expectit "Enter an initial pose"
|
||||
send "curiously looking at everything\n"
|
||||
|
||||
expectit "Enter your character's full description"
|
||||
send "A short, skinny goblin wearing a dirty tunic cinched with an elaborate belt bejeweled with gems and gold filigree. Unclear whether his green ears or nose are longer, but surely it must be the few hairs he combs over on top of his head.\n"
|
||||
|
||||
expectit "Enter a name here to check if it's available."
|
||||
send "Poach\n"
|
||||
|
||||
expectit "Shall I create your character"
|
||||
send "y\n"
|
||||
}
|
||||
|
||||
if {[string match "tutor*" $tutorial]} {
|
||||
# Handle the game command prompt
|
||||
expectit "In this story game, you type commands"
|
||||
send "look\n"
|
||||
|
||||
# Handle the prompt to examine the puddle
|
||||
expectit "You can now type"
|
||||
send "look puddle\n"
|
||||
|
||||
# Handle the response about flying
|
||||
expectit "Yes, I could fly myself"
|
||||
send "look boulder\n"
|
||||
|
||||
# Handle the prompt about climbing the boulder
|
||||
expectit "You can climb this boulder!"
|
||||
send "climb\n"
|
||||
|
||||
# Handle the prompt about typing
|
||||
expectit "Go ahead, just typing"
|
||||
send "say Hello there, little birdie.\n"
|
||||
} else {
|
||||
expectit "perches on your shoulder"
|
||||
}
|
||||
|
||||
# That should be enough of the birdie ...
|
||||
expectit "perches on your shoulder"
|
||||
send "shoo\n"
|
||||
|
||||
# Send the time command and handle the response
|
||||
expectit "Have fun, and I'll leave you here"
|
||||
|
||||
send "time\n"
|
||||
expect {
|
||||
"in the evening" {
|
||||
|
|
@ -51,9 +118,12 @@ expect {
|
|||
"in the morning" {
|
||||
set phase "morning"
|
||||
}
|
||||
# What about "at night"?
|
||||
"in the night" {
|
||||
set phase "night"
|
||||
}
|
||||
timeout {
|
||||
puts "Error: Expected time response not received."
|
||||
send "quit\n"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
|
@ -71,8 +141,12 @@ switch $phase {
|
|||
"morning" {
|
||||
expect "awakening dawn"
|
||||
}
|
||||
"night" {
|
||||
expect "night sky"
|
||||
}
|
||||
default {
|
||||
puts "Error: Unexpected phase value '$phase'."
|
||||
send "quit\n"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
|
@ -80,6 +154,15 @@ switch $phase {
|
|||
send "look trees\n"
|
||||
expectit "You feel dwarfed by colossal trees"
|
||||
|
||||
send "hint\n"
|
||||
expectit "Look at everything"
|
||||
|
||||
send "look puddle\n"
|
||||
expectit "A large puddle"
|
||||
|
||||
send "get puddle\n"
|
||||
expectit "As the water slips through your fingers"
|
||||
|
||||
send "jump\n"
|
||||
expectit "You jump in the puddle!"
|
||||
|
||||
|
|
@ -94,15 +177,29 @@ expect {
|
|||
# If stick is found, throw it
|
||||
send "throw stick\n"
|
||||
expect "it comes back to you"
|
||||
|
||||
send "drop stick\n"
|
||||
expect "You drop a stick."
|
||||
}
|
||||
timeout {
|
||||
puts "Error: Expected response for 'get stick' not received."
|
||||
send "quit\n"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
send "look book\n"
|
||||
expectit "The root from one of the colossal"
|
||||
|
||||
send "look quill\n"
|
||||
expectit "The black feathered quill may once belonged to a raven"
|
||||
|
||||
send "look ink\n"
|
||||
expectit "Black, like the ichor of the gods"
|
||||
|
||||
send "look ink well\n"
|
||||
expectit "The well appears to be little more than a depression"
|
||||
|
||||
send "read book\n"
|
||||
# expect -re "You open the leather-bound book, and begin to read\[.\n\r\]*For repayment of a boon, The Summer Queen"
|
||||
expectit "You open the leather-bound book, and begin to read"
|
||||
|
|
@ -111,26 +208,13 @@ expectit "For repayment of a boon, The Summer Queen"
|
|||
expectit "revious"
|
||||
# quit reading the book:
|
||||
send "q\n"
|
||||
expectit "Exited pager"
|
||||
sleep 1
|
||||
|
||||
send "look\n"
|
||||
expect {
|
||||
-re "Exits:.*" {
|
||||
# Store the matched line in a variable
|
||||
set matched_line $expect_out(buffer)
|
||||
send "get book\n"
|
||||
expectit "The owner designed a guest book to be read and written by guests"
|
||||
|
||||
# Check if the matched line contains "boulder"
|
||||
if {[string match boulder $matched_line]} {
|
||||
puts "Error: The line contains 'boulder'."
|
||||
exit 1
|
||||
} else {
|
||||
puts "The line is valid and does not contain 'boulder'."
|
||||
}
|
||||
}
|
||||
timeout {
|
||||
puts "Error: Expected line starting with 'Exits:' not received."
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
dont_expect "Exits" "boulder"
|
||||
|
||||
send "look boulder\n"
|
||||
expectit "You notice a foot hold"
|
||||
|
|
@ -138,24 +222,7 @@ expectit "You notice a foot hold"
|
|||
send "look\n"
|
||||
expect -re "Exits:.*climb.*boulder"
|
||||
|
||||
expect {
|
||||
-re "You notice.*" {
|
||||
# Store the matched line in a variable
|
||||
set matched_line $expect_out(buffer)
|
||||
|
||||
# Check if the matched line contains "boulder"
|
||||
if {[string match vines $matched_line]} {
|
||||
puts "Error: The line contains 'vines'."
|
||||
exit 1
|
||||
} else {
|
||||
puts "The line is valid and does not contain 'vines'."
|
||||
}
|
||||
}
|
||||
timeout {
|
||||
puts "Error: Expected line starting with 'Exits:' not received."
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
dont_expect "You notice.*" "vines"
|
||||
|
||||
send "look vines\n"
|
||||
expectit "Strong vines twisted to look like rope"
|
||||
|
|
@ -163,19 +230,476 @@ expectit "Strong vines twisted to look like rope"
|
|||
send "look\n"
|
||||
expect -re "You notice.*vines"
|
||||
|
||||
send "get vines\n"
|
||||
expectit "The vines are too strong to break or cut."
|
||||
|
||||
send "pull vines\n"
|
||||
expectit "You pull the vines, but don't let go."
|
||||
|
||||
send "push vines\n"
|
||||
expectit "That doesn't seem to do much."
|
||||
|
||||
send "climb boulder\n"
|
||||
expectit "You grab hold of some"
|
||||
|
||||
# And once on top...
|
||||
expectit "Still, a nice view."
|
||||
# Did we arrive?
|
||||
expectit "Boulder Top"
|
||||
|
||||
send "sit moss"
|
||||
send "sit moss\n"
|
||||
expectit "You sit on the patch of moss."
|
||||
|
||||
# We can't get this stuff:
|
||||
send "get moss"
|
||||
send "get moss\n"
|
||||
expectit "The moss is a bryophyte"
|
||||
|
||||
send "pull vines\n"
|
||||
expectit "You pull the vines"
|
||||
|
||||
send "get vines\n"
|
||||
expectit "You yank and shape a coil of rope from the vines"
|
||||
|
||||
send "inv\n"
|
||||
expectit "Made from vines"
|
||||
|
||||
# Let's get another length of rope to try lassoing the hut twice:
|
||||
send "get vines\n"
|
||||
expectit "You yank and shape a coil of rope from the vines"
|
||||
|
||||
# Let's head back to the grove...
|
||||
send "down\n"
|
||||
expectit "You stand up first"
|
||||
|
||||
# Wait until we've arrived
|
||||
expectit "Grove of the Matriarchs"
|
||||
|
||||
dont_expect "You notice" "mushrooms"
|
||||
|
||||
send "e\n"
|
||||
expectit "Frog Meadow"
|
||||
|
||||
# Until we are an alchemist, we shouldn't see the tickleweeds...
|
||||
dont_expect "You notice" "tickleweed"
|
||||
|
||||
send "look frogs\n"
|
||||
expectit "Cute little guys"
|
||||
|
||||
dont_expect "Exits" "cave entrance"
|
||||
|
||||
dont_expect "You notice" "waterfall"
|
||||
|
||||
send "look pool\n"
|
||||
expectit "A pool of cool, clear water."
|
||||
|
||||
send "look waterfall\n"
|
||||
expectit "entrance hidden behind the water?"
|
||||
|
||||
# water == waterfall ... eh.
|
||||
# send "look water\n"
|
||||
# expectit "Could not find 'water'"
|
||||
|
||||
send "look\n"
|
||||
expect -re "Exits:.*cave entrance"
|
||||
expect -re "You notice.*waterfall"
|
||||
|
||||
send "get waterfall\n"
|
||||
expectit "You can't get that"
|
||||
|
||||
send "look stream\n"
|
||||
expectit "A slow-moving stream meanders like a snake in the grassy field."
|
||||
|
||||
send "get stream\n"
|
||||
expectit "Seriously? You can't get that."
|
||||
|
||||
# send "look water\n"
|
||||
# expectit "A slow-moving stream meanders like a snake in the grassy field."
|
||||
|
||||
# send "get water\n"
|
||||
# expectit "Seriously? You can't get that."
|
||||
|
||||
dont_expect "You notice" "tickleweed"
|
||||
|
||||
send "hint\n"
|
||||
expectit "but scared of everything and everyone"
|
||||
send "hint beast\n"
|
||||
expectit "The beast doesn't like new people"
|
||||
send "hint feed\n"
|
||||
expectit "Just hard to get into his house"
|
||||
send "hint berries\n"
|
||||
expectit "You'll find a bush of them to the west in the Grotto"
|
||||
send "hint scones\n"
|
||||
expectit "Dabbler lives in a tree to the west, behind a red door"
|
||||
send "hint stream\n"
|
||||
expectit "Yes, the fizzy water is drinkable"
|
||||
send "hint collect\n"
|
||||
expectit "To collect the water, you will need"
|
||||
send "hint bottle\n"
|
||||
expectit "to collect the water."
|
||||
|
||||
send "look cave\n"
|
||||
expectit "A large entrance to a dark, and foul-smelling cave."
|
||||
|
||||
send "lair\n"
|
||||
expectit "Lair"
|
||||
|
||||
send "look outside\n"
|
||||
expectit "You can see the waterfall cascading outside the cave entrance."
|
||||
|
||||
dont_expect "You notice" "mattress"
|
||||
|
||||
send "look mattress\n"
|
||||
expectit "Looks comfortable"
|
||||
|
||||
send "look\n"
|
||||
expect -re "You notice.*mattress"
|
||||
|
||||
send "sit\n"
|
||||
expectit "You sit on the mattress."
|
||||
|
||||
send "get mattress\n"
|
||||
expectit "too heavy"
|
||||
|
||||
dont_expect "You notice" "mushrooms"
|
||||
|
||||
send "leave\n"
|
||||
expectit "Frog Meadow"
|
||||
|
||||
expect {
|
||||
"a big hairy beast" {
|
||||
send "look beast\n"
|
||||
expectit "it tries to hide behind a tall clump of grass"
|
||||
|
||||
send "pet bhb\n"
|
||||
expectit "can't get near the wild beast to pet it"
|
||||
|
||||
send "get hairy beast\n"
|
||||
expectit "beast is far larger than you."
|
||||
}
|
||||
timeout {
|
||||
if {$phase == "night"} {
|
||||
puts "The beast is in bed now."
|
||||
} else {
|
||||
puts "Where is the beast? It is $phase?"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
send "look south\n"
|
||||
expectit "Looks like the river spreads into a marsh."
|
||||
|
||||
send "south\n"
|
||||
expectit "perched on three stilts"
|
||||
|
||||
send "look north\n"
|
||||
expectit "The meadow to the north looks easier to walk around."
|
||||
|
||||
send "look birds\n"
|
||||
expectit "Birds of every color on the rainbow and beyond fly and squawk around you"
|
||||
|
||||
send "look moth\n"
|
||||
expectit "On closer inspection, the moths are really"
|
||||
|
||||
send "look sprite\n"
|
||||
expectit "Seems that sprites with pink wings are on one team"
|
||||
|
||||
send "look fireflies\n"
|
||||
expectit "A passing firefly shows it to actually be"
|
||||
|
||||
send "look pixies\n"
|
||||
expectit "The pixies ignore you as their coreography keeps them focused on their dance."
|
||||
|
||||
send "look grass\n"
|
||||
expectit "Guess this kind of grass doesn't mind the wet environment."
|
||||
|
||||
send "look mud\n"
|
||||
expectit "Pretty brown and sticky."
|
||||
|
||||
send "hut\n"
|
||||
expectit "the hut scurries away"
|
||||
|
||||
send "use 1-rope\n"
|
||||
expectit "Something tells you that the rope won't last for long."
|
||||
|
||||
send "look\n"
|
||||
expectit "A pissed-off looking"
|
||||
|
||||
send "look hut\n"
|
||||
expectit "straining at its bonds"
|
||||
|
||||
send "hut\n"
|
||||
expectit "The door, and its landing, are still too high and out of reach"
|
||||
|
||||
# Let's wait to make sure that the hut eventually breaks free ...
|
||||
puts "Waiting for the hut to break free of its bonds..."
|
||||
set timeout 90
|
||||
expectit "The hut, straining against its bounds, finally breaks free"
|
||||
set timeout 30
|
||||
|
||||
send "say Hello there, big bird.\n"
|
||||
expectit "heron"
|
||||
|
||||
send "get heron\n"
|
||||
expectit "flies out of reach"
|
||||
|
||||
send "look reeds\n"
|
||||
expectit "Extremely tall, white reeds tipped with white gooey clumps."
|
||||
|
||||
send "get reeds\n"
|
||||
expectit "You pluck and shape a ten-foot pole from a marsh reed"
|
||||
|
||||
# send "look\n"
|
||||
# dont_expect "You notice" "pixie dust"
|
||||
|
||||
send "use rope on hut\n"
|
||||
expectit "Something tells you that the rope won't last for long."
|
||||
|
||||
send "hut\n"
|
||||
expectit "Homey Hut"
|
||||
|
||||
dont_expect "You notice" "skull"
|
||||
|
||||
send "look skull\n"
|
||||
expectit "Painted with arcane symbols, a wolf skull sports"
|
||||
|
||||
send "look\n"
|
||||
expect -re "You notice.*skull"
|
||||
|
||||
send "get skull\n"
|
||||
expectit "It appears firmly attached to the wall where it hangs."
|
||||
|
||||
dont_expect "You notice" "carving"
|
||||
|
||||
send "look carving\n"
|
||||
expectit "the carving shows exquisite craftsmanship and artistry"
|
||||
|
||||
send "look\n"
|
||||
expect -re "You notice.*carving"
|
||||
|
||||
send "get carving\n"
|
||||
expectit "As you reach for the carving, it promptly runs away."
|
||||
|
||||
dont_expect "You notice" "reed"
|
||||
|
||||
send "look reed\n"
|
||||
expectit "twisted and shaped in a six-spoke star"
|
||||
|
||||
send "look\n"
|
||||
expect -re "You notice.*reed"
|
||||
|
||||
send "get sculpture\n"
|
||||
expectit "It appears firmly attached to the wall where it hangs."
|
||||
|
||||
send "get torch\n"
|
||||
expectit "You take a torch from the bucket."
|
||||
|
||||
send "inv\n"
|
||||
expectit "Made from marsh grass"
|
||||
|
||||
puts "Waiting for Trampolina to sweep us out the door..."
|
||||
set timeout 240
|
||||
# expectit "grabs her broom and with a sweeping motion"
|
||||
expectit "Mellow Marsh"
|
||||
set timeout 20
|
||||
|
||||
send "north\n"
|
||||
expectit "Frog Meadow"
|
||||
|
||||
send "west\n"
|
||||
expectit "Grove of the Matriarchs"
|
||||
|
||||
send "south\n"
|
||||
expectit "Lazy Dock"
|
||||
|
||||
send "look chair\n"
|
||||
expectit "A cushioned wood chair of craftsmanship"
|
||||
|
||||
send "sit\n"
|
||||
expectit "You sit on the chair."
|
||||
|
||||
send "stand\n"
|
||||
expectit "You stand up"
|
||||
|
||||
send "get chair\n"
|
||||
expectit "way too heavy for you to lift."
|
||||
|
||||
send "get pole\n"
|
||||
expectit "You pick up a fishing pole."
|
||||
|
||||
send "cast\n"
|
||||
expectit "You cast"
|
||||
|
||||
send "reel\n"
|
||||
# Too many messages to expect.
|
||||
|
||||
send "drop fishing pole\n"
|
||||
expectit "You drop a fishing pole."
|
||||
|
||||
send "look sign\n"
|
||||
expectit "You see a wood sign tied with a rope around the back of the chair"
|
||||
|
||||
send "read sign\n"
|
||||
expectit "Fish at your own annoyance. Please return pole when finished."
|
||||
|
||||
send "get sign\n"
|
||||
expectit "This granny knot"
|
||||
|
||||
send "hint\n"
|
||||
expectit "Docks are good"
|
||||
send "hint fishing\n"
|
||||
expectit "If you dare catch"
|
||||
send "hint fish\n"
|
||||
expectit "You can get rid of obnoxious fish"
|
||||
send "hint boat\n"
|
||||
expectit "A magical boat appears here"
|
||||
send "hint call\n"
|
||||
expectit "To call the boat"
|
||||
send "hint swamp\n"
|
||||
expectit "I think the swamp is called"
|
||||
send "hint horn\n"
|
||||
expectit "The mystical south wind gathers the mystical mist from the sea"
|
||||
|
||||
send "north\n"
|
||||
expectit "Grove of the Matriarchs"
|
||||
|
||||
send "look west\n"
|
||||
expectit "A footpath winds between the roots of a tree."
|
||||
|
||||
send "west\n"
|
||||
expectit "Grotto"
|
||||
|
||||
send "look east\n"
|
||||
expectit "A winding footpath leads through the forest of giant trees."
|
||||
|
||||
send "look tree\n"
|
||||
expectit "The trees in this forest are massive, but a smaller tree has a red door."
|
||||
|
||||
send "look bridge\n"
|
||||
expectit "bridge leads over a tiny stream"
|
||||
|
||||
send "look cabbage\n"
|
||||
expectit "Large glossy green leaves with big yellow flowers that looks like cobras in drag"
|
||||
|
||||
send "look ferns\n"
|
||||
expectit "Mostly sword ferns interrupted by Maiden Hair ferns that sing to the stream."
|
||||
|
||||
send "pick berries\n"
|
||||
expectit "You pick"
|
||||
|
||||
send "eat berry\n"
|
||||
|
||||
send "get berry\n"
|
||||
expectit "You pick"
|
||||
|
||||
send "eat berry\n"
|
||||
|
||||
send "knock\n"
|
||||
expectit "You grab the ring"
|
||||
|
||||
send "get ring\n"
|
||||
expectit "From whom do you want to get this ring?"
|
||||
|
||||
send "get ring from knocker\n"
|
||||
expectit "You take brass ring from knocker."
|
||||
|
||||
send "say Give me a hint, please.\n"
|
||||
expectit "A hint does sound fair."
|
||||
|
||||
send "say Is the answer, whiskey?\n"
|
||||
|
||||
send "give ring to knocker\n"
|
||||
expectit "You give a brass ring to knocker."
|
||||
|
||||
send "hint\n"
|
||||
expectit "So try to talk to it."
|
||||
|
||||
send "inside\n"
|
||||
expectit "Cozy House"
|
||||
|
||||
expectit "Oddly angled shelves with books and knickknackery"
|
||||
|
||||
send "look tapestry\n"
|
||||
expectit "The muted colors of the tapestry"
|
||||
|
||||
send "look man\n"
|
||||
expectit "The old man in the"
|
||||
|
||||
send "look rose\n"
|
||||
expectit "The rose in both scenes"
|
||||
|
||||
send "look queen\n"
|
||||
expectit "The beautiful queen shown in the second scene"
|
||||
|
||||
send "look paper\n"
|
||||
expectit "The paper with a gold seal"
|
||||
|
||||
send "look trees\n"
|
||||
expectit "The trees shown in the third and fourth scenes"
|
||||
|
||||
send "look whispering\n"
|
||||
expectit "This curious aspect"
|
||||
|
||||
send "look trinkets\n"
|
||||
|
||||
send "look books\n"
|
||||
expectit "Books of different sizes and colors."
|
||||
|
||||
send "look book\n"
|
||||
expect -re "You see.*book"
|
||||
|
||||
send "get book\n"
|
||||
expectit "You pick up the book."
|
||||
|
||||
send "read book\n"
|
||||
expect -re "You.*open your book"
|
||||
|
||||
send "drop book\n"
|
||||
expectit "flies"
|
||||
|
||||
send "sit\n"
|
||||
expectit "You sit in the few overstuffed chairs."
|
||||
|
||||
send "hint\n"
|
||||
expectit "You are in a cozy and casual place"
|
||||
|
||||
send "pet beastie\n"
|
||||
expectit "While it doesn't stop"
|
||||
|
||||
send "kitchen\n"
|
||||
expectit "Cramped Kitchen"
|
||||
|
||||
send "look scones\n"
|
||||
expectit "look tempting"
|
||||
|
||||
send "get scone\n"
|
||||
expect -re "You get.*scone"
|
||||
|
||||
send "eat scone\n"
|
||||
# Too much variableness here.
|
||||
# expectit "You"
|
||||
|
||||
send "make green\n"
|
||||
expectit "You make a teapot"
|
||||
|
||||
send "pour tea\n"
|
||||
expectit "Command 'pour tea' is not available."
|
||||
|
||||
send "get teacup\n"
|
||||
expectit "You pick up a teacup."
|
||||
|
||||
send "look teacup\n"
|
||||
expectit "Teacup"
|
||||
|
||||
send "pour tea\n"
|
||||
expect -re "You pour some.*cup"
|
||||
|
||||
send "drink tea\n"
|
||||
expect -re "You.*cup"
|
||||
|
||||
send "pour tea\n"
|
||||
expect -re "You empty your teacup"
|
||||
|
||||
send "hint\n"
|
||||
expectit "Grab yourself some breakfast"
|
||||
|
||||
# Close the log file
|
||||
log_file
|
||||
|
||||
|
|
|
|||
1078
world/version1.ev
1078
world/version1.ev
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue