Ir para conteúdo

mastof

Campones
  • Total de itens

    49
  • Registro em

  • Última visita

  • Dias Ganhos

    3

Posts postados por mastof

  1. Não sou programador e já tentei diversas vezes fazer um codigo apenas para chamar o Opcode quando eu interagir em algo mas não consigo de jeito nenhum, se alguém puder me ajudar eu agradeço

    Preciso apenas disso, quando eu interagir com um objeto chamar o Opcode que já tenho pronto no OTClient

    E um para quando interagir com um NPC se possivel(falou Hi ele abre a janela)

  2. 8 minutos atrás, Yan18 disse:

    O seu é para funcionar também, está parecido com o do colega acima, mas o seu tem a verificação caso o player não tenha valor para storage acima de 0. Porém vou te dar um conselho, no seu caso, não precisava ter feito aquele elseif, pois se o valor da storage não for 1 ou maior que 1 já vai executar o else, então seria bem melhor só colocar else. E também é mais fácil e legível criar uma variável para a storage, pois fica mais fácil de mexer no código e também a chance de errar o valor na verificação é menor.

     

    Enfim, se nenhum dos dois códigos dos colegas acima não funcionar, tente este, é para funcionar:

    
    local stor, limit = 7575, 30 --storage, limit to add.
    local allow_container = false --empty! not looted with items, atleast for now.
    local storage_quest = 25425 -- ID DA STORAGE DA QUEST PARA USAR O TALKACTION
    local texto = "Você precisa completar uma quest para usar este comando."
    
    function onSay(cid, words, param)
    local expl = param:explode(':')
    local action, rst = expl[1], expl[2]
    
    if getPlayerStorageValue(cid, storage) < 1 then
      doPlayerSendTextMessage(cid, 27, texto)
      doPlayerSendCancel(cid, texto)   
    return true
    end     
      
            if (action:lower() == 'check') then
                    local infos, list = getPlayerStorageValue(cid, stor), {}
                    if (infos ~= -1) then
                            list = tostring(infos):explode(',')
                    end
                    local txt = 'Autoloot List:\n'
                    if (#list > 0) then
                            for k, id in ipairs(list) do
                                    id = id:gsub('_', '')
                                    if tonumber(id) then
                                            txt = txt .. getItemNameById(tonumber(id)) .. ((k < #list) and '\n' or '')
                                    end
                            end
                    else
                            txt = 'Empty'
                    end
                    doPlayerPopupFYI(cid, txt)
            elseif (action:lower() == 'add') then
                    local infos, list = getPlayerStorageValue(cid, stor), {}
                    if (infos ~= -1) then
                            list = tostring(infos):gsub('_', ''):explode(',')
                    end
                    if (#list >= limit) then
                            return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.')
                    end
                    local item = tonumber(rst)
                    if not item then
                            item = getItemIdByName(rst, false)
                            if not item then
                                    return doPlayerSendCancel(cid, 'not valid item.')
                            end
                    end
                    if not allow_container and isItemContainer(item) then
                            return doPlayerSendCancel(cid, 'this item can not be autolooted.')
                    end
                    local attrs = getItemInfo(item)
                    if not attrs then
                            return doPlayerSendCancel(cid, 'not valid item.')
                    elseif not attrs.movable or not attrs.pickupable then
                            return doPlayerSendCancel(cid, 'this item can not be autolooted.')
                    end
                    if isInArray(list, item) then
                            return doPlayerSendCancel(cid, 'already added.')
                    end
                    table.insert(list, tostring(item))
                    local new = ''
                    for v, id in ipairs(list) do
                            new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '')
                    end
                    doPlayerSetStorageValue(cid, stor, tostring(new))
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< has been added to the autoloot list.')
            elseif (action:lower() == 'remove') then
                    local infos, list = getPlayerStorageValue(cid, stor), {}
                    if (infos ~= -1) then
                            list = tostring(infos):gsub('_', ''):explode(',')
                    end
                    if (#list == 0) then
                            return doPlayerSendCancel(cid, 'You dont have any item added.')
                    end
                    if (#list >= limit) then
                            return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.')
                    end
                    local item = tonumber(rst)
                    if not item then
                            item = getItemIdByName(rst, false)
                            if not item then
                                    return doPlayerSendCancel(cid, 'not valid item.')
                            end
                    end
                    if not isInArray(list, item) then
                            return doPlayerSendCancel(cid, 'This item is not in the list.')
                    end
                    local new = ''
                    for v, id in ipairs(list) do
                            if (tonumber(id) ~= item) then
                                    new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '')
                            end
                    end
                    doPlayerSetStorageValue(cid, stor, tostring(new))
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< removed from the autoloot list.')
            end       
            return true
    end

    Lembrando que irá precisar colocar a storage que está usando na quest na variável storage_quest.

    Agradeço pela dica, estou aprendendo então esses conselhos são bem importantes

     

  3. Em 21/03/2020 em 16:22, doruaziin disse:

    Como entusiasta de servidores de poketibia, irei acompanhar!

    Acompanhe, estamos melhorando nossa infraestrutura para não ter nenhum tipo de queda, invasão ou perda de pokemons, trazendo a melhor experiência para vocês

  4. 15 horas atrás, LeoTK disse:

    seria legal ter uma espécie de bloquear acesso do jogador pelo discord de acordo com o cargo ou seja caso setar um cargo no membro do discord bloqueia o acesso dele no site e no servidor o mesmo seriviria para acessar o site e servidor etc.... podendo até setar cargos dentro do servidor do ot pelo cargo do discord ... 

    O de bloquear acesso, já criamos, é o sistema de BAN, o player fica com a tag BANIDO ou TEM BAN(Temporariamente Banido), cargos a gente preferiu não setar pelo discord, questão de segurança

  5. Em 11/02/2020 em 19:40, ManoGregory disse:

    Maravilhoso !! , fiz isso com minecraft

    Sim, retiramos o forum do servidor (hoje quase não é mais utilizado) e focamos no Discord que, acredito eu, ter se tornado algo que esta em todos os computadores hoje em dia, poder fazer eventos mesmo longe do servidor ou simplesmente gerenciar banimento em qualquer situação é algo que vai ajudar muito o servidor

  6. Spoiler

    local stor, limit = 7575, 30 --storage, limit to add.

    local allow_container = false --empty! not looted with items, atleast for now.

    function onSay(cid, words, param)
            local expl = param:explode(':')
            local action, rst = expl[1], expl[2]
            if getPlayerStorageValue(cid, 123456712) >= 1 then
                if (action:lower() == 'check') then
                        local infos, list = getPlayerStorageValue(cid, stor), {}
                        if (infos ~= -1) then
                                list = tostring(infos):explode(',')
                        end
                        local txt = 'Autoloot List:\n'
                        if (#list > 0) then
                                for k, id in ipairs(list) do
                                        id = id:gsub('_', '')
                                        if tonumber(id) then
                                                txt = txt .. getItemNameById(tonumber(id)) .. ((k < #list) and '\n' or '')
                                        end
                                end
                        else
                                txt = 'Empty'
                        end
                        doPlayerPopupFYI(cid, txt)
                elseif (action:lower() == 'add') then
                        local infos, list = getPlayerStorageValue(cid, stor), {}
                        if (infos ~= -1) then
                                list = tostring(infos):gsub('_', ''):explode(',')
                        end
                        if (#list >= limit) then
                                return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.')
                        end
                        local item = tonumber(rst)
                        if not item then
                                item = getItemIdByName(rst, false)
                                if not item then
                                        return doPlayerSendCancel(cid, 'not valid item.')
                                end
                        end
                        if not allow_container and isItemContainer(item) then
                                return doPlayerSendCancel(cid, 'this item can not be autolooted.')
                        end
                        local attrs = getItemInfo(item)
                        if not attrs then
                                return doPlayerSendCancel(cid, 'not valid item.')
                        elseif not attrs.movable or not attrs.pickupable then
                                return doPlayerSendCancel(cid, 'this item can not be autolooted.')
                        end
                        if isInArray(list, item) then
                                return doPlayerSendCancel(cid, 'already added.')
                        end
                        table.insert(list, tostring(item))
                        local new = ''
                        for v, id in ipairs(list) do
                                new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '')
                        end
                        doPlayerSetStorageValue(cid, stor, tostring(new))
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< has been added to the autoloot list.')
                elseif (action:lower() == 'remove') then
                        local infos, list = getPlayerStorageValue(cid, stor), {}
                        if (infos ~= -1) then
                                list = tostring(infos):gsub('_', ''):explode(',')
                        end
                        if (#list == 0) then
                                return doPlayerSendCancel(cid, 'You dont have any item added.')
                        end
                        if (#list >= limit) then
                                return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.')
                        end
                        local item = tonumber(rst)
                        if not item then
                                item = getItemIdByName(rst, false)
                                if not item then
                                        return doPlayerSendCancel(cid, 'not valid item.')
                                end
                        end
                        if not isInArray(list, item) then
                                return doPlayerSendCancel(cid, 'This item is not in the list.')
                        end
                        local new = ''
                        for v, id in ipairs(list) do
                                if (tonumber(id) ~= item) then
                                        new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '')
                                end
                        end
                        doPlayerSetStorageValue(cid, stor, tostring(new))
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< removed from the autoloot list.')
                end       
                return true
            elseif getPlayerStorageValue(cid, 123456712) <= 0 then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce precisa completar a missao X")
            return true
        end
    end

    O cara ja postou acima, acredito que resolva, mas ta aqui de qualquer forma 

  7. Tenta dessa forma:
    Talkaction

    local stor, limit = 7575, 30 --storage, limit to add.
    
    local allow_container = false --empty! not looted with items, atleast for now.
    
    function onSay(cid, words, param)
            local expl = param:explode(':')
            local action, rst = expl[1], expl[2]
            local storage = 12345
    
            
            if getPlayerStorageValue(cid, storage) >= 1 then    
                    doPlayerSendCancel(cid, "Você não tem permissão para utilizar esse comando")
            return true 
            end
    
    
            if (action:lower() == 'check') then
                    local infos, list = getPlayerStorageValue(cid, stor), {}
                    if (infos ~= -1) then
                            list = tostring(infos):explode(',')
                    end
                    local txt = 'Autoloot List:\n'
                    if (#list > 0) then
                            for k, id in ipairs(list) do
                                    id = id:gsub('_', '')
                                    if tonumber(id) then
                                            txt = txt .. getItemNameById(tonumber(id)) .. ((k < #list) and '\n' or '')
                                    end
                            end
                    else
                            txt = 'Empty'
                    end
                    doPlayerPopupFYI(cid, txt)
            elseif (action:lower() == 'add') then
                    local infos, list = getPlayerStorageValue(cid, stor), {}
                    if (infos ~= -1) then
                            list = tostring(infos):gsub('_', ''):explode(',')
                    end
                    if (#list >= limit) then
                            return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.')
                    end
                    local item = tonumber(rst)
                    if not item then
                            item = getItemIdByName(rst, false)
                            if not item then
                                    return doPlayerSendCancel(cid, 'not valid item.')
                            end
                    end
                    if not allow_container and isItemContainer(item) then
                            return doPlayerSendCancel(cid, 'this item can not be autolooted.')
                    end
                    local attrs = getItemInfo(item)
                    if not attrs then
                            return doPlayerSendCancel(cid, 'not valid item.')
                    elseif not attrs.movable or not attrs.pickupable then
                            return doPlayerSendCancel(cid, 'this item can not be autolooted.')
                    end
                    if isInArray(list, item) then
                            return doPlayerSendCancel(cid, 'already added.')
                    end
                    table.insert(list, tostring(item))
                    local new = ''
                    for v, id in ipairs(list) do
                            new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '')
                    end
                    doPlayerSetStorageValue(cid, stor, tostring(new))
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< has been added to the autoloot list.')
            elseif (action:lower() == 'remove') then
                    local infos, list = getPlayerStorageValue(cid, stor), {}
                    if (infos ~= -1) then
                            list = tostring(infos):gsub('_', ''):explode(',')
                    end
                    if (#list == 0) then
                            return doPlayerSendCancel(cid, 'You dont have any item added.')
                    end
                    if (#list >= limit) then
                            return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.')
                    end
                    local item = tonumber(rst)
                    if not item then
                            item = getItemIdByName(rst, false)
                            if not item then
                                    return doPlayerSendCancel(cid, 'not valid item.')
                            end
                    end
                    if not isInArray(list, item) then
                            return doPlayerSendCancel(cid, 'This item is not in the list.')
                    end
                    local new = ''
                    for v, id in ipairs(list) do
                            if (tonumber(id) ~= item) then
                                    new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '')
                            end
                    end
                    doPlayerSetStorageValue(cid, stor, tostring(new))
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< removed from the autoloot list.')
            end       
            return true
    end

    Me fala se deu algum erro, não sou programador experiente, então não me julgue ;-;

  8. Acredito que isso possa te ajudar:

    Adicione:

    if getPlayerStorageValue(cid, ID) >= 1 then

    ID = sua storage

    Exemplo:

    if getPlayerStorageValue(cid, 12345) >= 1 then
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Comando utilizado Com sucesso !")
       doPlayerAddItem(cid, 16163, 1)
    elseif getPlayerStorageValue(cid, 12345) <= 0 then
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Faça a missão X, para desbloquear esse comando")
       end	  
    end


    não esqueça de na sua quest adicionar 
     

    setPlayerStorageValue(cid, 12345, 1)

    para que seja adicionado a Storage

  9. Vocês desviaram completamente do foco do Post para xingar o Walox, como eu já disse, estou mudando o servidor, e na vez de virem xingar alguém que não tem nada mais a ver com o servidor, pq não acompanham as mudanças que estão sendo feitas?

  10. 5 minutos atrás, Henrique disse:

    +1 para quem o Walox vendeu a base! Meu deus, isso que o mesmo disse que só venderia para uma pessoa e que não colocaria a mesma online.

    Como eu to usando como uma Base, estou modificando e adicionando coisas unicas, o servidor logo logo passará longe de parecer um Zring

    Já estamos trabalhando em um sistema de integração com Discord e Servidor:

    Estamos adicionando alguns sistemas de Tiers que logo mais iremos postar na Pagina

    Já já estaremos longe de Zring e de qualquer semelhante que possa aparecer

  11. image.png.c4b28b6238ba7e2989f148ea23847e8c.png

    Sistema de Denuncias no servidor, faz verificação para ver se o Player realmente existe no servidor do PokeTibia e a verificação se o player esta no servidor do Discord(caso esteja ele faz marcação no Discord)

    Funcionamento:
    O player reporta um jogador, podendo por provas, e o player reportado pode se defender da mesma forma atualizando a denuncia, o ADM pode dar a punição diretamente pelo Discord caso seja necessario, sem ter que estar online para o mesmo

  12. image.png.5a4e83748e9ff0f763300cab302d43f8.png

     

    Desenvolvemos um BOT para o Discord que é integrado 100% com o servidor, tendo não só um sistema de Cadastro no Servidor para dar recompensar de eventos Pelo Discord, da para você informar quem te indicou(caso alguém tenha te indicado) e quando o player pegar level 50, ele automaticamente vai dar a recompensa para quem você indicou, o Bot pode dar itens para players, mandar mensagens no Servidor, e avisar algum evento que esteja tendo no servidor pelo discord

     

    image.png.7355fe5e858ce6f2d7aab6dbadff3fb3.png

    Alguma ideia mais do que fazer com o Bot?

    Obs.: ele já tem Sistema de Denuncias sem floodar o servidor do discord

  13. gLm23Bo.png

    Link da imagem em melhor qualidadehttps://i.imgur.com/gLm23Bo.png

    PokeVerse vem com a proposta de não ser só mais um servidor que nasce e morre na mesma semana, estamos dedicados a torna-lo um dos maiores servidores, e para isso precisamos da ajuda de vocês, estamos trabalhando para fazer uma ClosedBeta ainda nesse mes, com previa de lançamento em Abril, nos acompanhe pelo: Facebook, iremos disponibilizar informações e atualizações por lá

    Facebook: https://www.facebook.com/PokeVerseOnline

  14. 10 horas atrás, brazvct disse:

    @Ayron5 @mastof
    Experimentem trocar 

          local outfitColor = getOutfitColor(j*19 + i)
    por
          local outfitColor = getOufitColor(j*19 + i)

    E me manda aqui denovo pra eu ver o erro do terminal, se não der é pq vcs tão usando um otclient desatualizado

    ---------

    Ou então tenta substituir só o .otui 

    Agora esta funcionando normalmente, Rep+

     

  15. 3 horas atrás, GOD Vitor disse:

    Estou pedindo a retirada do módulo, por conta do design completo que eu fiz. 

    O autor dos códigos é o DZRU.

     

    Caso não queira retirar, tudo bem, isso não é nada pra mim. 

     

    Você só está ganhando REP em cima de algo que você não editou um caractere se quer.

     

    Bom uso do módulo aí, só falta ter criatividade.

    Se o Problema é o design então mais tarde eu refaço e mando um novo e melhorado aqui

     

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...