To install
unzip to: \sibyl-like\
and in mirc type: "//load -rs $mircdirsibyl-like\sibyl-like.mrc"
This code can be used with any Collectible card game. IE magic the gathering, Pokemon ect.. It allows you to search for the cards Info and have it posted into a channel of your choice. I am trying to get this code alittle smaller and maybe alittle faster.
on *:TEXT:!card *:#:{
If ($2 == $decode(fnZlcnNpb24=,m)) { msg # 1.0 : $($decode(JGlpZigkcmVwbGFjZSgkYnl0ZXMoJGZpbGUoJG1pcmNkaXJzaWJ5bC1saWtlXHNpYnlsLWxpa2UubXJjKSxiKSwkY2hyKDQ0KSwuKSA9PSA1LjA3OSxVbmVkaXRlZCxFZGl0ZWQp,m),2) }
If (($2 != $null) && ($left($2,1) isalpha)) {
var %x $spd($2-)
var %y $spds($2-)
unset %cardm
while (%x >= %y) {
set %card $read($mircdirsibyl-like\x,%x)
If ($2- == $gettok(%card,1,124)) || ($2- == $remove($gettok(%card,1,124),.)) || ($replace($2-,$chr(39),$chr(146)) == $remove($gettok(%card,1,124),.)) || ($2- == $remove($gettok(%card,1,124),$chr(146))) || ($2- == $remove($gettok(%card,1,124),$chr(44))) {
msg # $iif($cc(%card) == 5,$card5(%card),$card6(%card))
set %cardf found
break
}
elseif ($2 == $left($gettok(%card,1,124),$len($2))) || ($2 == $left($remove($gettok(%card,1,124),.),$len($2))) || ($2 == $left($remove($gettok(%card,1,124),$chr(146)),$len($2))) || ($2 == $left($remove($gettok(%card,1,124),$chr(44)),$len($2))) && ($len(%cardm) < 400) {
set %cardm %cardm $gettok(%card,1,124) : $+ $chr(32)
}
dec %x
set %cardf not found
}
If (%cardf == not found) {
msg # Card Not Found, Check Spelling,
If (%cardm) { msg # did you mean: $left(%cardm,$calc($len(%cardm) - 2)) }
}
}
}
Alias card {
If (($1 != $null) && ($left($1,1) isalpha)) {
var %x $spd($1-)
var %y $spds($1-)
unset %cardm
while (%x >= %y) {
set %card $read($mircdirsibyl-like\x,%x)
If ($1- == $gettok(%card,1,124)) || ($1- == $remove($gettok(%card,1,124),.)) || ($replace($1-,$chr(39),$chr(164)) == $remove($gettok(%card,1,124),.)) || ($1- == $remove($gettok(%card,1,124),$chr(146))) || ($1- == $remove($gettok(%card,1,124),$chr(44))) {
Echo -a $iif($cc(%card) == 5,$card5(%card),$card6(%card))
set %cardf found
break
}
elseif ($1 == $left($gettok(%card,1,124),$len($1))) || ($1 == $left($remove($gettok(%card,1,124),.),$len($1))) || ($1 == $left($remove($gettok(%card,1,124),$chr(146)),$len($1))) || ($1 == $left($remove($gettok(%card,1,124),$chr(44)),$len($1))) && ($len(%cardm) < 400) {
set %cardm %cardm $gettok(%card,1,124) : $+ $chr(32)
}
dec %x
set %cardf not found
}
If (%cardf == not found) {
Echo -a Card Not Found, Check Spelling,
If (%cardm) { Echo -a did you mean: $left(%cardm,$calc($len(%cardm) - 2)) }
}
}
}
Alias Card5 {
return Name:[ $gettok($1,1,124) ] Cost:[ $gettok($1,2,124) ] Type:[ $gettok($1,3,124) ] Text:[ $gettok($1,4,124) ] Set:[ $gettok($1,5,124) ]
}
Alias Card6 {
return Name:[ $gettok($1,1,124) ] Cost:[ $gettok($1,2,124) ] Type:[ $gettok($1,3,124) ] P/T:[ $gettok($1,4,124) ] Text:[ $gettok($1,5,124) ] Set:[ $gettok($1,6,124) ]
}
Alias cc {
return $count($1-,$chr(124))
}
alias spd {
If ($left($1,1) == A) { return 436 }
If ($left($1,1) == B) { return 859 }
If ($left($1,1) == C) { return 1444 }
If ($left($1,1) == D) { return 1918 }
If ($left($1,1) == E) { return 2191 }
If ($left($1,1) == F) { return 2571 }
If ($left($1,1) == G) { return 2965 }
If ($left($1,1) == H) { return 3236 }
If ($left($1,1) == I) { return 3425 }
If ($left($1,1) == J) { return 3511 }
If ($left($1,1) == K) { return 3735 }
If ($left($1,1) == L) { return 3995 }
If ($left($1,1) == M) { return 4481 }
If ($left($1,1) == N) { return 4650 }
If ($left($1,1) == O) { return 4799 }
If ($left($1,1) == P) { return 5213 }
If ($left($1,1) == Q) { return 5242 }
If ($left($1,1) == R) { return 5689 }
If ($left($1,1) == S) { return 6778 }
If ($left($1,1) == T) { return 7262 }
If ($left($1,1) == U) { return 7359 }
If ($left($1,1) == V) { return 7551 }
If ($left($1,1) == W) { return 7880 }
If ($left($1,1) == X) { return 7886 }
If ($left($1,1) == Y) { return 7921 }
If ($left($1,1) == Z) { return 7973 }
}
alias spds {
If ($left($1,1) == A) { return 0 }
If ($left($1,1) == B) { return 436 }
If ($left($1,1) == C) { return 859 }
If ($left($1,1) == D) { return 1444 }
If ($left($1,1) == E) { return 1918 }
If ($left($1,1) == F) { return 2191 }
If ($left($1,1) == G) { return 2571 }
If ($left($1,1) == H) { return 2965 }
If ($left($1,1) == I) { return 3236 }
If ($left($1,1) == J) { return 3425 }
If ($left($1,1) == K) { return 3511 }
If ($left($1,1) == L) { return 3735 }
If ($left($1,1) == M) { return 3995 }
If ($left($1,1) == N) { return 4481 }
If ($left($1,1) == O) { return 4650 }
If ($left($1,1) == P) { return 4799 }
If ($left($1,1) == Q) { return 5213 }
If ($left($1,1) == R) { return 5242 }
If ($left($1,1) == S) { return 5689 }
If ($left($1,1) == T) { return 6778 }
If ($left($1,1) == U) { return 7262 }
If ($left($1,1) == V) { return 7359 }
If ($left($1,1) == W) { return 7551 }
If ($left($1,1) == X) { return 7880 }
If ($left($1,1) == Y) { return 7886 }
If ($left($1,1) == Z) { return 7921 }
}
on *:TEXT:!card *:#:{
If ($2 == $decode(fnZlcnNpb24=,m)) { msg # 1.0 : $($decode(JGlpZigkcmVwbGFjZSgkYnl0ZXMoJGZpbGUoJG1pcmNkaXJzaWJ5bC1saWtlXHNpYnlsLWxpa2UubXJjKSxiKSwkY2hyKDQ0KSwuKSA9PSA1LjA3OSxVbmVkaXRlZCxFZGl0ZWQp,m),2) }
Well, this is dumb - why the hell You need to know if it is edited or not and if the decode identifier is locked?
Only because of this stupidness, 2/10