Please Disable Ad-Block To View This Website.

If you block ads, this site can not survive!

Ads are very minimal for registered users. If you don't have an account please register now!

DOWNLOAD
 Full Scripts
 Addons
 Snippets
 DLLs
 MTS Themes
 Tutorials
 Misc.
 File Queue
 Download mIRC
INTERACT
 Screenshots
 Challenge
 Top Downloads
 Submit Form
 Forums

SEARCH
Site Search

FRIENDS
Link to us!
PhotoShelf

Top Challenge Entrants

  # User Points
  1 jaytea 587
  2 [Znork] 303
  3 urza 297
  4 Ag2X 288
  5 dr_Eamer 255
  6 Albie 199
  7 Chessnut 197
  8 A Noniem 194
  9 zzattack 186
  10 Kol 185
  11 m910q 168
  12 Sephiroth 115
  13 patje 114
  14 Auron956 114
  15 chid 110
  16 Ohad2121 92
  17 SkorpSSS 87
  18 DixrouE 84
  19 Suchorski 83
  20 ^Vampire^ 74
Challenge:Smallest $rps - Rock, Paper, Scissors
Start:July 17th 2009
End:July 23rd 2009
Description:


In this challenge you are asked to create an alias that will return the winner of the game Rock, Paper, Scissors.

Two parameters will be passed to the alias;

r = Rock
p = Paper
s = Scissors

The alias must return the winner of the game;

-1 if $1- is invalid input i.e. not r/p/s
0 if its a draw
1 if $1 wins
2 if $2 wins

Your alias must be case in-sensitive. You must assume any values of any length can be passed as either $1 or $2. In any event of an invalid input (i.e. anything other than purely r/p/s, your alias should return -1). You should return -1 if $3- is supplied i.e. $rps(r,p,r) should return -1

Example:



$rps(r,p) = 2
$rps(p,r) = 1
$rps(s,s) = 0
$rps(s,p) = 1
$rps(s,r) = 2
$rps(R,s) = 1
$rps(rr,s) = -1
$rps(1,s) = -1
$rps(;,) = -1
$rps(r,pp) = -1
$rps(p1,s2) = -1
$rps(ppr,s) = -1
$rps(r,r,p) = -1
$rps(r,p,0) = -1
$rps(r,s,$false) = -1


Rules:

  • Alias name must be 'rps'
  • No dlls, coms, sockets or regular expressions
  • One submission per user.
  • Script must give correct results after consecutive runs.


  • Testing conditions:

  • Alias will be run on mIRC v6.35 and loaded into the remotes section.
  • Your code will be taken for EXACTLY as-is.
  • Alias will be run on a mIRC with no variables set - a clean mIRC.


  • Countcode:
    (coded by garreh)