Mushclient Questions

by Esano

Back to Mechanic's Corner.

Yamiki2009-01-14 22:04:32
ok nvm dumb question, How am I suppose to know whether I'm using VB script or Lua Script?
Isuka2009-01-14 22:56:00
QUOTE (Yamiki @ Jan 14 2009, 02:04 PM) <{POST_SNAPBACK}>
ok nvm dumb question, How am I suppose to know whether I'm using VB script or Lua Script?


ctrl+g>scripting>scripts. The top of that screen has a drop-down box telling you which language you're currently using.

That said: plugins don't have to follow that rule.
Nerra2009-01-19 14:10:46
What do I do to disable/enable a timer? I'm -really- bad at this stuff so please break it down as simple as possible.
Unknown2009-01-19 14:17:04
QUOTE (Nerra @ Jan 19 2009, 09:10 AM) <{POST_SNAPBACK}>
What do I do to disable/enable a timer? I'm -really- bad at this stuff so please break it down as simple as possible.


First, give the timer a name, if it doesn't have one already.

Second, in your alias/trigger, call the EnableTimer function with the name of your timer and use false to disable it or true to enable it.

CODE
EnableTimer("timer_name", false)


(You didn't mention your scripting language, so I assumed Lua. Adapt it to your language, if different.)
Esano2009-01-19 14:20:23
Or, if you're only changing it manually:

Press SHIFT+CTRL+0.

This should open up a list of timers. Find the one you want to turn off or on. Double click on it.

This'll open up another window. Down the right hand side of this window will be a list of checkboxes.

One of these checkboxes will be marked 'Enabled.'

If this checkbox is clicked, the timer is enabled. If it is not clicked, it is disabled. Click on it to change it.


Otherwise, use the method Zarquan looked at above. Just remember to set your trigger/alias to Send to Script.
Nerra2009-01-19 16:33:30
Oh I use VB. I'm trying to make a timer that turns off when my last meld effect happens. My old way was too spammy and lagged which caused the demesne to fire over 3 seconds rather than on que.
Oli2009-01-20 09:25:57
Ok this is like noob question to the extreme. Basically I wanna set up my own targeting system by using an alias to change a variable (target) which I'll refer to in all my attacks. I did it in CMUD fine but I can't figure out how to do it in MUSH and for whatever reason I can't seem to get on the help files in the client.

I don't need things spelled out for me just recommendations on how to set it up and/or standard coding for this.

Also if anybody knows about a website with the help files on it that'd be great
Rika2009-01-20 09:27:32
Oli2009-01-20 09:31:00
Absolutely perfect. Thanks alot
Unknown2009-01-20 13:15:31
Okay, I've tried many things, but nothing works, so I'm just posting this trigger here and see if any can find out what is the problem

CODE

     enabled="y"
   expand_variables="y"
   lines_to_match="2"
   keep_evaluating="y"
   match="\\(Shadowmaze\\)\\: Please welcome * who has just enrolled into the Shadowmaze to learn the ways of the *\\!"
   multi_line="y"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  Sound("notify.wav")
AnsiNote (ANSI (30, 47), "A Novice is here! " .. "%1" .. " is in the " .. "%2" .. "!")

  


EDIT: Erm, its in Lua.
Mariello2009-01-20 13:22:30
Change
CODE
   match="\\(Shadowmaze\\)\\: Please welcome * who has just enrolled into the Shadowmaze to learn the ways of the *\\!"


To

CODE
   match="\\(Shadowmaze\\)\\: Please welcome (.*?) who has just enrolled into the Shadowmaze to learn the ways of the (.*?)\\!"


Trigger should work, I think
Unknown2009-01-20 13:32:11
Thanks, it triggers now, but I have the exact opposite problem now. It triggers twice. I know I made it multi-line, does that mean it triggers twice? If so, is there any way to make a multi-line trigger without triggering twice?
Unknown2009-01-20 14:01:56
I highly recommend you use CONFIG WRAPWIDTH 0, so you don't need to make 99% of your triggers multi-line. If there's some reason for you to use a different wrapwidth, however, then you'll need to put a \\n somewhere in your pattern to tell MUSHclient where the lines break.
Unknown2009-01-20 14:04:58
Ah, so now I don't need to care if a trigger line is longer than the width of the screen?
Unknown2009-01-20 16:05:12
If you're using wrapwidth 0 in the game, no. You can setup MUSHclient to wrap it client-side, but that has no effect at all on your triggers.
Oli2009-01-21 10:42:22
With CMUD I managed to set up something to let me use one alias to switch between begging and supplication for my influencing. To do this I just used trigger lines to switch a variable and my main alias would consist of two IF statements which would use the variable to decide between the two attacks.

I managed to find the answers to most of my problems on the MUSHclient forums but I can't seem to get the triggers to switch the variable.

Any help would be much appreciated
Esano2009-01-21 10:44:33
The commands you need are (for Lua) SetVariable("variable",value) and GetVariable("variable").

So ...
CODE
if (GetVariable("inftype") == "begging") then
  SetVariable("inftype","supplication")
else
  SetVariable("inftype","begging")
end


Oh, and make sure your trigger is set to Send to Script in the dropdown box.
Oli2009-01-21 11:38:25
Wonderful, thanks

Also it seems like I can't use the MUSHclient help files with vista. Anybody know a way around that?
Unknown2009-01-21 11:58:47
QUOTE (Oli @ Jan 21 2009, 06:38 AM) <{POST_SNAPBACK}>
Also it seems like I can't use the MUSHclient help files with vista. Anybody know a way around that?


Unless Nick makes his help files into the CHM format instead of the really old HLP format, no. You'll just have to use the web site for help files. No HLP files work on Vista. It's not just MUSHclient.
Unknown2009-01-21 12:14:07