Mushclient Questions

by Esano

Back to Mechanic's Corner.

Unknown2009-09-17 14:36:42
I saw this in a few logs on nogfx, and I was really getting curious.

Basically, say you trigger a line that's like... "Ried spins clockwise and a bubble springs up around her etc. etc." (I forget the exact invoke circle line), and you want your system to echo, "Ried has shielded!" Now, if you're someone like me who misses a lot of things, I'd put that in all caps, "RIED HAS SHIELDED!" But if I capture the line with "^(.*?) spins clockwise and..." and have my system echo "%1 HAS SHIELDED", the wildcard is going to be in lowercase.

Is there any way to convert that to all caps too?
Unknown2009-09-17 14:44:55
I use Lua's string.upper function to capitalize things like that.
CODE
ColourNote("red", "white", string.upper("%1") .. " HAS SHIELDED!")
Unknown2009-09-17 14:47:34
Aha! Thank you!
Dynami2009-09-21 00:20:21
Can anyone explain how to do setvariable and how to make a script I can turn off?
Unknown2009-09-24 19:41:27
I have this trigger that works, but sometimes the last word (which is the target's name) goes to the next line when the person's name is longer. I thought I knew how to do multi-line triggers but I can't get it to work with this one. How would I fix this to still catch if (@target) goes to the next line?


CODE

enabled="y"
expand_variables="y"
group="shield_rebound_tracking"
ignore_case="y"
keep_evaluating="y"
match="^You suddenly perceive the vague outline of an aura of rebounding around (@target)\\."
name="rebounding_up"
regexp="y"
send_to="12"
sequence="50"
>
SetVariable("tar_rebounding","1")
ColourNote("red", "", "<< ", "yellow", "", "REBOUDING REBOUNDING REBOUNDING", "red", "", " >>")





Unknown2009-09-24 20:37:59
CONFIG WRAPWIDTH 0

It removes all server-side carriage returns that result from word wrapping, thus making trigger matches a TON easier.
Mirami2009-10-13 03:58:33
is there a way to disable the newline function of ;semocolons? It's really beginning to bug me, and I can't find an option anywhere.
Unknown2009-10-13 04:04:19
Game -> Configure -> Commands -> Disable Command Stacking or change the symbol.
Mirami2009-10-13 04:25:21
QUOTE (Solanis @ Oct 12 2009, 09:04 PM) <{POST_SNAPBACK}>
Game -> Configure -> Commands -> Disable Command Stacking or change the symbol.

Thanks!
Aerotan2009-10-14 04:01:42
QUOTE (Dynami @ Sep 20 2009, 08:20 PM) <{POST_SNAPBACK}>
Can anyone explain how to do setvariable and how to make a script I can turn off?

Sending to script, just SetVariable("varname",value)

If the variable is a string, then keep " around it.

For instance, an alias to target something might look like
CODE
SetVariable("target","%1")

The easiest way I know of to make a script that can be turned off is to disable the triggers and aliases that call for it. To do so, just put a common name in the Group: box in each of them, and have a pair of aliases. In one alias, put
CODE
EnableGroup("group",true)


And in the other put
CODE
EnableGroup("group",false)


This should enable and disable the group, respectively. And remember the most important rule of Mush coding is that it's Case SeNSeTIVE
Fern2009-10-15 18:59:05
You'll have to bear with me, how to I go about putting a timer into my prompt? I need to be able to time my demesne effects
Ayisdra2009-10-16 16:29:41
after having to reinstall my system (Treant) and such. I go to install the Prompt tracker (by Simimi) and it works, but it doubles the prompt. So I'm getting:

CODE
4260h, 4380m, 3900e, 10p, 18800en, 20000w elrx-
4260h, 4380m, 3900e, 10p, 18800en, 20000w elrx-<12:26:42.185>


Any idea how I can just make it show the one with the time stamp? (it has worked before, but after I reinstalled, it does this)
Fern2009-10-18 04:05:24
I'm trying to make a new trigger, to work with the treant curing system, for bashing lower level stuff, so that I auto springup when I get proned. I have auto springup on, and I have springup in acrobatics, so I know that's not the issue here.

This is the line I'm trying to trigger:

A spawn of the horde begins to growl deeply, the rumbling ever increasing in volume until he suddenly lunges forward, ripping at your flesh and knocking you over.

This is how I named the trigger:

^A spawn of the horde begins to growl deeply\\, the rumbling ever increasing in volume until he suddenly lunges forward\\, ripping at your flesh and knocking you over\\.$

This is what I'm sending to script:

affs:prone()


but it's not doing anything! Where have I gone wrong?
Gregori2009-10-18 04:28:01
Since you are using mushclient, select the trigger, click the copy button, then paste the code in here so we can see the full extent of the trigger to better assist you.
Fern2009-10-18 04:31:59
CODE

     enabled="y"
   group="Treant_Bashing"
   lines_to_match="3"
   match="^A spawn of the horde begins to growl deeply\\, the rumbling ever increasing in volume until he suddenly lunges forward\\, ripping at your flesh and knocking you over\\.$"
   multi_line="y"
   name="hifarae_spawn__"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  affs:prone()
  
Gregori2009-10-18 04:34:24
QUOTE (Fern @ Oct 17 2009, 10:31 PM) <{POST_SNAPBACK}>
CODE

     enabled="y"
   group="Treant_Bashing"
---- lines_to_match="3"----
   match="^A spawn of the horde begins to growl deeply\\, the rumbling ever increasing in volume until he suddenly lunges forward\\, ripping at your flesh and knocking you over\\.$"
----   multi_line="y" ----
   name="hifarae_spawn__"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  affs:prone()
  



remove that in the trigger

edit pah, can't use bolds in code, forgot that.
Fern2009-10-18 04:47:08
Fixed, thanks for the help!
Unknown2009-10-19 04:52:52
How easy would it be to make a little script that tallies up the listed items when you do II and spits the total back to you? And how would I go about doing that?
Dynami2009-10-24 17:39:51
I am trying to make a colournote for when my greentea gets stripped, but it doesn't want to appear.

For the trigger, I have this: ^Your enhanced movement repels paralysis\\.$
The send area looks like this: ColourNote("orange", "white", "*****WATCH OUT, PARALYZATION !*****")

Does anyone have any idea what's wrong?
Unknown2009-10-24 17:51:16
Make sure your "send to" is "Script (after omit)" or your notes won't show in the output display. (Really, this should be the only send to script option available, in my opinion, but it was added much later than the plain old send to script.)