So I've gotten done editing it, and here's the things I've added: A menu script, a color code for msg's, a use for the %owner, and some kill-operater/adding kill-op commands. Plus I fixed some of the major bugs I missed, so it should work now. But a word of warning, I haven't got a chance to test this newer one much. But I'm pretty sure it'll work. So just type Alt + R and paste this into your remotes. If you need a run down on all of the commands, just type !kcommands. I don't care what you do with the script, as long as you don't reproduce it, or claim it as your own. If you do rip it, please give me credit ¯~¯
The script went from being almost 500 lines, to almost 600 ;x
Also, I didn't make the unban all script in there (should be Alias ub), but I don't remember who did, so who ever made it, thank you. :|
on *:load:{
owner
color
}
menu channel {
Killer
.Set bot owner:/owner
.Set msg color:/color
.Troubleshoot:msgg %~mc there was some problems, and we're now trouble shooting, this means we're starting over. | unset %~* | msg %~mc someone type !killer to begin anew
}
alias msgg { msg $1 $+ %color $+ $2- }
alias owner {
if (!$1) { set %owner $$?="Owner of the bot(To change, type /owner):" }
else { set %owner $1 }
}
alias color {
if (!$1) { set %color $$?="Color of the messages [please do something like '4,1' or '13']" $+ | echo -a The color was changed to $+ %color $+ this. To change type /color }
else { set %color $1 | echo -a the color was changed to $+ %color $+ this. To change, type /color }
}
alias check_kill {
if (%~playas == 2) { msgg %~mc Looks like most of the players have been killed off, the killer was %~the_killer $+ , because you weren't smart enough to vote him out, oh well, you guys lose. | /part %~killchan | mode %~mc -m | unset %~* }
}
alias ub {
if ($me isop %~killchan) {
var %~i = 1, %~bans
while (%~i <= $ibl(%~killchan,0)) {
%~bans = %~bans $ibl($chan,%~i)
if ($numtok(%~bans,32) == $modespl) {
mode %~killchan - $+ $str(b,$numtok(%~bans,32)) %~bans
%~bans = ""
}
inc %~i
}
if (%~bans) mode %~killchan - $+ $str(b,$numtok(%~bans,32)) %~bans
}
}
alias set_roles {
set %~killchan #killer $+ $r(1000,9999)
join %~killchan
ub
mode %~killchan +p
mode %~killchan +s
set %~knum $r(1,%~playas)
set %~p1role $r(1,%~playas)
set %~p2role $r(1,%~playas)
set %~p3role $r(1,%~playas)
if (%~p4) { set %~p4role $r(1,%~playas) }
if (%~p5) { set %~p5role $r(1,%~playas) }
if (%~p6) { set %~p6role $r(1,%~playas) }
if (%~p7) { set %~p7role $r(1,%~playas) }
if (%~p8) { set %~p8role $r(1,%~playas) }
if (%~p9) { set %~p9role $r(1,%~playas) }
if (%~p10) { set %~p10role $r(1,~%~playas) }
if (%~p1role == %~knum) {
set %~the_killer %~p1
set %~p1role Killer
unset %~knum
msgg %~p1 You are the killer, please /join %~killchan
}
else {
set %~p1role Normal
msgg %~p1 You are a normal person, watch out, the killer migt get you!
}
if (%~p2role == %~knum) {
set %~the_killer %~p2
set %~p2role Killer
unset %~knum
msgg %~p2 You are the killer, please /join %~killchan
}
else {
set %~p2role Normal
msgg %~p2 You are a normal person, watch out, the killer might get you!
}
if (!%~p4 && %~knum) {
set %~the_killer %~p3
set %~p3role Killer
unset %~knum
msgg %~p3 You are the killer, please /join %~killchan
goto skip
}
if (%~p3role == %~knum) {
set %~the_killer %~p3
set %~p3role Killer
unset %~knum
msgg %~p3 You are the killer, please /join %~killchan
goto skip
}
if (%~p3role != %~knum) {
set %~p3role Normal
msgg %~p3 You are a normal person, watch out, the killer might get you!
goto skip
}
:skip
if (%~p4) {
if (!%~p5 && %~knum) {
set %~the_killer %~p4
set %~p4role Killer
unset %~knum
msgg %~p4 You are the killer, please /join %~killchan
goto skip2
}
if (%~p4role == %~knum) {
set %~the_killer %~p4
set %~p4role Killer
unset %~knum
msgg %~p4 You are the killer, please /join %~killchan
goto skip2
}
if (%~p4role != %~knum) {
set %~p4role Normal
msgg %~p4 You are a normal person, watch out, the killer might get you!
goto skip2
}
}
:skip2
if (%~p5) {
if (!%~p6 && %~knum) {
set %~the_killer %~p5
set %~p5role Killer
unset %~knum
msgg %~p5 You are the killer, please /join %~killchan
goto skip3
}
if (%~p5role == %~knum) {
set %~the_killer %~p5
set %~p5role Killer
unset %~knum
msgg %~p5 You are the killer, please /join %~killchan
goto skip3
}
if (%~p5role != %~knum) {
set %~p5role Normal
msgg %~p5 You are a normal person, watch out, the killer might get you!
goto skip3
}
}
:skip3
if (%~p6) {
if (!%~p7 && %~knum) {
set %~the_killer %~p6
set %~p6role Killer
unset %~knum
msgg %~p6 You are the killer, please /join %~killchan
goto skip4
}
if (%~p6role == %~knum) {
set %~the_killer %~p6
set %~p6role Killer
unset %~knum
msgg %~p6 You are the killer, please /join %~killchan
goto skip4
}
if (%~p6role != %~knum) {
set %~p6role Normal
msgg %~p6 You are a normal person, watch out, the killer might get you!
goto skip4
}
}
:skip4
if (%~p7) {
if (!%~p8 && %~knum) {
set %~the_killer %~p7
set %~p7role Killer
unset %~knum
msgg %~p7 You are the killer, please /join %~killchan
goto skip5
}
if (%~p7role == %~knum) {
set %~the_killer %~p7
set %~p7role Killer
unset %~knum
msgg %~p7 You are the killer, please /join %~killchan
goto skip5
}
if (%~p7role != %~knum) {
set %~p7role Normal
msgg %~p7 You are a normal person, watch out, the killer might get you!
goto skip5
}
}
:skip5
if (%~p8) {
if (!%~p9 && %~knum) {
set %~the_killer %~p8
set %~p8role Killer
unset %~knum
msgg %~p8 You are the killer, please /join %~killchan
goto skip6
}
if (%~p8role == %~knum) {
set %~the_killer %~p8
set %~p8role Killer
unset %~knum
msgg %~p8 You are the killer, please /join %~killchan
goto skip6
}
if (%~p8role != %~knum) {
set %~p8role Normal
msgg %~p8 You are a normal person, watch out, the killer might get you!
oto skip6
}
}
:skip6
if (%~p9) {
if (!%~p10 && %~killerchance) {
set %~the_killer %~p9
set %~p9role Killer
unset %~knum
msgg %~p9 You are the killer, please /join %~killchan
goto skip7
}
if (%~p9role == %~knum) {
set %~the_killer %~p9
set %~p9role Killer
unset %~knum
msgg %~p9 You are the killer, please /join %~killchan
goto skip7
}
if (%~p9role != %~knum) {
set %~p9role Normal
msgg %~p9 You are a normal person, watch out, the killer might get you!
goto skip7
}
}
:skip7
if (%~p10) {
if (%~killchance) {
set %~the_killer %~p10
set %~p10role Killer
unset %~knum
msgg %~p10 You are the killer, please /join %~killchan
}
else {
set %~p10role Normal
msgg %~p10 You are a normal person, watch out, the killer might get you!
}
}
}
on *:text:!Killer:#:{
if (%~Killer == on) { msgg # There's already a game going. | inc %games | set %msgguiy on }
else {
if (!%games) { msgg # This is the first time the Killer Game (By Trikloa/Fluffy), has been activated on this bot! :D }
msgg # $nick would like to play a game of Killer, if you would like to play, please type !join
set %~killer on
msgg # $nick $+ , once atleast four people have joined, type !start
msgg # But be careful, once you type !start, no one else can join, so use it wisely.
if (%msgguiy) { msgg # %games total games have been played on this bot so far! }
inc %games
inc %~playas
set %~p1 $nick
set %~gamea %~p1
set %~gameb %~p1
set %~mainplayer $nick
mode # +v $nick
set %~mc $chan
}
}
on *:text:!Join:%~mc:{
if (!%~killer) { msgg # There isn't a game going on, type !killer to start one }
elseif (%~started) { msgg # Sorry $nick $+ , they've already started a game, try again after this one is over. }
elseif (%~playas == 10) { msgg # Sorry $nick $+ , there are already 10 players, try joining once this game is over. }
elseif ($nick isin %~gameb) { msgg # Sorry $nick $+ , you've already joined. }
else {
inc %~playas
set %~p [ $+ [ %~playas ] ] $nick
set %~gamea %~gamea $+ . $+ %~p [ $+ [ %~playas ] ]
set %~gameb %~gameb %~p [ $+ [ %~playas ] ]
msgg # %~p [ $+ [ %~playas ] ] has joined the game. Total players: %~gameb $+ , which means there are %~playas players!
}
}
on *:text:!start:%~mc:{
if (!%~killer) { msgg # No one has used the !killer command yet. }
elseif (%~started) { msgg # There's already a game started }
elseif (%~playas < 4) { msgg # There aren't enough players }
elseif ($nick != %~mainplayer) { msgg # You can't say start, only %~mainplayer can, since they started the game. }
else {
set %~started on
set_roles
.timer 1 2 msgg # The night has begun, once the killer makes his move, you will be able to vote on who you think it is.
if ($me !isreg # && $me !isvoice #) {
mode # +m
mode # +v %~p2
mode # +v %~p3
mode # +v %~p4
mode # +v %~p5
mode # +v %~p6
mode # +v %~p7
mode # +v %~p8
mode # +v %~p9
mode # +v %~p10
}
}
}
on *:join:%~killchan:{
if ($nick != %~the_killer && $nick != $me) { ban -k # $nick 2 Sorry $Nick $+ , you are not the killer }
elseif ($nick != $me) { msgg # Hello $nick $+ , please type !kill <Victim> ; The victim must be playing in order for you to kill them, here's the list of players: $remove(%~gameb,$nick) }
}
on *:text:!Kill *:%~killchan:{
if (%~paused) { msgg # The game is currently paused }
elseif (%~killed) { msgg # Sorry $nick $+ , you've just killed someone, let the people vote }
elseif ($2 !isin %~gameb) { msgg # $2 isn't playing, sorry $nick $+ . }
elseif ($nick == $2) { msgg # You can't kill yourself!!! }
else {
set %~victy $2
mode %~mc -v $2
set %~killed on
msgg # $nick $+ , the other players are about to vote in %~mc $+ , go ahead and vote with them, to lower your suspicions.
set %~p1vote 0
set %~p2vote 0
set %~p3vote 0
if (%~p4) { set %~p4vote 0 }
if (%~p5) { set %~p5vote 0 }
if (%~p6) { set %~p6vote 0 }
if (%~p7) { set %~p7vote 0 }
if (%~p8) { set %~p8vote 0 }
if (%~p9) { set %~p9vote 0 }
if (%~p10) { set %~p10vote 0 }
dec %~playas
check_kill
if (%~killer) {
if ($2 == %~p1) { unset %~p1 | unset %~p1vote | unset %~p1role }
if ($2 == %~p2) { unset %~p2* }
if ($2 == %~p3) { unset %~p3* }
if ($2 == %~p4) { unset %~p4* }
if ($2 == %~p5) { unset %~p5* }
if ($2 == %~p6) { unset %~p6* }
if ($2 == %~p7) { unset %~p7* }
if ($2 == %~p8) { unset %~p8* }
if ($2 == %~p9) { unset %~p9* }
if ($2 == %~p10) { unset %~p10* }
msgg %~mc You may now commence in voting, please type !vote (option). Once %~playas votes have been submitted (one vote per player), the votes will be judged up. Here are the results so far (The number for the player is to thr right of their name): %~p1 %~p1vote %~p2 %~p2vote %~p3 %~p3vote %~p4 %~p4vote %~p5 %~p5vote %~p6 %~p6vote %~p7 %~p7vote %~p8 %~p8vote %~p9 %~p9vote %~p10 %~p10vote
set %~gameb $remove(%~gameb,$2)
}
}
}
on *:text:!vote *:%~mc:{
if (%~paused) { msgg # The game is currently paused }
elseif (!%~killed) { msgg # Sorry $nick $+ , the killer has made their move yet. }
elseif ($nick !isin %~gameb) { msgg # You aren't playing $nick }
elseif (%~v [ $+ [ $nick ] ]) { msgg # You've already voted $nick }
elseif ($2 !isin %~gamea) { msgg # $2 is not a pickable option }
else {
if ($2 == %~p1) { inc %~p1vote }
if ($2 == %~p2) { inc %~p2vote }
if ($2 == %~p3) { inc %~p3vote }
if ($2 == %~p4) { inc %~p4vote }
if ($2 == %~p5) { inc %~p5vote }
if ($2 == %~p6) { inc %~p6vote }
if ($2 == %~p7) { inc %~p7vote }
if ($2 == %~p8) { inc %~p8vote }
if ($2 == %~p9) { inc %~p9vote }
if ($2 == %~p10) { inc %~p10vote }
inc %~vote
set %~v $+ $nick $+ v yes
msgg # Current data: %~p1 %~p1vote %~p2 %~p2vote %~p3 %~p3vote %~p4 %~p4vote %~p5 %~p5vote %~p6 %~p6vote %~p7 %~p7vote %~p8 %~p8vote %~p9 %~p9vote %~p10 %~p10vote
set %~votecheck %~playas
if (%~vote == %~votecheck) {
if (%~p1) {
if (%~p1vote == 10) { set %~p1vote %~p1vote }
else { set %~p1vote 0 $+ %~p1vote }
}
if (%~p2) {
if (%~p2vote == 10) { set %~p2vote %~p2vote }
else { set %~p2vote 0 $+ %~p2vote }
}
if (%~p3) {
if (%~p3vote == 10) { set %~p3vote %~p3vote }
else { set %~p3vote 0 $+ %~p3vote }
}
if (%~p4) {
if (%~p4vote == 10) { set %~p4vote %~p4vote }
else { set %~p4vote 0 $+ %~p4vote }
}
if (%~p5) {
if (%~p5vote == 10) { set %~p5vote %~p5vote }
else { set %~p5vote 0 $+ %~p5vote }
}
if (%~p6) {
if (%~p6vote == 10) { set %~p6vote %~p6vote }
else { set %~p6vote 0 $+ %~p6vote }
}
if (%~p7) {
if (%~p7vote == 10) { set %~p7vote %~p7vote }
else { set %~p7vote 0 $+ %~p7vote }
}
if (%~p8) {
if (%~p8vote == 10) { set %~p8vote %~p8vote }
else { set %~p8vote 0 $+ %~p8vote }
}
if (%~p9) {
if (%~p9vote == 10) { set %~p9vote %~p9vote }
else { set %~p9vote 0 $+ %~p9vote }
}
if (%~p10) {
if (%~p10vote == 10) { set %~p10vote %~p10vote }
else { set %~p10vote 0 $+ %~p10vote }
}
if (%~p1) { writeini killer.ini vote %~p1vote %~p1 }
if (%~p2) { writeini killer.ini vote %~p2vote %~p2 }
if (%~p3) { writeini killer.ini vote %~p3vote %~p3 }
if (%~p4) { writeini killer.ini vote %~p4vote %~p4 }
if (%~p5) { writeini killer.ini vote %~p5vote %~p5 }
if (%~p6) { writeini killer.ini vote %~p6vote %~p6 }
if (%~p7) { writeini killer.ini vote %~p7vote %~p7 }
if (%~p8) { writeini killer.ini vote %~p8vote %~p8 }
if (%~p9) { writeini killer.ini vote %~p9vote %~p9 }
if (%~p10) { writeini killer.ini vote %~p10vote %~p10 }
if ($mid($sorttok($iif(%~p1vote, %~p1vote $+ .) $+ $iif(%~p2vote, %~p2vote $+ .) $+ $iif(%~p3vote, %~p3vote $+ .) $+ $iif(%~p4vote, . $+ %~p4vote $+ .) $+ $iif(%~p5vote, %~p5vote $+ .) $+ $iif(%~p6vote, %~p6vote $+ .) $+ $iif(%~p7vote, %~p7vote $+ .) $+ $iif(%~p8vote, %~p8vote $+ .) $+ $iif(%~p9vote, %~p9vote $+ .) $+ $iif(%~p10vote, %~p10vote),46,nr),1,2) == $mid($sorttok($iif(%~p1vote, %~p1vote $+ .) $+ $iif(%~p2vote, %~p2vote $+ .) $+ $iif(%~p3vote, %~p3vote $+ .) $+ $iif(%~p4vote, . $+ %~p4vote $+ .) $+ $iif(%~p5vote, %~p5vote $+ .) $+ $iif(%~p6vote, %~p6vote $+ .) $+ $iif(%~p7vote, %~p7vote $+ .) $+ $iif(%~p8vote, %~p8vote $+ .) $+ $iif(%~p9vote, %~p9vote $+ .) $+ $iif(%~p10vote, %~p10vote),46,nr),4,5)) {
msgg # Try getting a result where there aren't any ties.
if (%~p1) && (%~p1 isin %~gameb) { set %~p1vote 0 }
if (%~p2) && (%~p2 isin %~gameb) { set %~p2vote 0 }
if (%~p3) && (%~p3 isin %~gameb) { set %~p3vote 0 }
if (%~p4) && (%~p4 isin %~gameb) { set %~p4vote 0 }
if (%~p5) && (%~p5 isin %~gameb) { set %~p5vote 0 }
if (%~p6) && (%~p6 isin %~gameb) { set %~p6vote 0 }
if (%~p7) && (%~p7 isin %~gameb) { set %~p7vote 0 }
if (%~p8) && (%~p8 isin %~gameb) { set %~p8vote 0 }
if (%~p9) && (%~p9 isin %~gameb) { set %~p9vote 0 }
if (%~p10) && (%~p10 isin %~gameb) { set %~p10vote 0 }
unset %~v*v
set %~vote 0
msgg # Current data: %~p1 %~p1vote %~p2 %~p2vote %~p3 %~p3vote %~p4 %~p4vote %~p5 %~p5vote %~p6 %~p6vote %~p7 %~p7vote %~p8 %~p8vote %~p9 %~p9vote %~p10 %~p10vote
halt
}
set %~The_Victim $readini(killer.ini,vote,$mid($sorttok($iif(%~p1vote, %~p1vote $+ .) $+ $iif(%~p2vote, %~p2vote $+ .) $+ $iif(%~p3vote, %~p3vote $+ .) $+ $iif(%~p4vote, . $+ %~p4vote $+ .) $+ $iif(%~p5vote, %~p5vote $+ .) $+ $iif(%~p6vote, %~p6vote $+ .) $+ $iif(%~p7vote, %~p7vote $+ .) $+ $iif(%~p8vote, %~p8vote $+ .) $+ $iif(%~p9vote, %~p9vote $+ .) $+ $iif(%~p10vote, %~p10vote),46,nr),1,2))
mode %~mc -v %~the_victim
msgg # %~the_victim was voted on the most
if (%~the_victim == %~the_killer) {
msgg # Congrats normal players, you voted on the correct one. %~the_victim was infact the killer!! You guys win!!!!
part %~killchan
unset %~*
msgg # To start a new game, type !killer
mode # -m
}
else {
unset %~killed
unset %~the_victim
msgg # Sorry, you didn't kill the killer, they're still on the lose!!! Try to vote correctly next time, so we can stop this horrible charade!!!
if (%~p1) && (%~p1 isin %~gameb) { set %~p1vote 0 }
else { unset %~p1 | unset %~p1vote }
if (%~p2) && (%~p2 isin %~gameb) { set %~p2vote 0 }
else { unset %~p2 | unset %~p2vote }
if (%~p3) && (%~p3 isin %~gameb) { set %~p3vote 0 }
else { unset %~p3 | unset %~p3vote }
if (%~p4) && (%~p4 isin %~gameb) { set %~p4vote 0 }
else { unset %~p4 | unset %~p4vote }
if (%~p5) && (%~p5 isin %~gameb) { set %~p5vote 0 }
else { unset %~p5 | unset %~p5vote }
if (%~p6) && (%~p6 isin %~gameb) { set %~p6vote 0 }
else { unset %~p6 | unset %~p6vote }
if (%~p7) && (%~p7 isin %~gameb) { set %~p7vote 0 }
else { unset %~p7 | unset %~p7vote }
if (%~p8) && (%~p8 isin %~gameb) { set %~p8vote 0 }
else { unset %~p8 | unset %~p8vote }
if (%~p9) && (%~p9 isin %~gameb) { set %~p9vote 0 }
else { unset %~p9 | unset %~p9vote }
if (%~p10) && (%~p10 isin %~gameb) { set %~p10vote 0 }
else { unset %~p10 | unset %~p10vote }
unset %~v*v
dec %~playas
set %~gameb $remove(%~gameb,%~the_victim)
if (%~the_victim == %~p1) { unset %~p1 | %~p1vote | unset %~p1role }
if (%~the_victim == %~p2) { unset %~p2* }
if (%~the_victim == %~p3) { unset %~p3* }
if (%~the_victim == %~p4) { unset %~p4* }
if (%~the_victim == %~p5) { unset %~p5* }
if (%~the_victim == %~p6) { unset %~p6* }
if (%~the_victim == %~p7) { unset %~p7* }
if (%~the_victim == %~p8) { unset %~p8* }
if (%~the_victim == %~p9) { unset %~p9* }
if (%~the_victim == %~p10) { unset %~p10* }
msgg %~killchan %~the_killer $+ , you may use the !kill command now. Here's the current players: $Remove(%~gameb,%~the_killer)
}
}
}
}
on *:text:!kadd *:#:{
if ($nick == %owner) {
if (!$2) { msgg # $nick $+ , you can't add no one as a kill-operater }
elseif ($2 !ison #) { msgg # $2 isn't on the channel, you eithered spelled their name wrong, or you should wait for them to return. }
else { auser 10 $2 | msgg # $2 has been added as a kill-operater }
}
else { msgg # Sorry $Nick $+ , you are not the bot founder. }
}
on *:text:!kend:%~mc:{
if ($nick != %owner && $ulevel < 10 && $nick != %~mainplayer) { msgg # Sorry $Nick $+ , you are not able to use that command. | halt }
if ($nick == %owner) { goto endgame }
if ($ulevel >= 10) { goto endgame }
if ($nick == %~mainplayer) { goto endgame }
:endgame
msgg # $nick has requested that the current game be ended. | unset %~*
}
on *:text:!kdelete *:%~mc:{
if ($nick != %owner && $ulevel < 10 && $nick != %~mainplayer) { msgg # Sorry $Nick $+ , you are not able to use that command. | halt }
if ($nick == %owner) {
if (!$2) { msgg # You can't remove nobody. }
else { goto remove }
}
if ($ulevel >= 10) {
if (!$2) { msgg # You can't remove nobody. }
else { goto remove }
}
if ($nick == %~mainplayer) {
if (!$2) { msgg # You can't remove nobody. }
else { goto remove }
}
:remove
if ($2 !ison #) { msgg # $2 isn't even here $nick }
elseif ($2 !isin %~gameb) { msgg # $2 isn't playing. }
else {
if ($2 == %~p1) { unset %~p1 | unset %~p1vote | unset %~p1role | unset %~mainplayer | goto remove2 }
if ($2 == %~p2 { unset %~p2* | goto remove2 }
if ($2 == %~p3 { unset %~p3* | goto remove2 }
if ($2 == %~p4 { unset %~p4* | goto remove2 }
if ($2 == %~p5 { unset %~p5* | goto remove2 }
if ($2 == %~p6 { unset %~p6* | goto remove2 }
if ($2 == %~p7 { unset %~p7* | goto remove2 }
if ($2 == %~p8 { unset %~p8* | goto remove2 }
if ($2 == %~p9 { unset %~p9* | goto remove2 }
if ($2 == %~p10 { unset %~p10* | goto remove2 }
:remove2
set %~gameb $remove(%~gameb,$2)
msgg # $2 has been removed from the game.
check_kill
if (%~killer) { msgg # Current Players: %~gameb }
}
}
on *:text:!kdelete *:#:{
if ($nick == %owner) {
if (!$2) { msgg # You can't delete nothing from the user list }
else { ruser $2 | MSGg # $2 has been removed as a kill-operater }
}
else { msgg # Sorry $nick $+ , you're unable to use this command. }
}
on *:part:%~mc:{
if ($nick isin %~gameb) {
msgg # $nick has left the channel, pausing the game.
set %~pausedd on
set %~wait $+ $nick on
}
}
on *:join:%~mc:{
if (%~wait [ $+ [ $nick ] ]) { msgg # Resuming the game | unset %~wait* | unset %~pausedd }
}
on *:quit:{
if ($nick ison %~mc) && ($nick isin %~gameb) {
msgg # $nick has quit, removing them from the game
if ($nick == %~p1) { unset %~p1 | unset %~p1vote | unset %~p1role | unset %~mainplayer | goto remove2 }
if ($nick == %~p2) { unset %~p2* | goto remove23 }
if ($nick == %~p3) { unset %~p3* | goto remove23 }
if ($nick == %~p4) { unset %~p4* | goto remove23 }
if ($nick == %~p5) { unset %~p5* | goto remove23 }
if ($nick == %~p6) { unset %~p6* | goto remove23 }
if ($nick == %~p7) { unset %~p7* | goto remove23 }
if ($nick == %~p8) { unset %~p8* | goto remove23 }
if ($nick == %~p9) { unset %~p9* | goto remove23 }
if ($nick == %~p10) { unset %~p10* | goto remove23 }
:remove23
set %~gameb $remove(%~gameb,$2)
}
}
on *:text:!kpause:%~mc:{
if (%~pa_used > 3) { msgg # Don't spam the pause | halt }
if (%~paused) { msgg # The game has already been paused | goto skipe }
msgg # Pausing the game
set %~paused on
:skipe
inc -u15 %~pa_used 1
}
on *:text:!kunpause:%~mc:{
if (%~pa2_used > 3) { msgg # Don't spam the pause | halt }
if (!%~paused) { msgg # The game isn't paused | goto skipe2 }
msgg # Unpausing game
unset %~paused
:skipe2
inc -u15 %~pa2_used 1
}
on *:text:!kplayers:#:{
if (!%~killer) { notice $nick Sorry $nick $+ , there isn't a game going on. }
else { notice $nick Here are the current players: %~gameb }
}
on *:text:!kinfo:#: notice $nick Here's some info about the Killer Game: Each of the players is assigned a role. The killer is asked to go to a safe channel, where they can kill other players. the other players (not killers) wait for someone to die, and then they get to vote on who they think the killer is. If you vote the killer out, they win, but if they don't, the killer gets to kill again. If the killer kills all but one player, they win, but if the nonkillers manage to vote him out before hand, they win.
on *:text:!kcommands:#: notice $nick Here are the commands: !killer (starts the game), !start (once enough players have joined, starts the game), !kill (if you're the killer, you kill someone), !vote (casts a vote for who you think is the killer), !players (says the current players), !kend (Under certain circumstances, you can end the game), !kadd (the bot owner can add a Kill-Op), !kremove (removes a given nickname from the current game), !kdelete (removes a given nick from the kill-op list), !kpause (pauses the game), !kunpause (unpauses the game), !kplayers (tells you the players), and !kinfo (explains about the Killer Game)
unset %p1*
unset %p2*
unset %p3*
unset %p4*
unset %p5*
unset %p6*
unset %p7*
unset %p8*
unset %p9*
unset %p10*
unset %killer
unset %the_killer
unset %the_victim
unset %knum
unset %killchan
unset %mc
unset %killed
unset %started
unset %playas
unset %game*
unset %v*
unset %mainplayer
You can do that all in one line if you want. Like:
unset %playas %game* %v* %mainplayer %etc