repeating last output

Posted by Catthou on Fri 12 Aug 2005 12:49 AM — 5 posts, 23,164 views.

#0
I want a trigger to trigger off of "You fail." and I want it to send the command which I last outputted.

Elaboration
[World gives]You attempt to pick the lock of a [%1]wooden [%2]rust-bound [%3]chest, but fail.
[Trigger says]Pick [%3]chest
[World gives]You fail.


See, I'm stuck because theres no wildcard for me to "Pick %X". It could be a chest, trunk, coinbox, etc, etc, so I was thinking that the easiest way to re-pick it would be just to repeat the message that the last trigger gave.

Help, tips, or other advice?
USA #1
Most MUDs have a command that is: !
It'll repeat the last command. That's what I always used. If not, I'm sure MUSHclient has a way, but I don't know of it offhand.
#2
Thank you!
It works, although it would be cool if there was a way to do it in MUSHclient
USA #3
You can. You end up looking it up in the command history (GetCommandList).

Of course, this gets ugly if you're using world.send (since they don't get stored in the command history. You can use world.sendpush to get around that on for casting or whatnot (use it for things that you might need to repeat for failure reasons).

Of course, if this is all just you entering text, then that will work fine.
Romania #4
This is how I'd do. Tou I'm less than a newbie in this area, so...

world: You attempt to pick the lock of * but fail
your trigger: pick %1
say I will open a %1

another trigger with 2 lines:
^You say \'\I will open a *\'\nYou fail\.\z
pick %1


Basically trigger are looking for both phrases: your "I will open a *" and the next one "You fail." If finds both it should launch pick %1.
I'm not sure about sintax here. Is just an ideea, it could be bad.