Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;GUNEVO ALPHA :D;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;SCRIPT OPEN
- ON *:TEXT:*:#test: {
- ;
- ;!FIGHT OPEN
- if ($1 == !fight) {
- if ($2 !ison $chan) { .notice $nick $2 isn't here! | return }
- set -u20 %fighton $nick $2
- set -u20 %fightonchan $chan
- whois $nick | .timer 1 2 whois $2
- }
- ;FIGHT CLOSE
- ;
- ;
- ;;ACCEPT/DECLINE OPEN
- if (%fighton != ongoing) {
- if ($istok(!accept !decline,$1,32)) {
- var %v = $gettok(%fighton,2,32)
- if (%v == $nick) {
- var %ac = $1
- .timer~gevo~fight off
- gevo_fight $network $chan %fighton %ac
- }
- }
- }
- ;;;ACCEPT/DECLINE CLOSE
- ;
- ;
- }
- ;SCRIPT CLOSE;;;;
- ;;;;
- ;;;;
- ;;;;
- ;ALIAS GEVO_FIGHT OPEN
- alias gevo_fight {
- ;PARAMETERS
- var %net = $1, %chan = $2, %nick = $3, %opp = $4, %ac = $5
- ;PLAYERS HASHES
- var %gevonick = $+(gevo~,%nick), %gevoopp = $+(gevo~,%opp)
- if (!$hget(%gevonick)) { gevo_newpl %nick }
- if (!$hget(%gevoopp)) { gevo_newpl %opp }
- ;PLAYERS LVLS
- var %lvlnick = $hget(%gevonick,lvl), %lvlopp = $hget(%gevoopp,lvl), %lvldiff = $remove($calc(%lvlnick - %lvlopp),-)
- if (%lvldiff >= 5) { .notice %nick Too much lvl difference! Please choose an other opponent. | return }
- if (%ac == !decline) { .notice %nick %opp declined! | unset %fighton | return }
- set %fighton ongoing
- ;PLAYERS WEAPONS
- var $+(%,weap,%nick) = $hget(%gevonick,weapon), $+(%,weap,%opp) = $hget(%gevoopp,weapon)
- ;PLAYERS STATS
- 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)
- ;;;;HP: %hpnick %hpopp • ARMOR: %armornick %armoropp DMG: %dmgnick %dmgopp
- ;;;;RECOV: %reconick %recoopp EVASION: %evasnick %evasopp CRIT: %critnick %critopp
- ;PLAYERS ROUTINES
- var %healatnick = $hget(%gevonick,healat), %healatopp = $hget(%gevoopp,healat)
- ;MISC
- var %titlenick = $hget(%gevonick,title), %titleopp = $hget(%gevoopp,title)
- .timer 1 1 msg %chan The Fight Begins in 20 seconds!
- .timer 1 2 notice %nick Change any settings while you can, before the fight begins.
- .timer 1 2 notice %opp Change any settings while you can, before the fight begins.
- .timer~gevo~fightbegin1 1 21 set %fighton fighting
- .timer~gevo~fightbegin2 1 22 msg %chan !TIME TO FIGHT!
- .timer~gevo~fightbegin3 1 22 msg %chan $gevo_lvl(%lvlnick) $iif(%titlenick != no_title, $v1) %nick $gevo_hp(%hpnick)
- .timer~gevo~fightbegin4 1 22 msg %chan $+($chr(03),03,$chr(02),VERSUS)
- .timer~gevo~fightbegin5 1 23 msg %chan $gevo_lvl(%lvlopp) $iif(%titleopp != no_title, $v1) %opp $gevo_hp(%hpopp)
- ;;;ACTUAL FIGHT SEQUENCE LOOP OPEN
- var %t = 24, %player = 1
- while (%player) {
- inc %t 2
- ;PLAYER 1 BLOCK OPEN
- if (%player == 1) {
- var %armorcutoff = $calc(%armoropp * 0.2)
- var %crit = $iif($rand(1,100) isnum $+(1-,%critnick), 1, 0)
- var %dmgrangenick = $rand($calc(%dmgnick - (%dmgnick * (40/100))),%dmgnick)
- var %dmg = $iif(%crit, $calc(%dmgrangenick * 2), %dmgrangenick)
- var %finaldmg = $calc(%dmg - (%dmg * (%armorcutoff / 100)))
- var %evade = $iif(%crit, 0, $iif($rand(1,100) isnum $+(1-,%evasopp), 1, 0))
- ;;;;;;;;;;;;;;;;;1iifopen^;;;;;;;2iifopen^
- if (%evade) { var %hitmsg = %opp evades a $+(%finaldmg,DMG) hit from %nick }
- else {
- var %hitmsg %nick strikes %opp with $+(%finaldmg,DMG!)
- var %bhpo = %hpopp
- dec %hpopp %finaldmg
- var %newhpopp = %opp HP $gevo_hp(%bhpo,$+(-,%finaldmg)) %hpopp
- if (%hpopp <= 0) {
- unset %fighton
- .timer 1 $calc(%t + 2) msg %chan %nick defeats %opp
- hdec %gevonick hp $calc(100 - %hpnick)
- hdec %gevoopp hp 100
- set %player 0
- }
- }
- }
- ;PLAYER 1 BLOCK CLOSE
- ;
- ;
- ;PLAYER 2 BLOCK OPEN
- if (%player == 2) {
- var %armorcutoff = $calc(%armornick * 0.6)
- var %crit = $iif($rand(1,100) isnum $+(1-,%critopp), 1, 0)
- var %dmgrangeoopp = $rand($calc(%dmgopp - (%dmgopp * (40/100))),%dmgopp)
- var %dmg = $iif(%crit, $calc(%dmgrangeopp * 2), %dmgrangeopp)
- var %finaldmg = $calc(%dmg - (%dmg * (%armorcutoff / 100)))
- var %evade = $iif(%crit, 0, $iif($rand(1,100) isnum $+(1-,%evasnick), 1, 0))
- ;;;;;;;;;;;;;;;;;1iifopen^;;;;;;;2iifopen^
- if (%evade) { msg %chan %nick evades a $+(%finaldmg,DMG) hit from %opp [<>] %hitmsg }
- else {
- .timer 1 $calc(%t + 1) msg %chan %opp strikes %nick with $+(%finaldmg,DMG!) [<>] %hitmsg
- var %bhp = %hpnick
- dec %hpnick %finaldmg
- msg %chan %opp HP %newopphp
- msg %chan %nick HP $gevo_hp(%bhp,$+(-,%finaldmg) %hpnick
- if (%hpnick <= 0) {
- unset %fighton
- .timer 1 $calc(%t + 2) msg %chan %opp defeats %nick
- hdec %gevoopp hp $calc(100 - %hpopp)
- hdec %gevonick hp 100
- set %player 0
- }
- }
- }
- ;PLAYER 2 BLOCK CLOSE
- ;
- ;LOOPBACK OR BREAK
- $iif(!%player, break, $iif(%player == 1, inc $+(%,player), dec $+(%,player)))
- }
- ;ACTUAL FIGHT SEQUENCE LOOP CLOSE
- }
- ;ALIAS GEVO FIGHT CLOSE
- ;;;
- ;;;
- ;;;
- ; ALIAS GEVO_NEWPL OPEN
- alias gevo_newpl {
- var %n = $1
- var %h = $+(gevo~,%n)
- hmake %h
- ;;; not yet needed ;;; hsave %h $+(%h,.hsh)
- ;;;;HP: %hpnick %hpopp • ARMOR: %armornick %armoropp DMG: %dmgnick %dmgopp
- ;;;;RECOV: %reconick %recoopp EVASION: %evasnick %evasopp CRIT: %critnick %critopp
- hadd %h hp 20
- hadd %h armor 5
- hadd %h dmg 10
- hadd %h reco 1
- hadd %h evas 1
- hadd %h crit 5
- hadd %h lvl 1
- hadd %h title no_title
- }
- ; ALIAS GEVO_NEWPL CLOSE
- ;
- ;
- ;ALIAS GEVO_HP OPEN
- alias gevo_hp {
- var %hp = $iif($2 < 0, $calc($1 $2), $1)
- var %str = $str(',%hp)
- var %hpgfx = $+($chr(03),05,$chr(44),05,$chr(02),%str)
- if ($2) {
- var %pm = $left($2,1), %clpm = $iif(%pm == -, 08, 03)
- var %strpm = $str(',$mid($2,2,$len($2)))
- var %hpgfx = $+(%hpgfx,$chr(03),%clpm,$chr(44),%clpm,$chr(02),%strpm)
- }
- return %hpgfx
- }
- ;ALIAS GEVO_HP CLOSE
- ;
- ;
- ;ALIAS GEVO_LVL
- alias gevo_lvl { return $+(LvL,$chr(03),$iif($len($1) == 1, $+(0,$1), $1),$1) }
- ;
- ;
- ;;;;RAW Check identified
- ;:irc-us2.alphachat.net 330 OrFeAsGr OrFeAsGr OrFeAsGr :is logged in as
- raw *:*:{
- if ($numeric == 330) {
- var %p1 = $gettok(%fighton,1,32), %p2 = $gettok(%fighton,2,32)
- var %usednick = $2
- if ($istok(%fighton,%usednick,32)) {
- inc %idednum
- if (%idednum == 2) {
- unset %idednum
- .timer~gevo~fight 1 20 .notice %p1 $2 Declined the request!
- .notice %p2 %p1 challenged you to a fight. !accept or !decline
- .notice %p1 %p2 has been alerted. Waiting 20s for their reply.
- }
- set $+(%,ided,%usednick) 1
- var %loggedinas = $3
- if (%usednick != %loggedinas) {
- set %fighton $replace(%fighton,%usednick,%loggedinas)
- }
- }
- }
- if ($numeric == 318) {
- var %usednick = $2
- var %p1 = $gettok(%fighton,1,32), %p2 = $gettok(%fighton,2,32)
- if (!$($+(%,ided,%usednick),2)) {
- unset %ided*
- .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!)
- unset %fighton
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement