If you can't tell from the topic, it's a little script I made while I was bored that references the Energy Swords the Elites use in the Halo series.
Pretty easy to operate, just type `esword or !esword to activate it. Also put in a couple lines of code to limit the people you can attack to those that are in the channel.
One thing though before you get going with it, replace the on line 3 with your usual operating nick, otherwise you will be vulnerable. Have fun with it, just don't use it on ops unless you want to get into trouble.
on $*:text:/^[`!](esword)/Si:#: {
var %sword $rand(1,9999999)
if ($2 == $me) || ($2 == <YourName>) {
msg $chan I will not kill myself/him! | halt
}
if ($2 !ison $chan) {
msg $chan Cant seem to find them, $nick $+ . | halt
}
else {
.timer 1 3 describe $chan rushes at $2 with an Energy Sword drawn!
.timer 1 5 describe $chan connects with $2 $+ , causing %sword damage!
}
if (%sword > 9000) {
inc %pwned
.timer 1 8 describe $chan watches $2 die drowning in his own blood. ( $+ %pwned people pwned.)
}
if (%sword < 9000) {
inc %unpwned
.timer 1 8 describe $chan watches $2 get up, barely alive! ( $+ %unpwned unpwned people.)
}
}
on $*:text:/^`!/Si:#: {
if ($2 == $me) || ($2 == ) {
msg $chan I will not kill myself/him!
halt
}
if ($2 !ison $chan) {
msg $chan Can\'t seem to find them, $nick $+ .
halt
}
else {
var %sword = $rand(1,9999999)
.timer 1 3 describe $chan rushes at $2 with an Energy Sword drawn!
.timer 1 5 describe $chan connects with $2 $+ , causing %sword damage!
if (%sword > 9000) {
if (!%pwned) {
set %pwned 0
}
inc %pwned
.timer 1 8 describe $chan watches $2 die drowning in his own blood. ( $+ %pwned people pwned.)
}
if (%sword <= 9000) {
if (!%unpwned) {
set %unpwned 0
}
inc %unpwned
.timer 1 8 describe $chan watches $2 get up, barely alive! ( $+ %unpwned unpwned people.)
}
}
}
Well he uses var %sword $rand(1,9999999) because he want\'s to show some random damage :)
And if it\'s lower than 9000 it doesn\'t kill him :)
So if you use another var for damage only and 1,2 for the output, it wouldn\'t fit right.
But indeed he should have done if (%sword =< 9000)
Nontheless I would do it different as well :)