mIRC duel game

By dronez4 on May 14, 2017

Hi guys so i'm making a simple command line game, i've finished making a standard one, theres so much more to add but for now i'll show you what its like.

this is called the DUEL game:
Look at the pastebin to see what the game is like.
https://pastebin.com/ep0Dzhed

at the moment the commands are:
[18:08:54] <~dronez4> !help
[18:08:55] [Duel Commands]
[18:08:55] !duel, !accept, !attack, !damage, !duelstats

i'll show you what each command does

[!duel]
[18:04:58] <~dronez4> !duel wallrunner
[18:04:59] [DUEL]: dronez4 has dueled wallrunner [Type !accept to accept dronez4's duel]

[!accept]
[18:05:02] !accept
[18:05:03] [DUEL]: wallrunner accepted dronez4's duel
[18:05:03] [Max Damage]: dronez4: 40 - wallrunner: 40
[18:05:03] [HP:200] - dronez4
[18:05:03] [HP:200] - wallrunner
[18:05:04] [DUEL]: dronez4's turn

[!attack]
[18:05:14] <~dronez4> !attack wallrunner
[18:05:14] [ATTACK]: dronez4 hit 11 on wallrunner
[18:05:14] [HP:200] - dronez4
[18:05:14] [HP:189] - wallrunner
[18:05:14] [DUEL]: wallrunner's turn

[!damage]
[18:11:41] <~dronez4> !damage dronez4
[18:11:42] [Damage Output]: Maximum amount of damage dronez4 has: [Damage: 40]

[!duelstats]
[18:12:26] <~dronez4> !duelstats dronez4
[18:12:27] [Duel Stats]: dronez4 - (Max damage: 40) (Total HP: 200) (Wins: ) (loses: )
[the wins/loses are empty if you have won/lost 0 games]

I am currently in the stage of adding more features, way more features, feel free to give me any ideas? atm i've got a list
hp [DONE]
damage [DONE]
upgrades [DONE]
Round start - Round end [DONE]
Special power - skip [not sure about implimenting yet]
Store point system [Coming soon]
Stun [Coming soon]
Critical hit [coming soon]
Heal [Coming soon]
Protection spell [Coming soon]

;works for only 1 channel at the moment, so add a specific channel if need be.
on *:text:*:#:{
  if ($1 == !duel) && ($2 ison $chan) {
    if (%duel == on) { msg $chan 7[DUEL]: There's already a duel going on }
    else {
      msg $chan 7[DUEL]: $nick has dueled $2 [Type !accept to accept $nick $+ 's duel]
      set %duel on
      set %duelnick1 $nick
      set %duelnick2 $2
    }
  }
  if ($1 == !accept) {
    if (%duel == on) {
      remini duelhp.ini hp %duelnick1
      remini duelhp.ini hp %duelnick2
      set %duelturn %duelnick1
      set %duelnotturn %duelnick2
      msg $chan 7[DUEL]: %duelnick2 accepted %duelnick1 $+ 's duel
      msg $chan 4[Max Damage]: %duelnick1 $+ :13 $calc($readini(duelstats.ini, stats, %duelnick1) + 40) 4- %duelnick2 $+ :13 $calc($readini(duelstats.ini, stats, %duelnick2) + 40)
      timer 1 2 msg $chan 7[DUEL]: %duelturn $+ 's turn
      if ($readini(addhp.ini, hp, %duelnick1) != $null) {
        timer 1 1 writeini duelhp.ini hp %duelnick1 $calc(200 + $readini(addhp.ini, hp, %duelnick1))
        msg $chan 4[HP:13 $+ $calc(200 + $readini(addhp.ini, hp, %duelnick1)) $+ 4] - %duelnick1
      }
      if ($readini(addhp.ini, hp, %duelnick2) != $null) {
        timer 1 1 writeini duelhp.ini hp %duelnick2 $calc(200 + $readini(addhp.ini, hp, %duelnick2))
        msg $chan 4[HP:13 $+ $calc(200 + $readini(addhp.ini, hp, %duelnick2)) $+ 4] - %duelnick2
      }
      if ($readini(duelhp.ini, hp, %duelnick1)) {
        msg $chan 4[HP:13 $+ $calc($readini(duelhp.ini, hp, %duelnick1) + $readini(addhp.ini, hp, %duelnick1)) $+ 4] - %duelnick1
      }
      else {
        if ($readini(addhp.ini, hp, %duelnick1) == $null) {
          writeini duelhp.ini hp %duelnick1 200
          msg $chan 4[HP:132004] - %duelnick1
        }
      }
      if ($readini(duelhp.ini, hp, %duelnick2)) {
        msg $chan 4[HP:13 $+ $calc($readini(duelhp.ini, hp, %duelnick2) + $readini(addhp.ini, hp, %duelnick2)) $+ 4] - %duelnick2
      }
      else {
        if ($readini(addhp.ini, hp, %duelnick2) == $null) {
          writeini duelhp.ini hp %duelnick2 200
          msg $chan 4[HP:132004] - %duelnick2
        }
      }
    }
  }
  if ($1 == !attack) {
    if (%duel == on) {
      if ($nick isin %duelturn) {
        set %randomhit $calc($rand(10,40) + $readini(duelstats.ini, stats, %duelturn))
        if ($chr(45) isin $calc($readini(duelhp.ini, hp, %duelnotturn) - %randomhit)) {
          set %prize $rand(1,5)
          set %prize1 $rand(1,7)
          set %duel off
          msg $chan 4[ATTACK]:9 %duelturn hit13 %randomhit 9on %duelnotturn
          writeini duelhp.ini hp %duelnotturn $calc($readini(duelhp.ini, hp, %duelnotturn) - %randomhit)
          msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick1) $+ 4] - %duelnick1
          msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick2) $+ 4] - %duelnick2
          msg $chan 9[Winner]: %duelturn won the duel [Prize: Added %prize damage + %prize1 HP to %duelturn $+ 's statistic]
          writeini winsnlose.ini win %duelturn $calc($readini(winsnlose.ini, win, %duelturn) + 1)
          writeini winsnlose.ini lose %duelnotturn $calc($readini(winsnlose.ini, win, %duelnotturn) + 1)
          remini duelhp.ini hp %duelnick1
          remini duelhp.ini hp %duelnick2
          if ($readini(addhp.ini, hp, %duelturn) == $null) {
            writeini addhp.ini hp %duelturn %prize1
          }
          else {
            writeini addhp.ini hp %duelturn $calc($readini(addhp.ini, hp, %duelturn) + %prize1)
          }
          if ($readini(duelstats.ini, stats, %duelturn) != $null) {
            writeini duelstats.ini stats %duelturn $calc($readini(duelstats.ini, stats, %duelturn) + %prize)
            halt
          }
          else {
            writeini duelstats.ini stats %duelturn %prize
            halt
          }
        }

        msg $chan 4[ATTACK]:9 %duelturn hit13 %randomhit 9on %duelnotturn
        writeini duelhp.ini hp %duelnotturn $calc($readini(duelhp.ini, hp, %duelnotturn) - %randomhit)
        msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick1) $+ 4] - %duelnick1
        msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick2) $+ 4] - %duelnick2
        set %duelnotturn1 %duelnotturn
        set %duelnotturn %duelturn
        set %duelturn %duelnotturn1
        msg $chan 7[DUEL]: %duelturn $+ 's turn
      }
      else {
        msg $chan 7[DUEL]: It is %duelturn $+ 's turn
      }
    }
  }
  if ($1 == !damage) && ($2 == $null) {
    msg $chan 9[Damage Output]: Maximum amount of damage $nick has: [Damage:13 $calc($readini(duelstats.ini, stats, $nick) + 40) $+ 9]
  }
  if ($1 == !damage) && ($2 != $null) {
    msg $chan 9[Damage Output]: Maximum amount of damage $2 has: [Damage:13 $calc($readini(duelstats.ini, stats, $2) + 40) $+ 9]
  }
  if ($1 == !duelstats) {
    if ($2 != $null) {
      msg $chan 9[Duel Stats]: $2 - (Max damage:13 $calc($readini(duelstats.ini, stats, $2) + 40) $+ 9) (Total HP:13 $calc($readini(addhp.ini, hp, $2) + 200) $+ 9) 9(Wins:13 $readini(winsnlose.ini, win, $2) $+ 9) 9(loses:13 $readini(winsnlose.ini, lose, $2) $+ 9)
    }
    else {
      msg $chan 9[Duel Stats]: $nick - (Max damage:13 $calc($readini(duelstats.ini, stats, $nick) + 40) $+ 9) (Total HP:13 $calc($readini(addhp.ini, hp, $nick) + 200) $+ 9) 9(Wins:13 $readini(winsnlose.ini, win, $nick) $+ 9) 9(loses:13 $readini(winsnlose.ini, lose, $nick) $+ 9)

    }
  }
  if ($1 == !help) {
    msg $chan [Duel Commands]
    msg $chan !duel, !accept, !attack, !damage, !duelstats
  }
}

Comments

Sign in to comment.
cptpan   -  Jul 22, 2017

You need a way to turn off the colours, they're so bad

 Respond  
Valware   -  May 25, 2017

I love these sort of IRC games

dronez4  -  May 28, 2017

Hahahah me too! i'm actually working on more! you should definitely come by at irc.rencorner.com i'm always there maybe we can work on something together :p

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.