Top

Army game


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Sep 04, 2009
Last Updated  Oct 09, 2009
Tags  bla  cares  die  fighter  fuck  gun  shoot  the  who 

Introduction

Army script - i give the idea, you elaborate on it, gave up on this a long time ago. it works tho.

Grab the Code

on *:TEXT:!money:#: {
  $iif(!$Readini(army.ini, $nick $+ , money),writeini army.ini $nick money 1000)
  msg $chan $nick has $Readini(army.ini, $nick $+ , money) dollars
}
on *:TEXT:!Declare war*:#: {
  if ( $3 ison $chan ) && ( $readini(army.ini, $nick, war) != on ) && ( $readini(army.ini, $nick, Soldiers)) {
    echo $active 1
    if ( Readini(army.ini, $3, soldiers) == $null ) || (Readini(army.ini, $3, health) == $null ) { goto 2 }
    msg $chan $nick has declared war against $3 $+ !
    writeini -n army.ini $3 wara $nick
    halt
    :2 
    echo $active 2
    .notice $nick $3 does not meet the requirements to engage in war. 
    halt
  }
  else { .notice $nick You do not meet the requirements to declare war. }
}
on *:TEXT:!*infantry:#: {
  if ( $Readini(army.ini, $nick, war) != off ) {
    if ( $readini(army.ini, $nick, attacking) != on ) {
      var %oppenent $Readini(army.ini, $nick, war)
      var %damage $calc($readini(army.ini, $nick,attack) + $rand(10,35) )
      msg $chan $nick has sent infantry at %oppenent $+ !
      var %health $calc( $readini(army.ini, %oppenent, health) - %damage)
      writeini army.ini %oppenent health %health
      set %Player1 $nick
      Set %player2 %oppenent
      set %chan $chan
      writeini army.ini $nick Attacking on
      .timer $+ $nick $+ 2 1 26 deathcheck
      .timer $+ $nick $+ 3 1 25 writeini army.ini $nick Attacking off
      .timer $+ $nick 1 25 msg $chan $nick $+ 's infantry deals %damage damage leaving %oppenent with $readini(army.ini, %oppenent,health) health
    }
    else { notice $nick you are already attacking | halt }
  }
  else { .notice $nick you are not having a war with anyone }
}
alias deathcheck {
  if ( $readini(army.ini, %player1, health ) <= 0 ) { goto die }
  if ( $readini(army.ini, %player2, health ) <= 0 ) { goto die2 }
  halt
  :die
  var %mgain $rand(500,2000)
  var %magain2 $calc(%mgain + $readini(army.ini %player2 money))
  writeini army.ini %player2 money %mgain2
  msg chan %player2 has defeated %player1 $+ 's army and gotten %mgain dollars!
  writeini army.ini %player1 war off
  writeini army.ini %player2 war off
  halt
  :die2
  var %mgain $rand(500,2000)
  var %magain2 $calc(%mgain + $readini(army.ini, %player1, money))
  writeini army.ini %player1 money %magain2
  msg %chan %player1 has defeated %player2 $+ 's army and gotten %mgain dollars!
  writeini army.ini %player1 war off
  writeini army.ini %player2 war off
  halt
}
on *:TEXT:!accept war:#: {
  if ( $Readini(army.ini, $nick, wara) != $null ) {
    $Readini(army.ini, $nick, war)
    writeini -n army.ini $nick Health 100
    writeini -n army.ini $Readini(army.ini, $nick, wara) Health 100
    msg $chan $nick has acceped the war declared by $Readini(army.ini, $nick, wara)
    writeini -n army.ini $Readini(army.ini, $nick, wara) war on
    writeini -n army.ini $nick war $Readini(army.ini, $nick, wara)
    writeini -n army.ini $Readini(army.ini, $nick, wara) war $nick
  }
  else { $iif($readini(army.ini, $nick, wara) == $null,notice $nick no one has declared war with you.,notice $nick you do not have an army.) }
}
on *:TEXT:!army*:#: {
  if (!$Readini(army.ini, $iif($2,$2,$nick) $+ , soldiers)) {
    if ( $Readini(army.ini, $nick $+ , soldiers)) {
      msg $chan $iif($2,$2,$nick) has no soldiers.
    }
    if (!$2) {
      writeini -n army.ini $nick soldiers 100
      writeini -n army.ini $nick Health 100
      writeini -n army.ini $nick Attacking off
      msg $chan $nick has gotten 100 soilders
    }
  }
  else { msg $chan $iif($2,$2,$nick) has $Readini(army.ini, $iif($2,$2,$nick) $+ , soldiers) soldiers
  }
} 
on *:TEXT:!buy *:#: {
  if ( $2 == soldiers ) {
    if ( $3 isnum ) {
      if ( $Readini(army.ini, $nick $+ , money) >= $calc( $3 * 100 )) {
        var %num $3
        var %cost $3
        var %money $Readini(army.ini, $nick $+ , money)
        dec %money $calc( $3 * 100 )
        writeini -n army.ini $nick money %money
        var %soldiers $readini(army.ini, $nick $+ , soldiers)
        inc %soldiers %num
        writeini -n army.ini $nick soldiers %soldiers
      }
      else { .msg $chan You do not have enough money }
    }
    else { .msg $nick syntax is !buy <soldiers> <Number> }
  }
  if ( $2 == nuke ) {
    if ( $readini(army.ini, $nick, money) >= 1000 ) {
      var %money $readini(army.ini, $nick, money)
      dec %money 5000
      writeini army.ini $nick money %money
      writeini army.ini $nick nuke Yes
      msg $chan $nick has bought a bomb!
    }
    else { .notice $nick you do not have enough money }
  }
}
on *:TEXT:!nuke:#: {
  if ( $Readini(army.ini, $nick, war) != off ) && ( $readini(army.ini, $nick, war) != on ) {
    if ( $readini(army.ini, $nick, nuke) == yes ) && ( $readini(army.ini, $nick, attacking) != on ) {
      var %oppenent $Readini(army.ini, $nick, war)
      var %damage $calc($readini(army.ini, $nick,attack) + $rand(30,45) )
      msg $chan $nick has planted a bomb for %oppenent $+ !
      var %health $calc( $readini(army.ini, %oppenent, health) - %damage)
      writeini army.ini %oppenent health %health
      set %Player1 $nick
      Set %player2 %oppenent
      set %chan $chan
      writeini army.ini $nick Attacking on
      .timer $+ $nick $+ 2 1 36 deathcheck
      .timer $+ $nick $+ 3 1 34 writeini army.ini $nick Attacking off
      .timer $+ $nick 1 35 msg $chan $nick $+ 's bomb deals %damage damage leaving %oppenent with $iif($readini(army.ini, %oppenent,health) <= 0,0,$readini(army.ini, %oppenent,health)) health
    }
    else { notice $nick you are already attacking | halt }
  }
  else { .notice $nick you are not having a war with anyone }
}
 

