EpicNet.Ru - Форум IRC Чата

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » EpicNet.Ru - Форум IRC Чата » HELP SCRIPTS - Помощь по mIRC скриптам » Auto messages with a delay on the timer


Auto messages with a delay on the timer

Сообщений 1 страница 5 из 5

1

I have this little code that sends automatic messages with the timer:

Код:
menu channel {
  AutoMessage
  .Mess 1
  ..Start:/timerA 0 20 msg $chan hello1 | timerB 0 20 msg $chan hello2 | timerC 0 20 msg $chan hello3 | window -ez @Mess1On
  .Stop: timerA off | timerB off | timerC off | /close -@ @Mess1On
  .Mess 2
  ..Start:/timerD 0 20 msg $chan hello4 | timerE 0 20 msg $chan hello5 | window -ez @Mess2On
  .Stop: timerD off | timerE off | /close -@ @Mess2On
 .Mess 3
  ..Start:/timerF 0 20 msg $chan hello6 | timerG 0 20 msg $chan hello6 | timerH 0 20 msg $chan hello7 | timerI 0 20 msg $chan hello8 | window -ez @Mess3On
  .Stop: timerF off | timerG off | timerH off | timerI off | /close -@ @Mess3On
}

It's not that great but it partially worked.

The problem with this script is that in theory such a script should work like this:
Let's take for example "Mess 1". It starts and after 20 seconds the first message starts. After another 20 seconds the second message starts, and after another 20 seconds the third message starts. After the last message we start all over again with the first message, then the second, then the third and so on in loop as mentioned above.

The problem is that none of this happens. Once the script is started, the messages start all together and continue to be posted all together after 20 seconds. There is no order.
And this is the problem.

Another thing I would like to know if it is possible to do, is to put the messages instead of one to the right of the other, one under the other, like this:

Код:
Mess 1
/timerA 0 20 msg $chan hello1
/timerB 0 20 msg $chan hello2 
/timerC 0 20 msg $chan hello3
Stop

Since one to the right of the other would create a very long row, while one under the other would be easier to manage and modify.

I hope I have explained myself decently, sorry for the bad English.

2

1340,366 написал(а):

The problem with this script is that in theory such a script should work like this:
Let's take for example "Mess 1". It starts and after 20 seconds the first message starts. After another 20 seconds the second message starts, and after another 20 seconds the third message starts. After the last message we start all over again with the first message, then the second, then the third and so on in loop as mentioned above. The problem is that none of this happens. Once the script is started, the messages start all together and continue to be posted all together after 20 seconds. There is no order. And this is the problem.

Для этого вам нужно было всего лишь сделать так, чтобы для каждого следующего таймера было установлено время увеличенное на +20 секунд больше, чем для предыдущего таймера.


1340,366 написал(а):

Another thing I would like to know if it is possible to do, is to put the messages instead of one to the right of the other, one under the other. Since one to the right of the other would create a very long row, while one under the other would be easier to manage and modify.

Да, конечно, вы можете сделать так, чтобы каждая строка в коде с таймером начиналась с новой строки, и это будет гораздо удобнее сделать при помощи отдельного алиаса.
Вы просто выбираете в контекстном меню "AutoMessage/Mess 1/Start" и далее запускается алиас "mess1", который будет зациклен при помощи последнего таймера, который будет запускать алиас заново.


Теперь вы можете посмотреть пример того, как это реализовано в коде:

Код:
menu channel {
  AutoMessage
  .Mess 1
  ..Start: mess1 $chan | echo -a 03Timer Mess1 ON
  ..Stop: .timerMESS1* off | .close -@ @Mess1On | echo -a 04Timer Mess1 OFF
}
alias -l mess1 {
  if (!$window(@Mess1On)) .window -enz @Mess1On
  .timerMESS1_1 1 20 msg $1 hello1
  .timerMESS1_2 1 40 msg $1 hello2
  .timerMESS1_3 1 60 msg $1 hello3
  .timerMESS1 1 60 mess1 $1
}
Подпись автора

