Wyświetl Pojedyńczy Post
Stary 03-06-2006, 16:48   #3
Fistus
 
Reputacja: 5 Fistus wkrótce będzie znany
$: 34 310
Znajdował się na baaardzo starym serverze LI.
Kod:
[script]
n0=on 1:text:*d*:#: {
n1=  set %screen a b c e f g h i j k l m n o p q r s t u v w y z
n2=  set %x 1
n3=  :scan
n4=  if ($gettok(%screen,%x,32) isin $1-) { /halt }
n5=  inc %x 1
n6=  if ($gettok(%screen,%x,32) != $null) { goto scan }
n7=  :prestart
n8=  if (($count($1-,d) > 1) || ($count($1-,+) > 1) || ($count($1-,-) > 1) || ($count($1-,x) > 1)) { /msg $chan Too many parameters $nick $+ . | /halt }
n9=  if (d isin $1) { /set %raw $1 | /set %sets 1 }
n10=  else if (d isin $2)  { /set %raw $2 | /set %sets $1 }
n11=  if (%sets !isnum) { /msg $chan %sets is not a valid number $nick $+ . | /halt }
n12=  if (%sets > 12) { /msg $chan 12 sets of dice maximum per roll $nick $+ . | /halt }
n13=  set %checkset 0
n14=  %multiply = 1
n15=  %modifier = 0
n16=  :begin
n17=  inc %checkset 1
n18=  if %checkset > %sets goto final
n19=  %result = 0
n20=  :filter1
n21=  if (x isin %raw) { set %multiply $gettok(%raw,2,120) | set %raw $remtok(%raw,%multiply,120) }
n22=  if (+ isin %raw) { set %modifier $gettok(%raw,2,43) | set %raw $remtok(%raw,%modifier,43) }
n23=  else if (- isin %raw) { set %modifier $gettok(%raw,2,45) | set %raw $remtok(%raw,%modifier,45) | set %modifier - $+ %modifier }
n24=  if (%modifier !isnum) { /msg $chan %modifier is not a valid number $nick $+ . | /halt }
n25=  if (%multiply !isnum) { /msg $chan %multiply is not a valid number $nick $+ . | /halt }
n26=  if ($len(%modifier) > 6) { /msg $chan That modifier is too large $nick $+ . | /halt }
n27=  if (%multiply > 20) { /msg $chan That multiplier is too large $nick $+ . | /halt }
n28=  :filter2
n29=  if ($left(%raw,1) isnum) {
n30=    set %sides $gettok(%raw,2,100)
n31=    set %times $gettok(%raw,1,100)
n32=  }
n33=  else { %sides = $remove(%raw,d) | %times = 1 }
n34=  if (%sides !isnum) { /msg $chan %sides is not a valid number $nick $+ . | /halt }
n35=  if ($len(%sides) > 6) { /msg $chan There are too many sides on that die $nick $+ . | /halt }
n36=  if (%times !isnum) { /msg $chan %times is not a valid number $nick $+ . | /halt }
n37=  if (%times > 1000) { /msg $chan 1000 dice of any type maximum $nick $+ . | /halt }
n38=  set %checkresult 0
n39=  :rolldice
n40=  inc %checkresult 1
n41=  if %checkresult > %times goto process
n42=  else { %result = %result + $rand(1,%sides) | goto rolldice }
n43=  :process
n44=  if (%modifier != 0) { %result = %result + %modifier }
n45=  if (%multiply != 1) { %result = %result * %multiply }
n46=  set %total %total %result
n47=  goto begin
n48=  :final
n49=  /describe $chan throws the bones for $nick ( $+ $1- $+ ) and gets %total $+ .
n50=  /unset %total
n51=}
Zapisz to jako dice.ini i wsio.
 
__________________
"A flame which never dies, but brightens with the passing of time."
O... kłótniach w necie
O... ;)
Fistus jest offline   Odpowiedź z Cytowaniem