Advertisement
severen1999

SevbotConvert

Jul 2nd, 2020
1,866
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.64 KB | None | 0 0
  1. on *:TEXT:!convert*:#Landail: {
  2.   if ($1 = !convert) {
  3.     if (!%no.flood. [ $+ [ $nick ] ] ) {
  4.       if (!$2) {
  5.         msg # error $+ : Insufficient Parameters. SYNTAX: !convert c/f <temperature> | halt
  6.       }
  7.       if ($2 isnum) {
  8.         msg # error $+ : Insufficient Parameters. SYNTAX: !convert c/f <temperature> | halt
  9.       }
  10.  
  11.       if ($2 = f || $2 = F) {
  12.         if ($3 = 0) { msg # Converting 0 $+ $chr(176) Fahrenheit to Celsius: -17.77 $+ $chr(176) Celsius | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | halt }
  13.         if (!$3) { msg # $nick I need a temperature to convert. }
  14.         if ($3 isletter) { msg $chan Converting $3 $+ : You\'re an Idiot? | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | halt }
  15.         if ($3 isnum) {
  16.           set %t1 $calc($3 - 32)
  17.           set %temp $calc(%t1 * 0.55555555555555555555555555555556)
  18.           msg # Converting $3 $+ $chr(176) Fahrenheit to Celsius: $round(%temp,2) $+ $chr(176) Celsius
  19.           set -u3 %no.flood. [ $+ [ $nick ] ] 1
  20.         }
  21.       }
  22.       if ($2 = c || $2 = C) {
  23.         if ($3 = 0) { msg # Converting 0 $+ $chr(176) Celsius to Fahrenheit: 32 $+ $chr(176) Fahrenheit | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | halt }
  24.         if (!$3) { msg # $nick $+ , I need a temperature to convert. }
  25.         if ($3 isletter) { msg # Converting $3 $+ : ? | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | halt }
  26.         if ($3 isnum) {
  27.           set %t1 $calc($3 * 1.8)
  28.           set %temp $calc(%t1 + 32)
  29.           msg # Converting $3 $+ $chr(176) Celsius to Fahrenheit: $round(%temp,2) $+ $chr(176) Fahrenheit
  30.           set -u3 %no.flood. [ $+ [ $nick ] ] 1
  31.         }
  32.       }
  33.     }
  34.   }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement