Random Number Generator

By Zerg on Aug 11, 2009

An alias to show a random number between any two intergers of your choice.

Triggers:
/random

OR

/random

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Zerg's Random Number Alias---------;;
;;Coded By Zerg----------------------;;
;;Contact on: Irc.swiftirc.net 6667--;;
;;#zergs_list #fender or #gs-pure----;;
;;All rights reserved.---------------;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

alias Random {
  if (- isin $1-) || (+ isin $1-) || (. isin $1-) {
    //echo -a 12[04***ERROR***12] Your Random Numbers have to be Intergers ( 04Full, Positive Numbers 12) 
  }
  else {
    if ($2 == $null) {
      set %random1 $$?="Why is the First(lowest) Number?"
      set %random2 $$?="What is the Second(max) Number?"
      if (%random2 <= %random1) {
        //echo -a 12[04***ERROR***12] Your Random Numbers have to be logical( 04The Second Number has to be greater than the First Number 12) 
        unset %random*
        halt 
      }
      else {
        //echo -a 12[04***Random***12] Your random number between04 %random1 12and04 %random2 12is4 $+($rand(%random1,%random2))
        unset %random*
        halt
      }
    }
    else {
      set %random1 $1
      set %random2 $2
      if (%random2 <= %random1) {
        //echo -a 12[04***ERROR***12] Your Random Numbers have to be logical( 04The Second Number has to be greater than the First Number 12) 
        unset %random*
        halt 
      }
      else {
        //echo -a 12[04***Random***12] Your random number between04 %random1 12and04 %random2 12is4 $+($rand(%random1,%random2))
        unset %random*
        halt
      }
    }
  }
}

Comments

Sign in to comment.
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.