[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  repeating last output

repeating last output

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Catthou   (5 posts)  [Biography] bio
Date Fri 12 Aug 2005 12:49 AM (UTC)
Message
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?
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #1 on Fri 12 Aug 2005 01:28 AM (UTC)
Message
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.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Catthou   (5 posts)  [Biography] bio
Date Reply #2 on Fri 12 Aug 2005 02:22 AM (UTC)
Message
Thank you!
It works, although it would be cool if there was a way to do it in MUSHclient
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #3 on Fri 12 Aug 2005 02:31 AM (UTC)
Message
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.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Rjak   Romania  (42 posts)  [Biography] bio
Date Reply #4 on Sat 10 Sep 2005 11:36 PM (UTC)
Message
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.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


16,141 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]