https://github.com/jtuu/psobb-unrandom-addon/blob/b6cd4027b57e2896ef0dd8dcf8780265df058a54/init.lua#L604 Here's some lua code i wrote a while ago that gets the special attack of the current weapon
Tip: use Gallium Nine for a big performance boost if you're using Mesa. You need to use d3d8to9 or something and override d3d8.dll and d3d9.dll (for example the ENB mod provides both of these).
Also tried using d9vk but couldn't get it to work. Anyone else have experience with using it?