Windower Sound Effect |
||
|
windower sound effect
anyone know the code for lua to play a sound effect ?
it didnt work for some reason
windower.register_event('gain buff', function(buff_id) local buff_name = res.buffs[buff_id].name if buff_name == 'stun' then equip(sets.defense.DT) windower.add_to_chat(50,'DT [ Stun ]') elseif buff_name == 'terror' then equip(sets.defense.DT) windower.add_to_chat(50,'DT [ SET EQUIPED ]') elseif buff_name == 'paralysis' then send_command('input /p <=== Paralyzed please Para !') elseif buff_name == 'petrification' then equip(sets.defense.DT) windower.add_to_chat(50,'DT [ SET EQUIPED ]') send_command('input /p <=== Petrification, please Stona !') elseif buff_name == 'sleep' then send_command('input /p <=== zzZzz Asleep zzZzz , please Cure me !') elseif buff_name == 'doom' then equip(sets.defense.DT) send_command('input /p <=== DOOMED , please Cursna !') elseif buff_name == 'charm' then send_command('input /p <=== Charmed Sleep me !') elseif buff_name == 'Haste' then windower.play_sound("C:\\glittershot.wav") send_command('input /echo --GAIN BUFF HASTE-- !') return end end) ok thanks
Odin.Cbolt said: » I added to my lua and it seemed to work fine but I also had to add this line as well to make it work: Code res = require('resources') this didnt work for the sound file where did u add that code in? everything else works but just not the sound file and i dont get any errors
res = require('resources')
windower.register_event('lose buff', function(buff_id) local buff_name = res.buffs[buff_id].name if buff_name == 'haste' then send_command('input /p <=== haste removed, Thank you !;@wait 1') elseif buff_name == 'petrification' then send_command('input /p <=== is no longer Petrify Thank you !;@wait 1') elseif buff_name == 'sleep' then send_command('input /p <=== is no longer Asleep !;@wait 1') elseif buff_name == 'paralysis' then send_command('input /p <=== is no longer Paralyzed !;@wait 1') elseif buff_name == 'Haste' then windower.play_sound("C:\\glittershot.wav") send_command('input /echo <----- LOSE BUFF HASTE II ----->!') windower.add_to_chat(50,'[ ~~~~~LOSE BUFF HASTE II ~~~~~]') return end end) Im not sure, but in the example I found, it uses "/" instead of the standard windows "\" character, so in my lua files, I have for example the following and it works:
windower.play_sound('C:/Windower/addons/GearSwap/data/Sounds/Sound.wav') --must be a .wav-- perhaps try the "/" for any slashes in the directory target. And im not sure on the double slash, should be singles. By the way, I love using this feature for both loss of cor rolls as well as geo bubbles etc. as an audio cue. works great. This may be a permissions issue. I'm not sure if Windower will have permission to access the root drive, so I suggest moving the sound file into your addon directory and trying:
Code windower.play_sound(windower.addon_path .. 'glittershot.wav') |
|
All FFXI content and images © 2002-2025 SQUARE ENIX CO., LTD. FINAL
FANTASY is a registered trademark of Square Enix Co., Ltd.
|