Top

My Coin Toss


mIRC Code
+ 0 likes
Please Register to submit score.
Average Score  3.8
Scores Submitted  4
Date Added  Jul 03, 2005
Last Updated  Sep 23, 2005
Tags  coin  flip  toss 
  Bookmark and Share

Introduction

Well, I decided to add in my coin toss. This is meant to be used on a bot.
Type !toss.
It randomly chooses what you have to match to win, and randomly chooses what you get. If they match, it says you won. If not, it says you lost.

Grab the Code

Comments

  (10)  RSS
DarthReven
Comments: 468
 
mIRC Snippet:  My Coin Toss
Posted on Jul 3, 2005 10:55 pm
Variables aren\'t needed
xDaeMoN
Comments: 696
 
mIRC Snippet:  My Coin Toss
Posted on Jul 4, 2005 12:05 am
I agree. Your code could be shorten to 3 lines or less. Also fix your trigger command.

With this \"on *:TEXT:*!toss*:#:{\", !toss can be triggered anytime they say it in a sentence. Lose the wildcards.

On your commented version, you have an incorrect usage of the comments.

/*
This is a Comment
*/
DarthReven
Comments: 468
 
mIRC Snippet:  My Coin Toss
Posted on Jul 4, 2005 2:22 am
on *:text:!toss:#: { msg $chan $iif($r(1,2) == $r(1,2),Congratulations $nick you needed $iif($v1 == 1,Heads,Tails) and you got it,Sorry $nick you needed $iif($v2 == 1,Heads,Tails) but you got $iif($v1 == 1,Tails,Heads)) } no variables
aeros
Comments: 35
 
mIRC Snippet:  My Coin Toss
Posted on Jul 4, 2005 4:47 pm
hm..
supergeo
Comments: 256
 
mIRC Snippet:  My Coin Toss
Posted on Jul 5, 2005 5:39 pm
Lose the wildcards?

I made this on a server where the users are given nickname and text colors, and the wildcards are needed for it to function properly if the person has colors.
xDaeMoN
Comments: 696
 
mIRC Snippet:  My Coin Toss
Posted on Jul 5, 2005 6:08 pm
Strip the colors then. There is an option in mIRC where you could strip the colors for incoming messages. My suggestion stays. See Darth\'s code.
supergeo
Comments: 256
 
mIRC Snippet:  My Coin Toss
Posted on Jul 6, 2005 2:00 pm
Or you can just leave it the way it is and have 2 extra characters ;)
supergeo
Comments: 256
 
mIRC Snippet:  My Coin Toss
Posted on Jul 6, 2005 2:01 pm
Also, Darth\'s code is good. It\'s also smaller and cleaner. But this still does the same thing ;)
supergeo
Comments: 256
 
mIRC Snippet:  My Coin Toss
Posted on Jul 6, 2005 2:01 pm
Also, Darth\'s code is good. It\'s also smaller and cleaner. But this still does the same thing ;)
Zachery
Comments: 51
 
mIRC Snippet:  My Coin Toss
Posted on Sep 26, 2005 9:58 pm
add this snippet to the game tag =/

Please Register or Login to start posting comments.
Bottom