[html]<style>img {vertical-align:middle;}.hnet{color:#FFFFFF;}.hstar{color:#DE0000;}.htext{font-family:Verdana;font-size:13px;color:#6E1E00;}.heading{font-family:Verdana;font-size:13px;font-weight:bold;background-color:#4897E7;}.stitle{font-family:Verdana;font-size:12px;}.dot{color:#808000;}.desc{color:#ADADAD;}a .curl{font-family:Verdana;font-size:13px;color:#3A92CD;}</style><table><tr><td width="20px" height="20px"><img src="https://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="https://forum.epicnet.ru/viewtopic.php?id=234"><span class="heading"> <span class="hstar">★</span> <span class="hnet">EpicNet.Ru</span> <span class="hstar">★</span> </span><span class="htext"> - IRC Чат © 2008</span></a></td></tr><tr><td></td><td><div class="stitle"><span class="dot">•</span> <span class="desc">Вход через вебгейт:</span> <a href="http://irc.epicnet.ru"><span class="curl">http://irc.epicnet.ru</span></a><br><span class="dot">•</span> <span class="desc">Сервер:</span> irc.epicnet.ru <span class="desc">Порты:</span> 6667, 6668 (ssl)<br><div></td></tr></table>[/html]

3

Ok, I tried your version and it's perfect. I tried it by adding other messages:

Код:
menu channel {
  AutoMessage
  .Mess 1
  ..Start: mess1 $chan | echo -a 03Timer Mess1 ON
  ..Stop: .timerMESS1* off | .close -@ @Mess1On | echo -a 04Timer Mess1 OFF
  .Mess 2
  ..Start: mess2 $chan | echo -a 03Timer Mess2 ON
  ..Stop: .timerMESS2* off | .close -@ @Mess2On | echo -a 04Timer Mess2 OFF
}
alias -l mess1 {
  if (!$window(@Mess1On)) .window -enz @Mess1On
  .timerMESS1_1 1 20 msg $1 hello1
  .timerMESS1_2 1 40 msg $1 hello2
  .timerMESS1_3 1 60 msg $1 hello3
  .timerMESS1 1 60 mess1 $1
}
alias -l mess2 {
  if (!$window(@Mess2On)) .window -enz @Mess2On
  .timerMESS2_1 1 20 msg $1 hope it works 1
  .timerMESS2_2 1 40 msg $1 hope it works 2
  .timerMESS2 1 40 mess2 $1
}

Is it right in this way or by adding other messages there is something to change..?

4

1342,366 написал(а):

I tried it by adding other messages. Is it right in this way or by adding other messages there is something to change..?

Да, всё правильно. Вам достаточно для каждого следующего пункта контекстного меню создать новый алиас, где нужно изменить число в названии таймеров и при необходимости время задержки.

Подпись автора

[html]<style>img {vertical-align:middle;}.hnet{color:#FFFFFF;}.hstar{color:#DE0000;}.htext{font-family:Verdana;font-size:13px;color:#6E1E00;}.heading{font-family:Verdana;font-size:13px;font-weight:bold;background-color:#4897E7;}.stitle{font-family:Verdana;font-size:12px;}.dot{color:#808000;}.desc{color:#ADADAD;}a .curl{font-family:Verdana;font-size:13px;color:#3A92CD;}</style><table><tr><td width="20px" height="20px"><img src="https://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="https://forum.epicnet.ru/viewtopic.php?id=234"><span class="heading"> <span class="hstar">★</span> <span class="hnet">EpicNet.Ru</span> <span class="hstar">★</span> </span><span class="htext"> - IRC Чат © 2008</span></a></td></tr><tr><td></td><td><div class="stitle"><span class="dot">•</span> <span class="desc">Вход через вебгейт:</span> <a href="http://irc.epicnet.ru"><span class="curl">http://irc.epicnet.ru</span></a><br><span class="dot">•</span> <span class="desc">Сервер:</span> irc.epicnet.ru <span class="desc">Порты:</span> 6667, 6668 (ssl)<br><div></td></tr></table>[/html]

5

Ok perfect then.

Thank you so much for your help, always kind and competent. See you next time!  http://www.kolobok.us/smiles/icq/drinks.gif


Вы здесь » EpicNet.Ru - Форум IRC Чата » HELP SCRIPTS - Помощь по mIRC скриптам » Auto messages with a delay on the timer