Hey Forum,
I have a dicebot and wish to place two tweaks on it.
1- I want it to be able to idle in multiple rooms but only be actively working in the one i choose.
2- After everyone gives their init, i'd like the bot to be able to put them in order so we dont have to fiddle around finding out who goes first.
Here is my simple bot
menu nicklist {
Dice [ %DS ]
.ON:/set %DS ON | .enable #dice
.OFF:/set %DS OFF | .disable #dice
.-
}
#dice on
menu nicklist {
roll
.dice:/set %sdce 0 | /dice $?="how many dice" $$?="difficulty" $$me $?="what are you doing or leave blank"
.Sdice:/set %sdce 1 | /dice $?="how many dice" $$?="difficulty" $$me $?="what are you doing or leave blank"
.Xdice:/set %sdce 2 | /dice $?="how many dice" $$?="difficulty" $$me $?="what are you doing or leave blank"
.Init:/init $?="# of dice in dex" $$?="# of dots in wits"
.Spirit of Fray init:/sinit $?="# of dice in dex" $$?="# of dots in wits" $$?="Gnosis rating"
}
on *:text:!dice*:#:/set %sdce 0 | /dice $2 $3 $nick $4-
on *:text:!sdice*:#:/set %sdce 1 | /dice $2 $3 $nick $4-
on *:text:!xdice*:#:/set %sdce 2 | /dice $2 $3 $nick $4-
on *:TEXT:!init*:#:/init $2 $3
on *:TEXT:!sinit*:#:/sinit $2 $3 $4
alias dice {
/unset %curroll
/unset %total
/set %scc 0
/set %btch 0
/set %tn 0
/set %nin 0
/set %rt 0
/set %rp $1
/set %ru $1
/set %dff $2
:roll
if (%rt < %ru) { /set %curroll $rand(1,10) | /set %total %total 12-14 %curroll | inc %rt | goto eval }
else { goto eval2 }
:eval
if (%curroll >= %dff) { /inc %scc 1 }
if (%curroll == 1) { /inc %btch 1 }
if (%curroll == 10) { /inc %tn 1 }
if (%curroll == 9) { /inc %nin 1 }
goto roll
:eval2
if (%sdce == 0) { goto post }
elseif (%sdce == 1) { goto sdice }
elseif (%sdce == 2) { goto xdice }
:sdice
/set %rt 0
/set %ru %tn
/set %total %total 12[5rerolling14 %tn 5tens12]5=
:sroll
if (%rt < %ru) { /set %curroll $rand(1,10) | /set %total %total 12-14 %curroll | inc %rt | goto eval3 }
else { goto post }
:eval3
if (%curroll >= %dff) { /inc %scc 1 }
if (%curroll == 10) { /inc %ru 1 }
goto sroll
:xdice
/set %rt 0
/set %ru $calc(%tn + %nin)
/set %total %total 12[5rerolling14 %nin 5nines &14 %tn 5tens12]5=
:xroll
if (%rt < %ru) { /set %curroll $rand(1,10) | /set %total %total 12-14 %curroll | inc %rt | goto eval4 }
else { goto post }
:eval4
if (%curroll >= %dff) { /inc %scc 1 }
if (%curroll >= 9) { /inc %ru 1 }
goto xroll
:post
/set %tscc [ %scc - %btch ]
if (%tscc >= 1) { /set %result Success!!! | goto post2 }
elseif (%tscc < 1) { /set %result Fail!!! | goto botch }
:botch
if ( %scc <= 0 ) && ( %btch >= 1 ) { /set %result BOTCH!!!! | goto post2 }
else { goto post2 }
:post2
/describe # $nick rolls14 %rp 12dice at a difficulty of14 %dff 12to:14 $4-
/describe # %total
/describe # 14success's =12 %scc 14Botches =12 %btch 5:14Total =12 %tscc 14Result12 %result
halt
}
alias init {
unset %calc
unset %rand
set %rand $rand(1,10)
set %calc $calc($1 + $2 + %rand)
/describe # 14 $nick $+ 's Dex:12 $1 $+ ,14 Wits:12 $2 14plus Init Roll:12 %rand $+ . 14Initiative =12 %calc
halt
}
alias sinit {
unset %calc
unset %rand
set %rand $rand(1,10)
set %calc $calc( 10 + $1 + $2 + (10*$3) + %rand )
/describe # 14 $nick $+ 's Dex:12 $1 $+ , 14Wits:12 $2 $+ , 14Init Roll:12 %rand $+ ,14 Gnosis extra:12 $3 14(times 10), Spirit of the Fray (Auto 10). Initiative =12 %calc
halt
}
#Dice off
Thanks for the help guys