Balances

by Unknown

Back to Mechanic's Corner.

Unknown2005-01-21 02:29:01
Can anyone enlighten me on balances and how to trigger them? I need it for my combat reflexes, so that I don't get smashed in the arm, and am off balance, then can't remove the arnica to use... is there a way to get it to check to see if I have balance, or not? I'm using Zmud by the way.

Daniel
Ethelon2005-01-21 03:00:01
I don't use Zmud but the easiest way would to have a reflex to capture the Prompt and have a variable set for when E or X or there or gone
Unknown2005-01-21 03:20:28
Sorry didn't understand that...
Unknown2005-01-21 08:19:35
I thought you said you were quite capable with zMUD, Elessar...

Anyway, here's a trigger which will catch balances if you use full prompt:

CODE
#TRIGGER {^%dh, %dm, %dp, %den, %dw ()} {
 #IF (%pos( %1, "e")) {#VAR Equilibrium 1} {#VAR Equilibrium 0}
 #IF (%pos( %1, "x")) {#VAR Balance 1} {#VAR Balance 0}
 }

☼ Replace this with the other status letters to track other things such as prone, et cetera. Also add the appropriate #IF statement for each letter, if you do this.
If you just want to track balance and equilibrium, just remove the ☼.

Also, if your prompt is shorter, just remove the proper "%dx, "(s). tongue.gif
Unknown2005-01-21 17:04:14
{deleted because of mispost]
Unknown2005-01-21 17:04:27
Thank you. And as to your point, we all have weaknesses in things we are good at. I was never taught how to catch balances, but I have worked extensively all through achaea, imperian aetolia and now Lusternia on healing stuff.

Daniel

PS Is there a way to do this in mushclient?
Aajen2005-01-21 22:19:02
Be warned though, if you have a skill that uses just an arm balance, the 'x' will stay on your prompt
Unknown2005-01-22 01:25:12
QUOTE(ElessarNightshade @ Jan 22 2005, 06:04 AM)
PS Is there a way to do this in mushclient?
33127


If it can use Reg. Exp., it should be able to -- I forgot if it does or not... I think it does, have a look in the help files. I know SimpleMU has it, though tongue.gif.
Unknown2005-01-22 01:46:30
Don't forget, to set the trigger to fire on the prompt, not on the default, which is newline. Their is a toggle box, or you can do


#TRIGGER {^%dh, %dm, %dp, %den, %dw ()} {
#IF (%pos( %1, "e")) {#VAR Equilibrium 1} {#VAR Equilibrium 0}
#IF (%pos( %1, "x")) {#VAR Balance 1} {#VAR Balance 0}
} "" {nocr|prompt}


Unknown2005-01-22 01:54:38
Yeah, doh.gif.
Unknown2005-01-22 05:46:18
So this will add balance icons to my prompt with equil and balance?

EDIT: erm i'm ditching this version of zmud, it wont take commanded triggers anymore, i have to manually set them, and I dont know how the hell to do that with these type of things.
Unknown2005-01-22 08:21:48
QUOTE(ElessarNightshade @ Jan 22 2005, 06:46 PM)
So this will add balance icons to my prompt with equil and balance?
33465


Eh? The symbols for balance (x) and equilibrium (e) are already implemented into the prompt by Lusternia, before it ever gets to your MUD client. This trigger just tracks them and stores the value of them into the @Balance and @Equilibrium variables -- which you can then manipulate to do whatever.
Unknown2005-01-22 18:55:08
How do I do this for MUSHclient?
Unknown2005-01-23 03:26:00
Hang on, I'll just have a look...
Unknown2005-01-23 03:37:21
Hrm... MUSHClient is weird... Anyways:

I don't know how to find if something is contained in a string, so all I can work out it the pattern, with is a regular expression:

CODE
^+h, +m, +e, +p, +en, +w ()


So, you need to find some way to see if %1 contains e, and if so, set variable Equilibrium to 1, otherwise to 0. Same with x and Balance.

EDIT: Typo in pattern.
Unknown2005-01-23 12:59:21
Shorter pattern:

CODE
^\\d+h, \\d+m, \\d+e, \\d+p ()


I left out endurance and willpower, as they're not part of the prompt by default, but you could easily change that. I added more characters to the check at the end, which is useful for parsing out all the other values. I suppose you could just match e or x if you're only concerned about balance and equilibrium...
Unknown2005-01-23 20:54:53
Oh, can you use \\d for numbers in MUSHClient?

How do you set variables in MUSHClient *blush*?
Unknown2005-01-23 21:38:23
I know you can use "world.SetVariable(varname, varvalue)" and send it to Script, but I haven't had success with my Python plugin script setting and getting variables. Sucks.
Unknown2005-01-23 21:46:18
Hmm...

zMUD's better!

My MUD client rankings:

1. zMUD
2. SimpleMU
3. Wintin.Net
4. MUSHClient

Don't have any others, apart from Telnet, do I don't know. MUDMagic's MUD client looks alright...

If you can't afford zMUD, and are used to its scripting format (not of that VBScript/Python bull censor.gif), I suggest SimpleMU.
Unknown2005-01-24 02:58:17
QUOTE(Zarquan @ Jan 23 2005, 05:38 PM)
I know you can use "world.SetVariable(varname, varvalue)" and send it to Script, but I haven't had success with my Python plugin script setting and getting variables. Sucks.
34661



PM me your AIM or email, I can help you out.