|
ToyMage Apprentice
Joined: 01 Sep 2005 Posts: 120
|
Posted: Sun Aug 27, 2006 4:41 pm
Auto Maze Walker |
Okie I haven't figured how to do this at all... Clueless...
There is a maze in my mud which is called The Void. There are markers in the maze which we can look for which shows the right direction. The markers are usually a pile of coins. So I 'Look North|South|East|West|Up|Down'
The exits are random too.
1) How do I capture the Exits available in the room?
2) How do I 'Look' through the available Exits?
3) How do I move in the Direction once 'A pile of gold coins' is found?
Thanks.
--------
The Void
[Exits: east south west up down]
You are suspended in cool electric space above a translucent plain. You feel synesthesia invading your nerves and reshuffling your senses. The sky is the same obsidian color as the ground and you can't find a horizon.
<987/987hp 630/630mn 574/574mv 912exp> Look up
The Void
[Exits: north east west up down]
You are suspended in cool electric space above a translucent plain. You feel synesthesia invading your nerves and reshuffling your senses. The sky is the same obsidian color as the ground and you can't find a horizon.
A pile of gold coins. |
|
|
|
ToyMage Apprentice
Joined: 01 Sep 2005 Posts: 120
|
Posted: Sat Sep 02, 2006 6:45 am |
How can we capture the exits available in a room?
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Sep 02, 2006 4:56 pm |
With a trigger.
#trigger {~[Exits: (*)~]} {#variable RoomExits %replace("%1"," ","|")} |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
ToyMage Apprentice
Joined: 01 Sep 2005 Posts: 120
|
Posted: Sun Sep 03, 2006 3:54 pm |
hmm,
how to make it 'Look' through the exits available? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Sep 04, 2006 3:28 am |
Depends on how you want to do it. I'd suggest not using a loop at all, since there'd be no way to really stop the loop at the correct time if you found a way to go. Therefore, in the above trigger, I'd use the %item() function to send the first direction.
I'd then make a second #trigger to match what was displayed by the LOOK command (if the only directions to move are NSEW types instead of non-standard types, you can limit this pattern to "look %t"). This would be a multistate trigger that started out matching the look command, with subsequent states matching the output generated. The #condition for "a pile of gold coins" would set a #variable to 1. The prompt condition would then use an #if command to check this variable. If true, then the direction captured in the zero-state would be sent to the mud and for neatness's sake the RoomExits variable would be set to "". If false, then a #DELNITEM command is needed to flush out the direction you already moved from RoomExits before using another %item() to look in another direction. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|