Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''tfs 1.2''.



Mais opções de pesquisa

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • A Cidade OTBR
    • OTServ Brasil
    • Atendimento
    • Taverna
  • Projetos Open Source
    • Canary
    • OTServBR-Global
    • Mehah OTClient
    • MyAAC
  • OpenTibia
    • Notícias e Discussões
    • Suporte - Dúvidas, Bugs, Erros
    • Downloads
    • Tutoriais
    • Show-Off
  • Outros
    • Design

Encontrado 5 registros

  1. Antes de fazer a sua pergunta, tenha certeza de ter lido as regras da seção e o guia abaixo: https://forums.otserv.com.br/index.php?/forums/topic/168583-regras-da-seção/ https://forums.otserv.com.br/index.php?/forums/topic/165121-como-fazer-uma-pergunta-ou-o-grande-guia-do-usuário-com-dúvidas/ Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.). Ex: The Forgotten Server 1.3, Versão: 10.98. Base: Qual é a sua pergunta? No meu servidor, eu uso a source do malucoo e disponibilizo para os jogadores 2 opções de clientes, o 10.00 outdated com sprites até o 12.03, e o 11.44 com sprites até o 12.03. Tudo funciona perfeitamente, exceto uma coisa: O market. É possível utilizá-lo, no entanto ele aparece com bugs (diferentes para o cliente 10 e o 11). No cliente 10, nenhum item aparece nas listas de Armaduras, Shields, etc... No entanto se eu digitar o nome do item em search, ele aparece perfeitamente normal. Seguem imagens: (imagens em spoiler) Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo: Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:
  2. Scripting Cooldown

    Base: The Forgotten Server 1.2, Versão: 8.60 Qual a sua pergunta? Estou com problemas em arrumar o exhaustion de uma runa, queria que ela não tivesse muito, ser algo que possa ser muito rápido, porém, parece que tem um minimo de exhaustion e não pode ser menor que o minimo e eu não faço a minima ideia de como deixar ela rapida. Tentei mudar no spells.xml, colocar no script (vi que dava certo '-') a função "Player.getExhaustion" e "Player.setExhaustion"... Tentei mudar na distro no spells.cpp o cooldown estava 1000 e eu deixar em 1 (pensei que era um padrão), mas não funcionou.... Alguem tem alguma ideia? Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo: (A runa seria uma arma de fogo, nesse exemplo a ak47) Eu fiz varios testes no script, então o que eu utilizava dês do inicio era esse
  3. [TFS 1.2] Modal Window Helper Lib

    Resumo A maneira atual para implementar Modal Window é um pouco complicada. Atualmente precisamos cria-la em algum lugar, registrar o evento, adicionar os botões em uma ordem específica, definir o ID da janela, dos botões e da escolha. Isso não é o ideal, então esta biblioteca foi criada pelo Non Sequitur para ajudar nisso. E eu estou trazendo para a OtServBrasil. Instalando Adicionar em data/lib/lib.lua dofile('data/lib/modalwindow.lua') Crie o arquivo modalwindow.lua com o seguinte conteúdo em data/lib if not modalWindows then modalWindows = { modalWindowConstructor = ModalWindow, nextFreeId = 500, windows = {} } end local MT = {} MT.__index = MT function ModalWindow(...) local args = {...} if type(args[1]) == 'table' then local self = setmetatable(args[1], MT) local id = modalWindows.nextFreeId self.id = id self.buttons = {} self.choices = {} self.players = {} self.created = false modalWindows.nextFreeId = id + 1 table.insert(modalWindows.windows, self) return self end return modalWindows.modalWindowConstructor(...) end function MT:setDefaultCallback(callback) self.defaultCallback = callback end function MT:addButton(text, callback) local button = {text = tostring(text), callback = callback} table.insert(self.buttons, button) return button end function MT:addButtons(...) for _, text in ipairs({...}) do table.insert(self.buttons, {text = tostring(text)}) end end function MT:addChoice(text) local choice = {text = tostring(text)} table.insert(self.choices, choice) return choice end function MT:addChoices(...) for _, text in ipairs({...}) do table.insert(self.choices, {text = tostring(text)}) end end function MT:setDefaultEnterButton(text) self.defaultEnterButton = text end function MT:setDefaultEscapeButton(text) self.defaultEscapeButton = text end function MT:setTitle(title) self.title = tostring(title) end function MT:setMessage(message) self.message = tostring(message) end local buttonOrder = { [4] = {3, 4, 2, 1}, [3] = {2, 3, 1}, [2] = {1, 2}, [1] = {1} } function MT:create() local modalWindow = modalWindows.modalWindowConstructor(self.id, self.title, self.message) local order = buttonOrder[math.min(#self.buttons, 4)] if order then for _, i in ipairs(order) do local button = self.buttons[i] modalWindow:addButton(i, button.text) button.id = i if button.text == self.defaultEnterButton then modalWindow:setDefaultEnterButton(i) elseif button.text == self.defaultEscapeButton then modalWindow:setDefaultEscapeButton(i) end end end for _, choice in ipairs(self.choices) do modalWindow:addChoice(_, choice.text) choice.id = _ end self.modalWindow = modalWindow end function MT:sendToPlayer(player) if not self.modalWindow then self:create() end player:registerEvent('ModalWindowHelper') self.players[player:getId()] = true return self.modalWindow:sendToPlayer(player) end Adicionar em data/creaturescripts/craturescripts.xml <event type="modalwindow" name="ModalWindowHelper" script="modalwindowhelper.lua" /> Crie o arquivo modalwindowhelper.lua com o seguinte conteúdo em data/creaturescripts/scripts/ function onModalWindow(player, modalWindowId, buttonId, choiceId) local modalWindow for _, window in ipairs(modalWindows.windows) do if window.id == modalWindowId then modalWindow = window break end end if not modalWindow then return true end local playerId = player:getId() if not modalWindow.players[playerId] then return true end modalWindow.players[playerId] = nil local choice = modalWindow.choices[choiceId] for _, button in ipairs(modalWindow.buttons) do if button.id == buttonId then local callback = button.callback or modalWindow.defaultCallback if callback then callback(button, choice) break end end end return true end Pronto! Espero que gostem, posteriormente irei postar um tutorial de como usar/ aplicar e alguns scripts utilizando a Biblioteca.
  4. Em talkactions/scripts crie um arquivo chamado set_actionid.lua com o seguinte código: function onSay(cid, words, param) local player = Player(cid) if not player then return false end if not player:getGroup():getAccess() then return true end if not tonumber(param) then player:sendCancelMessage("Need a number param.") return false end local position = player:getPosition() position:getNextPosition(player:getDirection()) local tile = Tile(position) if not tile then player:sendCancelMessage("Object not found.") return false end local thing = tile:getTopVisibleThing(player) if not thing then player:sendCancelMessage("Thing not found.") return false end if thing:isCreature() then player:sendCancelMessage("You can't give an action id to a creature.") elseif thing:isItem() then local actionid = tonumber(param) if actionid <= 0 then thing:removeAttribute(ITEM_ATTRIBUTE_ACTIONID) else thing:setActionId(actionid) end end position:sendMagicEffect(CONST_ME_MAGIC_RED) return false end E em talkactions.xml ponha a seguinte tag: <talkaction words="/aid" separator=" " script="set_actionid.lua" /> Para utilizar, ponha o item no chão na sua frente e escreva /aid action_id, sendo action_id um umero
  5. Crie um arquivo em talkactions/scripts chamado storage.lua e ponha o seguinte código: function onSay(cid, words, param, type) local player = Player(cid) if not player or not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GAMEMASTER then return false end -- Extract the specified parameters. local parameters = param:split(",") if words == "/getstorage" and parameters[2] == nil then player:sendCancelMessage("Insufficient parameters, usage: !getstorage playerName, key") return false end if words == "/setstorage" and parameters[3] == nil then player:sendCancelMessage("Insufficient parameters, usage: !setstorage playerName, key, value") return false end -- Remove trailing/leading white spaces from parameters. local playerName = (parameters[1] or ""):trim() local storageKey = tonumber(parameters[2]) or 0 -- Get meta player. local checkedPlayer = Player(playerName) if not checkedPlayer then player:sendCancelMessage(string.format("Could not find player '%s'.", playerName)) player:getPosition():sendMagicEffect(CONST_ME_BUBBLES) return false end local storageValue = tonumber(parameters[3]) or checkedPlayer:getStorageValue(storageKey) local msg = string.format("Storage key '%s' %s set to '%d' for player '%s'.", storageKey, "%s", storageValue, checkedPlayer:getName()) if words == "/setstorage" then -- Set specified storage value on player. checkedPlayer:setStorageValue(storageKey, storageValue) msg = string.format(msg, "is now") else -- Get specified storage value from player. msg = string.format(msg, "is currently") end -- Print the message in Local Chat in orange (only self can see). player:sendTextMessage(MESSAGE_EVENT_ORANGE, msg) player:getPosition():sendMagicEffect(CONST_ME_BUBBLES) end Em talkactions.xml ponha as seguintes tags: <talkaction words="/getstorage" separator=" " script="storage.lua"/> <talkaction words="/setstorage" separator=" " script="storage.lua"/>
×