Comments

  (7)  RSS
miniCruzer
Comments: 47
 
mIRC Snippet:  Army game
Posted on Sep 4, 2009 11:35 pm
I like the auto-capitalization. One problem I've seen so far:
Quote:

[12:26] <@Number`6> Question?.

I like the topics, and the other features. Good job!
GlobalAnomaly
Comments: 77
 
mIRC Snippet:  Army game
Posted on Sep 5, 2009 1:08 am
Quote:

* /msg: insufficient parameters (line 22, script1.ini)
(11.08.05) <Artemis_Fowl> hmm
(11.08.13) <Andraste> ?
(11.08.17) -> *This* script.
¦|¦|¦|¦|¦|¦|¦|¦| This not found on server. ¦|¦|¦|¦|¦|¦|¦|¦


Also, turning the rainbow talk on as well as the grammar won't work.

It could just be clashing with another script of mine, but...when I loaded it:

Quote:

Thank you for flying Termz airlines ;] hope you like the darkest script :D! 11,0¦|0,11¦|12,11¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|11,1 12,1I was using 12D12,14arkest 12S12,14cript 2,1|¦1,2|¦12,2|¦2,12|¦11,12|¦12,11|¦0,11|¦11,0|¦
 is unknown mode char to me
-
1 is unknown mode char to me
-
2 is unknown mode char to me
-
{ is unknown mode char to me
-
 is unknown mode char to me
-
1 is unknown mode char to me
Ghost-writer
Comments: 260
 
mIRC Snippet:  Army game
Posted on Sep 5, 2009 10:26 am
ahh thanks for the bugs, i will be fixing those immediatly;]
And global i think you missed a bracket.
Korvin
Comments: 336
 
mIRC Snippet:  Army game
Posted on Sep 5, 2009 11:59 am
This is the rainbow script i made for fun
Code:
f4 { editbox -n /msg $active 1,1 $+ $regsubex($editbox($active),//g,$+($chr(03),$r(0,1),$r(2,9))) }
it does what yours does, but more efficiently just type as you normally would, but use f4 as an enter key.

My more complete one:
Code:
rainbow {
  var %rbo 1 , %rb 2 , %txa
  var %ot $replace($1-,$chr(32),Š) , %rt 1 , %rb $r(2,14)
  while (%rbo < $calc($len(%ot) + 1 )) {
    if (%rb > 15) %rb = 2
    %txa = %txa $+ $($chr(3) $+ %rb) $+ $mid(%ot,%rbo,1)
    inc %rbo
    inc %rb
  }
  msg $active $replace(%txa,Š,$chr(32))
}

this cycles through the colors, so its a true rainbow effect.

also, for the theme I made and use, I use this grammar correction, VERY correct, and works great:
Code:

alias wwwww return who what where when why how did will would
alias rere {
  var %x = $1-
  tokenize 32 $1- $+ $iif($1 isalpha,$iif($right($1-,1) !isin $chr(63) $chr(44) $chr(59) :"'!.^][{}(),$iif($1- === $upper($1-),!,$iif($istok($wwwww,$1,32),?))))
  return $iif(%x isupper,$upper($1-),$sentance($1-))
}
Gage
Comments: 16
 
mIRC Snippet:  Army game
Posted on Nov 2, 2009 7:18 pm
Not a bad game, but I think some of the command should reply in notice. Otherwise pretty good :]
Korvin
Comments: 336
 
mIRC Snippet:  Army game
Posted on Nov 4, 2009 2:27 am
...did you completely change this post?
Ghost-writer
Comments: 260
 
mIRC Snippet:  Army game
Posted on Nov 4, 2009 6:21 am
Yes, yes i did, so i could put it elsewhere and give different comments.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom