Simple Calculator for Bots

By jonypaul on Jul 22, 2006

This is a very easy channel calculator, but it can camo in handy. Type !calc 5+5 and see what is does. You can obviously use a lot of other things. Type !c-commands for more info.
I think it looks better in a ot but if you want to put in in your script...who cares...:)

on *:TEXT:!calc*:#: {
  if ($3 == $null) /msg $chan  $2 =7 $calc( $2 )
  if ($3 != $null) /msg $chan 7Please dont use the space bar for the !calc7 trigger. Do it like this:  5+5 7for example.
}
on *:TEXT:!c-commands:#: {
  /msg $nick 7To use this channel calculator, you should know this:
  /msg $nick The Calculator Buttons Are: 7[+7] [-7] [^7] [*7] [/7]
  /msg $nick Here are some examples: 
  /msg $nick 3^2 = 9
  /msg $nick 3*2 = 6
  /msg $nick 3/2 = 1,5
  /msg $nick 3+2 = 5
  /msg $nick 3-2 = 1
}

Comments

Sign in to comment.
Gage   -  Oct 17, 2009

nice job works fine :D

 Respond  
TheboyskinG   -  Sep 18, 2009

nice jonypaul :)

 Respond  
clarey   -  Apr 08, 2009

That is really gay, since you copied it off the dragonportal bot without giving credits. And yeah, it can be evaluated in one line ;)

 Respond  
KingMe   -  Apr 07, 2009

It failed.

 Respond  
Jubbyjubbster   -  Mar 30, 2009

it works ! and its good

 Respond  
Chainchomp   -  Sep 17, 2006

Eh, I have a calc script that uses one line, could be trimmed down lots.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.