• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    PokeDash Pota Server - TFS 1.2 (10.98)

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1PokeDash Pota Server - TFS 1.2 (10.98) Empty PokeDash Pota Server - TFS 1.2 (10.98) Lun Dic 19, 2022 11:00 pm

    Psycho

    Psycho
    Moderador
    Moderador
    Este es un servidor que el Dueño decidió compartir y este es  el mensaje que dejo para toda la comunidad.
    He decidido poner a disposición mi servidor Pokemon basado en Tibia, que pasé muchos años programando desde cero ( basado en TFS 1.2 ). Es muy ligero ( puede alojar 1000 + jugadores en línea ) y muy estable ( no se conocen errores que puedan causar problemas de estabilidad).
    Si es posible me gustaría que me ayuden a pasar este servidor a windows ya que es Linux.
    Ejemplo de cómo agregar un nuevo Pokémon
    Abra.xml
    Código:

    Ejemplo de cómo agregar un nuevo Pokémon

                  <?xml versión = "1.0" codificación = "ISO-8859-1"?>
                  < nombre del monstruo = nombre "Abra" Descripción = "una raza abra" = raza "psíquica" 2 = experiencia "ninguna" = "31" velocidad = "180" manacost = " " " "
                    <level min="10" max="25" />
                    <health now="527" max="527" />
                    <look type="966" head="113" body="57" legs="95" feet="113" corpse="26924" />
                    <targetchange interval="5000" chance="0" />
                    <flags>
                      <flag summonable="1" />
                      <flag attackable="1" />
                      <flag hostile="1" />
                      <flag passive="0" />
                      <flag illusionable="1" />
                      <flag convinceable="1" />
                      <flag pushable="1" />
                      <flag canpushitems="1" />
                      <flag canpushcreatures="0" />
                      <flag targetdistance="1" />
                      <flag staticattack="97" />
                      <flag runonhealth="0" />
                      <flag dexentry="63" />
                      <flag portraitid="27179" />
                      <flag hasshiny="0" />
                      <flag hasmega="0" />
                      <flag flyable="0" />
                      <flag rideable="0" />
                      <flag surfable="0" />
                      <flag canteleport="1" />
                      <flag catchchance="23" />
                      <flag moveMagicAttackBase="105" />
                      <flag moveMagicDefenseBase="55" />
                    </flags>
                    <script>
                      <event name="MonsterHealthChange" />
                      <event name="CorpseLevel" />
                      <event name="CorpseLoot" />

                    </script>
                    <moves>
                      <move name="double slap" interval="3000" isTarget="1" range="1" />
                      <move name="zen headbutt" interval="7000" isTarget="1" />

                    </moves>
                    <evolutions>
                      <evolution name="Kadabra" level="25" chance="50" itemName="enigma stone" count="1" />

                    </evolutions>
                    <attacks>
                      <attack name="melee" interval="2000" min="-20" max="-20" />
                      <attack name="double slap" interval="3000" chance="40" range="1" target="1" />
                      <attack name="zen headbutt" interval="7000" chance="40" target="1" />

                    </attacks>
                    <defenses armor="0" defense="15" >

                    </defenses>
                    <elements>
                    </elements>
                    <immunities>

                    </immunities>
                    <voices interval="5000" chance="10">
                      <voice sentence="ABRA!" />
                    </voices>
                    <loot>
                      <item name="enigma stone" countmax="1" chance="88" />
                      <item name="gold coin" countmax="35" chance="40000" />
                      <item name="blue gem" countmax="2" chance="10000" />
                      <item name="future orb" countmax="2" chance="30000" />

                    </loot>
                  </monster>
                  
    a tiene muchas características implementadas ( que incluyen todas las características estándar de pokemon y algunas características únicas! ).
    Algunas características disponibles ( faltan muchas )
    ✅ Pokémonos con nivel, estado y aumentos.

    ✅ Sistema de amor ( tu pokemon se vuelve más fuerte que otros si mata pokemons fuertes ).

    ✅ 4 generaciones de Pokémons ( incluidos Brillante y Antiguo )

    ✅ Más de 40 misiones y tareas

    ✅ Mueve la barra y la barra de pokemon.

    ✅ Autoloot.

    ✅ Eventos diarios automáticos.

    ✅ Profesiones: Catcher, Hunter, Blocker, Healer, Explorer

    ✅ ¡Mucho más!

    Capturas de pantalla
    PokeDash Pota Server - TFS 1.2 (10.98) Image?url=%2Fpkd1
    PokeDash Pota Server - TFS 1.2 (10.98) Image?url=%2Fpkd2
    PokeDash Pota Server - TFS 1.2 (10.98) Image?url=%2Fpkd4

    Descargas
    [Tienes que estar registrado y conectado para ver este vínculo]

    Compilado para windows GOD MAYA

    link: [Tienes que estar registrado y conectado para ver este vínculo]


    Spr del client aport [Tienes que estar registrado y conectado para ver este vínculo]

    link: [Tienes que estar registrado y conectado para ver este vínculo]



    Última edición por [Admin] God Maya el Sáb Feb 25, 2023 7:28 pm, editado 2 veces



    AFC By Psycho & DMOT Server
    [Tienes que estar registrado y conectado para ver este vínculo]
    5 participantes
    http://digidarkss.com

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] listo ahi tienes la compilacion para windows



    PokeDash Pota Server - TFS 1.2 (10.98) YNU5B25
    5 participantes
    http://www.tibiaface.com

    Psycho

    Psycho
    Moderador
    Moderador
    O Muchas gracias Maya lo probare!:



    AFC By Psycho & DMOT Server
    [Tienes que estar registrado y conectado para ver este vínculo]
    5 participantes
    http://digidarkss.com

    4PokeDash Pota Server - TFS 1.2 (10.98) Empty Otclient Dom Dic 25, 2022 2:52 pm

    pesiarzyk

    pesiarzyk
    Nuevo Miembro
    Nuevo Miembro
    I have problem to compile client, can u show how to do that? I have newest libs or what..?

    I want to know for future what libs i need to compile OTclient etc.

    If you can show how, I'd appreciate it.


    [Tienes que estar registrado y conectado para ver este vínculo]

    And i dont have Tibia.spr for this client, so if someone compile can send SPR for this engine?

    5 participantes

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    pesiarzyk escribió:I have problem to compile client, can u show how to do that? I have newest libs or what..?

    I want to know for future what libs i need to compile OTclient etc.

    If you can show how, I'd appreciate it.


    [Tienes que estar registrado y conectado para ver este vínculo]

    And i dont have Tibia.spr for this client, so if someone compile can send SPR for this engine?

    [Tienes que estar registrado y conectado para ver este vínculo]



    PokeDash Pota Server - TFS 1.2 (10.98) YNU5B25
    5 participantes
    http://www.tibiaface.com

    6PokeDash Pota Server - TFS 1.2 (10.98) Empty Re: PokeDash Pota Server - TFS 1.2 (10.98) Miér Feb 08, 2023 3:33 pm

    Hammer

    Hammer
    Nuevo Miembro
    Nuevo Miembro
    es muy dificil quitarle el lvl system para que se parezca mas al pxg

    5 participantes

    7PokeDash Pota Server - TFS 1.2 (10.98) Empty Re: PokeDash Pota Server - TFS 1.2 (10.98) Sáb Feb 25, 2023 5:29 pm

    akane

    akane
    Miembro
    Miembro
    falta lo mas importante que es el spr del cliente

    [Tienes que estar registrado y conectado para ver este vínculo]

    ahí está para el que lo necesite

    5 participantes

    8PokeDash Pota Server - TFS 1.2 (10.98) Empty Re: PokeDash Pota Server - TFS 1.2 (10.98) Sáb Feb 25, 2023 7:29 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    akane escribió:falta lo mas importante que es el spr del cliente

    [Tienes que estar registrado y conectado para ver este vínculo]

    ahí está para el que lo necesite

    buen aporte ya te menciones en el tema con el aporte y link



    PokeDash Pota Server - TFS 1.2 (10.98) YNU5B25
    5 participantes
    http://www.tibiaface.com

    pesiarzyk

    pesiarzyk
    Nuevo Miembro
    Nuevo Miembro
    How i can add client_terminal to this OTClient? i adding folder client_terminal to modules, adding to client.lua in load-later: " - client_terminal " but i got error (unable to load "client" module) This OTClient has 0.6.3 version. Any sugestions?

    5 participantes

    10PokeDash Pota Server - TFS 1.2 (10.98) Empty Re: PokeDash Pota Server - TFS 1.2 (10.98) Mar Mar 14, 2023 7:40 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    pesiarzyk escribió:How i can add client_terminal to this OTClient? i adding folder client_terminal to modules, adding to client.lua in load-later: " - client_terminal " but i got error (unable to load "client" module) This OTClient has 0.6.3 version. Any sugestions?

    charla con [Tienes que estar registrado y conectado para ver este vínculo] el tiene conocimiento con este ot



    PokeDash Pota Server - TFS 1.2 (10.98) YNU5B25
    5 participantes
    http://www.tibiaface.com

    11PokeDash Pota Server - TFS 1.2 (10.98) Empty Re: PokeDash Pota Server - TFS 1.2 (10.98) Mar Mar 14, 2023 8:56 pm

    akane

    akane
    Miembro
    Miembro
    The modules must be added in the "modules" folder, that module is already by default in both otclient and otclientv8.

    In the same way I will give you the scripts so that you can do the test:

    commands.lua

    Código:
    local function pcolored(text, color)
      color = color or 'white'
      modules.client_terminal.addLine(tostring(text), color)
    end

    function draw_debug_boxes()
      g_ui.setDebugBoxesDrawing(not g_ui.isDrawingDebugBoxes())
    end

    function hide_map()
      modules.game_interface.getMapPanel():hide()
    end

    function show_map()
      modules.game_interface.getMapPanel():show()
    end

    function live_textures_reload()
      g_textures.liveReload()
    end

    function live_module_reload(name)
      if not name then
        pcolored('ERROR: missing module name', 'red')
        return
      end

      local module = g_modules.getModule(name)
      if not module then
        pcolored('ERROR: unable to find module ' .. name, 'red')
        return
      end

      if not module:isReloadble() then
        pcolored('ERROR: that module is not reloadable', 'red')
        return
      end

      if not module:canReload() then
        pcolored('ERROR: some other modules requires this module, cannot reload now', 'red')
        return
      end

      local files = {}
      local hasFile = false
      for _,file in pairs(g_resources.listDirectoryFiles('/' .. name)) do
        local filepath = '/' .. name .. '/' .. file
        local time = g_resources.getFileTime(filepath)
        if time > 0 then
          files[filepath] = time
          hasFile = true
        end
      end

      if not hasFile then
        pcolored('ERROR: unable to find any file for module', 'red')
        return
      end

      cycleEvent(function()
        for filepath,time in pairs(files) do
          local newtime = g_resources.getFileTime(filepath)
          if newtime > time then
            pcolored('Reloading ' .. name, 'green')
            modules.client_terminal.flushLines()
            module:reload()
            files[filepath] = newtime

            if name == 'client_terminal' then
              modules.client_terminal.show()
            end
            break
          end
        end
      end, 1000)
    end

    function live_sprites_reload()
      local files = {}
      for _,file in pairs(g_resources.listDirectoryFiles('/things')) do
        local filepath = '/things/' .. file
        local time = g_resources.getFileTime(filepath)
        if time > 0 then
          files[filepath] = time
          hasFile = true
        end
      end

      if not hasFile then
        pcolored('ERROR: unable to find things file for module', 'red')
        return
      end

      cycleEvent(function()
        for filepath,time in pairs(files) do
          local newtime = g_resources.getFileTime(filepath)
          if newtime > time then
            pcolored('Reloading sprites...', 'green')
            modules.client_terminal.flushLines()
            modules.game_things.load()
            files[filepath] = newtime

            if name == 'client_terminal' then
              modules.client_terminal.show()
            end
            break
          end
        end
      end, 1000)
    end

    local pinging = false
    local function pingBack(ping)
      if ping < 300 then color = 'green'
      elseif ping < 600 then color = 'yellow'
      else color = 'red' end
      pcolored(g_game.getWorldName() .. ' => ' .. ping .. ' ms', color)
    end
    function ping()
      if pinging then
        pcolored('Ping stopped.')
        g_game.setPingDelay(1000)
        disconnect(g_game, 'onPingBack', pingBack)
      else
        if not (g_game.getFeature(GameClientPing) or g_game.getFeature(GameExtendedClientPing)) then
          pcolored('this server does not support ping', 'red')
          return
        elseif not g_game.isOnline() then
          pcolored('ping command is only allowed when online', 'red')
          return
        end

        pcolored('Starting ping...')
        g_game.setPingDelay(0)
        connect(g_game, 'onPingBack', pingBack)
      end
      pinging = not pinging
    end

    function clear()
      modules.client_terminal.clear()
    end

    function ls(path)
      path = path or '/'
      local files = g_resources.listDirectoryFiles(path)
      for k,v in pairs(files) do
        if g_resources.directoryExists(path .. v) then
          pcolored(path .. v, 'blue')
        else
          pcolored(path .. v)
        end
      end
    end

    function about_version()
      pcolored(g_app.getName() .. ' ' .. g_app.getVersion() .. '\n' ..
            'Rev  ' .. g_app.getBuildRevision() .. ' ('.. g_app.getBuildCommit() .. ')\n' ..
            'Built on ' .. g_app.getBuildDate())
    end

    function about_graphics()
      pcolored('Vendor ' .. g_graphics.getVendor() )
      pcolored('Renderer' .. g_graphics.getRenderer())
      pcolored('Version' .. g_graphics.getVersion())
    end

    function about_modules()
      for k,m in pairs(g_modules.getModules()) do
        local loadedtext
        if m:isLoaded() then
          pcolored(m:getName() .. ' => loaded', 'green')
        else
          pcolored(m:getName() .. ' => not loaded', 'red')
        end
      end
    end


    terminal.lua:

    Código:
    -- configs
    local LogColors = { [LogDebug] = 'pink',
                        [LogInfo] = 'white',
                        [LogWarning] = 'yellow',
                        [LogError] = 'red' }
    local MaxLogLines = 128
    local MaxHistory = 1000

    local oldenv = getfenv(0)
    setfenv(0, _G)
    _G.commandEnv = runinsandbox('commands')
    setfenv(0, oldenv)

    -- private variables
    local terminalWindow
    local terminalButton
    local logLocked = false
    local commandTextEdit
    local terminalBuffer
    local commandHistory = { }
    local currentHistoryIndex = 0
    local poped = false
    local oldPos
    local oldSize
    local firstShown = false
    local flushEvent
    local cachedLines = {}
    local disabled = false
    local allLines = {}

    -- private functions
    local function navigateCommand(step)
      local numCommands = #commandHistory
      if numCommands > 0 then
        currentHistoryIndex = math.min(math.max(currentHistoryIndex + step, 0), numCommands)
        if currentHistoryIndex > 0 then
          local command = commandHistory[numCommands - currentHistoryIndex + 1]
          commandTextEdit:setText(command)
          commandTextEdit:setCursorPos(-1)
        else
          commandTextEdit:clearText()
        end
      end
    end

    local function completeCommand()
      local cursorPos = commandTextEdit:getCursorPos()
      if cursorPos == 0 then return end

      local commandBegin = commandTextEdit:getText():sub(1, cursorPos)
      local possibleCommands = {}

      -- create a list containing all globals
      local allVars = table.copy(_G)
      table.merge(allVars, commandEnv)

      -- match commands
      for k,v in pairs(allVars) do
        if k:sub(1, cursorPos) == commandBegin then
          table.insert(possibleCommands, k)
        end
      end

      -- complete command with one match
      if #possibleCommands == 1 then
        commandTextEdit:setText(possibleCommands[1])
        commandTextEdit:setCursorPos(-1)
      -- show command matches
      elseif #possibleCommands > 0 then
        print('>> ' .. commandBegin)

        -- expand command
        local expandedComplete = commandBegin
        local done = false
        while not done do
          cursorPos = #commandBegin+1
          if #possibleCommands[1] < cursorPos then
            break
          end
          expandedComplete = commandBegin .. possibleCommands[1]:sub(cursorPos, cursorPos)
          for i,v in ipairs(possibleCommands) do
            if v:sub(1, #expandedComplete) ~= expandedComplete then
              done = true
            end
          end
          if not done then
            commandBegin = expandedComplete
          end
        end
        commandTextEdit:setText(commandBegin)
          commandTextEdit:setCursorPos(-1)

        for i,v in ipairs(possibleCommands) do
          print(v)
        end
      end
    end

    local function doCommand()
      local currentCommand = commandTextEdit:getText()
      executeCommand(currentCommand)

      if commandTextEdit then
        commandTextEdit:clearText()
      end
      return true
    end

    local function onLog(level, message, time)
      if disabled then return end
      -- avoid logging while reporting logs (would cause a infinite loop)
      if logLocked then return end

      logLocked = true
      addLine(message, LogColors[level])
      logLocked = false
    end

    -- public functions
    function init()
      terminalWindow = g_ui.displayUI('terminal')
      terminalWindow:setVisible(false)

      terminalWindow.onDoubleClick = popWindow

      terminalButton = modules.client_topmenu.addLeftButton('terminalButton', tr('Terminal') .. ' (Ctrl + T)', '/images/topbuttons/terminal', toggle)
      g_keyboard.bindKeyDown('Ctrl+T', toggle)

      commandHistory = g_settings.getList('terminal-history')

      commandTextEdit = terminalWindow:getChildById('commandTextEdit')
      g_keyboard.bindKeyPress('Up', function() navigateCommand(1) end, commandTextEdit)
      g_keyboard.bindKeyPress('Down', function() navigateCommand(-1) end, commandTextEdit)
      g_keyboard.bindKeyPress('Ctrl+C',
        function()
          if commandTextEdit:hasSelection() or not terminalSelectText:hasSelection() then return false end
          g_window.setClipboardText(terminalSelectText:getSelection())
        return true
        end, commandTextEdit)
      g_keyboard.bindKeyDown('Tab', completeCommand, commandTextEdit)
      g_keyboard.bindKeyDown('Enter', doCommand, commandTextEdit)
      g_keyboard.bindKeyDown('Escape', hide, terminalWindow)

      terminalBuffer = terminalWindow:getChildById('terminalBuffer')
      terminalSelectText = terminalWindow:getChildById('terminalSelectText')
      terminalSelectText.onDoubleClick = popWindow
      terminalSelectText.onMouseWheel = function(a,b,c) terminalBuffer:onMouseWheel(b,c) end
      terminalBuffer.onScrollChange = function(self, value) terminalSelectText:setTextVirtualOffset(value) end

      g_logger.setOnLog(onLog)

      if not g_app.isRunning() then
        g_logger.fireOldMessages()
      elseif _G.terminalLines then
        for _,line in pairs(_G.terminalLines) do
          addLine(line.text, line.color)
        end
      end
    end

    function terminate()
      g_settings.setList('terminal-history', commandHistory)

      removeEvent(flushEvent)

      if poped then
        oldPos = terminalWindow:getPosition()
        oldSize = terminalWindow:getSize()
      end
      local settings = {
        size = oldSize,
        pos = oldPos,
        poped = poped
      }
      g_settings.setNode('terminal-window', settings)

      g_keyboard.unbindKeyDown('Ctrl+T')
      g_logger.setOnLog(nil)
      terminalWindow:destroy()
      terminalButton:destroy()
      commandEnv = nil
      _G.terminalLines = allLines
    end

    function hideButton()
      terminalButton:hide()
    end

    function popWindow()
      if poped then
        oldPos = terminalWindow:getPosition()
        oldSize = terminalWindow:getSize()
        terminalWindow:fill('parent')
        terminalWindow:setOn(false)
        terminalWindow:getChildById('bottomResizeBorder'):disable()
        terminalWindow:getChildById('rightResizeBorder'):disable()
        terminalWindow:getChildById('titleBar'):hide()
        terminalWindow:getChildById('terminalScroll'):setMarginTop(0)
        terminalWindow:getChildById('terminalScroll'):setMarginBottom(0)
        terminalWindow:getChildById('terminalScroll'):setMarginRight(0)
        poped = false
      else
        terminalWindow:breakAnchors()
        terminalWindow:setOn(true)
        local size = oldSize or { width = g_window.getWidth()/2.5, height = g_window.getHeight()/4 }
        terminalWindow:setSize(size)
        local pos = oldPos or { x = 0, y = g_window.getHeight() }
        terminalWindow:setPosition(pos)
        terminalWindow:getChildById('bottomResizeBorder'):enable()
        terminalWindow:getChildById('rightResizeBorder'):enable()
        terminalWindow:getChildById('titleBar'):show()
        terminalWindow:getChildById('terminalScroll'):setMarginTop(18)
        terminalWindow:getChildById('terminalScroll'):setMarginBottom(1)
        terminalWindow:getChildById('terminalScroll'):setMarginRight(1)
        terminalWindow:bindRectToParent()
        poped = true
      end
    end

    function toggle()
      if terminalWindow:isVisible() then
        hide()
      else
        if not firstShown then
          local settings = g_settings.getNode('terminal-window')
          if settings then
            if settings.size then oldSize = settings.size end
            if settings.pos then oldPos = settings.pos end
            if settings.poped then popWindow() end
          end
          firstShown = true
        end
        show()
      end
    end

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

    function hide()
      terminalWindow:hide()
    end

    function disable()
      terminalButton:hide()
      g_keyboard.unbindKeyDown('Ctrl+T')
      disabled = true
    end

    function flushLines()
      local numLines = terminalBuffer:getChildCount() + #cachedLines
      local fulltext = terminalSelectText:getText()

      for _,line in pairs(cachedLines) do
        -- delete old lines if needed
        if numLines > MaxLogLines then
          local firstChild = terminalBuffer:getChildByIndex(1)
          if firstChild then
            local len = #firstChild:getText()
            firstChild:destroy()
            table.remove(allLines, 1)
            fulltext = string.sub(fulltext, len)
          end
        end

        local label = g_ui.createWidget('TerminalLabel', terminalBuffer)
        label:setId('terminalLabel' .. numLines)
        label:setText(line.text)
        label:setColor(line.color)

        table.insert(allLines, {text=line.text,color=line.color})

        fulltext = fulltext .. '\n' .. line.text
      end

      terminalSelectText:setText(fulltext)

      cachedLines = {}
      removeEvent(flushEvent)
      flushEvent = nil
    end

    function addLine(text, color)
      if not flushEvent then
        flushEvent = scheduleEvent(flushLines, 10)
      end

      text = string.gsub(text, '\t', '    ')
      table.insert(cachedLines, {text=text, color=color})
    end

    function executeCommand(command)
      if command == nil or #command == 0 then return end

      -- add command line
      addLine("> " .. command, "#ffffff")

      -- reset current history index
      currentHistoryIndex = 0

      -- add new command to history
      if #commandHistory == 0 or commandHistory[#commandHistory] ~= command then
        table.insert(commandHistory, command)
        if #commandHistory > MaxHistory then
          table.remove(commandHistory, 1)
        end
      end

      -- detect and convert commands with simple syntax
      local realCommand
      if string.sub(command, 1, 1) == '=' then
        realCommand = 'print(' .. string.sub(command,2) .. ')'
      else
        realCommand = command
      end

      local func, err = loadstring(realCommand, "@")

      -- detect terminal commands
      if not func then
        local command_name = command:match('^([%w_]+)[%s]*.*')
        if command_name then
          local args = string.split(command:match('^[%w_]+[%s]*(.*)'), ' ')
          if commandEnv[command_name] and type(commandEnv[command_name]) == 'function' then
            func = function() modules.client_terminal.commandEnv[command_name](unpack(args)) end
          elseif command_name == command then
            addLine('ERROR: command not found', 'red')
            return
          end
        end
      end

      -- check for syntax errors
      if not func then
        addLine('ERROR: incorrect lua syntax: ' .. err:sub(5), 'red')
        return
      end

      -- setup func env to commandEnv
      setfenv(func, commandEnv)

      -- execute the command
      local ok, ret = pcall(func)
      if ok then
        -- if the command returned a value, print it
        if ret then addLine(ret, 'white') end
      else
        addLine('ERROR: command failed: ' .. ret, 'red')
      end
    end

    function clear()
      terminalBuffer:destroyChildren()
      terminalSelectText:setText('')
      cachedLines = {}
      allLines = {}
    end


    termina.otmod:

    Código:
    Module
      name: client_terminal
      description: Terminal for executing lua functions
      author: edubart
      website: www.otclient.info
      scripts: [ terminal ]
      sandboxed: true
      @onLoad: init()
      @onUnload: terminate()

    terminal.otui:

    Código:
    TerminalLabel < UILabel
      font: terminus-10px
      text-wrap: true
      text-auto-resize: true
      phantom: true

    TerminalSelectText < UITextEdit
      font: terminus-10px
      text-wrap: true
      text-align: bottomLeft
      editable: false
      change-cursor-image: false
      cursor-visible: false
      selection-color: black
      selection-background-color: white
      color: alpha
      focusable: false
      auto-scroll: false

    UIWindow
      id: terminalWindow
      background-color: #000000
      opacity: 0.85
      clipping: true
      anchors.fill: parent
      border: 0 white
      $on:
        border: 1 black

      Label
        id: titleBar
        !text: tr('Terminal')
        border: 1 black
        color: white
        anchors.top: parent.top
        anchors.left: parent.left
        anchors.right: parent.right
        background-color: #ffffff11
        text-align: left
        text-offset: 4 0
        height: 18
        visible: false

      ScrollablePanel
        id: terminalBuffer
        focusable: false
        anchors.left: parent.left
        anchors.right: terminalScroll.left
        anchors.top: terminalScroll.top
        anchors.bottom: commandSymbolLabel.top
        layout:
          type: verticalBox
          align-bottom: true
        vertical-scrollbar: terminalScroll
        inverted-scroll: true
        margin-left: 2

      TerminalSelectText
        id: terminalSelectText
        anchors.fill: terminalBuffer
        focusable: false

      VerticalScrollBar
        id: terminalScroll
        anchors.top: parent.top
        anchors.bottom: parent.bottom
        anchors.right: parent.right
        step: 48
        pixels-scroll: true

      UILabel
        id: commandSymbolLabel
        size: 12 12
        fixed-size: true
        anchors.bottom: parent.bottom
        anchors.left: parent.left
        margin-left: 2
        font: terminus-10px
        text: >

      UITextEdit
        id: commandTextEdit
        height: 12
        anchors.bottom: parent.bottom
        anchors.left: commandSymbolLabel.right
        anchors.right: parent.right
        margin-left: 1
        font: terminus-10px
        selection-color: black
        selection-background-color: white

      ResizeBorder
        id: bottomResizeBorder
        anchors.bottom: parent.bottom
        anchors.left: parent.left
        anchors.right: parent.right
        enabled: false

      ResizeBorder
        id: rightResizeBorder
        anchors.right: parent.right
        anchors.top: parent.top
        anchors.bottom: parent.bottom
        enabled: false

    5 participantes

    12PokeDash Pota Server - TFS 1.2 (10.98) Empty Re: PokeDash Pota Server - TFS 1.2 (10.98) Miér Mar 15, 2023 4:54 am

    pesiarzyk

    pesiarzyk
    Nuevo Miembro
    Nuevo Miembro
    Bro, thank you for trying to help me, but i still dont have this Terminal in my client...

    first of all, folder terminal exist in modules. i've added it and your scripts.

    1. Modules

    In the game it doesn't show it to me, it doesn't even show me the button in the top bar (ctrl+t doesn't work.)

    2. game

    Trying to add line in client.lua but when i adding this it get me error.

    3. client module

    Then i change some line like client_options in client.lua it works, client_terminal he showed up but..

    4. ClientOptions

    But i have right now this..

    5. game

    I just want to know why it doesn't show up when I add a line to client.lua.

    If I'm doing something wrong, please someone point me in the right direction.





    EDIT: I think i fix this... When i use Notepad ++ it doesn't work when i save, but when i use Windows Notepad and save it work.. clown

    5 participantes

    Contenido patrocinado


    5 participantes

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).