Posted by
| Nick Gammon
Australia (22,973 posts) bio
Forum Administrator |
Message
| It doesn't have that right now. It could be tricky detecting if a door was open or not.
However when testing on the IRE Muds (like Achaea) I made some triggers that assisted in opening doors, for example:
<trigger
enabled="y"
regexp="y"
match="^There is a door in the way"
send_to="12"
sequence="100"
>
<send>
if last_direction_moved then
Send ("open door " .. last_direction_moved)
end -- if
</send>
</trigger>
This worked by detecting which way you last tried to move (last_direction_moved) which was done in the plugin in the OnPluginSent function, like this:
valid_direction = {
n = "n",
s = "s",
e = "e",
w = "w",
u = "u",
d = "d",
ne = "ne",
sw = "sw",
nw = "nw",
se = "se",
north = "n",
south = "s",
east = "e",
west = "w",
up = "u",
down = "d",
northeast = "ne",
northwest = "nw",
southeast = "se",
southwest = "sw",
['in'] = "in",
out = "out",
} -- end of valid_direction
-- try to detect when we send a movement command
function OnPluginSent (sText)
if valid_direction [sText] then
last_direction_moved = valid_direction [sText]
end -- if
end -- function
So what happens is, the plugin is speedwalking you somewhere, the last thing it sends is (say) "west", and then it gets the message:
There is a door in the way ...
The trigger then fires, and sends "open door west".
I'm not sure about whether the speedwalk resumes at the point but sending the alias "mapper resume" could get it going again if necessary.
It doesn't handle portals or special exits at present, the closest you could probably go is to speedwalk to the portal and manually go through it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|