mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-24 00:15:02 +02:00
OTCv8 3.0 rev 2
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
local context = G.botContext
|
||||
|
||||
context.getSoundChannel = function()
|
||||
if not g_sounds then
|
||||
return
|
||||
end
|
||||
return g_sounds.getChannel(SoundChannels.Bot)
|
||||
end
|
||||
|
||||
context.playSound = function(file)
|
||||
local botSoundChannel = context.getSoundChannel()
|
||||
if not botSoundChannel then
|
||||
return
|
||||
end
|
||||
botSoundChannel:setEnabled(true)
|
||||
botSoundChannel:stop(0)
|
||||
botSoundChannel:play(file, 0, 1.0)
|
||||
return botSoundChannel
|
||||
end
|
||||
|
||||
context.stopSound = function()
|
||||
local botSoundChannel = context.getSoundChannel()
|
||||
if not botSoundChannel then
|
||||
return
|
||||
end
|
||||
botSoundChannel:stop()
|
||||
end
|
||||
|
||||
context.playAlarm = function()
|
||||
return context.playSound("/sounds/alarm.ogg")
|
||||
end
|
||||
local context = G.botContext
|
||||
|
||||
context.getSoundChannel = function()
|
||||
if not g_sounds then
|
||||
return
|
||||
end
|
||||
return g_sounds.getChannel(SoundChannels.Bot)
|
||||
end
|
||||
|
||||
context.playSound = function(file)
|
||||
local botSoundChannel = context.getSoundChannel()
|
||||
if not botSoundChannel then
|
||||
return
|
||||
end
|
||||
botSoundChannel:setEnabled(true)
|
||||
botSoundChannel:stop(0)
|
||||
botSoundChannel:play(file, 0, 1.0)
|
||||
return botSoundChannel
|
||||
end
|
||||
|
||||
context.stopSound = function()
|
||||
local botSoundChannel = context.getSoundChannel()
|
||||
if not botSoundChannel then
|
||||
return
|
||||
end
|
||||
botSoundChannel:stop()
|
||||
end
|
||||
|
||||
context.playAlarm = function()
|
||||
return context.playSound("/sounds/alarm.ogg")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user