Ir para conteúdo
  • Cadastre-se

Pedido Ativar Luzes OTC


Ir para solução Resolvido por FlameArcixt,

Posts Recomendados

Qual o motivo deste tópico? 

 

Bom galera , eu queria saber se tem alguma maneira de trava isso aqui na Souce?

 

image.png.b54f69a3d21277e21751475cc37c407b.png

 

isso mesmo... travar! 

Tipo para que [Ativar luzes] fique sempre ativo, porem o play não possa tira de 10%.

já tentei trava no mod porem tem alguns que conhece e tira...

Jamais se desespere em meio as sombrias afeiçoes da sua vida, pois das nuvens mais negras cai água límpida e fecunda

Link para o post
Compartilhar em outros sites

Vá em  Otc\modules\client_options\options.lua e procure os codigos e edite:

Spoiler
Spoiler


function online()
  setLightOptionsVisibility(not g_game.getFeature(GameForceLight))
end

function offline()
  setLightOptionsVisibility(false)
end

 

Deixe assim:

Spoiler


function online()
  setLightOptionsVisibility(false)
end

function offline()
  setLightOptionsVisibility(false)
end

 

 

 

Procure por elseif key == 'enableLights' then e substitua:

Spoiler
Spoiler






elseif key == 'enableLights' then
    gameMapPanel:setDrawLights(value and options['ambientLight'] < 100)
    graphicsPanel:getChildById('ambientLight'):setEnabled(value)
    graphicsPanel:getChildById('ambientLightLabel'):setEnabled(value)

 

Deixe Assim: 

Spoiler






elseif key == 'enableLights' then
    gameMapPanel:setDrawLights(10)
    graphicsPanel:getChildById('ambientLight'):setEnabled(false)
    graphicsPanel:getChildById('ambientLightLabel'):setEnabled(false)

 

 

Se ajudei Deixa o rep+ ai tmj mano

 

