Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 19th, 2010 | Syntax: None | Size: 2.78 KB | Hits: 24 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. On *:text:.cash:#: {
  2. if (%cash [ $+ [ $nick ] ] == $null) { set %cash [ $+ [ $nick ] ] 0 }
  3.   if (%timer [ $+ [ $nick ] ] !== $null) { notice $nick Wait $duration($timer($nick).secs) before using the .cash command. | halt }
  4.   timer $+ $nick 1 $r(180,180) unset %timer [ $+ [ $nick ] ]
  5.   set %timer [ $+ [ $nick ] ] 1
  6.   timer 1 1 notice $nick Wait $duration($timer($nick).secs) before using the .cash command again.
  7.  
  8.  
  9.  
  10.   var %r $rand(1,10)
  11.   if (%r == 1) { notice $nick $nick steals a car and sells it for 500 dollars
  12.     inc %cash [ $+ [ $nick ] ] 500
  13.   }
  14.   if (%r == 2) { notice $nick $nick Stole a strangers wallet, obatining 70 dollars
  15.     inc %cash [ $+ [ $nick ] ] 70
  16.   }
  17.   if (%r == 3) { notice $nick $nick Finds 200 dollars in his trouser pocket.
  18.     inc %cash [ $+ [ $nick ] ] 200
  19.   }
  20.   if (%r == 4) { notice $nick $nick Robs a bank getting away with 1,300 dollars
  21.     inc %cash [ $+ [ $nick ] ] 1300
  22.   }
  23.   if (%r == 5) { notice $nick $nick Sells the last of his weed for 30 dollars
  24.     inc %cash [ $+ [ $nick ] ] 30
  25.   }
  26.   if (%r == 6) { notice $nick $nick Trips over whilst at work and claims 220 dollars compensation
  27.     inc %cash [ $+ [ $nick ] ] 220
  28.   }
  29.   if (%r == 7) { notice $nick $nick Sells some stuff at a carboot earning 320 dollars
  30.     inc %cash [ $+ [ $nick ] ] 320
  31.   }
  32.   if (%r == 8) { notice $nick $nick Finds a wallet on the floor, and took 100 dollars
  33.     inc %cash [ $+ [ $nick ] ] 100
  34.   }
  35.   if (%r == 9) { notice $nick $nick Sells some stuff on Ebay for 60 dollars
  36.     inc %cash [ $+ [ $nick ] ] 60
  37.   }
  38.   if (%r == 10) { notice $nick $nick Sells there Runescape account for 150 dollars
  39.     inc %cash [ $+ [ $nick ] ] 150
  40.   }
  41. }
  42.  
  43.  
  44.  
  45. alias rank {
  46.   ;;$gwdRank(Name) returns "name :: score :: rank";;
  47.   window -h @list1
  48.   window -h @list2
  49.   var %a 1
  50.   while ($var(%cash*,%a)) {
  51.     aline -a @list1 %cash [ $+ [ $remove($var(%cash*,%a),$+($chr(37),cash)) ] ] $remove($var(%cash*,%a),$+($chr(37),cash))
  52.     inc %a
  53.   }
  54.   filter -wwteuc 1 1 @list1 @list2
  55.   var %b $fline(@list2,* $1)
  56.   .timer 1 0 close -@ @list*
  57.   return $+(4,$token($line(@list2,%b),2,32)) 14has4 $+($bytes($line(@list2,%b),b),GP) 14and is ranked4 $ord(%b) $+ .
  58. }
  59.  
  60. on $*:TEXT:/^[!@.]score/Si:*: {
  61.   if (!$2) {
  62.     if (%cash [ $+ [ $nick ] ] isnum) {
  63.       $iif($left($1,1) == @, msg $chan, .notice $nick) $rank($nick)
  64.       halt
  65.     }
  66.     if (%cash [ $+ [ $nick ] ] !isnum) {
  67.       $iif($left($1,1) == @, msg $chan, .notice $nick) 14Sorry4 $nick $+ 14, you have no score.
  68.       halt
  69.     }
  70.   }
  71.   if ($2) {
  72.     if (%cash [ $+ [ $2 ] ] isnum) {
  73.       $iif($left($1,1) == @, msg $chan, .notice $nick) $rank($2)
  74.       halt
  75.     }
  76.     if (%cash [ $+ [ $2 ] ] !isnum) {
  77.       $iif($left($1,1) == @, msg $chan, .notice $nick) 14Sorry4 $2 $+ 14, has no score.
  78.       halt
  79.     }
  80.   }
  81. }