Advertisement
Wikked

game7

Nov 7th, 2019
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 7.87 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;;;;GUNEVO EARLY RELEASE;;;;;
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. ;SCRIPT OPEN
  5. ON *:TEXT:*:#Chillzone: {
  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 %actualfighton %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.6)
  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!) $iif(%crit, $+($chr(03),05,!!!CRITICAL!!!,$chr(15)))
  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(30 - %hpnick)
  90.           ;;;hdec %gevoopp hp 30
  91. hadd %gevonick hp 30
  92. hadd %gevoopp hp 30
  93.           set %player 0
  94.         }
  95.       }
  96.     }
  97.     ;PLAYER 1 BLOCK CLOSE
  98.     ;
  99.     ;
  100.     ;PLAYER 2 BLOCK OPEN
  101.     if (%player == 2) {
  102.       var %armorcutoff = $calc(%armornick * 0.6)
  103.       var %crit = $iif($rand(1,100) isnum $+(1-,%critopp), 1, 0)
  104.       var %dmgrangeopp = $rand($calc(%dmgopp - (%dmgopp * (40/100))),%dmgopp)
  105.       var %dmg = $iif(%crit, $calc(%dmgrangeopp * 2), %dmgrangeopp)
  106.       var %finaldmg = $calc(%dmg - (%dmg * (%armorcutoff / 100)))
  107.       var %evade = $iif(%crit, 0, $iif($rand(1,100) isnum $+(1-,%evasnick), 1, 0))
  108.       ;;;;;;;;;;;;;;;;;1iifopen^;;;;;;;2iifopen^
  109.       if (%evade) { .timer 1 $calc(%t +1) msg %chan %nick evades a $+(%finaldmg,DMG) hit from %opp [<>] %hitmsg }
  110.       else {
  111.         .timer 1 $calc(%t + 1) msg %chan %opp strikes %nick with $+(%finaldmg,DMG!) $iif(%crit, $+($chr(03),05,!!!CRITICAL!!!,$chr(15))) [<>] %hitmsg
  112.         var %bhp = %hpnick
  113.         dec %hpnick %finaldmg
  114.         .timer 1 $calc(%t + 2) msg %chan %newhpopp %hpopp
  115.         .timer 1 $calc(%t + 2) msg %chan %nick HP $gevo_hp(%bhp,$+(-,%finaldmg)) %hpnick
  116.         if (%hpnick <= 0) {
  117.           unset %fighton
  118.           .timer 1 $calc(%t + 2) msg %chan %opp defeats %nick
  119.          ;;; hdec %gevoopp hp $calc(100 - %hpopp)
  120.           ;;;;hdec %gevonick hp 100
  121. hadd %gevonick hp 30
  122. hadd %gevoopp hp 30
  123.           set %player 0
  124.         }
  125.       }
  126.     }
  127.     ;PLAYER 2 BLOCK CLOSE
  128.     ;
  129.     ;LOOPBACK OR BREAK
  130.     $iif(!%player, break, $iif(%player == 1, inc $+(%,player), dec $+(%,player)))
  131.   }
  132.   ;ACTUAL FIGHT SEQUENCE LOOP CLOSE
  133. }
  134. ;ALIAS GEVO FIGHT CLOSE
  135. ;;;
  136. ;;;
  137. ;;;
  138. ; ALIAS GEVO_NEWPL OPEN
  139. alias gevo_newpl {
  140.   var %n = $1
  141.   var %h = $+(gevo~,%n)
  142.   hmake %h
  143.   ;;; not yet needed ;;; hsave %h $+(%h,.hsh)
  144.   ;;;;HP: %hpnick %hpopp • ARMOR: %armornick %armoropp DMG: %dmgnick %dmgopp
  145.   ;;;;RECOV: %reconick %recoopp EVASION: %evasnick %evasopp CRIT: %critnick %critopp
  146.   hadd %h hp 30
  147.   hadd %h armor 5
  148.   hadd %h dmg 10
  149.   hadd %h reco 1
  150.   hadd %h evas 1
  151.   hadd %h crit 5
  152.   hadd %h lvl 1
  153.   hadd %h title no_title
  154. }
  155. ; ALIAS GEVO_NEWPL CLOSE
  156. ;
  157. ;
  158. ;ALIAS GEVO_HP OPEN
  159. alias gevo_hp {
  160.   var %hp = $iif($2 < 0, $calc($1 $2), $1)
  161.   var %str = $str(',%hp)
  162.   var %hpgfx = $+($chr(03),05,$chr(44),05,$chr(02),%str)
  163.   if ($2) {
  164.     var %pm = $left($2,1), %clpm = $iif(%pm == -, 08, 03)
  165.     var %strpm = $str(',$mid($2,2,$len($2)))
  166.     var %hpgfx = $+(%hpgfx,$chr(03),%clpm,$chr(44),%clpm,$chr(02),%strpm)
  167.   }
  168.   return %hpgfx
  169. }
  170. ;ALIAS GEVO_HP CLOSE
  171. ;
  172. ;
  173. ;ALIAS GEVO_LVL
  174. alias gevo_lvl {
  175.   var %cl = $calc($1 + 1)
  176.   return $+(LvL,$chr(03),$iif($len(%cl) == 1, $+(0,%cl), %cl),$1,$chr(15))
  177. }
  178. ;
  179. ;
  180. ;;;;RAW Check identified
  181. ;:irc-us2.alphachat.net 330 OrFeAsGr OrFeAsGr OrFeAsGr :is logged in as
  182. raw *:*:{
  183.   if ($numeric == 330) {
  184.     var %p1 = $gettok(%fighton,1,32), %p2 = $gettok(%fighton,2,32)
  185.     var %usednick = $2
  186.     if ($istok(%fighton,%usednick,32)) {
  187.       inc %idednum
  188.       if (%idednum == 2) {
  189.         unset %idednum
  190.         .timer~gevo~fight 1 20 .notice %p1 $2 Declined the request!
  191.         .notice %p2 %p1 challenged you to a fight. !accept or !decline
  192.         .notice %p1 %p2 has been alerted. Waiting 20s for their reply.
  193.       }
  194.       set $+(%,ided,%usednick) 1
  195.       var %loggedinas = $3
  196.       if (%usednick != %loggedinas) {
  197.         set %actualfighton $replace(%fighton,%usednick,%loggedinas)
  198.       }
  199.     }
  200.   }
  201.   if ($numeric == 318) {
  202.     var %usednick = $2
  203.     var %p1 = $gettok(%fighton,1,32), %p2 = $gettok(%fighton,2,32)
  204.     if (!$($+(%,ided,%usednick),2)) {
  205.       unset %ided*
  206.       .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!)
  207.       unset %fighton
  208.     }
  209.   }
  210. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement