Ir para conteúdo
  • Cadastre-se

Posts Recomendados

  • 2 weeks later...

cara como e esse de {fromPos = {x=1089, y=1110, z=8}, toPos = {x=1135, y=1142, z=8} sera que vc poderia ajuda n entendo como fazer uma aria usando isso dai (as posiçoes) tipo si eu kise-se so coloca ela no cp do meu serve como eu faria 

Link para o post
Compartilhar em outros sites
  • 2 weeks later...
  • 2 weeks later...

Eu não carrego esse ícone mod som e tudo, mas eu nem sempre têm os sons e repetir o som de inicialização em respone me ajudar em breve

Link para o post
Compartilhar em outros sites
  • 1 month later...

Sistema muito bom, otc uma grande esperança, meus créditos ali *-* xS0NYx mito

Idéias são à prova de balas.

xS0NYx here

"Ser ateu é viver em razão de fatos, não de crenças; É aproveitar essa vida, não desperdiça-la na esperança de viver outra; É fazer o bem de coração, não por devoção. Ser ate, simplesmente, um ser livre."

Link para o post
Compartilhar em outros sites
  • 4 weeks later...

bom 

                              ELITE GLOBAL

 

serve em construção galera curta nossa pagina no facebook e fique por dentro de tudo e do dia da Extreia

 

facebook = https://www.facebook.com/pages/Elite-global/361726520654949

 

 

 

Link para o post
Compartilhar em outros sites
  • 1 month later...
  • 2 weeks later...

Só uma dúvida cara, como deixa uma música mp3 nesse formato .ogg?

Vlw.

Se Eu não me engano, Audacity (editor de audio) tem um plug-in que permite vc salvar seu audio em ogg

darkrai.gif

A Vingança nunca é plena, mata a alma e envenena.
                                                      "Seu Madruga"
 
 
Não acredite na mentira, ela não é verdade.                                  
                         "Uma Pessoa do Facebook"
 
 
Se a força não esta funcionando, é porque você esta batendo fraco demais.
                                                                                    "Natsu Dragnell"
 
 
Pokemon Revolution 2015
 Facebook: https://www.facebook.com/PokemonRev?ref=ts&fref=ts
 
Sword Tibiart Online
Facebook: https://www.facebook.com/swordtibiartonline
 

tTAL2Wl.gif2z8t5ef.jpg

Link para o post
Compartilhar em outros sites

Eu Estou tendo um rpob

 

O que faz?
Esse mod, ao definirmos posições para ele, quando você estiver entre as posições ele tocará a música definida por você.

 

Instalação:

1 - Em sua pasta otc/mods crie uma pasta chamada rcsound, crie um arquivo chamado rcsound.lua e adicione isto:

SOUNDS_CONFIG = {
    soundChannel = SoundChannels.Music,
    checkInterval = 500,
    folder = 'music/',
    noSound = 'No sound file for this area.',
}


SOUNDS = {
    -- Rook Cave
    {fromPos = {x=879, y=803, z=8}, toPos = {x=1079, y=963, z=15}, sound = "FF VII - Main.ogg"},
    
        -- Boss
        {fromPos = {x=977, y=903, z=8}, toPos = {x=1009, y=916, z=9}, priority = 1, sound="FF VII - Main.ogg"},
        {fromPos = {x=1001, y=917, z=9}, toPos = {x=1002, y=919, z=9}, priority = 1, sound="FF VII - Main.ogg"},
    
    -- Main
    
        -- Dragon
        {fromPos = {x=1089, y=1110, z=8}, toPos = {x=1135, y=1142, z=8}, priority = 1, sound="Fairy Tail - Main.ogg"},
        {fromPos = {x=1102, y=1128, z=9}, toPos = {x=1131, y=1149, z=9}, priority = 1, sound="Fairy Tail - Main.ogg"},
        {fromPos = {x=1117, y=1124, z=9}, toPos = {x=1128, y=1127, z=9}, priority = 1, sound="Fairy Tail - Main.ogg"},
        {fromPos = {x=1100, y=1104, z=10}, toPos = {x=1127, y=1131, z=10}, priority = 1, sound="Fairy Tail - Main.ogg"},
        {fromPos = {x=1103, y=1108, z=9}, toPos = {x=1108, y=1112, z=9}, priority = 1, sound="Fairy Tail - Main.ogg"},


        {fromPos = {x=1096, y=1088, z=5}, toPos = {x=1110, y=1100, z=6}, priority = 1, sound="Fairy Tail - Main.ogg"},


        
        
} ----------


-- Sound
local rcSoundChannel
local showPosEvent
local playingSound


-- Design
soundWindow = nil
soundButton = nil


function toggle()
  if soundButton:isOn() then
    soundWindow:close()
    soundButton:setOn(false)
  else
    soundWindow:open()
    soundButton:setOn(true)
  end
end


function onMiniWindowClose()
  soundButton:setOn(false)
end


function init()
    for i = 1, #SOUNDS do
        SOUNDS[i].sound = SOUNDS_CONFIG.folder .. SOUNDS[i].sound
    end
    
    connect(g_game, { onGameStart = onGameStart,
                    onGameEnd = onGameEnd })
    
    rcSoundChannel = g_sounds.getChannel(SOUNDS_CONFIG.soundChannel)
    -- rcSoundChannel:setGain(value/COUNDS_CONFIG.volume)


    soundButton = modules.client_topmenu.addRightGameToggleButton('soundButton', tr('Sound Info') .. '', '/images/audio', toggle)
    soundButton:setOn(true)
    
    soundWindow = g_ui.loadUI('rcsound', modules.game_interface.getRightPanel())
    soundWindow:disableResize()
    soundWindow:setup()
    
    if(g_game.isOnline()) then
        onGameStart()
    end
end


function terminate()
    disconnect(g_game, { onGameStart = onGameStart,
                       onGameEnd = onGameEnd })
    onGameEnd()
    soundWindow:destroy()
    soundButton:destroy()
end


function onGameStart()
    stopSound()
    toggleSoundEvent = addEvent(toggleSound, SOUNDS_CONFIG.checkInterval)
end


function onGameEnd()
    stopSound()
    removeEvent(toggleSoundEvent)
end


function isInPos(pos, fromPos, toPos)
    return
        pos.x>=fromPos.x and
        pos.y>=fromPos.y and
        pos.z>=fromPos.z and
        pos.x<=toPos.x and
        pos.y<=toPos.y and
        pos.z<=toPos.z
end


function toggleSound()
    local player = g_game.getLocalPlayer()
    if not player then return end
    
    local pos = player:getPosition()
    local toPlay = nil


    for i = 1, #SOUNDS do
        if(isInPos(pos, SOUNDS[i].fromPos, SOUNDS[i].toPos)) then
            if(toPlay) then
                toPlay.priority = toPlay.priority or 0
                if((toPlay.sound~=SOUNDS[i].sound) and (SOUNDS[i].priority>toPlay.priority)) then
                    toPlay = SOUNDS[i]
                end
            else
                toPlay = SOUNDS[i]
            end
        end
    end


    playingSound = playingSound or {sound='', priority=0}
    
    if(toPlay~=nil and playingSound.sound~=toPlay.sound) then
        g_logger.info("RC Sounds: New sound area detected:")
        g_logger.info("  Position: {x=" .. pos.x .. ", y=" .. pos.y .. ", z=" .. pos.z .. "}")
        g_logger.info("  Music: " .. toPlay.sound)
        stopSound()
        playSound(toPlay.sound)
        playingSound = toPlay
    elseif(toPlay==nil) and (playingSound.sound~='') then
        g_logger.info("RC Sounds: New sound area detected:")
        g_logger.info("  Left music area.")
        stopSound()
    end


    toggleSoundEvent = scheduleEvent(toggleSound, SOUNDS_CONFIG.checkInterval)
end


function playSound(sound)
    rcSoundChannel:enqueue(sound, 0)
    setLabel(clearName(sound))
end


function clearName(soundName)
    local explode = string.explode(soundName, "/")
    soundName = explode[#explode]
    explode = string.explode(soundName, ".ogg")
    soundName = ''
    for i = 1, #explode-1 do
        soundName = soundName .. explode[i]
    end
    return soundName
end


function stopSound()
    setLabel(SOUNDS_CONFIG.noSound)
    rcSoundChannel:stop()
    playingSound = nil
end


function setLabel(str)
    soundWindow:recursiveGetChildById('currentSound'):getChildById('value'):setText(str)
end

2 - Crie um arquivo chamado rcsound.otmod e adicione isto:

Module
  name: rc_sound
  description: Handels sounds for Rising Client.
  author: Shawak
  website: none
  
  autoload: true
  autoload-priority: 1000
  sandbox: true
  
  scripts: [ rcsound ]
  @onLoad: init()
  @onUnload: terminate()

3 - Crie um arquivo chamado rcsound.otui e adicione isto:

Module
  name: rc_sound
  description: Handels sounds for Rising Client.
  author: Shawak
  website: none
  
  autoload: true
  autoload-priority: 1000
  sandbox: true
  
  scripts: [ rcsound ]
  @onLoad: init()
  @onUnload: terminate()

4 - Crie uma pasta dentro da rcsound, chamada music, dentro dela adicione os sons desejados, lembrando que o formato tem que ser OGG.

 

Como configurar?
É bastante simples, como definir as posições e a musica que tocará quando entrar nela:
{fromPos = {x=879, y=803, z=8}, toPos = {x=1079, y=963, z=15}, sound = "FF VII - Main.ogg"}    
Então, o frompos = da posição, topos = para a posição, ou seja, frompos vai ser onde começa e topos termina.
Sound = "FF VII - Main.ogg", o que está entre aspas é o nome da musica que se encontra na pasta music, lembrando que tem que colocar o .ogg

 

Créditos:

xS0NYx
Shawak

Eu estou tendo um problema, ao inves de tocar as musicas, ele ta tocando a musica de inicialização (login).

darkrai.gif

A Vingança nunca é plena, mata a alma e envenena.
                                                      "Seu Madruga"
 
 
Não acredite na mentira, ela não é verdade.                                  
                         "Uma Pessoa do Facebook"
 
 
Se a força não esta funcionando, é porque você esta batendo fraco demais.
                                                                                    "Natsu Dragnell"
 
 
Pokemon Revolution 2015
 Facebook: https://www.facebook.com/PokemonRev?ref=ts&fref=ts
 
Sword Tibiart Online
Facebook: https://www.facebook.com/swordtibiartonline
 

tTAL2Wl.gif2z8t5ef.jpg

Link para o post
Compartilhar em outros sites
  • 3 months later...
  • 8 months later...
  • 1 month later...

ERROR, e ficou tocando a música de inicialização. 
 

ERROR: failed to load UI from 'rcsound.otui': 'Module' is not a defined style
ERROR: Unable to load module 'rc_sound': LUA ERROR:
/rcsound/rcsound.lua:78: attempt to index global 'soundWindow' (a nil value)
stack traceback:
    [C]: ?
    /rcsound/rcsound.lua:78: in function 'init'
    /rcsound/rcsound.otmod:12:[@onLoad]:1: in main chunk
    [C]: in function 'autoLoadModules'
    /init.lua:49: in main chunk
Startup done :]
ERROR: Unable to send extended opcode 1, extended opcodes are not enabled
ERROR: protected lua call failed: LUA ERROR:
/rcsound/rcsound.lua:187: attempt to index global 'soundWindow' (a nil value)
stack traceback:
    [C]: ?
    /rcsound/rcsound.lua:187: in function 'setLabel'
    /rcsound/rcsound.lua:180: in function 'stopSound'
    /rcsound/rcsound.lua:97: in function </rcsound/rcsound.lua:96>

 

Link para o post
Compartilhar em outros sites
  • 11 months later...

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo