|
Joined: May 2014
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 15 |
Hello , i need a script anti timer . After 3-4 times when the user say "mesaj" on the chann at the same period of time the script notify me ... can it be done ? i`am a noob and all i try don`t work ... pls can enyone help me ?
|
|
|
|
Joined: Dec 2013
Posts: 779
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
Please explain more detailed, I could not understand a single thing of what you just said.
You want someone a script to notify you if a user mentions "Mesaj" 3-4 times during a set period of time from the first mention? Also, how do you want to be notified? Popup? Sound? Highlight?
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
|
Joined: May 2014
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 15 |
i need script anti timer . on the channel when a user write 3-4 msg one after another in the same period of time between posts the script notify me about this user . i`am sry , my eng is bad .... u understand ? :-s
|
|
|
|
Joined: May 2014
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 15 |
let me give u a exemple : (14:20:00)USER : this is msg on the cannal .... (14:21:00)USER : this is a new msg ... (14:22:00)USER : or the same msg .... (14:23:00)USER : this is msg no 4
----------- after the USER send 4 msg on the channel at the same period of time ( in this case 1 minutes ) the script notify me : USER on the CHANNEL send LAST 4 msg with the same period of time between .
|
|
|
|
Joined: Dec 2013
Posts: 779
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
on *:text:*:#: {
var %time $iif($readini(messages.ini,$nick,%time),$v1,$ctime)
var %duration $calc($ctime - %time)
if (%duration > 60) { remini messages.ini $nick | return }
var %ID $iif($readini(messages.ini,$nick,ID),$v1,$null)
inc %ID
writeini messages.ini $nick TIME $ctime
writeini messages.ini $nick ID %ID
writeini messages.ini $nick %ID $1-
if (%ID == 4) {
echo 3 -a $nick has messaged 4 times in the past 4 minutes with maximum 60 seconds intervals.
var %n 1
while (%n < 5) {
echo 4 -a $readini(messages.ini,$nick,%n)
inc %n
}
remini messages.ini $nick
}
} EDIT: If by some chance you want it to only trigger when the time has gone EXACTLY 60 seconds, change (%duration > 60) to (%duration != 60)
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
|
Joined: May 2014
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 15 |
Ths very much . But the problem is ... this script will notify me if the "user" msg on the channal 4 time in the last 4 minutes . I need te notify me ONLY if the "user" msg on the channel 4 times with the same intervals . If a "user" use "/timer 10 700 /msg # message " i need the script notify me after first 4 time : "user" have last 4 post with exacly 11 minutes and 40 seconds interval. But the 700 seconds is not exacly ... they can use 720...680... My eanglish is bad, i know ... i try to exprim myself how i can. The very very much .
|
|
|
|
Joined: Apr 2014
Posts: 191
Vogon poet
|
Vogon poet
Joined: Apr 2014
Posts: 191 |
@Nillen I think what he wants is a script that can detect users who use the timer in the channel. Interval can be varied and is not always 1 minute. For example: user1 may use timer with 1 minute interval, but user2 may use timer with 3 minute interval. He wants to be able to detect both user1 and user2.
@Chazzy Could you show your code? You said that you already tried to make it.
|
|
|
|
Joined: May 2014
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 15 |
Yes blessing . My script... after my script have crush my irc client i delete him and ask for help here... i.am noob but i want to learn Ths again very very very much
|
|
|
|
Joined: Dec 2013
Posts: 779
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
Ah, I see, that makes more sense now. Never even crossed my mind. Now the title makes sense too.. /facepalm So how about something like this? on *:text:*:#: {
var %ID $iif($readini(messages.ini,$nick,ID),$v1,$null)
inc %ID
writeini messages.ini $nick ID %ID
writeini messages.ini $nick %ID $ctime
remini messages.ini $nick $calc(%ID - 4)
remini messages.ini $nick $calc(%ID - 4) $+ .Difference
var %difference $calc($readini(messages.ini,$nick,%ID) - $readini(messages.ini,$nick,$calc(%ID - 1)))
writeini messages.ini $nick %ID $+ .Difference %difference
if (%ID $+ .Difference == $calc(%ID - 1) $+ .Difference) && (%ID $+ .Difference > 30) echo 4 -a Match found by $nick $+ . The difference are both exactly $v1 $+ !
}
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
|
Joined: May 2014
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 15 |
I don't understand why it is not working ... i don't understand a big part of it (script) because i.am e new and noob but i can't make it working
Last edited by Chazzy; 10/05/14 07:24 PM.
|
|
|
|
Joined: Dec 2013
Posts: 779
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
First of all you want to create a new script file. Open your scripts editor (ALT + R) and click File > New. Paste the script in there and it should work. It's likely that you left another instance of in your remote.ini, rendering all other text events useless.
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
|
Joined: May 2014
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 15 |
Invalid format: $calc (line 8, script1.ini) ...
|
|
|
|
Joined: Dec 2013
Posts: 779
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
Delete your messages.ini file, you probably have some stuff left from the previous attempt that messes up the $calc. Your file is located in your mircdir, type in the chat and you can find it, if you don't know where it is.
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
|
Joined: May 2014
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 15 |
Ok. Checking now ... Ths very much !!!
|
|
|
|
Joined: May 2014
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 15 |
After i delete messages.ini the script made it again and write [user] ID=1 1=1399753742
After this , on the next msg from the user he give me again invalid format: $calc And the script don't write in the messages.ini
Last edited by Chazzy; 10/05/14 08:39 PM.
|
|
|
|
Joined: Jul 2006
Posts: 4,149
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,149 |
Right, before asking the user about their mistakes, you should test the script and make sure it works, it doesn't
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: May 2014
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: May 2014
Posts: 15 |
and how i can make it work ?
|
|
|
|
Joined: Dec 2013
Posts: 779
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
I was unable to re-create the user's error with the exact script provided. Thus I assumed that the error was from the earlier version also using Messages.ini $nick ID. https://www.youtube.com/watch?v=-MupAEYoTKU&feature=youtu.beScript works fine for me.
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
|
Joined: Jul 2006
Posts: 4,149
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,149 |
What is the code that you are using? That line, quoted from the last code shown in here is not going to work, the bold part is probably not what you meant to use, you're trying to check if a string with letters is superior than a number: if (%ID $+ .Difference == $calc(%ID - 1) $+ .Difference) && (%ID $+ .Difference > 30) echo 4 -a Match found by $nick $+ . The difference are both exactly $v1 $+ ! I watched the video, it doesn't show that the code is working, only that the INI file is populated, but that last if statement can't possibly true, it will never warn anything.
Last edited by Wims; 10/05/14 09:36 PM.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Dec 2013
Posts: 779
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
You are very correct, my mistake. I definitely meant to make those to read the value from the ini file. However, this was not the error that the user presented. After i delete messages.ini the script made it again and write [user] ID=1 1=1399753742
After this , on the next msg from the user he give me again invalid format: $calc And the script don't write in the messages.ini So there are 2 entirely different matters at hand right now. Updated code that should use the ini file for value: on *:text:*:#: {
var %ID $iif($readini(messages.ini,$nick,ID),$v1,$null)
inc %ID
writeini messages.ini $nick ID %ID
writeini messages.ini $nick %ID $ctime
remini messages.ini $nick $calc(%ID - 4)
remini messages.ini $nick $calc(%ID - 4) $+ .Difference
var %difference $calc($readini(messages.ini,$nick,%ID) - $readini(messages.ini,$nick,$calc(%ID - 1)))
writeini messages.ini $nick %ID $+ .Difference %difference
if (%difference == $readini(messages.ini,$nick,$calc(%ID - 1) $+ .Difference)) && (%difference >= 30) echo 4 -a Match found by $nick $+ . The difference are both exactly $v1 $+ !
} Edit: Tested successfully. I don't know how to make it +-5 seconds however, if this is a requirement someone else will have to step in. Edit2: Forgot to remove #nillens
Last edited by Nillen; 10/05/14 09:57 PM.
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
|
|