Ir para conteúdo
Fórum Script Brasil
  • 0

Me ajudem a criar


Vinicius Lemonge

Pergunta

estou precisando de um script para q posso fazer essa soma q varia as vezes na adição e subtração e tanto nos numeros 

script q responda sozinho e de click no ok  essa imagem aparece bem no centro da telaScreenshot_1.png

esse e o script q faz aparecer a janela no meio da tela se puderem fazer o mesmo script porem um q já responda a conta e de ok agradeço

 

AntibotWindow = nil
haveTiming = false
local function getTimeInString(interval)
    timeTable = {}
    timeTable.minute = math.floor((math.fmod(interval, 60*60))/60) 
    timeTable.second = math.fmod(math.fmod(interval, 60*60),60) 
    for i, v in pairs(timeTable) do
    if tostring(v):len() < 2 then
      timeTable = "0"..timeTable
      end
    end
    return timeTable.minute..":"..timeTable.second
end

local function attTimer(timeLeft)
    if not g_game.isOnline() or timeLeft == 0 then 
        haveTiming = false
        return
    end
    AntibotWindow:getChildById("Timer"):setText(getTimeInString(timeLeft))
    scheduleEvent(function() attTimer(timeLeft-1) end, 1000)
    haveTiming = true
end 

function onReceiveQuestion(protocol, opcode, buffer)
    if buffer == nil or not buffer then return false end 
    buffer = string.explode(buffer, ",")
    if not haveTiming then
        attTimer(buffer[2])
    end
    AntibotWindow:getChildById("Question"):setText(buffer[1])
    AntibotWindow:getChildById("Answer"):setText("")
    if not AntibotWindow:isVisible() then
        AntibotWindow:show()
    end
end

function onTestVisible(protocol, opcode, buffer)
    if not AntibotWindow:isVisible() then
        AntibotWindow:getChildById("Answer"):setText("")
        AntibotWindow:show()
    end
    if not haveTiming then
        attTimer(buffer)
    end
end

function init()  
 ProtocolGame.registerExtendedOpcode(167, onReceiveQuestion)
 ProtocolGame.registerExtendedOpcode(168, onTestVisible)

  AntibotWindow = g_ui.displayUI('antibot.otui')
          connect(g_game, { onGameStart = online,
                    onGameEnd = offline,
                    onGameEnd = destroyWindows})
    
 AntibotWindow:hide()
end


function destroyWindows()
AntibotWindow:hide()
end

function terminate()
disconnect(g_game, { onGameStart = online,
                       onGameEnd = offline,
                       onGameEnd = destroyWindows})
 
    AntibotWindow:destroy()

end

function toggle()

end

function sendQuestion()
AntibotWindow:hide()
return g_game.talkChannel(1, 0, "!antibot " .. AntibotWindow:getChildById("Answer"):getText())
end

 

ou se for mais facil um script q responda essa msg, precisa responder !antibot "resultado da conta"  sem aspas

msg aparecer no chat Screenshot_2.png  

por favor me ajudem :D

 

Editado por Vinicius Lemonge
Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

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

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152k
    • Posts
      651,8k
×
×
  • Criar Novo...