mIRC Home    About    Download    Register    News    Help

Print Thread
How can I get these two scripts to work together #120307 16/05/05 04:34 PM
Joined: Aug 2004
Posts: 44
D
DarkLogan Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2004
Posts: 44
When I hit connect on my script I'd like to have this script play first

alias daystatus {
if ($time(hh:nn) < 12:00) { return morning }
if ($time(hh:nn) >= 12:00) && ($time(hh:nn) < 17:00) { return afternoon }
if ($time(hh:nn) >= 17:00) { return evening }
}
on *:START: {
if ($daystatus == morning) { splay GM.wav }
if ($daystatus == afternoon) { splay GA.wav }
if ($daystatus == evening) { splay GE.wav }
}

Which tells me what time of day it is then right after that i'd like for it to do this script

On *:Start: {
splay startup.mp3
}

On *:Mp3End: {
if ($filename == $mircdirSounds\startup.mp3) {
server irc.rizon.net
}
}

How can I make this work one after the other thanx.

Re: How can I get these two scripts to work together #120308 16/05/05 04:56 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just put the two on starts together...

Code:
alias daystatus {
  if ($time(hh:nn) &lt; 12:00) { return morning }
  if ($time(hh:nn) &gt;= 12:00) &amp;&amp; ($time(hh:nn) &lt; 17:00) { return afternoon }
  if ($time(hh:nn) &gt;= 17:00) { return evening }
}

on *:START: {
  if ($daystatus == morning) { splay GM.wav }
  if ($daystatus == afternoon) { splay GA.wav }
  if ($daystatus == evening) { splay GE.wav }
  splay startup.mp3
}

On *:Mp3End: {
  if ($filename == $mircdirSounds\startup.mp3) {
    server irc.rizon.net
  }
}


Invision Support
#Invision on irc.irchighway.net
Re: How can I get these two scripts to work together #120309 16/05/05 05:07 PM
Joined: Aug 2004
Posts: 44
D
DarkLogan Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2004
Posts: 44
Yeah that works only thing is i need to add a 1 sec timer so that it says the time then the mp3 starts cause right now they kind of blend together. Also if you could take a look at the time script because it is 1:06 PM here yet when my mirc starts the wav is saying good morning ??

Re: How can I get these two scripts to work together #120310 16/05/05 05:15 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Sorry... I didn't double check how you had the script written. For 24-hour time, use HH rather than hh. I added the timer for you as well. If you need to, you can adjust it to more than one second.

Code:
alias daystatus {
  if ($time(HH:nn) &lt; 12:00) { return morning }
  if ($time(HH:nn) &gt;= 12:00) &amp;&amp; ($time(HH:nn) &lt; 17:00) { return afternoon }
  if ($time(HH:nn) &gt;= 17:00) { return evening }
}

on *:START: {
  if ($daystatus == morning) { splay GM.wav }
  if ($daystatus == afternoon) { splay GA.wav }
  if ($daystatus == evening) { splay GE.wav }
  .timer 1 1 { splay startup.mp3 }
}

On *:Mp3End: {
  if ($filename == $mircdirSounds\startup.mp3) {
    server irc.rizon.net
  }
}


Invision Support
#Invision on irc.irchighway.net
Re: How can I get these two scripts to work together #120311 16/05/05 07:08 PM
Joined: Aug 2004
Posts: 44
D
DarkLogan Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2004
Posts: 44
Perfect smile I would also like to add some sort of ban protection. When someone in my channel takes my ops is there a script i could use that would give my ops back then take their ops from them with some sort of saying like ex:dont ever take my ops.Same for kicks and things of that nature.Thanx

Re: How can I get these two scripts to work togeth #120312 16/05/05 07:32 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Can't you trust your channel operators? :tongue:

-Andy

Re: How can I get these two scripts to work togeth #120313 16/05/05 07:56 PM
Joined: Aug 2004
Posts: 44
D
DarkLogan Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2004
Posts: 44
Yeah but in the middle of the night when they think your up and want to play around and start taking each others ops and what not i'd like to wake up knowing my script fixed it for me. Plus if there is a take over it would be nice for mirc to react to it. Torment script was like that. You could take somebodys ops ban them and from outside the channel the script would remove the ban re-join the channel take the ops of the person who did it and ban them it was awsome. I'd like to have that code just for protection.

Re: How can I get these two scripts to work togeth #120314 16/05/05 08:14 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Well, does your network have chanserv or some other similar services?

if you have chanserv, you can do something along the lines of:

Code:
on *:ban:#yourchan: {
  if ($bnick == $me) {
    chanserv unban $chan $banmask
    join $chan
    ban -k $chan $address($nick,2)
  }
}


Note that this only works with chanserv and only if that network uses this format for chanserv unban commands. If you don't know, type /chanserv help.


Invision Support
#Invision on irc.irchighway.net