7 games in one!

By [Plornt] on Nov 08, 2010

-

;********************************************************************
;********************************************************************
;********************************************************************
;********************************************************************
;********************************************************************
;Sorry! I was being a bitch when I put this up. Decided to put it up again but have lost the snippet
;********************************************************************
;********************************************************************
;********************************************************************
;********************************************************************
;********************************************************************
;********************************************************************
;********************************************************************

Comments

Sign in to comment.
Dark|   -  Nov 29, 2010

o.O

 Respond  
_Teen_   -  Nov 08, 2010

Thanks for remind this, i forgot that

 Respond  
Jethro   -  Nov 08, 2010

Teen, one thing about using regex is that it'll match everywhere. (As in the use of iswm and isin) Regex by design is prevalent, meaning it'll acquire as many strings as feasible. So you need to make sure it starts somewhere and ends at certain point.> elseif $regex($1,/^!(rock|paper|scissors)$/iS) {Also, take advantage of the /i and /S modifier to make it case insensitive (yes, regex is case-sensitive by nature! For example, if someone enters the command in uppercase, it won't be recognized.) The /S modifier is a non-standard modifier used mainly for mIRC to strip out control codes. This is useful because some people have custom scripts that use control codes...and that may render the commands unrecognizable if one does not have the option of "strip out all incoming messages" enabled via mIRC options.

 Respond  
_Teen_   -  Nov 08, 2010

why dont this?

elseif ($1 == !rock) || ($1 == !paper) || ($1 == !scissors) {
elseif $regex($1,/!(rock|paper|scissors)/) {

so no need to use the $remove($1,!)

just

 if (%rps == rock &&  $regml(1) == paper) msg $chan [RPS] Aww I loose. Damn it!

Just a comment dude nice job

 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.