Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Estou com um script de mandar mensagem automatica em dias e horarios especificos, porem a tag dele não é um time exato, e sim fica executando no meu log acada 5000, gostaria de saber se tem como tirar o erro ou só não fazer ele aparecer, para não deixar meu log cheio desse erro (o script funciona normal porem aparece esse erro quando não é na data e na hora que está especifica para acontecer, não queria por um time especifico pois a maneira que ele é executado é a maneira necessaria, fica repetindo durante o minuto em especifico a frase até o minuto acabar.)

erro:
 

Spoiler

image.thumb.png.db141495315dc75a47cfdaf6f31c4873.png


script:
 

Spoiler


local msg = {
    ["Monday"] = { --Terça
        ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:10'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:15'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
	    ['19:20'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},	
        ['19:25'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:29'] = {text = 'Evento Up Acaba Em 1 Minuto', type = 21},
    },
    ["Wednesday"] = { --Quinta
        ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:10'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:15'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
	    ['19:20'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},	
        ['19:25'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:29'] = {text = 'Evento Up Acaba Em 1 Minuto', type = 21},
    },
    ["Saturday"] = { --Sabado
        ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:10'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:15'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
	    ['19:20'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},	
        ['19:25'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:29'] = {text = 'Evento Up Acaba Em 1 Minuto', type = 21},
    },
}

function onThink(interval, lastExecution)
    local day = os.date("%A")
    local hours = os.date('%X'):sub(1, 5)
    if (msg[day][hours]) then
        local tab_val = msg[day][hours]
        return tab_val and doBroadcastMessage(tab_val.text, tab_val.type) or true
    end
end

 


tag:
 

Spoiler


<globalevent name="automaticmessages" interval="5000" event="script" value="mensagem.lua"/>

 

 

Editado por Thony D. Serv (veja o histórico de edições)

Resolvido por FeeTads

Ir para solução
  • Respostas 15
  • Visualizações 1.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • no lugar desse msg[day][hours] bota isso   if (msg[day][hours]) ~= nil then  

  • local msg = { ["Monday"] = { --Segunda ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21}, ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temp

  • Thony D. Serv
    Thony D. Serv

    Ah eu sabia que tava errado aliás kakakaka foi pq eu mexi na data só " " e esqueci de mudar na explicação kakakaka  FUNCIONOUUUUU MT OBRIGADOOOO VOCÊ É INCRIVEL MANN   então, tem actio

Posted Images

Postado
  • Solução
28 minutos atrás, Thony D. Serv disse:

Continua Aparecendo No Log > . <

local msg = {
    ["Monday"] = { --Segunda
        ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:10'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:15'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
	    ['19:20'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},	
        ['19:25'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:29'] = {text = 'Evento Up Acaba Em 1 Minuto', type = 21},
    },
    ["Wednesday"] = { --Quarta
        ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:10'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:15'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
	    ['19:20'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},	
        ['19:25'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:29'] = {text = 'Evento Up Acaba Em 1 Minuto', type = 21},
    },
    ["Saturday"] = { --Sabado
        ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:10'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:15'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
	    ['19:20'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},	
        ['19:25'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:29'] = {text = 'Evento Up Acaba Em 1 Minuto', type = 21},
    },
}

function onThink(interval, lastExecution)
  if msg[os.date("%A")] then
		hours = tostring(os.date("%X")):sub(1, 5)
		tab_val = msg[os.date("%A")][hours]
		if tab_val then			
			return tab_val and doBroadcastMessage(tab_val.text, tab_val.type) or true
		end
	end
	return true
end

tenta esse script, mudei pra ele checar o dia logo no começo, diferente do seu que recebe data e hora antes de checar kkk, acho q assim deve funcionar

e alias

 

11 horas atrás, Thony D. Serv disse:

["Monday"] = { --Terça

monday é segunda e Wednesday é quarta kkkkkkk, isso pode te atrapalhar depois, arrumei no script, vai que sla

1 minuto atrás, FeeTads disse:

Evento Up Aberto No Segundo Andar Do Temple', type = 21}

e creio também que Type  = 21 pra broadcast não funciona, tem que colocar 

 

2 minutos atrás, FeeTads disse:

tab_val.type

no lugar desse tab_cal.type o tipo de message, tipo 

doBroadcastMessage(tab_val.text, MESSAGE_STATUS_CONSOLE_RED)
11 horas atrás, Thony D. Serv disse:

interval="5000"

e vc tem ctz que quer esse script mandando a cada 5s na tela de todos mano? eu acho isso meio poluido sabe, magina em 1 minuto aparecer 12 mensagens dessa que duram 5s, a mensagem nem vai sair da tela durante o minuto todo, se eu fosse vc, ja que tem 7 horarios com aviso, colocaria o interval em 20000, que seria 20s, seria mais clean, isso é só minha opnião kkk as vezes a cada 5s eh melhor, mas ai eh com vc

Postado
  • Autor
5 minutos atrás, FeeTads disse:

local msg = {
    ["Monday"] = { --Segunda
        ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:10'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:15'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
	    ['19:20'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},	
        ['19:25'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:29'] = {text = 'Evento Up Acaba Em 1 Minuto', type = 21},
    },
    ["Wednesday"] = { --Quarta
        ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:10'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:15'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
	    ['19:20'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},	
        ['19:25'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:29'] = {text = 'Evento Up Acaba Em 1 Minuto', type = 21},
    },
    ["Saturday"] = { --Sabado
        ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:10'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:15'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
	    ['19:20'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},	
        ['19:25'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:29'] = {text = 'Evento Up Acaba Em 1 Minuto', type = 21},
    },
}

function onThink(interval, lastExecution)
  if msg[os.date("%A")] then
		hours = tostring(os.date("%X")):sub(1, 5)
		tab_val = msg[os.date("%A")][hours]
		if tab_val then			
			return tab_val and doBroadcastMessage(tab_val.text, tab_val.type) or true
		end
	end
	return true
end

tenta esse script, mudei pra ele checar o dia logo no começo, diferente do seu que recebe data e hora antes de checar kkk, acho q assim deve funcionar

e alias

 

monday é segunda e Wednesday é quarta kkkkkkk, isso pode te atrapalhar depois, arrumei no script, vai que sla



Ah eu sabia que tava errado aliás kakakaka
foi pq eu mexi na data só " " e esqueci de mudar na explicação kakakaka 

FUNCIONOUUUUU MT OBRIGADOOOO VOCÊ É INCRIVEL MANN <3<3 

7 minutos atrás, FeeTads disse:

local msg = {
    ["Monday"] = { --Segunda
        ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:10'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:15'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
	    ['19:20'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},	
        ['19:25'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:29'] = {text = 'Evento Up Acaba Em 1 Minuto', type = 21},
    },
    ["Wednesday"] = { --Quarta
        ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:10'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:15'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
	    ['19:20'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},	
        ['19:25'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:29'] = {text = 'Evento Up Acaba Em 1 Minuto', type = 21},
    },
    ["Saturday"] = { --Sabado
        ['19:00'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:05'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:10'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:15'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
	    ['19:20'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},	
        ['19:25'] = {text = 'Evento Up Aberto No Segundo Andar Do Temple', type = 21},
        ['19:29'] = {text = 'Evento Up Acaba Em 1 Minuto', type = 21},
    },
}

function onThink(interval, lastExecution)
  if msg[os.date("%A")] then
		hours = tostring(os.date("%X")):sub(1, 5)
		tab_val = msg[os.date("%A")][hours]
		if tab_val then			
			return tab_val and doBroadcastMessage(tab_val.text, tab_val.type) or true
		end
	end
	return true
end

tenta esse script, mudei pra ele checar o dia logo no começo, diferente do seu que recebe data e hora antes de checar kkk, acho q assim deve funcionar

e alias

 

monday é segunda e Wednesday é quarta kkkkkkk, isso pode te atrapalhar depois, arrumei no script, vai que sla

e creio também que Type  = 21 pra broadcast não funciona, tem que colocar 

 

no lugar desse tab_cal.type o tipo de message, tipo 


doBroadcastMessage(tab_val.text, MESSAGE_STATUS_CONSOLE_RED)

e vc tem ctz que quer esse script mandando a cada 5s na tela de todos mano? eu acho isso meio poluido sabe, magina em 1 minuto aparecer 12 mensagens dessa que duram 5s, a mensagem nem vai sair da tela durante o minuto todo, se eu fosse vc, ja que tem 7 horarios com aviso, colocaria o interval em 20000, que seria 20s, seria mais clean, isso é só minha opnião kkk as vezes a cada 5s eh melhor, mas ai eh com vc


então, tem actions no meu servidor que usam direto imagina um mana potion infinito com um effect grande, quando o cara fica clicando nesse mana potion direto a msg ela some em 1s ent eu ponho para repetir por isso, e tbm pela grande quantidade de pessoas de bot que as vezes vão olhar o char e como a msg foi enviada apenas 1 vez não viu que estava acontecendo o evento, ja se ficar repetindo ele vai conseguir ver

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo