Guest User

Untitled

a guest
May 22nd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 6.48 KB | None | 0 0
  1. ;The alias to set yourself as the bot's owner.
  2. ;
  3. alias /battlemaster {
  4.   unset %battlemaster
  5.   set %battlemaster $1
  6.   echo -a 12[7?12]4 $1 7 has been set as the battlemaster 12[7?12]
  7. }
  8.  
  9. ;The code to turn the attacker off, and punishment for anyone who flees.
  10. ;
  11.  
  12. on *:text:*:#: {
  13.   if ($nick == %battlemaster) {
  14.     if (($1 == !attacker) && (%attacker == off) && ($2 == on)) {
  15.       unset %attacker
  16.       set %attacker on
  17.       set %attackchan $chan
  18.       msg $chan 12[7?12]7 My attack function has been turned on and set to run in $chan 12[7?12]
  19.     }
  20.     if (($1 == !attacker) && (%attacker == on) && ($2 == off)) {
  21.       unset %attacker
  22.       set %attacker off
  23.       unset %attackchan
  24.       msg $chan 12[7?12]7 My attack function has been turned off 12[7?12]
  25. } } }
  26.  
  27. on *:part:#: {
  28.   if ($nick == %attackee) {
  29.     set %finisher $nick
  30.     .timer 1 3600 %unset finisher
  31.     halt  
  32. } }
  33.  
  34. on *:join:#: {
  35.   if (($nick == %finisher) && ($me isop $chan)) {
  36.     msg $chan 12[7?12]7 FINISH HIM! 12[7?12]
  37.     describe $chan tears $nick $+ 's heart out through their throat.
  38.     mode $chan +b $address($nick,2)
  39.     kick $chan $nick 12[7?12]7 Fatality! 12[7?12]
  40.     msg $chan 12[7?12]7 FLAWLESS VICTORY. 12[7?12]
  41.     unset %finisher
  42.     halt
  43. } }
  44.  
  45. ;The bulk of the code, feel free to edit for simplicity/balance.
  46. ;
  47.  
  48. on *:text:!attack *:#: {
  49.   if (%attacker == off) || ($2 == %battlemaster) { halt }
  50.   elseif ((%fight == on) && ($chan == %attackchan)) {
  51.     msg $chan 12[7?12]7 You will have to wait to fight,4 $nick $+ 7. 12[7?12]
  52.   halt }
  53.   elseif ((%attacker == on) && ($chan == %attackchan)) {
  54.     set -u10 %fight on
  55.     set -u10 %fighter $nick
  56.     set -u10 %attackee $2
  57.     set %attack $rand(1,1000)
  58.     if (%attack >= 950) {
  59.       msg $chan 12[7?12]12 $nick $+ 7's attack struck for %attack $+ ! Critical hit! 12[7?12]
  60.       .timer 1 3 mode $chan +b $address($2,2)
  61.       .timer 1 3 kick $chan $2 12[7?12]7 Hasta la bye bye. =) 12[7?12]
  62.       .timer 1 4 unset %attack
  63.       .timer 1 63 mode $chan -b $address($2,2)
  64.     halt }
  65.     elseif ((%attack >= 501) && (%attack <= 600)) {
  66.       msg $chan 12[7?12]12 $nick $+ 7's attack struck for %attack $+ ! A poor hit. =( 12[7?12]
  67.       .timer 1 3 mode $chan +b ~n: $+ $address($2,2)
  68.       .timer 1 4 unset %attack
  69.       .timer 1 33 mode $chan -b ~n: $+ $address($2,2)
  70.     halt }
  71.     elseif ((%attack >= 601) && (%attack <= 700)) {
  72.       msg $chan 12[7?12]12 $nick $+ 7's attack struck for %attack $+ ! A decent hit. 12[7?12]
  73.       .timer 1 3 mode $chan +b ~q: $+ $address($2,2)
  74.       .timer 1 4 unset %attack
  75.       .timer 1 33 mode $chan -b ~q: $+ $address($2,2)
  76.     halt }
  77.     elseif ((%attack >= 701) && (%attack <= 800)) {
  78.       msg $chan 12[7?12]12 $nick $+ 7's attack struck for %attack $+ ! Good hit! =) 12[7?12]
  79.       .timer 1 3 mode $chan +b ~q: $+ $address($2,2)
  80.       .timer 1 3 mode $chan +b ~n: $+ $address($2,2)
  81.       .timer 1 4 unset %attack
  82.       .timer 1 33 mode $chan -b ~q: $+ $address($2,2)
  83.       .timer 1 33 mode $chan -b ~n: $+ $address($2,2)
  84.     halt }
  85.     elseif ((%attack >= 801) && (%attack <= 950)) {
  86.       msg $chan 12[7?12]12 $nick $+ 7's attack struck for %attack $+ ! Excellent! =D 12[7?12]
  87.       .timer 1 3 kick $chan $2 12[7?12]7 You haff been slain. =O 12[7?12]
  88.       .timer 1 4 unset %attack
  89.     halt }
  90.     elseif (%attack == 500) {
  91.       msg $chan 12[7?12]7 The clash between 12 $+ $nick $+ 7 and 12 $+ $2 $+ 7 has ended in a stalemate. 12[7?12]
  92.       unset %attack
  93.     halt }
  94.     elseif (%attack >= 101) {
  95.       if (%attack >= 500) { halt }
  96.       if (%attack <= 275) {
  97.         msg $chan 12[7?12]12 $nick $+ 7's attack has failed to strike: %attack $+ . =( 12[7?12]
  98.         unset %attack
  99.         set %cattack $rand(1,4)
  100.         .timer 1 1 msg $chan 12[7?12]12 $2 $+ 7 is now counterattacking 12[7?12]
  101.         if (%cattack <= 2) {
  102.         .timer 1 3 msg $chan 12[7?12]7 Failure. =( 12[7?12] }
  103.         if (%cattack == 3) {
  104.           .timer 1 3 msg $chan 12[7?12]7 Success. =) 12[7?12]
  105.         .timer 1 4 kick $chan $nick 12[7?12]7 You haff been slain in combat. =O 12[7?12] }
  106.         if (%cattack == 4) {
  107.           .timer 1 3 msg $chan 12[7?12]7 Success. =) 12[7?12]
  108.           .timer 1 5 mode $chan +b $address($nick,2)
  109.         .timer 1 6 kick $chan $nick 12[7?12]7 You have been mortally wounded by your opponent. Try again later. 12[7?12] }
  110.         .timer 1 7 unset %cattack
  111.         .timer 1 35 mode $chan -b $address($nick,2)
  112.       halt }
  113.       if ((%attack <= 499) && (%attack >= 276)) {
  114.         msg $chan 12[7?12]12 $nick $+ 7's attack has failed to strike: %attack $+ . =( 12[7?12]
  115.         unset %attack
  116.         set %cattack $rand(1,4)
  117.         .timer 1 1 msg $chan 12[7?12]12 $2 $+ 7 is now counterattacking 12[7?12]
  118.         if (%cattack <= 2) {
  119.         .timer 1 3 msg $chan 12[7?12]7 Failure. =( 12[7?12] }
  120.         if (%cattack == 4) {
  121.           .timer 1 3 msg $chan 12[7?12]7 Success. =) 12[7?12]
  122.           .timer 1 4 mode $chan +b $address($nick,2)
  123.           .timer 1 4 kick $chan $nick 12[7?12]7 You haff been slain in combat. =P 12[7?12]
  124.           .timer 1 34 mode $chan -b $address($nick,2)
  125.         }
  126.         if (%cattack == 3) {
  127.           .timer 1 3 msg $chan 12[7?12]7 Success. =) 12[7?12]
  128.           .timer 1 5 mode $chan +b ~q: $+ $address($nick,2)
  129.           .timer 1 5 mode $chan +b ~n: $+ $address($nick,2)
  130.         .timer 1 6 msg $chan 12[7?12]7 You have been wounded by your opponent. You will have to rest. =) 12[7?12] }
  131.         .timer 1 7 unset %cattack
  132.         .timer 1 35 mode $chan -b ~q: $+ $address($nick,2)
  133.         .timer 1 35 mode $chan -b ~n: $+ $address($nick,2)
  134.     halt } }
  135.     elseif (%attack <= 100) {
  136.       msg $chan 12[7?12]12 $nick $+ 7's attack has resulted in failure: %attack $+ . 4Critical failure! 12[7?12]
  137.       .timer 1 3 mode $chan +b $address($nick,2)
  138.       .timer 1 3 kick $chan $nick 12[7?12]7 Your weak body has crumbled to dust. 12[7?12]
  139.       .timer 1 5 unset %attack
  140.       .timer 1 63 mode $chan -b $address($nick,2)
  141.     halt }
  142. } }
Add Comment
Please, Sign In to add comment