Advertisement
Wikked

game5

Nov 7th, 2019
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 7.51 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;;;;GUNEVO ALPHA :D;;;;;
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. ;SCRIPT OPEN
  5. ON *:TEXT:*:#test: {
  6.   ;
  7.   ;!FIGHT OPEN
  8.   if ($1 == !fight) {
  9.     if ($2 !ison $chan) { .notice $nick $2 isn't here! | return }
  10.     set -u20 %fighton $nick $2
  11.     set -u20 %fightonchan $chan
  12.     whois $nick | .timer 1 2 whois $2
  13.   }
  14.   ;FIGHT CLOSE
  15.   ;
  16.   ;
  17.   ;;ACCEPT/DECLINE OPEN
  18.   if (%fighton != ongoing) {
  19.     if ($istok(!accept !decline,$1,32)) {
  20.       var %v = $gettok(%fighton,2,32)
  21.       if (%v == $nick) {
  22.         var %ac = $1
  23.         .timer~gevo~fight off
  24.         gevo_fight $network $chan %fighton %ac
  25.       }
  26.     }
  27.   }
  28.   ;;;ACCEPT/DECLINE CLOSE
  29.   ;
  30.   ;
  31. }
  32. ;SCRIPT CLOSE;;;;
  33. ;;;;
  34. ;;;;
  35. ;;;;
  36. ;ALIAS GEVO_FIGHT OPEN
  37. alias gevo_fight {
  38.   ;PARAMETERS
  39.   var %net = $1, %chan = $2, %nick = $3, %opp = $4, %ac = $5
  40.   ;PLAYERS HASHES
  41.   var %gevonick = $+(gevo~,%nick), %gevoopp = $+(gevo~,%opp)
  42.   if (!$hget(%gevonick)) { gevo_newpl %nick }
  43.   if (!$hget(%gevoopp)) { gevo_newpl %opp }
  44.   ;PLAYERS LVLS
  45.   var %lvlnick = $hget(%gevonick,lvl), %lvlopp = $hget(%gevoopp,lvl), %lvldiff = $remove($calc(%lvlnick - %lvlopp),-)
  46.   if (%lvldiff >= 5) { .notice %nick Too much lvl difference! Please choose an other opponent. | return }
  47.   if (%ac == !decline) { .notice %nick %opp declined! | unset %fighton | return }
  48.   set %fighton ongoing
  49.   ;PLAYERS WEAPONS
  50.   var $+(%,weap,%nick) = $hget(%gevonick,weapon), $+(%,weap,%opp) = $hget(%gevoopp,weapon)
  51.   ;PLAYERS STATS
  52.   var %hpnick = $hget(%gevonick,hp), %hpopp = $hget(%gevoopp,hp), %armornick = $hget(%gevonick,armor), %armoropp = $hget(%gevoopp,armor), %dmgnick = $hget(%gevonick,dmg), %dmgopp = $hget(%gevoopp,dmg),%reconick = $hget(%gevonick,reco), %recoopp = $hget(%gevoopp,reco), %evasnick = $hget(%gevonick,evas), %evasopp = $hget(%gevoopp,evas), %critnick = $hget(%gevonick,crit), %critopp = $hget(%gevoopp,crit)
  53.   ;;;;HP: %hpnick %hpopp • ARMOR: %armornick %armoropp DMG: %dmgnick %dmgopp
  54.   ;;;;RECOV: %reconick %recoopp EVASION: %evasnick %evasopp CRIT: %critnick %critopp
  55.   ;PLAYERS ROUTINES
  56.   var %healatnick = $hget(%gevonick,healat), %healatopp = $hget(%gevoopp,healat)
  57.   ;MISC
  58.   var %titlenick = $hget(%gevonick,title), %titleopp = $hget(%gevoopp,title)
  59.   .timer 1 1 msg %chan The Fight Begins in 20 seconds!
  60.   .timer 1 2 notice %nick Change any settings while you can, before the fight begins.
  61.   .timer 1 2 notice %opp Change any settings while you can, before the fight begins.
  62.   .timer~gevo~fightbegin1 1 21 set %fighton fighting
  63.   .timer~gevo~fightbegin2 1 22 msg %chan !TIME TO FIGHT!
  64.   .timer~gevo~fightbegin3 1 22 msg %chan $gevo_lvl(%lvlnick) $iif(%titlenick != no_title, $v1) %nick $gevo_hp(%hpnick)
  65.   .timer~gevo~fightbegin4 1 22 msg %chan $+($chr(03),03,$chr(02),VERSUS)
  66.   .timer~gevo~fightbegin5 1 23 msg %chan $gevo_lvl(%lvlopp) $iif(%titleopp != no_title, $v1) %opp $gevo_hp(%hpopp)
  67.   ;;;ACTUAL FIGHT SEQUENCE LOOP OPEN
  68.   var %t = 24, %player = 1
  69.   while (%player) {
  70.     inc %t 2
  71.     ;PLAYER 1 BLOCK OPEN
  72.     if (%player == 1) {
  73.       var %armorcutoff = $calc(%armoropp * 0.2)
  74.       var %crit = $iif($rand(1,100) isnum $+(1-,%critnick), 1, 0)
  75.       var %dmgrangenick = $rand($calc(%dmgnick - (%dmgnick * (40/100))),%dmgnick)
  76.       var %dmg = $iif(%crit, $calc(%dmgrangenick * 2), %dmgrangenick)
  77.       var %finaldmg = $calc(%dmg - (%dmg * (%armorcutoff / 100)))
  78.       var %evade = $iif(%crit, 0, $iif($rand(1,100) isnum $+(1-,%evasopp), 1, 0))
  79.       ;;;;;;;;;;;;;;;;;1iifopen^;;;;;;;2iifopen^
  80.       if (%evade) { var %hitmsg = %opp evades a $+(%finaldmg,DMG) hit from %nick }
  81.       else {
  82.         var %hitmsg %nick strikes %opp with $+(%finaldmg,DMG!)
  83.         var %bhpo = %hpopp
  84.         dec %hpopp %finaldmg
  85.         var %newhpopp = %opp HP $gevo_hp(%bhpo,$+(-,%finaldmg)) %hpopp
  86.         if (%hpopp <= 0) {
  87.           unset %fighton
  88.           .timer 1 $calc(%t + 2) msg %chan %nick defeats %opp
  89.           hdec %gevonick hp $calc(100 - %hpnick)
  90.           hdec %gevoopp hp 100
  91.           set %player 0
  92.         }
  93.       }
  94.     }
  95.     ;PLAYER 1 BLOCK CLOSE
  96.     ;
  97.     ;
  98.     ;PLAYER 2 BLOCK OPEN
  99.     if (%player == 2) {
  100.       var %armorcutoff = $calc(%armornick * 0.6)
  101.       var %crit = $iif($rand(1,100) isnum $+(1-,%critopp), 1, 0)
  102.       var %dmgrangeoopp = $rand($calc(%dmgopp - (%dmgopp * (40/100))),%dmgopp)
  103.       var %dmg = $iif(%crit, $calc(%dmgrangeopp * 2), %dmgrangeopp)
  104.       var %finaldmg = $calc(%dmg - (%dmg * (%armorcutoff / 100)))
  105.       var %evade = $iif(%crit, 0, $iif($rand(1,100) isnum $+(1-,%evasnick), 1, 0))
  106.       ;;;;;;;;;;;;;;;;;1iifopen^;;;;;;;2iifopen^
  107.       if (%evade) { msg %chan %nick evades a $+(%finaldmg,DMG) hit from %opp [<>] %hitmsg }
  108.       else {
  109.         .timer 1 $calc(%t + 1) msg %chan %opp strikes %nick with $+(%finaldmg,DMG!) [<>] %hitmsg
  110.         var %bhp = %hpnick
  111.         dec %hpnick %finaldmg
  112.         msg %chan %opp HP %newopphp
  113.         msg %chan %nick HP $gevo_hp(%bhp,$+(-,%finaldmg) %hpnick
  114.         if (%hpnick <= 0) {
  115.           unset %fighton
  116.           .timer 1 $calc(%t + 2) msg %chan %opp defeats %nick
  117.           hdec %gevoopp hp $calc(100 - %hpopp)
  118.           hdec %gevonick hp 100
  119.           set %player 0
  120.         }
  121.       }
  122.     }
  123.     ;PLAYER 2 BLOCK CLOSE
  124.     ;
  125.     ;LOOPBACK OR BREAK
  126.     $iif(!%player, break, $iif(%player == 1, inc $+(%,player), dec $+(%,player)))
  127.   }
  128.   ;ACTUAL FIGHT SEQUENCE LOOP CLOSE
  129. }
  130. ;ALIAS GEVO FIGHT CLOSE
  131. ;;;
  132. ;;;
  133. ;;;
  134. ; ALIAS GEVO_NEWPL OPEN
  135. alias gevo_newpl {
  136.   var %n = $1
  137.   var %h = $+(gevo~,%n)
  138.   hmake %h
  139.   ;;; not yet needed ;;; hsave %h $+(%h,.hsh)
  140.   ;;;;HP: %hpnick %hpopp • ARMOR: %armornick %armoropp DMG: %dmgnick %dmgopp
  141.   ;;;;RECOV: %reconick %recoopp EVASION: %evasnick %evasopp CRIT: %critnick %critopp
  142.   hadd %h hp 20
  143.   hadd %h armor 5
  144.   hadd %h dmg 10
  145.   hadd %h reco 1
  146.   hadd %h evas 1
  147.   hadd %h crit 5
  148.   hadd %h lvl 1
  149.   hadd %h title no_title
  150. }
  151. ; ALIAS GEVO_NEWPL CLOSE
  152. ;
  153. ;
  154. ;ALIAS GEVO_HP OPEN
  155. alias gevo_hp {
  156.   var %hp = $iif($2 < 0, $calc($1 $2), $1)
  157.   var %str = $str(',%hp)
  158.   var %hpgfx = $+($chr(03),05,$chr(44),05,$chr(02),%str)
  159.   if ($2) {
  160.     var %pm = $left($2,1), %clpm = $iif(%pm == -, 08, 03)
  161.     var %strpm = $str(',$mid($2,2,$len($2)))
  162.     var %hpgfx = $+(%hpgfx,$chr(03),%clpm,$chr(44),%clpm,$chr(02),%strpm)
  163.   }
  164.   return %hpgfx
  165. }
  166. ;ALIAS GEVO_HP CLOSE
  167. ;
  168. ;
  169. ;ALIAS GEVO_LVL
  170. alias gevo_lvl { return $+(LvL,$chr(03),$iif($len($1) == 1, $+(0,$1), $1),$1) }
  171. ;
  172. ;
  173. ;;;;RAW Check identified
  174. ;:irc-us2.alphachat.net 330 OrFeAsGr OrFeAsGr OrFeAsGr :is logged in as
  175. raw *:*:{
  176.   if ($numeric == 330) {
  177.     var %p1 = $gettok(%fighton,1,32), %p2 = $gettok(%fighton,2,32)
  178.     var %usednick = $2
  179.     if ($istok(%fighton,%usednick,32)) {
  180.       inc %idednum
  181.       if (%idednum == 2) {
  182.         unset %idednum
  183.         .timer~gevo~fight 1 20 .notice %p1 $2 Declined the request!
  184.         .notice %p2 %p1 challenged you to a fight. !accept or !decline
  185.         .notice %p1 %p2 has been alerted. Waiting 20s for their reply.
  186.       }
  187.       set $+(%,ided,%usednick) 1
  188.       var %loggedinas = $3
  189.       if (%usednick != %loggedinas) {
  190.         set %fighton $replace(%fighton,%usednick,%loggedinas)
  191.       }
  192.     }
  193.   }
  194.   if ($numeric == 318) {
  195.     var %usednick = $2
  196.     var %p1 = $gettok(%fighton,1,32), %p2 = $gettok(%fighton,2,32)
  197.     if (!$($+(%,ided,%usednick),2)) {
  198.       unset %ided*
  199.       .notice %p1 $iif(%usednick == %p1, You are not identified with NickServ! Please do so if you want to play., %p2 is not identified with NickServ! Thus they can't play!)
  200.       unset %fighton
  201.     }
  202.   }
  203. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement