My snippet will virtually kill the opponents of whoever uses it. To use it you use !kill .
Features:
Control Panel (accessible by Right Clicking on a channel window and then clicking '!kill CP')
Flood Control (can be adjusted by accessing the control panel)
Ability to turn the script on\off (can be done by accessing the control panel)
Person with the script loaded can still use the script
Self-Protection (you cannot be killed)
(*Note: The person with the script loaded can avoid flood control and self-protection)
on *:CONNECT:{ set %power On }
on *:DISCONNECT:{ unset %power }
on *:INPUT:#:{
if ($1 == !kill) {
var %error = notice $nick Sorry but the !kill script has been turned off
var %speak = $rand(1,4)
var %a = You bastard!
var %b = $nick just duck hunted $2 with a shotgun!
var %c = $nick threw a stick at $2. Everyone laughs. $nick has failed.
var %d = $nick hired an assassin to kill $2. $2 was killed while working at the local 7-11.
var %e = Angry $2 was killed by a huggle beam from $nick $+ !
if ($2 == $null) {
notice $nick !kill Help
notice $nick 0
notice $nick !kill <person> - Kills the person using a random execution method
notice $nick Right Click + !kill CP - Opens the script control panel
}
else {
if (%speak == 1) msg $chan %b %a
if (%speak == 2) msg $chan %c
if (%speak == 3) msg $chan %d %a
if (%speak == 4) msg $chan %e %a
}
}
else { }
}
on *:TEXT:**:#:{
if ($1 == !kill) {
inc -u3 %kill. [ $+ [ $nick ] ]
if (%kill. [ $+ [ $nick ] ] < %kfp) {
var %error = notice $nick Sorry but the !kill script has been turned off
var %speak = $rand(1,4)
var %a = You bastard!
var %b = $nick just duck hunted $2 with a shotgun!
var %c = $nick threw a stick at $2. Everyone laughs. $nick has failed.
var %d = $nick hired an assassin to kill $2. $2 was killed while working at the local 7-11.
var %e = Angry $2 was killed by a huggle beam from $nick $+ !
if ($2 == $null) {
if (%power == off) { %error }
else {
notice $nick !kill Help
notice $nick 0
notice $nick !kill <person> - Kills the person using a random execution method
notice $nick Right Click + !kill CP - Opens the script control panel
}
}
elseif ($2 == $me) { msg $chan %c }
else {
if (%speak == 1) msg $chan %b %a
if (%speak == 2) msg $chan %c
if (%speak == 3) msg $chan %d %a
if (%speak == 4) msg $chan %e %a
}
}
else { notice $nick Sorry you have exceeded flood protection limits - please wait }
}
else { }
}
on *:KEYDOWN:@!kill-cp:*:{
if ($keyval == 96) {
unset %power
set %power On
dline @!kill-CP 2
iline @!kill-CP 2 Script: On
}
if ($keyval == 97) {
unset %power
set %power Off
dline @!kill-CP 2
iline @!kill-CP 2 Script: Off
}
if ($keyval == 98) {
inc %kfp 1
dline @!kill-CP 3
iline @!kill-CP 3 Flood Protection: Less than %kfp kill(s) per 3 seconds per nick
}
if ($keyval == 99) {
dec %kfp 1
dline @!kill-CP 3
iline @!kill-CP 3 Flood Protection: Less than %kfp kill(s) per 3 seconds per nick
}
}
menu * {
.!kill CP:{
window @!kill-CP 0 0 arial 11
aline @!kill-CP [Status]
aline @!kill-CP Script: %power
aline @!kill-CP Flood Protection: Less than %kfp kill(s) per 3 seconds per nick
aline @!kill-CP 0
aline @!kill-CP [Commands]
aline @!kill-CP NumPad 0: Turn on the script
aline @!kill-CP NumPad 1: Turn off the script
aline @!kill-CP NumPad 2: Adjust flood protection (+)
aline @!kill-CP NumPad 3: Adjust flood protection (-)
}
}
Already told you a few comments, but I'll post it here.
In my opinion, avoid all that var clutter you have:
1.) You only need to repeat var %blah = blah once. You have it twice for on INPUT and on TEXT events.
2.) Again, my opinion, you don't need vars for something like this.
if (%speak == 1) { msg $chan Blah Blah Blah }
Not:
if (%speak == 2) { msg $chan %blah }
Suggestion, add a feature to put your own kill messages.