mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
#160671 02/10/06 05:23 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
The code already uses an ON JOIN event.

#160672 02/10/06 05:37 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
I know that I meant it as for to add a if statement in the script


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#160673 02/10/06 05:53 AM
Joined: Sep 2006
Posts: 14
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Sep 2006
Posts: 14
I tried copy and pasting RuesselB's new code in my remote window, and now it's saying hello before the time it's suppose to be saying hello. I change my time clock to 6:50pm, and the script isn't suppose to say hello until 7:34pm. Thank you again or all your help, I really am thankful for it.

#160674 02/10/06 07:27 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
OK..This should work for you (I did test it briefly using the same method of changing my system time)
Code:
 on me:*:join:#:{
  if !$timer(end) {
    .timerend 4:00 1 1 tmsg
  }
  if ($calc($ctime - $ctime($date 00:00:00)) < 70440) && ($v1 > 14400) && !$timer(start)   {
    .timerstart 19:34 1 1 tmsg $chan
  }
  else {
    tmsg $chan
  }
}
alias tmsg {
  if !$1 {
    timermsg off
    .timerstart 19:34 1 1 tmsg $chan
  }
  else {
    .timermsg 0 10 msg $1 hello  
  }
}
on *:disconnect:{
  .timermsg off
  .timerstart off
  .timerend off
} 
 
I'm not sure why, but I've got the feeling this could be written up better, although, exactly how & why escpaes me at the moment.

#160675 02/10/06 10:29 AM
Joined: Sep 2006
Posts: 14
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Sep 2006
Posts: 14
Yes! That did the trick. Thank you so much!

#160676 03/10/06 05:10 AM
Joined: Sep 2006
Posts: 14
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Sep 2006
Posts: 14
Sorry, I thought it did the trick, but when I tested it, it does not repeat. The timer works inbetween 7:34pm and 4:00am for the first time around. But when it tries to repeat those times the second time around, it doesn't repeat. The timer just says * timer start 19:34.

#160677 03/10/06 06:19 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
OK...Almost a complete re-write, and while it doesn't work the way you wanted, as in starting and stopping the timer at certain times, this does work and has been tested for several times.
Code:
 on me:*:join:#:{
  .timermsg 0 10 tmsg $chan
}
alias tmsg {
  if $time > 19:34:00 || $time < 04:00:00 {
    .msg $1 hello
  }
}
on *:disconnect:{
  .timermsg off
} 
 

#160678 03/10/06 10:33 AM
Joined: Sep 2006
Posts: 14
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Sep 2006
Posts: 14
Thank you again for all your help. You helped solve the problem I was having. I really mean it this time. THANK YOU!

Page 2 of 2 1 2

Link Copied to Clipboard