Energy Sword

By Zaiba91 on Mar 26, 2008

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.)
    }
  }

Comments

Sign in to comment.
Jonesy44   -  Mar 31, 2008

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.)
}
}
}

 Respond  
ShAmPi   -  Mar 31, 2008

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 :)

 Respond  
Zaiba91   -  Mar 27, 2008

well, thats one way of going about it .-.

 Respond  
Andrew-|   -  Mar 27, 2008

If the local variable %sword is assigned the value 9000, what will be the outcome? :?

Because there are two possible outcomes, why don\'t you use $r(1,2) and if (%sword == 1) { ... } else { ... }?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.