I did a TCL version of this script, which is run on an eggdrop. This is NOT a mIRC Script.
For those that may want to use it, you can find it Here
I Translated this from mIRC, so it's easy to see the resemblance in the codes.
mIRC Snippet
on *:TEXT:*:#: {
if ($1 == !convert) {
if (!%no.flood. [ $+ [ $nick ] ]) {
if (!$2) { msg $chan ERROR $+ : Insufficient Parameters. SYNTAX $+ : !convert c/f <temperature> | return }
if ($2 isnum) { msg $chan ERROR $+ : Insufficient Parameters. SYNTAX $+ : !convert c/f <temperature> | return }
if ($2 == f) {
if ($3 == 0) { msg $chan Converting 0 $+ $chr(176) Fahrenheit to Celsius: -17.77 $+ $chr(176) $+ C | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | return }
if (!$3) { msg $chan $nick $+ , I need a temperature to convert. }
if ($3 isletter) { msg $chan Converting $3 $+ : You're an Idiot? | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | return }
if ($3 isnum) {
set %t1 $calc($3 - 32)
set %temp $calc(%t1 * 0.55555555555555555555555555555556)
msg $chan Converting $3 $+ $chr(176) Fahrenheit to Celsius: $round(%temp,2) $+ $chr(176) $+ C
set -u5 %no.flood. [ $+ [ $nick ] ] 1
}
}
if ($2 == c) {
if ($3 == 0) { msg $chan Converting 0 $+ $chr(176) Celsius to Fahrenheit: 32 $+ $chr(176) $+ F | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | return }
if (!$3) { msg $chan $nick $+ , I need a temperature to convert. }
if ($3 isletter) { msg $chan Converting $3 $+ : You're an Idiot? | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | return }
if ($3 isnum) {
set %t1 $calc($3 * 1.8)
set %temp $calc(%t1 + 32)
msg $chan Converting $3 $+ $chr(176) Celsius to Fahrenheit: $round(%temp,2) $+ $chr(176) $+ F
set -u5 %no.flood. [ $+ [ $nick ] ] 1
}
}
}
}
}
Enjoy either ;)
Jethro_, that isn't what I posted. This is the opposite to FordLawnMower's script here - This was the method I was asked for, so this is the method I made. Most, if not all of the code/snippets i've posted on this site have been because someone asked me for it, or asked for it a certain way.
nice ;)
I did mine a little different though - here
heh, I like to add things to groups, easy to turn on/off
#swear.prot off
on @*:TEXT:*:#: {
if ($nick isreg $chan) {
var %i = 0
while (%i < $numtok(%swear.words,32)) {
inc %i
var %current.word = $gettok(%swear.words,%i,32)
if ($istok($strip($1-),%current.word,32) == $true) {
ban -ku300 # $nick 2 Swear Word Detected.
}
}
}
}
#swear.prot end
menu channel {
-
Swear Protection.
.On://.enable #swear.prot | echo 4 -at * Your Current Set Swear Words are: %swear.words
.Off://.disable #swear.prot | echo 4 -at * Disabled Swear Protection.
.Set Swear Words://unset %swear.words | set %swear.words $$?="Enter Swear Words - Reset ALL Again (with spaces)"
.-
}
Similar method to others posted here, basic channel menu included.
ikthezeus wrote:
I take it this was built for mIRC ver 6.3 or below?
As I have tried it with 6.31 and I get the following output...
The script will now rejoin all your channels. Please give it time to process all your channels on all networks.
3 channel(s) will be affected. The script will be fully processed in 3 second(s).
23:35:28 Error: Invalid window!
23:35:29 Error: Invalid window!
23:35:30 Error: Invalid window!
Any ideas?
Yes, upgrade your mIRC :)
I tested this on mIRC 6.35 with /hopall -h Rejoining
I was on 6 networks, 34 channels.
It worked fine :)
Thankyou Lindrian
I was bored, so I beefed this up a little.
on *:TEXT:*:#: {
if ($1 == +convert) {
if (!%no.flood. [ $+ [ $nick ] ] ) {
if (!$2) { msg $chan ERROR $+ : Insufficient Parameters. SYNTAX $+ : +convert c/f <temperature> | halt }
if ($2 isnum) { msg $chan ERROR $+ : Insufficient Parameters. SYNTAX $+ : +convert c/f <temperature> | halt }
if ($2 isletter) { msg $chan ERROR $+ : Insufficient Parameters. SYNTAX $+ : +convert c/f <temperature> | halt }
if ($2 = f) {
if ($3 = 0) { msg $chan Converting 0 $+ $chr(176) Fahrenheit to Celsius: -17.77 $+ $chr(176) Celsius | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | halt }
if (!$3) { msg $chan $nick $+ , I need a temperature to convert. }
if ($3 isletter) { msg $chan Converting $3 $+ : You\'re an Idiot? | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | halt }
if ($3 isnum) {
set %t1 $calc($3 - 32)
set %temp $calc(%t1 * 0.55555555555555555555555555555556)
msg $chan Converting $3 $+ $chr(176) Fahrenheit to Celsius: $round(%temp,2) $+ $chr(176) Celsius
set -u5 %no.flood. [ $+ [ $nick ] ] 1
}
}
if ($2 = c) {
if ($3 = 0) { msg $chan Converting 0 $+ $chr(176) Celsius to Fahrenheit: 32 $+ $chr(176) Fahrenheit | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | halt }
if (!$3) { msg $chan $nick $+ , I need a temperature to convert. }
if ($3 isletter) { msg $chan Converting $3 $+ : You\'re an Idiot? | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | halt }
if ($3 isnum) {
set %t1 $calc($3 * 1.8)
set %temp $calc(%t1 + 32)
msg $chan Converting $3 $+ $chr(176) Celsius to Fahrenheit: $round(%temp,2) $+ $chr(176) Fahrenheit
set -u5 %no.flood. [ $+ [ $nick ] ] 1
}
}
}
}
}
atleast this way it returns syntax when users perform the command improperly, and checks for flooding.