Mushclient Questions

by Esano

Back to Mechanic's Corner.

Faymar2010-07-13 15:31:40
QUOTE (Zarquan @ Jul 13 2010, 04:46 PM) <{POST_SNAPBACK}>
I have a prompt trigger in Treant (treant_kata.xml) for tracking just momentum. It can be modified to track the other stats, of course, but Treant has a separate trigger that's doing that already. Anyway, here it is for reference:
CODE
code


(The last part, after the dash, is to make it work with MudBot's mapper module, too.)

I've shamelessly copied the trigger too (except that I track my momentum through my offense module). When and if you don't want to be a monk you won't have an annoying extra check each time you get the prompt.

First time I used the profile module from the Mush forums I couldn't believe how many times the trigger prompt matches in one game session.

Thank you for the free Treant, Iasmos!
Tarken2010-07-13 16:06:56
Aha, thanks, that's great!
Dynami2010-07-14 23:13:58
Can someone post an example of a timer that fires 8 seconds after event X happens?
Razenth2010-07-14 23:16:14
Just use a DoAfter
Dynami2010-07-14 23:19:52
QUOTE (Razenth @ Jul 14 2010, 07:16 PM) <{POST_SNAPBACK}>
Just use a DoAfter

Can you use the DoAfter function to make colournotes appear?
Razenth2010-07-14 23:21:57
DoAfterNote?
Esano2010-07-14 23:28:10
DoAfterSpecial(5,'ColourNote("red","black","THIS IS RED ON BLACK")', 12)
Dynami2010-07-14 23:43:36
QUOTE (Esano @ Jul 14 2010, 07:28 PM) <{POST_SNAPBACK}>
DoAfterSpecial(5,'ColourNote("red","black","THIS IS RED ON BLACK")', 12)

What does the 12 do?
Sylphas2010-07-14 23:48:04
QUOTE (Dynami @ Jul 14 2010, 07:43 PM) <{POST_SNAPBACK}>
What does the 12 do?


Send to Script. The last argument is the place the output gets sent.
Lorina2010-07-17 18:31:43
So I have been messing with Mush trying to get a trigger to work...I want to toggle when it works and junk, but I can't seem to figure it out like I did aliases. Aliases was easy when all you had to do was make a clearalias and a set alias thing...But I just don't see that working for triggers.
Felicia2010-07-17 18:53:11
QUOTE (Lorina @ Jul 17 2010, 02:31 PM) <{POST_SNAPBACK}>
So I have been messing with Mush trying to get a trigger to work...I want to toggle when it works and junk, but I can't seem to figure it out like I did aliases. Aliases was easy when all you had to do was make a clearalias and a set alias thing...But I just don't see that working for triggers.


If you want to toggle a trigger on and off, make two aliases (with "Send to: Script" selected):

Alias1
EnableTrigger("name", true)
print("Name enabled.") -- If you want confirmation that it's worked.

Alias2
EnableTrigger("name", false)
print("Name disabled.")
Lorina2010-07-17 18:57:38
Loooove you wub.gif
Unknown2010-07-17 19:01:17
QUOTE (Lorina @ Jul 17 2010, 06:31 PM) <{POST_SNAPBACK}>
So I have been messing with Mush trying to get a trigger to work...I want to toggle when it works and junk, but I can't seem to figure it out like I did aliases. Aliases was easy when all you had to do was make a clearalias and a set alias thing...But I just don't see that working for triggers.


More details? Assuming I'm understanding you in general:

Put something in the "Label" box of the trigger. Like myawesometoggle.

Then in the alias/macro/whatever that you want to use to toggle the on/off state of the trigger, do:
CODE
if GetTriggerOption ("myawesometoggle", "enabled") == 0 then
EnableTrigger("myawesometoggle", 1)
Note("Myawesometoggle on.")
return
else
EnableTrigger("myawesometoggle", 0)
Note("Myawesometoggle off")
end
Unknown2010-07-17 19:02:17
Felicia's way works, too, but it uses two aliases. The thing I gave you is more of a true toggle.
Felicia2010-07-17 19:22:59
Yeah, I knew you could do it with just one alias/macro, but I couldn't quite remember how.

I also knew someone would probably come along and point out how it's done with a single alias, so thank you. smile.gif

Edit: Also, yeah, better to use labels than the actual name of the trigger... the distinction didn't cross my mind.
Anisu2010-07-17 20:55:32
QUOTE (Zarquan @ Jul 12 2010, 09:25 PM) <{POST_SNAPBACK}>
I think the function is DeleteLines(...). You could also use the Miniwindow approach to capturing chat. I adapted one that was posted on the MUSHclient forums so that it preserves the colors and still allows dragging the window and scrolling/resizing it.

enquiring minds want to know if you are willing to sell this plugin for a democratic price
Unknown2010-07-18 00:41:25
If I start using it myself and consider it stable, I'll put it up somewhere (for free, since I borrowed 97% of the code from someone else).
Kepthira2010-07-18 01:23:04
Is there another piece of software other than Darwine that provides compatibility for Windows software for Mac OSX? I'd really rather not run a parallel just for MUSH.
Dynami2010-07-18 05:07:43
Is there any way to enable MUSHclient to show every single colournote/highlight when I log(as in shift+ctrl+J) a file instead of copying the screen and then pasting that into a html window on googlesites?
Esano2010-07-18 05:12:34
ALT+3, check the "Log Notes" checkbox.