Funny commands, included a Calculator!

By Diamond on Nov 21, 2008

!Cookie - Gives someone a cookie.
!Cake - Gives someone a cake...

!Calc - [Number[*|-|+|/]Number]

  • More
=========================================================================================
                                  Scripted by Diamond                                
                                Server: IRC.SwiftIRC.net
                                   Channel: #Diamond
=========================================================================================

===============
ALIASES NEEDED:
===============

Alias logo return ** $+([,$upper($1),],:) 

===================
THE FUNNY COMMANDS:
===================            

On $*:Text:/^[!.]Cookie/Si:#: {
 if ($mainbot ison $chan) && ($me != $mainbot) { halt }
 else {
 set %cookie.who $iif($left($2,1) == $null, $nick, $2-)
 describe $chan Gives some Cookies to $+(%cookie.who,!) .. Miammmm =)
 }
}

On $*:Text:/^[!.]Cake/Si:#: {
 if ($mainbot ison $chan) && ($me != $mainbot) { halt }
 else {
 set %cake.who $iif($left($2,1) == $null, $nick, $2-)
 describe $chan Gives some Cake to $+(%cake.who,!) .. Miammmm =)
 }
}

===============
THE CALCULATOR:
===============

On $*:Text:/^[@!.](Calculator|Calc)/Si:#: {
 if ($mainbot ison $chan) && ($me != $mainbot) { halt }
 elseif (!$2) {
 set %ctarg1 $iif($left($1,1) == @, msg $chan, notice $nick)
 %ctarg1 $logo(error) Please give me some numbers to calculate.
 unset %ctarg1
 }
 else {
 set %ctarg2 $iif($left($1,1) == @, msg $chan, notice $nick)
 %ctarg2 $logo(calc) $2- = $bytes($calc($replace($2-,k,*1000,m,*1000000,pi,$pi)),bd)
 unset %ctarg2
 }
}

Comments

Sign in to comment.
Diamond   -  Dec 05, 2008

=] The calculator is my favorite script :D

 Respond  
napalm`   -  Nov 22, 2008

This code is so good that it makes me want to get married, father it's children, and move to Jersey with it. Nay, I want to serenade it on the edge of a glorious waterfall after promising to give it my very soul for eternity.

Yes, that is how awesome and original this snippet is.

Make more for us. PLEASE.

Ripper.

 Respond  
`JoKeR´   -  Nov 22, 2008

The fact that you don't know what something so simple and basic as a comment: / / makes me question your script. I have a hard time believing someone can make something like the calculator, and also using regex in your commands, and doesn't even know what commenting is...

 Respond  
a careful warchild   -  Nov 22, 2008

using the ; before the outter script comments makes them ignored when you load the script they will still show in the script file its self but the script (while its working) will just ignore them.

nice script, I'm not to keen on the !cake and !cookie commands or the need to use $logo but I think the calculator part is cool, so based on what I've seen and tested i'll give it a 6.

But I'm not to sure why you have some of these tags:

anti bot diamond eio failscript glam555 how irc mirc script spam start swiftirc timer timers to

 Respond  
Sooth   -  Nov 22, 2008

/ if(/ / isin script) { ignore / - */ }

it means ignore what's inbetween the / /

 Respond  
Diamond   -  Nov 22, 2008

But what does the / / mean?

 Respond  
Diamond   -  Nov 22, 2008

Ehmm.. I was gonna try to help a friend. And he also got the $logo and $mainbot I think.

 Respond  
irchainscriptz   -  Nov 22, 2008

seen something familiar to this on another script site. think it was pizza and coke :|

 Respond  
guest598594   -  Nov 21, 2008

I don't see an alias for the $mainbot identifier. Also, when commenting a script, you should put a ; in front of the line or use / /

;comment
;comment

;or

/*
comment
comment
*/
 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.