All pastes #508566 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-25 02:03 UTC
rendered paste body
on *:TEXT:!pj*:#:{

  if (%pj != $null) { notice $nick Sorry the Player Jump spot is taken, try again later! | halt }

  while (!%1) {
    if ($nick($chan,$rand(1,$nick($chan,0))) != $nick) var %1 = $v1
  }
  while (!%2) {
    if ($nick($chan,$rand(1,$nick($chan,0))) != %1) var %2 = $ifmatch
  }
  set %pj $nick
  timer 1 0 .msg $chan 4 $nick 14is on the level 3 hills watching4 %1 14and4 %2 14fighting.
  timer 1 1 .msg $chan 4 $nick 14 runs up to the winner of the fight,4 %1 $+ .
  timer 1 1 .msg $chan 4 $nick 14 hits a4 $rand(20,30) 14with14 whip14 and then 4 $rand(20,30) & $rand(20,30) 14with dds!


  var %loot1 = $read(loot.txt)
  var %loot2 = $read(loot.txt)
  var %loot3 = $read(loot.txt)

  tokenize 32 %loot1
  var %price1 = $gettok(%loot1,$0,32)
  tokenize 32 %loot2
  var %price2 = $gettok(%loot2,$0,32)
  tokenize 32 %loot3
  var %price3 = $gettok(%loot3,$0,32)

  timer 1 1 .msg $chan 14Loot : [4 $+ %loot1 $+ GP $+ 4( $+ $money(%price1) $+ )14] [4 $+ %loot2 $+ GP $+ 4( $+ $money(%price2) $+ )14] [4 $+ %loot3 $+ GP $+ 4( $+ $money(%price3) $+ )14]
  set -u15 %abc $bytes($floor($calc(%price1 + %price2 + %price3)))
  set -u15 %abcd $calc($numtok(%abc,44) -1)
  set -u15 %xyz $+($gettok(%abc,1,44),$str(000,%abcd))
  timer 1 1 .msg $chan 4 $nick 14, You made4 $money($calc(%price1 + %price2 + %price3)) 14on that PJ!
  set %allprice [ $+ [ $nick ] ] $calc(%price1 + %price2 + %price3)
  set %theprice [ $+ [ $nick ] ] $calc(%allprice [ $+ [ $nick ] ] + %theprice [ $+ [ $nick ] ]) 
  inc %totalprice [ $+ [ $nick ] ] $(%theprice [ $+ [ $nick ] ]) 
  timer 1 1 .msg $chan 14You can go for another4 PJ14 in a couple of4 seconds14!
  timer 1 2
  timer 1 10 msg $chan 3You can now4 pj3 again!
  timer 1 10 /unset %pj $nick

}
alias -l Money {
  if ($len($1) > 9) {
    var %x = $remove($right($1,9),$right($1,7))
    return $+($remove($1,$right($1,9)),$chr(44),%x,B)
  }
  elseif ($len($1) > 6) {
    var %x = $remove($right($1,6),$right($1,5))
    return $+($remove($1,$right($1,6)),$chr(44),%x,M)
  }
  elseif ($len($1) > 3) {
    var %x = $remove($right($1,3),$right($1,2))
    return $+($remove($1,$right($1,3)),$chr(44),%x,K)
  }
  else return $+($1,GP)
}


on *:TEXT:!cash:#:{ 
  notice $nick 4 $nick 14you have made a total of14 [4 $money(%totalprice [ $+ [ $nick ] ]) 14 $+ $chr(93) so far! 

}

on *:TEXT:@cash:#:{

  msg $chan 4 $nick 14 has made a total of14 [4 $money(%totalprice [ $+ [ $nick ] ]) 14] so far! 

}

ON *:TEXT:!cash*:#:{

  if ($2 == $null) {
    notice $nick $left($1,1) $+ its !cash (Nick)
    halt
  }
  if ($2 ison $chan) {
    notice $nick 4 $2 14 has made a total of14 [4 $money(%totalprice [ $+ [ $2 ] ]) 14] so far!     
    halt
  }
  else {
    notice $nick Sorry he/she must be on the channel
  }
}