timer help - 23/08/14 11:35 AM
Hey guys, I'm trying to make a script where it will check if a timer is already on/off and display a msg to the channel saying it is but I cant seem to work it out. I've tried adding the checks for it to see if the timer is on or off already but all I get is either errors in my status window or it doesn't work. At the moment when an op types in !timer1 on, if it is already on it just says "Timer1 script has been Enabled" each time the trigger is typed because there is no check to see if it is actually on already (same with !timer1 off).
Also how would I make it so if the bot gets disconnected and the script is on, it doesn't keep saying in the status window that the bot isn't connected in the channel. Something that checks if the script is on when the bot gets disconnected and to turn it off until it reconnects to the server/channel (but only if the script is actually on when it gets disconnected).
Thanks guys hope you can help,
D00M
Code:
on *:TEXT:!timer1 on:#: { if ($nick isop #) { timer1 0 300 do something msg # - Timer1 script has been Enabled } else msg # Timer1 is already enabled } on *:TEXT:!timer1 off:#: { if ($nick isop #) { timer1 off msg # - Timer1 script has been Disabled } else msg # Timer1 is already disabled }
Also how would I make it so if the bot gets disconnected and the script is on, it doesn't keep saying in the status window that the bot isn't connected in the channel. Something that checks if the script is on when the bot gets disconnected and to turn it off until it reconnects to the server/channel (but only if the script is actually on when it gets disconnected).
Thanks guys hope you can help,
D00M