Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;The alias to set yourself as the bot's owner.
- ;
- alias /battlemaster {
- unset %battlemaster
- set %battlemaster $1
- echo -a 12[7?12]4 $1 7 has been set as the battlemaster 12[7?12]
- }
- ;The code to turn the attacker off, and punishment for anyone who flees.
- ;
- on *:text:*:#: {
- if ($nick == %battlemaster) {
- if (($1 == !attacker) && (%attacker == off) && ($2 == on)) {
- unset %attacker
- set %attacker on
- set %attackchan $chan
- msg $chan 12[7?12]7 My attack function has been turned on and set to run in $chan 12[7?12]
- }
- if (($1 == !attacker) && (%attacker == on) && ($2 == off)) {
- unset %attacker
- set %attacker off
- unset %attackchan
- msg $chan 12[7?12]7 My attack function has been turned off 12[7?12]
- } } }
- on *:part:#: {
- if ($nick == %attackee) {
- set %finisher $nick
- .timer 1 3600 %unset finisher
- halt
- } }
- on *:join:#: {
- if (($nick == %finisher) && ($me isop $chan)) {
- msg $chan 12[7?12]7 FINISH HIM! 12[7?12]
- describe $chan tears $nick $+ 's heart out through their throat.
- mode $chan +b $address($nick,2)
- kick $chan $nick 12[7?12]7 Fatality! 12[7?12]
- msg $chan 12[7?12]7 FLAWLESS VICTORY. 12[7?12]
- unset %finisher
- halt
- } }
- ;The bulk of the code, feel free to edit for simplicity/balance.
- ;
- on *:text:!attack *:#: {
- if (%attacker == off) || ($2 == %battlemaster) { halt }
- elseif ((%fight == on) && ($chan == %attackchan)) {
- msg $chan 12[7?12]7 You will have to wait to fight,4 $nick $+ 7. 12[7?12]
- halt }
- elseif ((%attacker == on) && ($chan == %attackchan)) {
- set -u10 %fight on
- set -u10 %fighter $nick
- set -u10 %attackee $2
- set %attack $rand(1,1000)
- if (%attack >= 950) {
- msg $chan 12[7?12]12 $nick $+ 7's attack struck for %attack $+ ! Critical hit! 12[7?12]
- .timer 1 3 mode $chan +b $address($2,2)
- .timer 1 3 kick $chan $2 12[7?12]7 Hasta la bye bye. =) 12[7?12]
- .timer 1 4 unset %attack
- .timer 1 63 mode $chan -b $address($2,2)
- halt }
- elseif ((%attack >= 501) && (%attack <= 600)) {
- msg $chan 12[7?12]12 $nick $+ 7's attack struck for %attack $+ ! A poor hit. =( 12[7?12]
- .timer 1 3 mode $chan +b ~n: $+ $address($2,2)
- .timer 1 4 unset %attack
- .timer 1 33 mode $chan -b ~n: $+ $address($2,2)
- halt }
- elseif ((%attack >= 601) && (%attack <= 700)) {
- msg $chan 12[7?12]12 $nick $+ 7's attack struck for %attack $+ ! A decent hit. 12[7?12]
- .timer 1 3 mode $chan +b ~q: $+ $address($2,2)
- .timer 1 4 unset %attack
- .timer 1 33 mode $chan -b ~q: $+ $address($2,2)
- halt }
- elseif ((%attack >= 701) && (%attack <= 800)) {
- msg $chan 12[7?12]12 $nick $+ 7's attack struck for %attack $+ ! Good hit! =) 12[7?12]
- .timer 1 3 mode $chan +b ~q: $+ $address($2,2)
- .timer 1 3 mode $chan +b ~n: $+ $address($2,2)
- .timer 1 4 unset %attack
- .timer 1 33 mode $chan -b ~q: $+ $address($2,2)
- .timer 1 33 mode $chan -b ~n: $+ $address($2,2)
- halt }
- elseif ((%attack >= 801) && (%attack <= 950)) {
- msg $chan 12[7?12]12 $nick $+ 7's attack struck for %attack $+ ! Excellent! =D 12[7?12]
- .timer 1 3 kick $chan $2 12[7?12]7 You haff been slain. =O 12[7?12]
- .timer 1 4 unset %attack
- halt }
- elseif (%attack == 500) {
- msg $chan 12[7?12]7 The clash between 12 $+ $nick $+ 7 and 12 $+ $2 $+ 7 has ended in a stalemate. 12[7?12]
- unset %attack
- halt }
- elseif (%attack >= 101) {
- if (%attack >= 500) { halt }
- if (%attack <= 275) {
- msg $chan 12[7?12]12 $nick $+ 7's attack has failed to strike: %attack $+ . =( 12[7?12]
- unset %attack
- set %cattack $rand(1,4)
- .timer 1 1 msg $chan 12[7?12]12 $2 $+ 7 is now counterattacking 12[7?12]
- if (%cattack <= 2) {
- .timer 1 3 msg $chan 12[7?12]7 Failure. =( 12[7?12] }
- if (%cattack == 3) {
- .timer 1 3 msg $chan 12[7?12]7 Success. =) 12[7?12]
- .timer 1 4 kick $chan $nick 12[7?12]7 You haff been slain in combat. =O 12[7?12] }
- if (%cattack == 4) {
- .timer 1 3 msg $chan 12[7?12]7 Success. =) 12[7?12]
- .timer 1 5 mode $chan +b $address($nick,2)
- .timer 1 6 kick $chan $nick 12[7?12]7 You have been mortally wounded by your opponent. Try again later. 12[7?12] }
- .timer 1 7 unset %cattack
- .timer 1 35 mode $chan -b $address($nick,2)
- halt }
- if ((%attack <= 499) && (%attack >= 276)) {
- msg $chan 12[7?12]12 $nick $+ 7's attack has failed to strike: %attack $+ . =( 12[7?12]
- unset %attack
- set %cattack $rand(1,4)
- .timer 1 1 msg $chan 12[7?12]12 $2 $+ 7 is now counterattacking 12[7?12]
- if (%cattack <= 2) {
- .timer 1 3 msg $chan 12[7?12]7 Failure. =( 12[7?12] }
- if (%cattack == 4) {
- .timer 1 3 msg $chan 12[7?12]7 Success. =) 12[7?12]
- .timer 1 4 mode $chan +b $address($nick,2)
- .timer 1 4 kick $chan $nick 12[7?12]7 You haff been slain in combat. =P 12[7?12]
- .timer 1 34 mode $chan -b $address($nick,2)
- }
- if (%cattack == 3) {
- .timer 1 3 msg $chan 12[7?12]7 Success. =) 12[7?12]
- .timer 1 5 mode $chan +b ~q: $+ $address($nick,2)
- .timer 1 5 mode $chan +b ~n: $+ $address($nick,2)
- .timer 1 6 msg $chan 12[7?12]7 You have been wounded by your opponent. You will have to rest. =) 12[7?12] }
- .timer 1 7 unset %cattack
- .timer 1 35 mode $chan -b ~q: $+ $address($nick,2)
- .timer 1 35 mode $chan -b ~n: $+ $address($nick,2)
- halt } }
- elseif (%attack <= 100) {
- msg $chan 12[7?12]12 $nick $+ 7's attack has resulted in failure: %attack $+ . 4Critical failure! 12[7?12]
- .timer 1 3 mode $chan +b $address($nick,2)
- .timer 1 3 kick $chan $nick 12[7?12]7 Your weak body has crumbled to dust. 12[7?12]
- .timer 1 5 unset %attack
- .timer 1 63 mode $chan -b $address($nick,2)
- halt }
- } }
Add Comment
Please, Sign In to add comment