/Service witch { /Function { ;ウィッチタロー用ボット ;制作:彬兄 2002.10.3 ;(c)冒険企画局 1991 /init { /set @taro ( 0.THE TRICKSTER,1.THE STAR,2.THE PRINCESS,3.THE STAFF,4.H~YUKIRIA,5.THE LOVERS,6.BLOOD,7.THE SUN,8.THE CAT,9.THE FAIRY,10.THE WIND,11.THE POISON,12.THE DREAM,13.THE NIGHTMARE,14.THE BALANCE,15.THE MOON,16.THE GEM,17.SWORD,18.STORM,19.DRAGON,20.THE DEEP SPACE,21.THE SEA,22.THE WITCH,23.SILVER,24.THE RIVER,25.GOLD,26.THE SKY,27.THE WARRIOR,28.THE FOREIGNER ) } /taro { ;%str2に引数を代入 $divide( $msg , " " , str ) /if ( %str0 == 1 ) { /set %str2 1 } ;引数が数字じゃなかったら入力間違いなので処理やめる /if ($isnum(%str2)==0) { /privmsg $chan USAGE: "#taro X" (X is a number) /halt } ;引く枚数が多すぎたら処理やめる /if (%str2>5) { /privmsg $chan USAGE: "#taro X" (X is 1-5) /halt } ;引く数が少なすぎても処理やめる /if (%str2<1) { /privmsg $chan USAGE: "#taro X" (X is 1-5) /halt } /set %int1 1 /set %yama "0.1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28" :drawstart /set %int2 $rand(0,$counttok(%yama,46)-1) ;%int2 に乱数を発生 ;/privmsg $chan %int2 /set %yama $remtok( %yama , %int2 , 46 ) ;だぶらないように引いたカードを削除 /privmsg $chan $nick gets " @taro[ %int2 ] " card %int1 = %int1 + 1 /if ( %int1 > %str2) { /halt } /goto drawstart } /skill { ;%str2に引数を代入 $divide( $msg , " " , str ) /if ( %str0 == 1 ) { /set %str2 1 } ;引数が数字じゃなかったら入力間違いなので処理やめる /if ($isnum(%str2)==0) { /privmsg $chan USAGE: "#skill X" (X is a number) /halt } ;引く枚数が多すぎたら処理やめる /if (%str2>10) { /privmsg $chan USAGE: "#skill X" (X is 1-10) /halt } ;引く数が少なすぎても処理やめる /if (%str2<1) { /privmsg $chan USAGE: "#skill X" (X is 1-5) /halt } /set %output "$nick :" /set %hit 0 /set %int 0 :skillstart %int = %int + 1 /set %int1 $rand(1,6) /set %int2 $rand(1,6) /if ( %int1 == %int2 ) { /set %output "%output \[ $+ %int1 $+ , $+ %int2 $+ \]" %hit = %hit + 1 } else { /set %output "%output ( $+ %int1 $+ , $+ %int2 $+ )" } /if ( %str2 == %int ) { /privmsg $chan %output : %hit hit! /halt } /goto skillstart } /maho { /set %int1 $rand(1,6) /set %int2 $rand(1,6) %int3 = %int1 * %int2 /privmsg $chan $nick : ( $+ %int1 $+ * $+ %int2 $+ ) = %int3 /halt } /dice { ;%str2に引数を代入 $divide( $msg , " " , str ) /if ( %str0 == 1 ) { /set %str2 1 } ;引数が数字じゃなかったら入力間違いなので処理やめる /if ($isnum(%str2)==0) { /privmsg $chan USAGE: "#dice X" (X is a number) /halt } ;引く枚数が多すぎたら処理やめる /if (%str2>4) { /privmsg $chan USAGE: "#dice X" (X is 1-4) /halt } ;引く数が少なすぎても処理やめる /if (%str2<1) { /privmsg $chan USAGE: "#taro X" (X is 1-5) /halt } /set %int 1 /set %sum 0 /set %output "$nick : (" :dicestart /set %int1 $rand(1,6) /set %output "%output $+ %int1" %int = %int + 1 %sum = %sum + %int1 if (%int>%str2) { /set %output "%output $+ ) = %sum" /privmsg $chan %output } else { /set %output "%output $+ ," /goto dicestart } } } /Event { on * : TEXT : #tarot* : * : /taro on * : TEXT : #skill* : * : /skill on * : TEXT : #maho : * : /maho on * : TEXT : #dice* : * : /dice } /Access { } /PopupMain { } /PopupUser { } /PopupChannel { } } /Var {