Editado por FlameArcixt (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
19 horas atrás, FlameArcixt disse:

Vá em  Otc\modules\client_options\options.lua e procure os codigos e edite:

  Ocultar conteúdo
  Ocultar conteúdo



function online()
  setLightOptionsVisibility(not g_game.getFeature(GameForceLight))
end

function offline()
  setLightOptionsVisibility(false)
end

 

Deixe assim:

  Ocultar conteúdo



function online()
  setLightOptionsVisibility(false)
end

function offline()
  setLightOptionsVisibility(false)
end

 

 

 

Procure por elseif key == 'enableLights' then e substitua:

  Ocultar conteúdo
  Ocultar conteúdo






elseif key == 'enableLights' then
    gameMapPanel:setDrawLights(value and options['ambientLight'] < 100)
    graphicsPanel:getChildById('ambientLight'):setEnabled(value)
    graphicsPanel:getChildById('ambientLightLabel'):setEnabled(value)

 

Deixe Assim: 

  Ocultar conteúdo






elseif key == 'enableLights' then
    gameMapPanel:setDrawLights(10)
    graphicsPanel:getChildById('ambientLight'):setEnabled(false)
    graphicsPanel:getChildById('ambientLightLabel'):setEnabled(false)

 

 

Se ajudei Deixa o rep+ ai tmj mano

 

Esqueci de por meu código.. ele não tem essa função 

/////////////////////////////////////////////////////////////////////////////////////////////

local defaultOptions = {
  vsync = true,
  showFps = false,
  showPing = false,
  fullscreen = false,
  classicControl = true,
  smartWalk = false,
  dashWalk = false,
  autoChaseOverride = true,
  showStatusMessagesInConsole = true,
  showEventMessagesInConsole = true,
  showInfoMessagesInConsole = true,
  showTimestampsInConsole = true,
  showLevelsInConsole = true,
  showPrivateMessagesInConsole = false,
  showPrivateMessagesOnScreen = true,
  showLeftPanel = false,
  foregroundFrameRate = 61,
  backgroundFrameRate = 80,
  painterEngine = 0,
  enableAudio = true,
  enableMusicSound = true,
  musicSoundVolume = 100,
  enableAmbientSound = true,
  ambientSoundVolume = 30,
  enableEffectSound = true,
  effectSoundVolume = 100,
  enablePrivateMessageAlert = true,
  enableLights = true,
  ambientLight = 70,
  displayNames = true,
  displayHealth = true,
  displayText = true,
  displayExperience = true,
  dontStretchShrink = false,
  enableShaderEffects = true,
  displayEnvironmentEffects = true,
  displayMapGuides = true,
  displayGameTime = true,
  displaySquaredCrosshair = false,
}

local optionsWindow
local optionsButton
local optionsTabBar
local options = {}
local generalPanel
local consolePanel
local graphicsPanel
local soundPanel
local audioButton

local function setupGraphicsEngines()
  local enginesRadioGroup = UIRadioGroup.create()
  local ogl1 = graphicsPanel:getChildById('opengl1')
  local ogl2 = graphicsPanel:getChildById('opengl2')
  local dx9 = graphicsPanel:getChildById('directx9')
  enginesRadioGroup:addWidget(ogl1)
  enginesRadioGroup:addWidget(ogl2)
  enginesRadioGroup:addWidget(dx9)

  if g_window.getPlatformType() == 'WIN32-EGL' then
    enginesRadioGroup:selectWidget(dx9)
    ogl1:setEnabled(false)
    ogl2:setEnabled(false)
    dx9:setEnabled(true)
  else
    ogl1:setEnabled(g_graphics.isPainterEngineAvailable(1))
    ogl2:setEnabled(g_graphics.isPainterEngineAvailable(2))
    dx9:setEnabled(false)
    if g_graphics.getPainterEngine() == 2 then
      enginesRadioGroup:selectWidget(ogl2)
    else
      enginesRadioGroup:selectWidget(ogl1)
    end

    if g_app.getOs() ~= 'windows' then
      dx9:hide()
    end
  end

  enginesRadioGroup.onSelectionChange = function(self, selected)
    if selected == ogl1 then
      setOption('painterEngine', 1)
    elseif selected == ogl2 then
      setOption('painterEngine', 2)
    end
  end

  if not g_graphics.canCacheBackbuffer() then
    graphicsPanel:getChildById('foregroundFrameRate'):disable()
    graphicsPanel:getChildById('foregroundFrameRateLabel'):disable()
  end
end

function onOnline()
    g_game.getProtocolGame():sendExtendedOpcode(ExtendedIds.DashWalking, (options['dashWalk'] and "1" or "0"))
end

function init()
  for k,v in pairs(defaultOptions) do
    g_settings.setDefault(k, v)
    options[k] = v
  end

  optionsWindow = g_ui.displayUI('options')
  optionsWindow:hide()

  optionsTabBar = optionsWindow:getChildById('optionsTabBar')
  optionsTabBar:setContentWidget(optionsWindow:getChildById('optionsTabContent'))

  g_keyboard.bindKeyDown('Ctrl+Shift+F', function() toggleOption('fullscreen') end)
  g_keyboard.bindKeyDown('Ctrl+N', toggleDisplays)

  generalPanel = g_ui.loadUI('game')
  optionsTabBar:addTab(tr('Game'), generalPanel, '/images/optionstab/game')

  consolePanel = g_ui.loadUI('console')
  optionsTabBar:addTab(tr('Console'), consolePanel, '/images/optionstab/console')

  graphicsPanel = g_ui.loadUI('graphics')
  optionsTabBar:addTab(tr('Graphics'), graphicsPanel, '/images/optionstab/graphics')

  audioPanel = g_ui.loadUI('audio')
  optionsTabBar:addTab(tr('Audio'), audioPanel, '/images/optionstab/audio')

  optionsButton = modules.client_topmenu.addLeftButton('optionsButton', tr('Options'), '/images/topbuttons/options', toggle)
  audioButton = modules.client_topmenu.addLeftButton('audioButton', tr('Audio'), '/images/topbuttons/audio', function() toggleOption('enableAudio') end)

  addEvent(function() setup() end)

    connect(g_game, { onGameStart = onOnline })
end

function terminate()
  g_keyboard.unbindKeyDown('Ctrl+Shift+F')
  g_keyboard.unbindKeyDown('Ctrl+N')
  optionsWindow:destroy()
  optionsButton:destroy()
  audioButton:destroy()

    disconnect(g_game, { onGameStart = onOnline })
end

function setup()
  -- load options
  for k,v in pairs(defaultOptions) do
    if type(v) == 'boolean' then
      setOption(k, g_settings.getBoolean(k), true)
    elseif type(v) == 'number' then
      setOption(k, g_settings.getNumber(k), true)
    end
  end
  setupGraphicsEngines()
end

function toggle()
  if optionsWindow:isVisible() then
    hide()
  else
    show()
  end
end

function show()
  optionsWindow:show()
  optionsWindow:raise()
  optionsWindow:focus()
end

function hide()
  optionsWindow:hide()
end

function toggleDisplays()
  if options['displayNames'] and options['displayHealth'] then
    setOption('displayNames', false)
  elseif options['displayHealth'] then
    setOption('displayHealth', false)
  else
    if not options['displayNames'] and not options['displayHealth'] then
      setOption('displayNames', true)
    else
      setOption('displayHealth', true)
    end
  end
end

function toggleOption(key)
  setOption(key, not getOption(key))
end

function setOption(key, value, force)
  if not force and options[key] == value then return end
  local gameMapPanel = modules.game_interface.getMapPanel()

  if key == 'vsync' then
    g_window.setVerticalSync(value)
  elseif key == 'showFps' then
    modules.client_topmenu.setFpsVisible(value)
  elseif key == 'showPing' then
    modules.client_topmenu.setPingVisible(value)
  elseif key == 'fullscreen' then
    g_window.setFullscreen(value)
  elseif key == 'enableAudio' then
    g_sounds.setAudioEnabled(value)
    if value then
      audioButton:setIcon('/images/topbuttons/audio')
    else
      audioButton:setIcon('/images/topbuttons/audio_mute')
    end
  elseif key == 'enableMusicSound' then
    g_sounds.getChannel(SoundChannels.Music):setEnabled(value)
  elseif key == 'musicSoundVolume' then
    g_sounds.getChannel(SoundChannels.Music):setGain(value/100)
    audioPanel:getChildById('musicSoundVolumeLabel'):setText(tr('Music volume: %d', value))
  elseif key == 'enableAmbientSound' then
    g_sounds.getChannel(SoundChannels.Ambient):setEnabled(value)
  elseif key == 'ambientSoundVolume' then
    g_sounds.getChannel(SoundChannels.Ambient):setGain(value/100)
    audioPanel:getChildById('ambientSoundVolumeLabel'):setText(tr('Ambient volume: %d', value))
  elseif key == 'enableEffectSound' then
    g_sounds.getChannel(SoundChannels.Effect):setEnabled(value)
  elseif key == 'effectSoundVolume' then
    g_sounds.getChannel(SoundChannels.Effect):setGain(value/100)
    audioPanel:getChildById('effectSoundVolumeLabel'):setText(tr('Effect volume: %d', value))
  elseif key == 'enablePrivateMessageAlert' then
    modules.game_console.setPrivateMessageAlert(value)
  elseif key == 'showLeftPanel' then
    modules.game_interface.getLeftPanel():setOn(value)
  elseif key == 'backgroundFrameRate' then
    local text, v = value, value
    if value <= 0 or value >= 201 then text = 'max' v = 0 end
    graphicsPanel:getChildById('backgroundFrameRateLabel'):setText(tr('Game framerate limit: %s', text))
    g_app.setBackgroundPaneMaxFps(v)
  elseif key == 'foregroundFrameRate' then
    local text, v = value, value
    if value <= 0 or value >= 61 then  text = 'max' v = 0 end
    graphicsPanel:getChildById('foregroundFrameRateLabel'):setText(tr('Interface framerate limit: %s', text))
    g_app.setForegroundPaneMaxFps(v)
  elseif key == 'enableLights' then
    gameMapPanel:setDrawLights(value and options['ambientLight'] < 100)
    graphicsPanel:getChildById('ambientLight'):setEnabled(value)
    graphicsPanel:getChildById('ambientLightLabel'):setEnabled(value)
  elseif key == 'ambientLight' then
    graphicsPanel:getChildById('ambientLightLabel'):setText(tr('Ambient light: %s%%', value))
    gameMapPanel:setMinimumAmbientLight(value/100)
    gameMapPanel:setDrawLights(options['enableLights'] and value < 100)
  elseif key == 'painterEngine' then
    g_graphics.selectPainterEngine(value)
  elseif key == 'displayNames' then
    gameMapPanel:setDrawNames(value)
  elseif key == 'displayHealth' then
    gameMapPanel:setDrawHealthBars(value)
  elseif key == 'displayText' then
    gameMapPanel:setDrawTexts(value)
  elseif key == 'displayExperience' then
    gameMapPanel:setDrawExperienceBars(value)
  elseif key == 'dontStretchShrink' then
    addEvent(function()
      modules.game_interface.updateStretchShrink()
    end)
  elseif key == 'enableShaderEffects' then
    g_graphics.setShouldUseShaders(value)
  elseif key == 'displayEnvironmentEffects' then
--    modules.game_environment.setDisplay(value)
  elseif key == 'displayMapGuides' then
    modules.game_minimap.setGuidesDisplay(value)
  elseif key == 'displayGameTime' then
    modules.game_time.setDisplay(value)
  elseif key == 'displaySquaredCrosshair' then
    _G['UICREATUREBUTTON_USESQUARED'] = (value)
  elseif key == 'dashWalk' then
      if g_game.isOnline() then
        g_game.getProtocolGame():sendExtendedOpcode(ExtendedIds.DashWalking, (value and "1" or "0"))
      end
  end

  -- change value for keybind updates
  for _,panel in pairs(optionsTabBar:getTabsPanel()) do
    local widget = panel:recursiveGetChildById(key)
    if widget then
      if widget:getStyle().__class == 'UICheckBox' then
        widget:setChecked(value)
      elseif widget:getStyle().__class == 'UIScrollBar' then
        widget:setValue(value)
      end
      break
    end
  end

  g_settings.set(key, value)
  options[key] = value
end

function getOption(key)
  return options[key]
end

function addTab(name, panel, icon)
  optionsTabBar:addTab(name, panel, icon)
end

function addButton(name, func, icon)
  optionsTabBar:addButton(name, func, icon)
end
 

Jamais se desespere em meio as sombrias afeiçoes da sua vida, pois das nuvens mais negras cai água límpida e fecunda

Link para o post
Compartilhar em outros sites
6 horas atrás, Salazar Slytherin disse:
local defaultOptions = {
  vsync = true,
  showFps = false,
  showPing = false,
  fullscreen = false,
  classicControl = true,
  smartWalk = false,
  dashWalk = false,
  autoChaseOverride = true,
  showStatusMessagesInConsole = true,
  showEventMessagesInConsole = true,
  showInfoMessagesInConsole = true,
  showTimestampsInConsole = true,
  showLevelsInConsole = true,
  showPrivateMessagesInConsole = false,
  showPrivateMessagesOnScreen = true,
  showLeftPanel = false,
  foregroundFrameRate = 61,
  backgroundFrameRate = 80,
  painterEngine = 0,
  enableAudio = true,
  enableMusicSound = true,
  musicSoundVolume = 100,
  enableAmbientSound = true,
  ambientSoundVolume = 30,
  enableEffectSound = true,
  effectSoundVolume = 100,
  enablePrivateMessageAlert = true,
  enableLights = true,
  ambientLight = 70,
  displayNames = true,
  displayHealth = true,
  displayText = true,
  displayExperience = true,
  dontStretchShrink = false,
  enableShaderEffects = true,
  displayEnvironmentEffects = true,
  displayMapGuides = true,
  displayGameTime = true,
  displaySquaredCrosshair = false,
}

local optionsWindow
local optionsButton
local optionsTabBar
local options = {}
local generalPanel
local consolePanel
local graphicsPanel
local soundPanel
local audioButton

local function setupGraphicsEngines()
  local enginesRadioGroup = UIRadioGroup.create()
  local ogl1 = graphicsPanel:getChildById('opengl1')
  local ogl2 = graphicsPanel:getChildById('opengl2')
  local dx9 = graphicsPanel:getChildById('directx9')
  enginesRadioGroup:addWidget(ogl1)
  enginesRadioGroup:addWidget(ogl2)
  enginesRadioGroup:addWidget(dx9)

  if g_window.getPlatformType() == 'WIN32-EGL' then
    enginesRadioGroup:selectWidget(dx9)
    ogl1:setEnabled(false)
    ogl2:setEnabled(false)
    dx9:setEnabled(true)
  else
    ogl1:setEnabled(g_graphics.isPainterEngineAvailable(1))
    ogl2:setEnabled(g_graphics.isPainterEngineAvailable(2))
    dx9:setEnabled(false)
    if g_graphics.getPainterEngine() == 2 then
      enginesRadioGroup:selectWidget(ogl2)
    else
      enginesRadioGroup:selectWidget(ogl1)
    end

    if g_app.getOs() ~= 'windows' then
      dx9:hide()
    end
  end

  enginesRadioGroup.onSelectionChange = function(self, selected)
    if selected == ogl1 then
      setOption('painterEngine', 1)
    elseif selected == ogl2 then
      setOption('painterEngine', 2)
    end
  end

  if not g_graphics.canCacheBackbuffer() then
    graphicsPanel:getChildById('foregroundFrameRate'):disable()
    graphicsPanel:getChildById('foregroundFrameRateLabel'):disable()
  end
end

function onOnline()
    g_game.getProtocolGame():sendExtendedOpcode(ExtendedIds.DashWalking, (options['dashWalk'] and "1" or "0"))
end

function init()
  for k,v in pairs(defaultOptions) do
    g_settings.setDefault(k, v)
    options[k] = v
  end

  optionsWindow = g_ui.displayUI('options')
  optionsWindow:hide()

  optionsTabBar = optionsWindow:getChildById('optionsTabBar')
  optionsTabBar:setContentWidget(optionsWindow:getChildById('optionsTabContent'))

  g_keyboard.bindKeyDown('Ctrl+Shift+F', function() toggleOption('fullscreen') end)
  g_keyboard.bindKeyDown('Ctrl+N', toggleDisplays)

  generalPanel = g_ui.loadUI('game')
  optionsTabBar:addTab(tr('Game'), generalPanel, '/images/optionstab/game')

  consolePanel = g_ui.loadUI('console')
  optionsTabBar:addTab(tr('Console'), consolePanel, '/images/optionstab/console')

  graphicsPanel = g_ui.loadUI('graphics')
  optionsTabBar:addTab(tr('Graphics'), graphicsPanel, '/images/optionstab/graphics')

  audioPanel = g_ui.loadUI('audio')
  optionsTabBar:addTab(tr('Audio'), audioPanel, '/images/optionstab/audio')

  optionsButton = modules.client_topmenu.addLeftButton('optionsButton', tr('Options'), '/images/topbuttons/options', toggle)
  audioButton = modules.client_topmenu.addLeftButton('audioButton', tr('Audio'), '/images/topbuttons/audio', function() toggleOption('enableAudio') end)

  addEvent(function() setup() end)

    connect(g_game, { onGameStart = onOnline })
end

function terminate()
  g_keyboard.unbindKeyDown('Ctrl+Shift+F')
  g_keyboard.unbindKeyDown('Ctrl+N')
  optionsWindow:destroy()
  optionsButton:destroy()
  audioButton:destroy()

    disconnect(g_game, { onGameStart = onOnline })
end

function setup()
  -- load options
  for k,v in pairs(defaultOptions) do
    if type(v) == 'boolean' then
      setOption(k, g_settings.getBoolean(k), true)
    elseif type(v) == 'number' then
      setOption(k, g_settings.getNumber(k), true)
    end
  end
  setupGraphicsEngines()
end

function toggle()
  if optionsWindow:isVisible() then
    hide()
  else
    show()
  end
end

function show()
  optionsWindow:show()
  optionsWindow:raise()
  optionsWindow:focus()
end

function hide()
  optionsWindow:hide()
end

function toggleDisplays()
  if options['displayNames'] and options['displayHealth'] then
    setOption('displayNames', false)
  elseif options['displayHealth'] then
    setOption('displayHealth', false)
  else
    if not options['displayNames'] and not options['displayHealth'] then
      setOption('displayNames', true)
    else
      setOption('displayHealth', true)
    end
  end
end

function toggleOption(key)
  setOption(key, not getOption(key))
end

function setOption(key, value, force)
  if not force and options[key] == value then return end
  local gameMapPanel = modules.game_interface.getMapPanel()

  if key == 'vsync' then
    g_window.setVerticalSync(value)
  elseif key == 'showFps' then
    modules.client_topmenu.setFpsVisible(value)
  elseif key == 'showPing' then
    modules.client_topmenu.setPingVisible(value)
  elseif key == 'fullscreen' then
    g_window.setFullscreen(value)
  elseif key == 'enableAudio' then
    g_sounds.setAudioEnabled(value)
    if value then
      audioButton:setIcon('/images/topbuttons/audio')
    else
      audioButton:setIcon('/images/topbuttons/audio_mute')
    end
  elseif key == 'enableMusicSound' then
    g_sounds.getChannel(SoundChannels.Music):setEnabled(value)
  elseif key == 'musicSoundVolume' then
    g_sounds.getChannel(SoundChannels.Music):setGain(value/100)
    audioPanel:getChildById('musicSoundVolumeLabel'):setText(tr('Music volume: %d', value))
  elseif key == 'enableAmbientSound' then
    g_sounds.getChannel(SoundChannels.Ambient):setEnabled(value)
  elseif key == 'ambientSoundVolume' then
    g_sounds.getChannel(SoundChannels.Ambient):setGain(value/100)
    audioPanel:getChildById('ambientSoundVolumeLabel'):setText(tr('Ambient volume: %d', value))
  elseif key == 'enableEffectSound' then
    g_sounds.getChannel(SoundChannels.Effect):setEnabled(value)
  elseif key == 'effectSoundVolume' then
    g_sounds.getChannel(SoundChannels.Effect):setGain(value/100)
    audioPanel:getChildById('effectSoundVolumeLabel'):setText(tr('Effect volume: %d', value))
  elseif key == 'enablePrivateMessageAlert' then
    modules.game_console.setPrivateMessageAlert(value)
  elseif key == 'showLeftPanel' then
    modules.game_interface.getLeftPanel():setOn(value)
  elseif key == 'backgroundFrameRate' then
    local text, v = value, value
    if value <= 0 or value >= 201 then text = 'max' v = 0 end
    graphicsPanel:getChildById('backgroundFrameRateLabel'):setText(tr('Game framerate limit: %s', text))
    g_app.setBackgroundPaneMaxFps(v)
  elseif key == 'foregroundFrameRate' then
    local text, v = value, value
    if value <= 0 or value >= 61 then  text = 'max' v = 0 end
    graphicsPanel:getChildById('foregroundFrameRateLabel'):setText(tr('Interface framerate limit: %s', text))
    g_app.setForegroundPaneMaxFps(v)
  elseif key == 'enableLights' then
    gameMapPanel:setDrawLights(10)
    graphicsPanel:getChildById('ambientLight'):setEnabled(true)
    graphicsPanel:getChildById('ambientLightLabel'):setEnabled(true)
  elseif key == 'ambientLight' then
    gameMapPanel:setMinimumAmbientLight(10)
    gameMapPanel:setDrawLights(10)
  elseif key == 'painterEngine' then
    g_graphics.selectPainterEngine(value)
  elseif key == 'displayNames' then
    gameMapPanel:setDrawNames(value)
  elseif key == 'displayHealth' then
    gameMapPanel:setDrawHealthBars(value)
  elseif key == 'displayText' then
    gameMapPanel:setDrawTexts(value)
  elseif key == 'displayExperience' then
    gameMapPanel:setDrawExperienceBars(value)
  elseif key == 'dontStretchShrink' then
    addEvent(function()
      modules.game_interface.updateStretchShrink()
    end)
  elseif key == 'enableShaderEffects' then
    g_graphics.setShouldUseShaders(value)
  elseif key == 'displayEnvironmentEffects' then
--    modules.game_environment.setDisplay(value)
  elseif key == 'displayMapGuides' then
    modules.game_minimap.setGuidesDisplay(value)
  elseif key == 'displayGameTime' then
    modules.game_time.setDisplay(value)
  elseif key == 'displaySquaredCrosshair' then
    _G['UICREATUREBUTTON_USESQUARED'] = (value)
  elseif key == 'dashWalk' then
      if g_game.isOnline() then
        g_game.getProtocolGame():sendExtendedOpcode(ExtendedIds.DashWalking, (value and "1" or "0"))
      end
  end

  -- change value for keybind updates
  for _,panel in pairs(optionsTabBar:getTabsPanel()) do
    local widget = panel:recursiveGetChildById(key)
    if widget then
      if widget:getStyle().__class == 'UICheckBox' then
        widget:setChecked(value)
      elseif widget:getStyle().__class == 'UIScrollBar' then
        widget:setValue(value)
      end
      break
    end
  end

  g_settings.set(key, value)
  options[key] = value
end

function getOption(key)
  return options[key]
end

function addTab(name, panel, icon)
  optionsTabBar:addTab(name, panel, icon)
end

function addButton(name, func, icon)
  optionsTabBar:addButton(name, func, icon)
end

 

Editado por FlameArcixt (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Funcionou não funcionando... tipo, ele ta como eu falei, porem o ambiente "ambientLight" não esta ficando escuro como era para ficar.

image.png.8348a0875615032e2a7141991d939d77.png

Activando ou desactivando as luzes fica da mesma forma...

Jamais se desespere em meio as sombrias afeiçoes da sua vida, pois das nuvens mais negras cai água límpida e fecunda

Link para o post
Compartilhar em outros sites
  • Solução
32 minutos atrás, Salazar Slytherin disse:

Funcionou não funcionando... tipo, ele ta como eu falei, porem o ambiente "ambientLight" não esta ficando escuro como era para ficar.

image.png.8348a0875615032e2a7141991d939d77.png

Activando ou desactivando as luzes fica da mesma forma...

Vai em data\modules\client_options\graphics.otui e procura por:

  OptionCheckBox
    id: enableLights
    !text: tr('Enable lights')

E apague.

Editado por FlameArcixt (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
21 minutos atrás, FlameArcixt disse:

Vai em data\modules\client_options\graphics.otui e procura por:


  OptionCheckBox
    id: enableLights
    !text: tr('Enable lights')

E apague.

Apaguei e sumi a opção de marca e desmarca porem não funcionou 

Jamais se desespere em meio as sombrias afeiçoes da sua vida, pois das nuvens mais negras cai água límpida e fecunda

Link para o post
Compartilhar em outros sites
2 horas atrás, FlameArcixt disse:

local defaultOptions = {
  vsync = true,
  showFps = false,
  showPing = false,
  fullscreen = false,
  classicControl = true,
  smartWalk = false,
  dashWalk = false,
  autoChaseOverride = true,
  showStatusMessagesInConsole = true,
  showEventMessagesInConsole = true,
  showInfoMessagesInConsole = true,
  showTimestampsInConsole = true,
  showLevelsInConsole = true,
  showPrivateMessagesInConsole = false,
  showPrivateMessagesOnScreen = true,
  showLeftPanel = false,
  foregroundFrameRate = 61,
  backgroundFrameRate = 80,
  painterEngine = 0,
  enableAudio = true,
  enableMusicSound = true,
  musicSoundVolume = 100,
  enableAmbientSound = true,
  ambientSoundVolume = 30,
  enableEffectSound = true,
  effectSoundVolume = 100,
  enablePrivateMessageAlert = true,
  enableLights = true,
  ambientLight = 70,
  displayNames = true,
  displayHealth = true,
  displayText = true,
  displayExperience = true,
  dontStretchShrink = false,
  enableShaderEffects = true,
  displayEnvironmentEffects = true,
  displayMapGuides = true,
  displayGameTime = true,
  displaySquaredCrosshair = false,
}

local optionsWindow
local optionsButton
local optionsTabBar
local options = {}
local generalPanel
local consolePanel
local graphicsPanel
local soundPanel
local audioButton

local function setupGraphicsEngines()
  local enginesRadioGroup = UIRadioGroup.create()
  local ogl1 = graphicsPanel:getChildById('opengl1')
  local ogl2 = graphicsPanel:getChildById('opengl2')
  local dx9 = graphicsPanel:getChildById('directx9')
  enginesRadioGroup:addWidget(ogl1)
  enginesRadioGroup:addWidget(ogl2)
  enginesRadioGroup:addWidget(dx9)

  if g_window.getPlatformType() == 'WIN32-EGL' then
    enginesRadioGroup:selectWidget(dx9)
    ogl1:setEnabled(false)
    ogl2:setEnabled(false)
    dx9:setEnabled(true)
  else
    ogl1:setEnabled(g_graphics.isPainterEngineAvailable(1))
    ogl2:setEnabled(g_graphics.isPainterEngineAvailable(2))
    dx9:setEnabled(false)
    if g_graphics.getPainterEngine() == 2 then
      enginesRadioGroup:selectWidget(ogl2)
    else
      enginesRadioGroup:selectWidget(ogl1)
    end

    if g_app.getOs() ~= 'windows' then
      dx9:hide()
    end
  end

  enginesRadioGroup.onSelectionChange = function(self, selected)
    if selected == ogl1 then
      setOption('painterEngine', 1)
    elseif selected == ogl2 then
      setOption('painterEngine', 2)
    end
  end

  if not g_graphics.canCacheBackbuffer() then
    graphicsPanel:getChildById('foregroundFrameRate'):disable()
    graphicsPanel:getChildById('foregroundFrameRateLabel'):disable()
  end
end

function onOnline()
    g_game.getProtocolGame():sendExtendedOpcode(ExtendedIds.DashWalking, (options['dashWalk'] and "1" or "0"))
end

function init()
  for k,v in pairs(defaultOptions) do
    g_settings.setDefault(k, v)
    options[k] = v
  end

  optionsWindow = g_ui.displayUI('options')
  optionsWindow:hide()

  optionsTabBar = optionsWindow:getChildById('optionsTabBar')
  optionsTabBar:setContentWidget(optionsWindow:getChildById('optionsTabContent'))

  g_keyboard.bindKeyDown('Ctrl+Shift+F', function() toggleOption('fullscreen') end)
  g_keyboard.bindKeyDown('Ctrl+N', toggleDisplays)

  generalPanel = g_ui.loadUI('game')
  optionsTabBar:addTab(tr('Game'), generalPanel, '/images/optionstab/game')

  consolePanel = g_ui.loadUI('console')
  optionsTabBar:addTab(tr('Console'), consolePanel, '/images/optionstab/console')

  graphicsPanel = g_ui.loadUI('graphics')
  optionsTabBar:addTab(tr('Graphics'), graphicsPanel, '/images/optionstab/graphics')

  audioPanel = g_ui.loadUI('audio')
  optionsTabBar:addTab(tr('Audio'), audioPanel, '/images/optionstab/audio')

  optionsButton = modules.client_topmenu.addLeftButton('optionsButton', tr('Options'), '/images/topbuttons/options', toggle)
  audioButton = modules.client_topmenu.addLeftButton('audioButton', tr('Audio'), '/images/topbuttons/audio', function() toggleOption('enableAudio') end)

  addEvent(function() setup() end)

    connect(g_game, { onGameStart = onOnline })
end

function terminate()
  g_keyboard.unbindKeyDown('Ctrl+Shift+F')
  g_keyboard.unbindKeyDown('Ctrl+N')
  optionsWindow:destroy()
  optionsButton:destroy()
  audioButton:destroy()

    disconnect(g_game, { onGameStart = onOnline })
end

function setup()
  -- load options
  for k,v in pairs(defaultOptions) do
    if type(v) == 'boolean' then
      setOption(k, g_settings.getBoolean(k), true)
    elseif type(v) == 'number' then
      setOption(k, g_settings.getNumber(k), true)
    end
  end
  setupGraphicsEngines()
end

function toggle()
  if optionsWindow:isVisible() then
    hide()
  else
    show()
  end
end

function show()
  optionsWindow:show()
  optionsWindow:raise()
  optionsWindow:focus()
end

function hide()
  optionsWindow:hide()
end

function toggleDisplays()
  if options['displayNames'] and options['displayHealth'] then
    setOption('displayNames', false)
  elseif options['displayHealth'] then
    setOption('displayHealth', false)
  else
    if not options['displayNames'] and not options['displayHealth'] then
      setOption('displayNames', true)
    else
      setOption('displayHealth', true)
    end
  end
end

function toggleOption(key)
  setOption(key, not getOption(key))
end

function setOption(key, value, force)
  if not force and options[key] == value then return end
  local gameMapPanel = modules.game_interface.getMapPanel()

  if key == 'vsync' then
    g_window.setVerticalSync(value)
  elseif key == 'showFps' then
    modules.client_topmenu.setFpsVisible(value)
  elseif key == 'showPing' then
    modules.client_topmenu.setPingVisible(value)
  elseif key == 'fullscreen' then
    g_window.setFullscreen(value)
  elseif key == 'enableAudio' then
    g_sounds.setAudioEnabled(value)
    if value then
      audioButton:setIcon('/images/topbuttons/audio')
    else
      audioButton:setIcon('/images/topbuttons/audio_mute')
    end
  elseif key == 'enableMusicSound' then
    g_sounds.getChannel(SoundChannels.Music):setEnabled(value)
  elseif key == 'musicSoundVolume' then
    g_sounds.getChannel(SoundChannels.Music):setGain(value/100)
    audioPanel:getChildById('musicSoundVolumeLabel'):setText(tr('Music volume: %d', value))
  elseif key == 'enableAmbientSound' then
    g_sounds.getChannel(SoundChannels.Ambient):setEnabled(value)
  elseif key == 'ambientSoundVolume' then
    g_sounds.getChannel(SoundChannels.Ambient):setGain(value/100)
    audioPanel:getChildById('ambientSoundVolumeLabel'):setText(tr('Ambient volume: %d', value))
  elseif key == 'enableEffectSound' then
    g_sounds.getChannel(SoundChannels.Effect):setEnabled(value)
  elseif key == 'effectSoundVolume' then
    g_sounds.getChannel(SoundChannels.Effect):setGain(value/100)
    audioPanel:getChildById('effectSoundVolumeLabel'):setText(tr('Effect volume: %d', value))
  elseif key == 'enablePrivateMessageAlert' then
    modules.game_console.setPrivateMessageAlert(value)
  elseif key == 'showLeftPanel' then
    modules.game_interface.getLeftPanel():setOn(value)
  elseif key == 'backgroundFrameRate' then
    local text, v = value, value
    if value <= 0 or value >= 201 then text = 'max' v = 0 end
    graphicsPanel:getChildById('backgroundFrameRateLabel'):setText(tr('Game framerate limit: %s', text))
    g_app.setBackgroundPaneMaxFps(v)
  elseif key == 'foregroundFrameRate' then
    local text, v = value, value
    if value <= 0 or value >= 61 then  text = 'max' v = 0 end
    graphicsPanel:getChildById('foregroundFrameRateLabel'):setText(tr('Interface framerate limit: %s', text))
    g_app.setForegroundPaneMaxFps(v)
  elseif key == 'enableLights' then
    gameMapPanel:setDrawLights(10)
    graphicsPanel:getChildById('ambientLight'):setEnabled(true)
    graphicsPanel:getChildById('ambientLightLabel'):setEnabled(true)
  elseif key == 'ambientLight' then
    gameMapPanel:setMinimumAmbientLight(10)
    gameMapPanel:setDrawLights(10)
  elseif key == 'painterEngine' then
    g_graphics.selectPainterEngine(value)
  elseif key == 'displayNames' then
    gameMapPanel:setDrawNames(value)
  elseif key == 'displayHealth' then
    gameMapPanel:setDrawHealthBars(value)
  elseif key == 'displayText' then
    gameMapPanel:setDrawTexts(value)
  elseif key == 'displayExperience' then
    gameMapPanel:setDrawExperienceBars(value)
  elseif key == 'dontStretchShrink' then
    addEvent(function()
      modules.game_interface.updateStretchShrink()
    end)
  elseif key == 'enableShaderEffects' then
    g_graphics.setShouldUseShaders(value)
  elseif key == 'displayEnvironmentEffects' then
--    modules.game_environment.setDisplay(value)
  elseif key == 'displayMapGuides' then
    modules.game_minimap.setGuidesDisplay(value)
  elseif key == 'displayGameTime' then
    modules.game_time.setDisplay(value)
  elseif key == 'displaySquaredCrosshair' then
    _G['UICREATUREBUTTON_USESQUARED'] = (value)
  elseif key == 'dashWalk' then
      if g_game.isOnline() then
        g_game.getProtocolGame():sendExtendedOpcode(ExtendedIds.DashWalking, (value and "1" or "0"))
      end
  end

  -- change value for keybind updates
  for _,panel in pairs(optionsTabBar:getTabsPanel()) do
    local widget = panel:recursiveGetChildById(key)
    if widget then
      if widget:getStyle().__class == 'UICheckBox' then
        widget:setChecked(value)
      elseif widget:getStyle().__class == 'UIScrollBar' then
        widget:setValue(value)
      end
      break
    end
  end

  g_settings.set(key, value)
  options[key] = value
end

function getOption(key)
  return options[key]
end

function addTab(name, panel, icon)
  optionsTabBar:addTab(name, panel, icon)
end

function addButton(name, func, icon)
  optionsTabBar:addButton(name, func, icon)
end

 

@Salazar Slytherin editei ai, caso de certo, marca a resposta como certa e se puder deixa o rep+

Link para o post
Compartilhar em outros sites
27 minutos atrás, FlameArcixt disse:

@Salazar Slytherin editei ai, caso de certo, marca a resposta como certa e se puder deixa o rep+

Também não deu certo, vou utiliza assim mesmo, acho que so funciona mexendo na source. Obrigado por tudo ai ^^, ctz não resolveu o meu mais vai resolver de muitas pessoas <3 

Jamais se desespere em meio as sombrias afeiçoes da sua vida, pois das nuvens mais negras cai água límpida e fecunda

Link para o post
Compartilhar em outros sites
17 horas atrás, Salazar Slytherin disse:

Também não deu certo, vou utiliza assim mesmo, acho que so funciona mexendo na source. Obrigado por tudo ai ^^, ctz não resolveu o meu mais vai resolver de muitas pessoas <3 

Pode me chamar no dc? Arcixt#1329

 

Link para o post
Compartilhar em outros sites

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.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por LasseXeterno
      Então, estou tentando adicionar uma nova "race" no meu Ot de base Cyan, tentei seguir 3 tutoriais aqui do tibiaking, um sobre race, porém nos códigos do meu servidor não tem o constant.h e nem o monster.cpp. E o outro tutorial, eu fiz tudo que ele pediu e quando entrei no game para testar, funcionava os golpes e as imunidades, porém não aparecia o número do dano e nem a cor.  Usei esse tutorial como base: 
      Pois ele é derivado. E o outro tutorial que usei foi: 
      Porém nesse, não consegui achar a const.h, e quando fui nos arquivos do creaturescript e adicionei uma cor nova a "COLOR_FAIRY", quando abro o jogo, os pokemons que seriam teoricamente "fada", o que eu usei de teste foi a Clefable. A Clefable tomava IK e dava IK no seu atk do tipo fada. 
      Além de que, o meu erro principal é esse: Warning - Monsters::loadMonster] Unknown race type fairy. (data/monster/pokes/geracao 1/Clefable.xml)
       Pois como eu já disse, não consigo achar onde adicionar uma nova race.

    • Por yuriowns
      Salve rapazes, tranquilo? Preciso de ajuda pra colocar para os npc's que vendem pots verificarem quantos itens possuem no tile em que o player está e se tiver com +80 itens no sqm, o npc avisa e não vende nada até o player ir em um sqm com menos de 80 itens no chão.
       
    • Por A.Mokk
      .Qual servidor ou website você utiliza como base? 
      TFS 0.4
      Qual o motivo deste tópico? 
      Bom pessoal, a algumas semanas atras eu joguei um servidor que havia sistema de imbuimento sendo 8.60, no servidor se utilizava a spellwand para encantar as armas, os comandos eram dado no canal Imbuiment... Gostaria de saber se alguém teria como disponibilizar algum sistema de imbuimento, já procurei pra caramba aqui no fórum mas tudo que encontro é pra versões acima da que eu uso.
       
    • Por Mateus Robeerto
      Não sei se aqui é a área ou algum local para solicitar a alteração do email antigo... Não lembro mais a senha dele, nem a resposta secreta para acessar. Peço a algum administrador ou moderador para, por favor, alterar o email para o novo.
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo