simple calculator!
Posted by BotMaN^
Sunday, April 06, 2008
Description: on text .c shows the calculator script! check:

on *:text:*.c*:#: {
  if $1 == %c $+ .c {
    if $2 == %c $+ $null { /calc $2-  | halt }
    else { /calc $2- | halt }
  }
}
alias calc {
  if ($1- != $null) {
    msg $chan  [^K]4([^K]9[[^K]1Calculating:[^K]1[^K]4 $1- [^K][^K]9][^K]4)
    msg $chan  [^K]4([^K]9[[^K]1Result[^K]9][^K]4)[^K]1==[^K]4 $calc($1-) [^K]
  }
  else msg $chan [^K]4([^K]9[[^K]1Calculater[^K]9][^K]4)[^K]1 : No parameters given. Halting.
}
Submit a comment
Oops! You need to login or register before you can post a comment!

ebaum's world