I run MUSHClient from a laptop keyboard, so I'm missing the keypad to use for simple directions. I've worked out a system of Accelerators to make up for this, usually along the lines of
I've also got a secondary set of accelerators to meet some of the common functions, and these are like
What I'm trying to do is establish a kind of group of accelerators, so that I can change modes and thus change the keybindings. For example, the CTRL+ALT+8 combination would if I was in, say, "Magic" mode, but if I was in "Combat" mode it would instead. I also have a third Debate mode.
I've worked out a system using an accel_mode variable and if-then statements to adjust what set of actions my accelerators perform. The problem that I'm running into is that if I have to re-process the script every time I change modes, or it won't register the change. It looks something like this:
If I switch modes and then re-process, it will do whichever set of actions accompanies the mode I'm in. But if I don't reprocess, I can switch modes as many times as I want and it will only do one set, the mode that was in place the last time the script was processed.
There -has- to be a better way to do this. ^.^ (BTW, I've also tried using ELSE IF statements, but didn't have any success at all with it.) What can I do?
Accelerator "CTRL+8", "north"I've also got a secondary set of accelerators to meet some of the common functions, and these are like
Accelerator "CTRL+ALT+8", "drink mana"What I'm trying to do is establish a kind of group of accelerators, so that I can change modes and thus change the keybindings. For example, the CTRL+ALT+8 combination would
drink manadrink healthI've worked out a system using an accel_mode variable and if-then statements to adjust what set of actions my accelerators perform. The problem that I'm running into is that if I have to re-process the script every time I change modes, or it won't register the change. It looks something like this:
if GetVariable ("accel_mode") = "combat" then
Accelerator "CTRL+ALT+8", "drink health"
end if
if GetVariable ("accel_mode") = "magic" then
Accelerator "CTRL+ALT+8", "drink mana"
end if
if GetVariable ("accel_mode") = "debate" then
Accelerator "CTRL+ALT+8", "drink bromide"
end if
If I switch modes and then re-process, it will do whichever set of actions accompanies the mode I'm in. But if I don't reprocess, I can switch modes as many times as I want and it will only do one set, the mode that was in place the last time the script was processed.
There -has- to be a better way to do this. ^.^ (BTW, I've also tried using ELSE IF statements, but didn't have any success at all with it.) What can I do?