Unknown2010-08-30 11:12:15
For some weird reason I can't see a way to access the keypad values. One solution might be to put aliases in each number (keypad_1, keypad_2, ect.) and then put the logic in the alias like if var == this, then do this, else do that.
I would have thought that they'd show up in AcceleratorList(), but I think Mush considers them "special", so the location of their values isn't apparent.
I would have thought that they'd show up in AcceleratorList(), but I think Mush considers them "special", so the location of their values isn't apparent.
Faymar2010-08-30 15:40:21
QUOTE (Anisu @ Aug 30 2010, 12:29 PM) <{POST_SNAPBACK}>
Question, is there a way for me to record what my current numpad bindings are in to variables.
To explain I am trying to make my script remap the numpad for certain situations, but for compatibility with other people who will use it I would like on disengaging change them back to the original instead of my standard keymap
To explain I am trying to make my script remap the numpad for certain situations, but for compatibility with other people who will use it I would like on disengaging change them back to the original instead of my standard keymap
Why not use Accelerator (or AcceleratorTo)?
You can have two functions, one to change the keypad to the default mapping, the other to whatever you wish.
Anisu2010-08-30 16:18:25
QUOTE (Faymar @ Aug 30 2010, 05:40 PM) <{POST_SNAPBACK}>
Why not use Accelerator (or AcceleratorTo)?
You can have two functions, one to change the keypad to the default mapping, the other to whatever you wish.
You can have two functions, one to change the keypad to the default mapping, the other to whatever you wish.
which is exactly what I am trying to do, however if other people are going to use the plugin it is entirely possible they are not going to use the same default and so being able to determine their settings before changing them would be usefull.
Unknown2010-08-30 16:24:21
I think there might even be a bug with AcceleratorList, after looking into it myself. It lists some standard and some custom accelerators, but it doesn't show them all. Odd.
Unknown2010-08-31 14:04:43
Please help me to understand something. If a trigger calls A function in my script file, it goes and starts processing it. While this is happening, another trigger gets called for B function... will B function start processing while A is at work, or does it wait until A finishes before function B starts working? - - I'm still trying to figure out how Mush works overall.
Thanks!
Thanks!
Unknown2010-08-31 14:26:14
It is sequential, so one trigger must finish processing before another may fire. MUSHclient isn't actually multi-threaded, except for one little thread that monitors your script file for changes when you use the auto-load-on-change option.
There are ways to make Lua process things asynchronously, and you can use timers for other delayed events, of course. It just gets a little tricky, depending on what you're doing.
There are ways to make Lua process things asynchronously, and you can use timers for other delayed events, of course. It just gets a little tricky, depending on what you're doing.
Unknown2010-08-31 23:40:54
QUOTE (Zarquan @ Aug 31 2010, 11:26 PM) <{POST_SNAPBACK}>
It is sequential, so one trigger must finish processing before another may fire. MUSHclient isn't actually multi-threaded, except for one little thread that monitors your script file for changes when you use the auto-load-on-change option.
There are ways to make Lua process things asynchronously, and you can use timers for other delayed events, of course. It just gets a little tricky, depending on what you're doing.
There are ways to make Lua process things asynchronously, and you can use timers for other delayed events, of course. It just gets a little tricky, depending on what you're doing.
I haven't really used timers at all in my scripting. How do people usually use them?
Xenthos2010-08-31 23:42:19
QUOTE (XarconZ @ Aug 31 2010, 07:40 PM) <{POST_SNAPBACK}>
I haven't really used timers at all in my scripting. How do people usually use them?
One possible option: Failsafes (if an action should have fired but did not for whatever reason).
Unknown2010-09-01 13:57:52
QUOTE (Xenthos @ Sep 1 2010, 08:42 AM) <{POST_SNAPBACK}>
One possible option: Failsafes (if an action should have fired but did not for whatever reason).
Hmm.. Okay, I kinda get what you mean. But what activates the failsafe - the delayed timer... a function that constantly runs/always checking?
Arggg.. There was another thing I was thinking about earlier that I wanted to ask but I forgot... Well, I'll ask this one. Do people use classes in thier script file? I'm still learning about them so I'm curious.
Unknown2010-09-01 14:10:40
MUSHclient calls them groups, not classes, and the only real difference is that they're not hierarchical in nature, which isn't a problem for me at all.
Timers can be used in any way you can imagine. I use them a lot in my combat system for failsafes and other things. You can make one-off timers, timers with or without labels (I prefer with the labels, so I have better control over them), timers that execute an alias or timers that run some script code.
Timers can be used in any way you can imagine. I use them a lot in my combat system for failsafes and other things. You can make one-off timers, timers with or without labels (I prefer with the labels, so I have better control over them), timers that execute an alias or timers that run some script code.
Unknown2010-09-01 23:39:58
QUOTE (Zarquan @ Sep 1 2010, 11:10 PM) <{POST_SNAPBACK}>
MUSHclient calls them groups, not classes, and the only real difference is that they're not hierarchical in nature, which isn't a problem for me at all.
Timers can be used in any way you can imagine. I use them a lot in my combat system for failsafes and other things. You can make one-off timers, timers with or without labels (I prefer with the labels, so I have better control over them), timers that execute an alias or timers that run some script code.
Timers can be used in any way you can imagine. I use them a lot in my combat system for failsafes and other things. You can make one-off timers, timers with or without labels (I prefer with the labels, so I have better control over them), timers that execute an alias or timers that run some script code.
Okay! I remembered the question I wanted to ask concerning failsafes just before I fell asleep. If you activate a timer in a function to go off say after 5 seconds, does the function wait until the 5 seconds is over before closing or does the timer sit in a different area and the function closes allowing for other things to get processed?
*Cheers*
Unknown2010-09-01 23:59:19
Timers are processed independently from the trigger or alias that create them, so it's an asynchronous setup.
Unknown2010-09-02 08:54:07
Okay... I just finished setting up a simple trigger to autoeat sparkleberry/coltsfoot whenever I can. I placed a simple variable flag check within the function that resets the sparkle balance to 0, so that if the flag check is on it will immediately eat another sparkleberry. I use an alias to set the flag on and off before combat. Is this efficient? Should I use EnableTrigger instead? And if so, do you have two separate triggers (same input), one for the normal bashing don't need to eat a sparkle and another for the automatic eat sparkle?
*Cheers for all the help*
*Cheers for all the help*
Unknown2010-09-02 11:41:14
First, do your healing/curing on the prompt whenever possible.
Second, set variables to toggle things like sipping or eating sparkleberry, using aliases to turn them on/off.
Third, the timer is useful for anti-illusion and for failsafes. So, when you send the command, you set a flag that basically says "I'm trying to do XYZ." with a timer to delete the flag after a second or two. When the action goes through successfully, you check that flag on the triggered message to make sure you initiated the command and it wasn't an illusion. Then, you set a variable (script variable should do, don't need a world variable) to turn off any appropriate balances, and set a different timer to reset the balance after a reasonable amount of time, in case the balance recovery doesn't come because it turned out to be a well-timed illusion after all.
Hope that makes sense.
Second, set variables to toggle things like sipping or eating sparkleberry, using aliases to turn them on/off.
Third, the timer is useful for anti-illusion and for failsafes. So, when you send the command, you set a flag that basically says "I'm trying to do XYZ." with a timer to delete the flag after a second or two. When the action goes through successfully, you check that flag on the triggered message to make sure you initiated the command and it wasn't an illusion. Then, you set a variable (script variable should do, don't need a world variable) to turn off any appropriate balances, and set a different timer to reset the balance after a reasonable amount of time, in case the balance recovery doesn't come because it turned out to be a well-timed illusion after all.
Hope that makes sense.
Unknown2010-09-02 12:01:12
QUOTE (Zarquan @ Sep 2 2010, 08:41 PM) <{POST_SNAPBACK}>
First, do your healing/curing on the prompt whenever possible.
This... is new to me. Is there any references on the forums that explains this better or would you be able to explain it here for me please? When you mean "On the prompt", do you mean that you catch any changes to your health/mana/ego and immediately supply a curing mean such as healing potion.... then healing scroll... then *boom* coltsfoot/sparkleberry ... then any Demi-power that ubers you up?
Xavius2010-09-02 20:43:22
QUOTE (XarconZ @ Sep 2 2010, 07:01 AM) <{POST_SNAPBACK}>
This... is new to me. Is there any references on the forums that explains this better or would you be able to explain it here for me please? When you mean "On the prompt", do you mean that you catch any changes to your health/mana/ego and immediately supply a curing mean such as healing potion.... then healing scroll... then *boom* coltsfoot/sparkleberry ... then any Demi-power that ubers you up?
The general idea is that you shouldn't eat sparkleberry when you see the "you can eat sparkleberry" line, but rather, you should have that line set a canEatSparkleberry variable to true, then, when you see your prompt, go through all of those flags and decide what to eat and drink.
Unknown2010-09-02 20:54:42
It's not just for grabbing your stats. It's a useful place to do your final tracking of things before executing your curing. So, if you get hit by a monk combo with a dozen afflictions, you don't just cure the first thing you see, instead going for the highest priority one from the whole combo. It gives you a chance to detect illusions, pick up on abilities that block an affliction, etc, so you can avoid adding afflictions and curing unnecessarily.
Unknown2010-09-02 23:39:38
QUOTE (Xavius @ Sep 3 2010, 05:43 AM) <{POST_SNAPBACK}>
The general idea is that you shouldn't eat sparkleberry when you see the "you can eat sparkleberry" line, but rather, you should have that line set a canEatSparkleberry variable to true, then, when you see your prompt, go through all of those flags and decide what to eat and drink.
Okay, I can see how to work that, kinda. Depending on how low your health or mana goes will determine the necessary steps that your system will take to get your health to max. Do most people use "if" statements to create the necessary flags or are there more complex programming I should read up on?
QUOTE (Zarquan @ Sep 3 2010, 05:54 AM) <{POST_SNAPBACK}>
It's not just for grabbing your stats. It's a useful place to do your final tracking of things before executing your curing. So, if you get hit by a monk combo with a dozen afflictions, you don't just cure the first thing you see, instead going for the highest priority one from the whole combo. It gives you a chance to detect illusions, pick up on abilities that block an affliction, etc, so you can avoid adding afflictions and curing unnecessarily.
Hmm.. So a monk comes in combos you with a whole bunch of afflictions, don't you get all of the affliction messages. I think the one part I still haven't grasped is that as combat goes round after round, you get hit by a huge number of attacks. So, the curing system has to compensate by continuing to rearrange priorities on what to cure first. Also, what I still don't get is how does the prompt just showing health, mana, and ego can help you in figuring out what to cure first. Or is it a simple check to make sure you aren't dying from health loss? - - (Hmm... if said illusion was supposed to cause "damage" but nothing happened to your health, then the system acknowledges it as an "illusion" - - Is this what you mean? )
Sorry for my newbness
Xavius2010-09-03 00:00:51
It has nothing to do with the information on the prompt. The prompt is just there to make you wait until you get all the relevant information before acting.
For example:
5000h, 5000m, 5000e, 10p, exk-
A gyfu and ger rune whiz in from the north and strike you in the chest.
5000h, 5000m, 5000e, 10p, exk-
If you wait for the prompt, you know that this is an illusion, because you're not prone. If you do end up being prone, you don't do something silly like try to cure paralysis (gyfu) before curing impatience (ger), just because paralysis was added first.
For example:
5000h, 5000m, 5000e, 10p, exk-
A gyfu and ger rune whiz in from the north and strike you in the chest.
5000h, 5000m, 5000e, 10p, exk-
If you wait for the prompt, you know that this is an illusion, because you're not prone. If you do end up being prone, you don't do something silly like try to cure paralysis (gyfu) before curing impatience (ger), just because paralysis was added first.
Unknown2010-09-03 07:17:30
QUOTE (Xavius @ Sep 3 2010, 09:00 AM) <{POST_SNAPBACK}>
It has nothing to do with the information on the prompt. The prompt is just there to make you wait until you get all the relevant information before acting.
For example:
5000h, 5000m, 5000e, 10p, exk-
A gyfu and ger rune whiz in from the north and strike you in the chest.
5000h, 5000m, 5000e, 10p, exk-
If you wait for the prompt, you know that this is an illusion, because you're not prone. If you do end up being prone, you don't do something silly like try to cure paralysis (gyfu) before curing impatience (ger), just because paralysis was added first.
For example:
5000h, 5000m, 5000e, 10p, exk-
A gyfu and ger rune whiz in from the north and strike you in the chest.
5000h, 5000m, 5000e, 10p, exk-
If you wait for the prompt, you know that this is an illusion, because you're not prone. If you do end up being prone, you don't do something silly like try to cure paralysis (gyfu) before curing impatience (ger), just because paralysis was added first.
Oooo... Thank you good sir! That makes sense and it is something I didn't notice. I shall be back in a couple of days with more questions.