Scripts
From Mk
I'll be putting some scripts I no longer use here:
Contents |
mIRC
Coin flipping script
/* +--------------------------------------------------------------------------------------------------+ */
/* | MK's coin flipping script. Use /coin to activate yourself, or have others use ^coin | */
/* | This first part is the alias: | */
/* | | */
alias coin {
if ($nick == $null) { var %coinnick $me }
else { var %coinnick $nick }
var %coinrand $rand(1,6001)
if ((%coinrand >= 1) && (%coinrand <= 3000)) { msg $chan %coinnick flips a coin! Heads! }
elseif ((%coinrand >= 3001) && (%coinrand <= 6000)) { msg $chan %coinnick flips a coin! Tails! }
else { msg $chan %coinnick flips a coin...and it landed on its edge. o_O }
}
/* | | */
/* | This second part is the trigger for the alias: | */
/* | | */
on *:text:^coin:#:{ coin }
/* | | */
/* | End of coin flipping script | */
/* +--------------------------------------------------------------------------------------------------+ */
Dice rolling script
/*
+--------------------------------------------------------------------------------------------------+
| MK's LHC countdown script. Use /lhc to activate yourself, or have others use ^lhc |
| This first part is the alias: |
| |
*/
alias lhc {
var %lhc_current $ctime($date $time)
var %lhc_circulate $ctime(2008 September 10 03:35:00)
var %lhc_collision $ctime(2008 October 10 00:00:00)
var %lhc_dif1 $calc(%lhc_circulate - %lhc_current)
var %lhc_dif2 $calc(%lhc_collision - %lhc_current)
if (%lhc_dif1 < 0) {
var %lhc_dif1 $remove(%lhc_dif1,-)
var %lhc_neg1 1
}
if (%lhc_dif2 < 0) {
var %lhc_dif2 $remove(%lhc_dif2,-)
var %lhc_neg2 1
}
var %lhc_date1 $iif(%lhc_neg1,began,will begin) circulating protons $datecon($duration(%lhc_dif1)) $iif(%lhc_neg1,ago,from now)
var %lhc_date2 $iif(%lhc_neg2,began,will begin) collisions $datecon($duration(%lhc_dif2)) $iif(%lhc_neg2,ago,from now)
msg $chan The Large Hadron Collider %lhc_date1 and %lhc_date2 $+ .
}
/*
| |
| This second part is an alias to be used as an identifier to fix mIRC's ugly date format |
| |
*/
alias datecon {
var %tmp $replace($1-,wk,$chr(32) $+ week,day,$chr(32) $+ day,hr,$chr(32) $+ hour,min,$chr(32) $+ minute,sec,$chr(32) $+ second)
return %tmp
}
/*
| |
| This third part is the trigger for the alias: |
| |
*/
on *:text:^lhc:#:{ lhc }
/*
| |
| End of LHC countdown script |
+--------------------------------------------------------------------------------------------------+
*/
Large Hadron Collider countdown
/* +--------------------------------------------------------------------------------------------------+ */
/* | MK's LHC countdown script. Use /lhc to activate yourself, or have others use ^lhc | */
/* | This first part is the alias: | */
/* | | */
alias lhc {
var %lhc_current $ctime($date $time)
var %lhc_circulate $ctime(2008 September 10 03:35:00)
var %lhc_collision $ctime(2008 October 10 00:00:00)
var %lhc_dif1 $calc(%lhc_circulate - %lhc_current)
var %lhc_dif2 $calc(%lhc_collision - %lhc_current)
if (%lhc_dif1 < 0) {
var %lhc_dif1 $remove(%lhc_dif1,-)
var %lhc_neg1 1
}
if (%lhc_dif2 < 0) {
var %lhc_dif2 $remove(%lhc_dif2,-)
var %lhc_neg2 1
}
var %lhc_date1 $iif(%lhc_neg1,began,will begin) circulating protons $datecon($duration(%lhc_dif1)) $iif(%lhc_neg1,ago,from now)
var %lhc_date2 $iif(%lhc_neg2,began,will begin) collisions $datecon($duration(%lhc_dif2)) $iif(%lhc_neg2,ago,from now)
msg $chan The Large Hadron Collider %lhc_date1 and %lhc_date2 $+ .
}
/* | | */
/* | This second part is an alias to be used as an identifier to fix mIRC's ugly date format | */
/* | | */
alias datecon {
var %tmp $replace($1-,wk,$chr(32) $+ week,day,$chr(32) $+ day,hr,$chr(32) $+ hour,min,$chr(32) $+ minute,sec,$chr(32) $+ second)
return %tmp
}
/* | | */
/* | This third part is the trigger for the alias: | */
/* | | */
on *:text:^lhc:#:{ lhc }
/* | | */
/* | End of LHC countdown script | */
/* +--------------------------------------------------------------------------------------------------+ */
