I've been seeing that a lot of BLM use a toggle to equip spaekona's +1. I was thinking it would be better to have something where I press down on a key, and while it's pressed down, it will equip spaekona's +1. Then when I let up, it will unequip it. Would anyone mind writing that code, or at least pointing me in the general direction of how to do that? Would be much appreciated. I'm using mote's blm lua if that makes any difference.

#1

Posted 20 September 2016 - 01:24 PM
#2

Posted 20 September 2016 - 02:34 PM
bind k input /equip "Spaekona's +1" bind k up input /equip "Idle Gear"Replace "k" with the key you want to bind to. Fill in the necessary commands to change your equipment.
#3

Posted 20 September 2016 - 02:51 PM
I'm afraid you've misunderstood what I'm asking. I'm not asking for code to merely equip the gear. I'm asking for code that will equip it when I'm holding down the key, and then when I release the key, it unequips it.
Let me try it. I'll see if it does what I had in mind.
#4

Posted 20 September 2016 - 03:01 PM
Since I'm using Spaekona's coat, it has a ' in there. It should be something like this
send_command('bind !n input /myrkr')
But because Spaekona's is in there, it prematurely thinks the command is ending.
#5

Posted 20 September 2016 - 03:33 PM
I've been seeing that a lot of BLM use a toggle to equip spaekona's +1. I was thinking it would be better to have something where I press down on a key, and while it's pressed down, it will equip spaekona's +1. Then when I let up, it will unequip it. Would anyone mind writing that code, or at least pointing me in the general direction of how to do that? Would be much appreciated. I'm using mote's blm lua if that makes any difference.
you would need to use
windower.register_event('keyboard', function(dik, flags, blocked) end)
#6

Posted 20 September 2016 - 04:21 PM
Thank you, but I'm going to need a little more guidance sdahlka. I'm not even a padawan lua coder.
#7

Posted 21 September 2016 - 04:23 AM
Thank you, but I'm going to need a little more guidance sdahlka. I'm not even a padawan lua coder.
the only thing i can tell you is that
dik = key(number)
flags = key orientation(number)
blocked = is this key blocked so FFXI does not see it(bool)
what you can do is
windower.register_event('keyboard', function(dik, flags, blocked) print(dik,flags) end)
it will print out the key id and the flag info to the windower console
but as i have no idea what the key id's are or what the flags are thats all i can tell you
unfortunately this page has no info on the key id's in number form http://wiki.windower...wer:key_mapping
tho these might be what your looking for for the dik key codes https://community.bi...ki/DIK_KeyCodes
and this page has no info on anything eather http://dev.windower....pi:events:start
#8

Posted 23 September 2016 - 10:03 PM
Since I'm using Spaekona's coat, it has a ' in there. It should be something like this
send_command('bind !n input /myrkr')
But because Spaekona's is in there, it prematurely thinks the command is ending.
Escape the single quote (\'s Coat), or use double quotes.
The link for the dik values looks correct. There's also a (less complete) table in Yush.
I'm pretty sure there's a fourth parameter for the keyboard event.
dik(number): indicates the dik code for the key pressed
down(boolean): indicates if the key is up or down
flags(number): a bit field which indicates which, if any, modifier keys are pressed
blocked(boolean): indicates whether the key stroke should be sent to the client (note: windower doesn't currently block the input even if blocked is true. It's still useful for determining if another addon has already successfully processed the key stroke. Return true (defaults to false) from the keyboard event to set blocked.)
Arcon explained that the flags parameter is passed a seven bit long bit-field with the following flags:
flags |= ShiftIsDown << 0; flags |= AltIsDown << 1; flags |= ControlIsDown << 2; flags |= WinIsDown << 3; flags |= AppsIsDown << 4; flags |= ChatOpen() << 5; flags |= down << 6;
The sixth bit (starting from 0) indicates whether the key is down or up, and is pulled off by Luacore and used to determine the down parameter.
I think I remember there being a bug with the flags value. If you press a modifier key and then press and hold a non-modifier key, flags might have been 0 sometimes. I haven't checked in the last year, though.
Iryoku's suggestion will work. You could switch the equip command to a gearswap command if you use gearswap, which would avoid some client spam.
#9

Posted 25 September 2016 - 12:43 AM
Escape the single quote (\'s Coat), or use double quotes.
The link for the dik values looks correct. There's also a (less complete) table in Yush.
I'm pretty sure there's a fourth parameter for the keyboard event.
if thats true the someone needs to update the dev wiki really badly
because all it has is
event name--
keyboard
Arguments--
number dik
number flags
bool blocked
Return--
bool
Description--
Triggers on any keyboard action, including release of a button. Optionally returns a bool indicating whether or not the keyboard action has been caught. If true, it will not be passed on to the next stage, so the keyboard action would never reach the game.
#10

Posted 27 September 2016 - 03:54 AM
Iryoku's suggestion will work. You could switch the equip command to a gearswap command if you use gearswap, which would avoid some client spam.
What would be the gearswap command for this? I am interested as being able to hold a key down to ensure my Automaton Enimty+ gear stays on when it performs Provoke/Flash or under certain situations would be really handy rather than what I currently have which is a toggle system.
Also tagged with one or more of these keywords: gearswap, toggle, magicburst
![]() Gearswap status_changeStarted by DerianX , 11 Sep 2017 ![]() |
| ![]()
| ||
Windower→
Support→
August 2017 Update Gearswap ProblemStarted by Ripp , 06 Aug 2017 ![]() |
| ![]()
| ||
Windower→
Support→
Can I get a Organizer sample scripts?Started by Ande85 , 10 Jul 2017 ![]() |
| ![]()
| ||
![]() GearSwap creating an Include PathStarted by Aliquis , 14 Jun 2017 ![]() |
| ![]()
| ||
Windower→
Support→
spells in custom functionsStarted by theblackdeath , 13 Apr 2017 ![]() |
| ![]()
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users