Windower Sound Effect

言語: JP EN DE FR
2010-06-21
New Items
users online
フォーラム » Windower » Support » windower sound effect
windower sound effect
Offline
Posts: 77
By Mazata 2022-02-19 17:40:00  
anyone know the code for lua to play a sound effect ?
 
Offline
Posts:
By 2022-02-19 19:15:56
 Undelete | Edit  | Link | 引用 | 返事
 
Post deleted by User.
[+]
Offline
Posts: 77
By Mazata 2022-02-20 10:33:05  
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)
 
Offline
Posts:
By 2022-02-20 11:12:08
 Undelete | Edit  | Link | 引用 | 返事
 
Post deleted by User.
Offline
Posts: 77
By Mazata 2022-02-20 11:37:13  
ok thanks
Offline
Posts: 77
By Mazata 2022-02-20 12:56:48  
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?
 
Offline
Posts:
By 2022-02-20 13:07:00
 Undelete | Edit  | Link | 引用 | 返事
 
Post deleted by User.
 Asura.Tilaa
Offline
サーバ: Asura
Game: FFXI
user: Mazata
Posts: 4
By Asura.Tilaa 2022-02-20 13:16:41  
everything else works but just not the sound file and i dont get any errors
Offline
Posts: 77
By Mazata 2022-02-20 13:21:39  
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)
 
Offline
Posts:
By 2022-02-20 13:30:34
 Undelete | Edit  | Link | 引用 | 返事
 
Post deleted by User.
 Asura.Yottaxa
Offline
サーバ: Asura
Game: FFXI
user: Yottaxa
Posts: 134
By Asura.Yottaxa 2022-02-20 18:34:33  
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.
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 693
By Bismarck.Xurion 2022-02-21 05:57:55  
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')
Log in to post.