Silvie Abandoned Code

From whuckaba
Jump to: navigation, search

category:Silvie Project

Second Generation Attack Routine


alias lolistriker {

  if ( $1 == !loliname ) {
    /lolinamer $2-
    halt
  }

  if ( $1 == !strike ) { 
    if ( $chan != #silviedebug ) { 
      lolinotice $nick Currently reworking.
      halt 
    }
    if ( $nick != keine ) { halt }
    ; advancedstrikesetup $2 $3 $4 $5 $6 $7 $8
    halt
  }
  if ( $1 == !commands ) {
    givefightcommands $2 $3 $4 $5 $6 $7
    halt
  }
  if ( $1 == !mystatus ) {
    /lolifightstatus $nick 2
    halt
  }
  if ( $1 == !deploytrap ) {
    /lolideploytrap $nick $2
    halt
  }
  if ( $1 == !flee ) {
    /loliflee $nick
    halt
  }
  if ( $1 == !bishaura ) {
    /lolibishaura $nick $2
    halt
  }

  if ( $1 == !attack ) {
    /loliattack $nick $2
    halt
  }
  if ( $1 == !antiloli ) {
    /describe $chan takes a loli back from $nick
    /loligamedata $nick loli -1 * * DIFF
  }



}




alias advancedstrikesetup {
  if ( $1 == $null ) {
    lolinotice $nick Format: !strike [person]
    lolinotice $nick Alt:  !strike the bank 
    lolinotice $nick Remind Keine to add the help file stuff
    halt
  }

  var %myfights = $loligamedata($nick,fights).get
  var %myfighting = $loligamedata($nick,fighting).get

  if (( %myfights < 1 ) || ( %myfights == $null)) {
    lolinotice $nick You currently have no fights available.
    halt
  }
  if (( %myfighting != no.one ) && ( %myfighting != $null)) {
    lolinotice $nick You are already engaged in war.
    halt
  }

  var %lolidatanick = $1
  var %loliname = $1
  var %lolispec = $null
  var %lolinet = $network
  var %theirfights = $loligamedata(%lolidatanick,fights,%lolispec,%lolinet).get
  var %theirfighting = $loligamedata(%lolidatanick,fighting,%lolispec,%lolinet).get
  if ( $2 == bank ) {
    %lolidatanick = $null
    %lolispec = bank
    %loliname = $network $+ 's bank
    %lolinet = $network
    %theirfights = 1
    %theirfighting = $null
  }
  var %valueloli = $loligamedata(%lolidatanick,loli,%lolispec,%lolinet).get

  if ( $1 == $me ) {
    %lolidatanick = $null
    %lolispec = silvie
    %loliname = Silvie and the Wanko Loli Collection Force
    %lolinet = $network
    %theirfights = 1
    %theirfighting = $null
    %valueloli = %loligamedata($nick,loli).get
  }
  if ( ( %valueloli == $null ) && ( $1 != $me ) ) {
    lolinotice $nick I don't think they have played my game (or they are on a different network)
    halt
  }
  if (( %theirfights < 1 ) || ( %theirfights == $null)) {
    lolinotice $nick %loliname currently has a protected state.
    halt
  }
  if (( %theirfighting != no.one ) && ( %theirfighting != $null)) {
    lolinotice $nick %loliname is already engaged in war.
    halt
  }

  while ( %i == %i ) {
    var %unid = WAR $+ $rand(1,10000)
    var %check = $readini(c:\script\silviewar.ini,master,%unid)
    if ( %check == $null ) {
      /break
    }
  } 

  msg $nick UNIQUE BATTLE ID: %unid
  msg $nick You have challenged %loliname to a battle. If %loliname doesn't respond within the 5 minute period, they will be played by $me $+ .
  msg $nick If you fail to respond to your turns, your battle will be forfeited.
  msg $nick List of available commands at: �!commands�
  if ( %lolidatanick != $null ) { 
    msg %lolidatanick UNIQUE BATTLE ID: %unid 
    msg %lolidatanick $nick has challenged you to a battle. If you do not respond within the 5 minute period, you will be played by $me $+ .
    msg %lolidatanick List of available commands at: �!commands� 
  }


  var %cond = GOOD. 
  ;whatever else blah go here

  /writeini c:\script\silviewar.ini master %unid IN PROGRESS
  /writeini c:\script\silviewar.ini %unid network $network
  /writeini c:\script\silviewar.ini %unid 1 $nick
  /writeini c:\script\silviewar.ini %unid $+ . $+ $nick name $nick

  /loligamedata $nick fighting %unid
  /loligamedata $nick fights $calc(%myfights -1)


  if ( $1 == $me ) {
    /writeini c:\script\silviewar.ini %unid 2 the.silvie
    /writeini c:\script\silviewar.ini %unid $+ .the.silvie NPC TRUE
    /writeini c:\script\silviewar.ini %unid $+ .the.silvie name %loliname
  }
  elseif ( $2 == bank ) {
    /writeini c:\script\silviewar.ini %unid 2 the.bank
    /writeini c:\script\silviewar.ini %unid $+ .the.bank NPC TRUE
    /writeini c:\script\silviewar.ini %unid $+ .the.bank name %loliname
  }
  else {
    /writeini c:\script\silviewar.ini %unid 2 %lolidatanick
    /writeini c:\script\silviewar.ini %unid $+ . $+ %lolidatanick name %loliname

    /loligamedata %lolidatanick fighting %unid
    /loligamedata %lolidatanick fights $calc(%theirfights -1)   

  }


  var %topone = $loligamedata(,UNITS).get

  var %quick = 0
  var %iio = 0
  while ( %iio <= %topone ) {
    var %stocks = $LOLICOMD(%iio)
    if ( %iio = 0 ) {   var %stocks = loli }

    var %tempa = $loligamedata($nick,%stocks).get
    if ( %tempa == $null ) { %tempa = 0 }
    /writeini c:\script\silviewar.ini %unid $+ . $+ $nick %stocks $+ .start %tempa
    /writeini c:\script\silviewar.ini %unid $+ . $+ $nick %stocks $+ .hp $calc(%tempa * $hget(loligamehash,fight. $+ %stocks $+ .hp))

    if ( $1 == $me ) {
      var %tempa = $int($calc($loligamedata($nick,%stocks).get * 1.3))
      if ( %tempa == $null ) { %tempa = 0 }
      /writeini c:\script\silviewar.ini %unid $+ .the.silvie %stocks $+ .start %tempa 
      /writeini c:\script\silviewar.ini %unid $+ .the.silvie %stocks $+ .hp $calc(%tempa * $hget(loligamehash,fight. $+ %stocks $+ .hp))
      %quick = 1
    }
    elseif ( $2 == bank ) {
      var %tempa = $loligamedata(%lolidatanick,%stocks,%lolispec,%lolinet).get
      if ( %tempa == $null ) { %tempa = 0 }
      /writeini c:\script\silviewar.ini %unid $+ .the.bank %stocks $+ .start %tempa
      /writeini c:\script\silviewar.ini %unid $+ .the.bank %stocks $+ .hp $calc(%tempa * $hget(loligamehash,fight. $+ %stocks $+ .hp))
      %quick = 2
    }
    else {
      var %tempa = $loligamedata(%lolidatanick,%stocks,%lolispec,%lolinet).get
      if ( %tempa == $null ) { %tempa = 0 }
      /writeini c:\script\silviewar.ini %unid $+ . $+ %lolidatanick %stocks $+ .start %tempa
      /writeini c:\script\silviewar.ini %unid $+ . $+ %lolidatanick %stocks $+ .hp $calc(%tempa * $hget(loligamehash,fight. $+ %stocks $+ .hp))

    }
    inc %iio
  }



  if ( $chan != $null ) {
    msg $chan $nick has engaged in combat with %loliname
  } 



  msg $nick Currently additional phases of this fighting have not been written.. currently only in theater setup

  /lolifightstatus $nick 2
  if ( %quick == 0 ) { 
    /lolifightstatus %lolidatanick 2 
    /lolifightstatus %lolidatanick 3 $nick
    /lolifightstatus $nick 3 %lolidatanick
  }
  if ( %quick == 1 ) { 
    /lolifightstatus the.silvie 0 
    /lolifightstatus $nick 3 the.silvie
  }
  if ( %quick == 2 ) { 
    /lolifightstatus the.bank 0 
    /lolifightstatus $nick 3 the.bank
  }

  /writeini c:\script\silviewar.ini %unid status prematch

  /writeini c:\script\silviewar.ini %unid time $ctime
  /writeini c:\script\silviewar.ini %unid starttime $ctime
  if ( $chan != $null ) {   /writeini c:\script\silviewar.ini %unid chan $chan }




  ;/timer $+ %unid 1 10 /lolifightminder %unid
  /lolifightminder %unid
}



alias lolifightstatus {
  if ( $5 == $null ) { var %unid = $lolifightchecker }
  if ( $5 != $null ) { var %unid = $5 }

  ; $2 = 99 - just run calcs
  ; $2 = 98 - kill $6 HP

  var %forwho = $1
  if ( $1 == $null )  { %forwho = $nick }

  if ( $2 == 100 ) {

    var %hpmax = $readini(c:\script\silviewar.ini,%unid $+ . $+ %forwho,HPMAX)
    var %hpnow = $readini(c:\script\silviewar.ini,%unid $+ . $+ %forwho,HPNOW)
    return $int($calc((%hpnow / %hpmax)*100) )
  }

  if ( $2 == 3 ) {
    var %hpmax = $readini(c:\script\silviewar.ini,%unid $+ . $+ $3,HPMAX)
    var %hpnow = $readini(c:\script\silviewar.ini,%unid $+ . $+ $3,HPNOW)

    var %tattack = $readini(c:\script\silviewar.ini,%unid $+ . $+ $3,ATTACK)
    var %mdefense = $readini(c:\script\silviewar.ini,%unid $+ . $+ %forwho,DEFENSE)
    var %mhp = $readini(c:\script\silviewar.ini,%unid $+ . $+ %forwho,HPNOW)

    var %whatif = $calc( %tattack - ( %mdefense + %mhp ) )
    if ( %whatif > 1 ) { var %extra = Warning, they could critically strike you. }   

    /echo -s the item is %unid $+ . $+ $3,HPNOW

    var %goname = $readini(c:\script\silviewar.ini,%unid $+ . $+ $3,name)
    msg %forwho %goname $+ 's forces are currently at $int($calc((%hpnow / %hpmax)*100) ) percent. %extra

  }

  if ( $2 == 98 ) {
    var %outout = $null
    var %killed = 0
  }

  ; ################# ACTUAL FIGURING


  var %iio = 0
  var %topone = $loligamedata(,UNITS).get
  while ( %iio <= %topone ) {
    var %stocks = $LOLICOMD(%iio)
    if ( %iio = 0 ) {   var %stocks = loli }

    var %tempa  = $readini(c:\script\silviewar.ini,%unid $+ . $+ %forwho,%stocks $+ .start)
    var %hpstart = $calc(%tempa * $hget(loligamehash,fight. $+ %stocks $+ .hp))
    var %hpnow = $readini(c:\script\silviewar.ini,%unid $+ . $+ %forwho,%stocks $+ .hp)
    var %uniteff = $calc(%hpnow / $hget(loligamehash,fight. $+ %stocks $+ .hp))

    if (%stocks == TRAP ) {

      var %bishaura = $readini(c:\script\silviewar.ini,%unid $+ . $+ %forwho,BISH.AURA)
      if (%bishaura == $null ) {
        %bishaura = 0
        /writeini c:\script\silviewar.ini %unid $+ . $+ %forwho BISH.AURA 0
      }
      var %bishauratwo = $calc((100 - %bishaura) / 100 )
      var %bishaura = $calc(%bishaura / 100 )
      var %offense = $calc((%uniteff * $hget(loligamehash,fight. $+ %stocks $+ .attack)) * %bishauratwo )
      var %defense = $calc((%uniteff * $hget(loligamehash,fight. $+ %stocks $+ .defense)) * %bishauratwo )
      var %offenset = $calc((%uniteff * $hget(loligamehash,fight. $+ %stocks $+ .attack)) * %bishaura * -22)
      var %defenset = $calc((%uniteff * $hget(loligamehash,fight. $+ %stocks $+ .defense)) * %bishaura * 10)
      var %offense = $int($calc(%offense + %offenset))
      var %defense = $int($calc(%defense + %defenset))
    }
    else {




      var %offense = $int($calc(%uniteff * $hget(loligamehash,fight. $+ %stocks $+ .attack)))
      ;above must be corrected for spells/effects
      var %defense = $int($calc(%uniteff * $hget(loligamehash,fight. $+ %stocks $+ .defense)))
    }

    var %totalhpmax = $calc(%totalhpmax + %hpstart)
    var %totalhp = $calc(%totalhp + %hpnow)
    var %totaloff = $calc(%totaloff + %offense)
    var %totaldef = $calc(%totaldef + %defense)
    if ( $2 == 1 ) {
      msg %forwho %stocks $+ : HP: $chr(91) $+ %hpnow $+ / $+ %hpstart $+ $chr(93)  Offensive Power: %offense   Defensive Power: %defense
    }


    if ( $2 == 98 ) {
      var %partake = $calc(%defense / $7)
      var %inflict = $int($calc(($6 * %partake) + 1 + %killed ))
      %killed = 0
      ;if ( %hpnow == 0 ) { %inflict = 0 }
      var %difhp = $calc(%hpnow - %inflict)
      if ( %difhp < 0 ) {
        var %killed = $calc( 0 - %difhp )
        var %difhp = 0
        if ( %hpnow > 0 ) {
          if ( %outout == $null ) {
            %outout = You have killed all of their: 
          }
          var %outout = %outout $LOLICOMDNAME(%stocks) 
          %outout = %outout $+ ,
        }
      }              
      /writeini c:\script\silviewar.ini %unid $+ . $+ %forwho %stocks $+ .hp %difhp


      ;       %killed = 0


      ;msg #silviedebug %stocks to Partken = %partake , inflict %inflict ,  HP %hpnow , end %difhp , carry over %killed

    }



    inc %iio
  } 

  if ( $2 == 2 ) {
    msg %forwho Current Status: HP $chr(91) $+ %totalhp $+ / $+ %totalhpmax $+ $chr(93)  Offensive Power: %totaloff   Defensive Power: %totaldef
  }

  if ( $2 == 98 ) {
    return %outout
  }

  /writeini c:\script\silviewar.ini %unid $+ . $+ %forwho HPMAX %totalhpmax
  /writeini c:\script\silviewar.ini %unid $+ . $+ %forwho HPNOW %totalhp
  /writeini c:\script\silviewar.ini %unid $+ . $+ %forwho ATTACK %totaloff
  /writeini c:\script\silviewar.ini %unid $+ . $+ %forwho DEFENSE %totaldef





}





alias lolifightchecker {
  ;     /loligamedata %lolidatanick fighting %unid
  var %who = $nick
  if ( %who == $null ) { %who = $1 }

  var %unid = $loligamedata(%who,fighting).get
  if ( ( %unid == no.one ) || ( %unid == $null ) ) {
    msg $nick You do not appear to be in a fight at the moment.
    halt
  }
  return %unid
}


alias loliattack {
  if ( $2 == TTT ) { %unid = $3 }
  if ( $2 != TTT ) {
    if ( ( $1 != the.silvie ) && ( $1 != the.bank ) ) { %unid = $lolifightchecker }
    if ( ( $1 == the.silvie ) || ( $1 == the.bank ) ) { %unid = $3 }
  }

  var %status = $readini(c:\script\silviewar.ini,%unid,status)
  if (( %status == p1 ) || ( %status == p2 ) ) {
    var %activep = $readini(c:\script\silviewar.ini,%unid,activep)
  }
  var %pass = 0
  if ( %activep == $1 ) { %pass = 1 }

  if ( %pass == 0 ) {
    msg $1 Sorry, you can't do that right now. Try when it is your turn.
    halt
  }

  var %pone = $1
  var %ptwo = $readini(c:\script\silviewar.ini,%unid,2)
  if ( %ptwo == %pone ) {
    var %ptwo = $readini(c:\script\silviewar.ini,%unid,1)
  }

  /lolifightstatus %pone 99 * * %unid
  /lolifightstatus %ptwo 99 * * %unid



  ;  /writeini c:\script\silviewar.ini %unid $+ . $+ %forwho HPMAX %totalhpmax
  ;  /writeini c:\script\silviewar.ini %unid $+ . $+ %forwho HPNOW %totalhp
  ;  /writeini c:\script\silviewar.ini %unid $+ . $+ %forwho ATTACK %totaloff
  ;  /writeini c:\script\silviewar.ini %unid $+ . $+ %forwho DEFENSE %totaldef

  var %ponehp = $readini(c:\script\silviewar.ini,%unid $+ . $+ %pone,hpnow)
  var %ptwohp = $readini(c:\script\silviewar.ini,%unid $+ . $+ %ptwo,hpnow)
  var %poneattk = $readini(c:\script\silviewar.ini,%unid $+ . $+ %pone,ATTACK)
  var %ptwodefn = $readini(c:\script\silviewar.ini,%unid $+ . $+ %ptwo,DEFENSE)

  var %attkvar = $rand($int($calc(%poneattk * 0.8)),$int($calc(%poneattk * 1.4)))
  var %forcer = $int($calc((%attkvar / %poneattk) * 100)) percent

  ;  msg $nick DEBUG %pone HP = %ponehp , %ptwo HP = %ptwohp , attack = %poneattk , defense = %ptwodefn , mod = %attkvar

  var %outline = You attack with %forcer of your power.



  var %damage = $calc( %attkvar - %ptwodefn )


  if ( %damage < 1 ) {
    %damage = 0
    var %outline = %outline You don't even scratch $readini(c:\script\silviewar.ini,%unid $+ . $+ %ptwo,name) $+ .

    if ( ( $1 != the.silvie ) && ( $1 != the.bank ) ) {
      msg $1 %outline
    }
    lolifightchangesides %unid
  }

  ;msg #silviedebug Damage = %damage





  var %what = $lolifightstatus(%ptwo,98,,,%unid,%damage,%ptwodefn)

  var %outline = %outline %what
  if ( ( $1 != the.silvie ) && ( $1 != the.bank ) ) { 
    msg $1 %outline
  }

  lolifightchangesides %unid

}

















alias lolideploytrap {
  if ( ( $1 != the.silvie ) && ( $1 != the.bank ) ) { %unid = $lolifightchecker }
  if ( ( $1 == the.silvie ) || ( $1 == the.bank ) ) { %unid = $3 }

  var %status = $readini(c:\script\silviewar.ini,%unid,status)
  if (( %status == p1 ) || ( %status == p2 ) ) {
    var %activep = $readini(c:\script\silviewar.ini,%unid,activep)
  }
  var %pass = 0
  if ( %status == prematch ) { %pass = 1 }
  if ( %activep == $1 ) { %pass = 1 }

  if ( %pass == 0 ) {
    msg $1 Sorry, you can't do that right now. Try when it is your turn.
    halt
  }

  if ( $2 == $null ) {
    msg $1 You must tell me how many traps to deploy into the feild.
    halt
  }

  var %hptrap = $readini(c:\script\silviewar.ini,%unid $+ . $+ $1,TRAP.HP)
  var %maxtrap = $int($calc(%hptrap / $hget(loligamehash,fight.trap.hp)))

  var %todeploy = $2
  if ( %todeploy > %maxtrap ) {
    msg $1 You only have %maxtrap traps that can be deployed.
    %todeploy = %maxtrap
  }

  %hptrap = $calc(%hptrap - (%todeploy * $hget(loligamehash,fight.trap.hp)))
  /writeini c:\script\silviewar.ini %unid $+ . $+ $1 TRAP.HP %hptrap

  var %jj = $readini(c:\script\silviewar.ini,%unid,1)
  if ( %jj == $1 ) { 
    %jj = $readini(c:\script\silviewar.ini,%unid,2) 
  }

  var %existingtrap = $readini(c:\script\silviewar.ini,%unid $+ . $+ %jj,EXITTRAP)
  if ( %existingtrap == $null ) { %existingtrap = 0 }
  /writeini c:\script\silviewar.ini %unid $+ . $+ %jj EXITTRAP $calc(%existingtrap + %todeploy)

  if ( %jj = the.bank ) { %jj = $network $+ 's bank }
  if ( %jj = the.silvie ) { %jj = silvie }

  if ( ( $1 != the.silvie ) && ( $1 != the.bank ) ) {
    msg $1 %jj was surrounded with %existingtrap traps gaurding the exit routes, now %jj is now surrounded by $calc(%existingtrap + %todeploy) traps. 
  }

  halt




}


alias lolibishaura {

  if ( ( $1 != the.silvie ) && ( $1 != the.bank ) ) { %unid = $lolifightchecker }
  if ( ( $1 == the.silvie ) || ( $1 == the.bank ) ) { %unid = $3 }

  var %status = $readini(c:\script\silviewar.ini,%unid,status)
  if (( %status == p1 ) || ( %status == p2 ) ) {
    var %activep = $readini(c:\script\silviewar.ini,%unid,activep)
  }
  var %pass = 0
  if ( %status == prematch ) { %pass = 1 }
  if ( %activep == $1 ) { %pass = 1 }

  if ( %pass == 0 ) {
    msg $1 Sorry, you can't do that right now. Try when it is your turn.
    halt
  }

  if ( $2 == $null ) {
    msg $1 You must tell me what percent of your BISH you want to become self-obsessed.
    halt
  }


  var %plays = $int($2)
  if ( $2 < 0 ) {
    msg $1 You must have 0% or more of your BISH involved in self-appreciation.
    halt
  }
  if ( $2 > 100 ) {
    msg $1 You must have 100% or less of your BISH involved in self-appreciation.
    halt
  } 

  var %jj = $readini(c:\script\silviewar.ini,%unid,1)
  if ( %jj == $1 ) { 
    %jj = $readini(c:\script\silviewar.ini,%unid,2) 
  }

  if ( ( $1 != the.silvie ) && ( $1 != the.bank ) ) { 
    msg $1 Now %plays percent of your BISH are involved in appreaciating their beauty.
  }
  if ( ( %jj != the.silvie ) &&  ( %jj != the.bank ) ) { 
    if ( %plays < 5 ) {
      msg %jj $1 $+ 's battle field loses its Bishie glow.
    }
    if ( ( %plays > 5 ) && ( %plays < 95 ) ) {
      msg %jj $1 $+ 's battle feild begins to have an aura of Bishie to it.
    }
    if ( %plays > 95 ) {
      msg %jj It almost feels like the view of $1 $+ 's battle feild in your binoculars is bordered by roses and vines. It's very distracting.

    }
  }
  /writeini c:\script\silviewar.ini %unid $+ . $+ $1 BISH.AURA %plays




  halt
}











alias loliflee {
  if ( ( $1 != the.silvie ) && ( $1 != the.bank ) ) { %unid = $lolifightchecker($1) }
  if ( ( $1 == the.silvie ) || ( $1 == the.bank ) ) { %unid = $2 }

  ;msg #silviedebug person is $1 and result is %unid

  var %status = $readini(c:\script\silviewar.ini,%unid,status)
  if (( %status == p1 ) || ( %status == p2 ) ) {
    var %activep = $readini(c:\script\silviewar.ini,%unid,activep)
  }
  var %pass = 0
  if ( %status == prematch ) { %pass = 1 }
  if ( %activep == $1 ) { %pass = 1 }

  if ( %pass = 0 ) {
    msg $nick Sorry, you can't do that right now. Try when it is your turn.
    halt
  }


  var %existingtrap = $readini(c:\script\silviewar.ini,%unid $+ . $+ $1,EXITTRAP)

  if (%existingtrap == $null ) { %existingtrap = 0 }

  var %top = $calc(1 + %existingtrap)
  var %bottom = $calc( 2 + %existingtrap)
  var %chance = $calc(%top / %bottom )
  var %prob = $calc($rand(1,10000) / 10000)

  var %escape = 0
  var %jj = $readini(c:\script\silviewar.ini,%unid,1)
  if ( %jj == $1 ) { 
    %jj = $readini(c:\script\silviewar.ini,%unid,2) 
  }


  if ( %prob > %chance ) { 
    if ( ( $1 != the.bank ) || ( $1 != the.silvie ) ) { msg $1 You have successfully fled. }
    if ( ( %jj != the.bank ) || ( %jj != the.silvie ) ) { msg %jj $1 $+ 's force has fled the feild of battle.  }
    /fightend %unid %jj fled
    halt
  }


  if ( %existingtrap = 0 ) { 
    if ( ( $1 != the.bank ) || ( $1 != the.silvie ) ) { 
      msg $1 Your pride keeps you from leaving. 
      if ( ( %jj != the.bank ) || ( %jj != the.silvie ) ) { msg %jj $1 started to flee, but $1 $+ 's pride kept them from leaving. }
    }
  }    

  if ( %existingtrap > 1 ) {
    if ( ( $1 != the.bank ) || ( $1 != the.silvie ) ) { msg $1 You begin to leave, but you come across a cute girl.. er.. wait.. its ... A TRAP! ...   }


    var %ii = 1

    while ( %ii < 10 ) {

      var %topone = $loligamedata(,UNITS).get

      var %iio = $rand(0,%topone)
      var %stocks = $LOLICOMD(%iio)
      if ( %iio = 0 ) { %stocks = LOLI }
      var %hpstock = $readini(c:\script\silviewar.ini,%unid $+ . $+ $1,%stocks $+ .HP)
      var %maxstock = $int($calc(%hpstock / $hget(loligamehash,fight. $+ %stocks $+ .hp)))
      if ( %hpstock > 0 ) {
        %maxstock = $int($calc(%maxstock / 2 ))
        if ( %maxstock == 0 ) { %maxstock = 1 }
        var %loss = $rand(1,%maxstock)
        if ( ( %stocks == STKR ) && ( %loss > 1 ) ) { %loss = 1 }
        if ( %loss = 0 ) {
          msg $1 The trap detonates an explosive device, but luckily your force was safe.
          if ( ( %jj != the.bank ) || ( %jj != the.silvie ) ) { msg %jj One of your deployed Traps exploded, but caused no damage. }          
          /break
        }
        if ( %stocks == STKR ) {
          msg $1 One of your Strikers ventures too close to the TRAP just as it detonates, mortally wounding your Striker.
          if ( ( %jj != the.bank ) || ( %jj != the.silvie ) ) { msg %jj Even from across the battlefeild it is clear that $1 $+ 's Striker was trying to retreat... but was killed by a Trap you deployed! }          
        } 
        else {
          msg $1 The trap explodes, taking %loss of your %stocks with it.
          if ( ( %jj != the.bank ) || ( %jj != the.silvie ) ) { msg %jj $1 tried to retreat, but one of your Deployed Traps detonated killing some of their force! }          
        } 
        %loss = $calc(%loss * $hget(loligamehash,fight. $+ %stocks $+ .hp) )
        %hpstock = $calc( %hpstock - %loss)
        if ( %hpstock < 0 ) { %hpstock = 0 }
        /writeini c:\script\silviewar.ini %unid $+ . $+ $1 %stocks $+ .HP %hpstock
        /break
      }
      ;otherwise have to find another stock out there
      inc %ii
    }
  }


  if ( %existingtrap > 0 ) {
    %existingtrap = $calc(%existingtrap - 1)
    /writeini c:\script\silviewar.ini %unid $+ . $+ $1 EXITTRAP %existingtrap
  }


  if ( %status != prematch ) {
    lolifightchangesides %unid 
    halt
  }


  halt
}


















alias lolifightminder {
  var %unid = $1
  if ( %unid == $null ) { halt }
  var %status = $readini(c:\script\silviewar.ini,%unid,status)
  var %stime = $readini(c:\script\silviewar.ini,%unid,time)
  var %ptime = $calc($ctime - %stime)
  var %pone = $readini(c:\script\silviewar.ini,%unid,1)
  var %ptwo = $readini(c:\script\silviewar.ini,%unid,2)
  var %ochan = $readini(c:\script\silviewar.ini,%unid,chan)

  if ( %status == prematch ) {
    ;globaldebug $scriptline Time %ptime okay? pone: %pone ptwo: %ptwo

    if ( %ptime < 260 ) {
      if ( %ptime < 5 ) { var %outline =  About 5 minutes remain in the pre-match period. }
      if ( ( %ptime > 55 ) && ( %ptime < 65 )) { var %outline = About 4 minutes remain in the pre-match period. }
      if ( ( %ptime > 115 ) && ( %ptime < 125 )) { var %outline = About 3 minutes remain in the pre-match period. }
      if ( ( %ptime > 175 ) && ( %ptime < 185 )) { var %outline = About 2 minutes remain in the pre-match period. }
      if ( ( %ptime > 235 ) && ( %ptime < 245 )) { var %outline = About 1 minute remains in the pre-match period. }
      if ( %outline != $null ) {
        msg %pone %outline
        if ( . !isin %ptwo ) { msg %ptwo %outline }
      }
      /timer $+ %unid 1 30 /lolifightminder %unid  
      halt
    }
    if ( ( %ptime > 259 ) && ( %ptime < 300 ) ) {


      if ( ( %ptime > 268 ) && ( %ptime < 272 )) { var %outline = About 30 seconds remain in the pre-match period. }
      if ( ( %ptime > 278 ) && ( %ptime < 282 )) { var %outline = About 20 seconds remain in the pre-match period. }
      if ( ( %ptime > 288 ) && ( %ptime < 292 )) { var %outline = About 10 seconds remain in the pre-match period. }
      if ( ( %ptime > 293 ) && ( %ptime < 297 )) { var %outline = About 5 seconds remain in the pre-match period. }
      if ( %outline != $null ) {
        msg %pone %outline
        if ( . !isin %ptwo ) { msg %ptwo %outline }
      }
      /timer $+ %unid 1 5 /lolifightminder %unid  
      halt
    }



    globaldebug $scriptline well we hit the end of that. Do NPC and forfeit checking here.





    /lolifightstatus %pone 2 * * %unid
    var %outline = %pone $+ 's forces at $lolifightstatus(%pone,100,,,%unid) percent.
    if (( %ptwo != the.bank ) && ( %ptwo != the.silvie ) ) { 
      /lolifightstatus %ptwo 2 * * %unid
      /lolifightstatus %ptwo 3 %pone * %unid
      /lolifightstatus %pone 3 %ptwo * %unid
      var %outline = %outline %ptwo $+ 's forces at $lolifightstatus(%ptwo,100,,,%unid) percent.
    }
    if ( %ptwo == the.silvie ) { 
      /lolifightstatus the.silvie 0 * * %unid
      /lolifightstatus %pone 3 the.silvie * %unid
      var %outline = %outline Silvie's forces at $lolifightstatus(the.silvie,100,,,%unid) percent.
    }
    if ( %ptwo == the.bank ) { 
      /lolifightstatus the.bank 0 * * %unid
      /lolifightstatus %pone 3 the.bank * %unid
      var %outline = %outline $network bank's forces at $lolifightstatus(the.bank,100,,,%unid) percent.
    }


    if ( %ochan != $null ) { msg %ochan Battle Report, 5 minutes: %outline }

    var %outline = Now entering aggressive rounds. %pone starts first.
    msg %pone %outline
    if ( . !isin %ptwo ) { msg %ptwo %outline }



    /writeini c:\script\silviewar.ini %unid status p1
    /writeini c:\script\silviewar.ini %unid activep %pone
    /writeini c:\script\silviewar.ini %unid time $ctime
    /writeini c:\script\silviewar.ini %unid artime 5
    /timer $+ %unid 1 15 /lolifightminder %unid  



    halt
  }


  if (( %status == p1 ) || ( %status == p2 ) ) {
    var %whoitis = $readini(c:\script\silviewar.ini,%unid,activep)
    var %whoitis = $readini(c:\script\silviewar.ini,%unid $+ . $+ %whoitis,name)

    if ( %ptime < 49 ) {
      if ( ( %ptime > 10 ) && ( %ptime < 20 )) { var %outline = About 45 seconds left in %whoitis $+ 's turn. }
      if ( ( %ptime > 25 ) && ( %ptime < 35 )) { var %outline = About 30 seconds left in %whoitis $+ 's turn. }
      if ( ( %ptime > 40 ) && ( %ptime < 50 )) { var %outline = About 15 seconds left in %whoitis $+ 's turn. }
      if ( %outline != $null ) {
        msg %pone %outline
        if ( . !isin %ptwo ) { msg %ptwo %outline }
      }
      /timer $+ %unid 1 15 /lolifightminder %unid  
      halt
    }
    if ( %ptime < 60 ) {
      /timer $+ %unid 1 15 /lolifightminder %unid  
      halt
    }        
    lolifightchangesides %unid
    halt
  }
  if ( %status == cleanup ) {
    /lolicleanupservice %unid
  }

  ;  /writeini c:\script\silviewar.ini %unid status prematch
  ;  /writeini c:\script\silviewar.ini %unid time $ctime


}


alias lolicleanupservice {
  var %war = $1
  var %pone = $readini(c:\script\silviewar.ini,$1,1)
  var %ptwo = $readini(c:\script\silviewar.ini,$1,2)
  var %pnet = $readini(c:\script\silviewar.ini,$1,network)

  /remini c:\script\silviewar.ini MASTER $1
  /remini c:\script\silviewar.ini $1
  /remini c:\script\silviewar.ini $1 $+ . $+ %pone
  /remini c:\script\silviewar.ini $1 $+ . $+ %ptwo

  globaldebug $scriptline  Remember to change cleanup when this is all over.
  if ( ( %pone != the.bank ) && ( %pone != the.silvie ) ) {
    /loligamedata %pone fighting no.one * %pnet
    msg %pone Battle ID %war is over. Cleanup complete. 
    ;next temp
    /loligamedata %pone fights 1 * %pnet
  }
  if ( ( %ptwo != the.bank ) && ( %ptwo != the.silvie ) ) {
    /loligamedata %ptwo fighting no.one * %pnet
    msg %ptwo Battle ID %war is over. Cleanup complete.
    /loligamedata %ptwo fights 1 * %pnet
  }

}

alias lolifightsettings {

  /hadd -s LOLIGAMEHASH FIGHT.LOLI.HP 5
  /hadd -s LOLIGAMEHASH FIGHT.LOLI.ATTACK 1
  /hadd -s LOLIGAMEHASH FIGHT.LOLI.DEFENSE 1
  /hadd -s LOLIGAMEHASH FIGHT.SHTA.HP 10
  /hadd -s LOLIGAMEHASH FIGHT.SHTA.ATTACK 2
  /hadd -s LOLIGAMEHASH FIGHT.SHTA.DEFENSE 2
  /hadd -s LOLIGAMEHASH FIGHT.TRAP.HP 15
  /hadd -s LOLIGAMEHASH FIGHT.TRAP.ATTACK 1
  /hadd -s LOLIGAMEHASH FIGHT.TRAP.DEFENSE 10
  /hadd -s LOLIGAMEHASH FIGHT.BISH.HP 15
  /hadd -s LOLIGAMEHASH FIGHT.BISH.ATTACK 10
  /hadd -s LOLIGAMEHASH FIGHT.BISH.DEFENSE 3
  /hadd -s LOLIGAMEHASH FIGHT.TSUN.HP 10
  /hadd -s LOLIGAMEHASH FIGHT.TSUN.ATTACK 8
  /hadd -s LOLIGAMEHASH FIGHT.TSUN.DEFENSE 8
  /hadd -s LOLIGAMEHASH FIGHT.YNDR.HP 15
  /hadd -s LOLIGAMEHASH FIGHT.YNDR.ATTACK 20
  /hadd -s LOLIGAMEHASH FIGHT.YNDR.DEFENSE 8
  /hadd -s LOLIGAMEHASH FIGHT.MGNK.HP 10
  /hadd -s LOLIGAMEHASH FIGHT.MGNK.ATTACK 2
  /hadd -s LOLIGAMEHASH FIGHT.MGNK.DEFENSE 20
  /hadd -s LOLIGAMEHASH FIGHT.STKR.HP 500
  /hadd -s LOLIGAMEHASH FIGHT.STKR.ATTACK 30
  /hadd -s LOLIGAMEHASH FIGHT.STKR.DEFENSE 20
  /hadd -s LOLIGAMEHASH FIGHT.MHSJ.HP 500
  /hadd -s LOLIGAMEHASH FIGHT.MHSJ.ATTACK 25
  /hadd -s LOLIGAMEHASH FIGHT.MHSJ.DEFENSE 25






}






alias givefightcommands {
  %unid = $lolifightchecker
  var %status = $readini(c:\script\silviewar.ini,%unid,status)
  if (( %status == p1 ) || ( %status == p2 ) ) {
    var %activep = $readini(c:\script\silviewar.ini,%unid,activep)
  }


  if ( $1 == $null) {

    if ( %status == prematch ) {
      msg $nick The following commands are available during the pre-match period.
      msg $nick !commands !mystatus !deploytrap !bishaura !flee
      msg $nick Use �!commands [command] � to learn more about a command.
      halt
    }
    if ( %activep == $nick ) {
      msg $nick The following commands are available during your turn.
      msg $nick !commands !mystatus !deploytrap !bishaura !flee
      msg $nick Use �!commands [command] � to learn more about a command.
      halt
    }      

    if ( %activep != $nick ) {
      msg $nick The following commands are available when it is not your turn.
      msg $nick !commands !mystatus
      msg $nick Use �!commands [command] � to learn more about a command.
      halt
    }      


  } 
  if ( $1 == !commands ) {
    msg $nick Um, didn't you figure that already? This command is available through the whole match.
  }
  if ( $1 == !mystatus ) {
    msg $nick This will show your current HP, Offensive Power, and Defensive Power. This command is available through the whole match.
  }  
  if ( $1 == !deploytrap ) {
    msg $nick !deploytrap [no. of traps to deploy]
    msg $nick Available during Pre-match period and during your turn.
    msg $nick Decreases the chance that your opponent can !flee and also reduces certain types of attacks. A deployed Trap is no longer available to fight or defend, and so your HP will be reduced accordingly.
  }  
  if ( $1 == !bishaura ) {
    msg $nick !bishaura [PERCENTAGE]
    msg $nick Available during Pre-match period and during your turn.
    msg $nick Bishie like thinking about themselves, gaining that mystrical glow around them. It's hard to not be distracted by it.
    msg $nick This increases your defense and reduces some incoming attacks.
    msg $nick However, your own forces are attracted to this aura.
  }  
  if ( $1 == !flee ) {
    msg $nick Available during Pre-match period and during your turn.
    msg $nick Try to leave the fight. But be warned, its not so easy all the time.
  }  

}

alias fightend {
  ;    /fightend %unid $1 fled
  var %unid = $1
  var %pone = $2 
  var %ponen = $readini(c:\script\silviewar.ini,%unid $+ . $+ %pone,name)

  ; actor that won
  var %ochan = $readini(c:\script\silviewar.ini,%unid,chan)
  var %ptwo = $readini(c:\script\silviewar.ini,%unid,2)
  if ( %ptwo == %pone ) { 
    %ptwo = $readini(c:\script\silviewar.ini,%unid,1) 
  }
  var %ptwon = $readini(c:\script\silviewar.ini,%unid $+ . $+ %ptwo,name)

  ;/writeini c:\script\silviewar.ini %unid starttime $ctime

  var %starttime = $readini(c:\script\silviewar.ini,%unid,starttime)
  var %tti = $calc($ctime - %starttime)


  var %outline = %ponen wins battle with %ptwon in a battle lasting $duration(%tti) $+ ! 

  if ( $3 == fled ) {
    var %outline = %outline %ptwon fled the battle feild.
  }

  if ( $3 == won ) {
    var %outline = %outline %ponen won in normal combat.
  }

  if ( $3 == collateral ) {
    %outline = %outline %ptwon killed themselves in collateral damage.
  }


  if ( %ochan != $null ) { msg %ochan %outline } 



  /writeini c:\script\silviewar.ini %unid status cleanup

  /timer $+ %unid 1 5 /lolifightminder %unid  
  halt
}

alias lolifightchangesides {
  var %unid = $1
  if ( %unid == $null ) { halt }
  var %status = $readini(c:\script\silviewar.ini,%unid,status)
  var %pone = $readini(c:\script\silviewar.ini,%unid,1)
  var %ptwo = $readini(c:\script\silviewar.ini,%unid,2)

  ;  globaldebug $scriptline change them sides!

  /lolifightstatus %pone 2 * * %unid
  var %outline = %pone $+ 's forces at $lolifightstatus(%pone,100,,,%unid) percent.
  if (( %ptwo != the.bank ) && ( %ptwo != the.silvie ) ) { 
    /lolifightstatus %ptwo 2 * * %unid
    /lolifightstatus %ptwo 3 %pone * %unid
    /lolifightstatus %pone 3 %ptwo * %unid
    var %outline = %outline %ptwo $+ 's forces at $lolifightstatus(%ptwo,100,,,%unid) percent.
  }
  if ( %ptwo == the.silvie ) { 
    /lolifightstatus the.silvie 0 * * %unid
    /lolifightstatus %pone 3 the.silvie * %unid
    var %outline = %outline Silvie's forces at $lolifightstatus(the.silvie,100,,,%unid) percent.
  }
  if ( %ptwo == the.bank ) { 
    /lolifightstatus the.bank 0 * * %unid
    /lolifightstatus %pone 3 the.bank * %unid
    var %outline = %outline $network bank's forces at $lolifightstatus(the.bank,100,,,%unid) percent.
  }


  var %ponehp = $readini(c:\script\silviewar.ini,%unid $+ . $+ %pone,hpnow)
  var %ptwohp = $readini(c:\script\silviewar.ini,%unid $+ . $+ %ptwo,hpnow)



  if ( %status = p1 ) {
    /writeini c:\script\silviewar.ini %unid status p2
    /writeini c:\script\silviewar.ini %unid activep %ptwo
    /writeini c:\script\silviewar.ini %unid time $ctime
    /timer $+ %unid 1 15 /lolifightminder %unid  


    var %whoitis = $readini(c:\script\silviewar.ini,%unid,activep)
    var %whoitis = $readini(c:\script\silviewar.ini,%unid $+ . $+ %whoitis,name)



    if ( %ptwohp < 1 ) {
      /fightend %unid %pone won
    }
    if ( %ponehp < 1 ) {
      /fightend %unid %ptwo collateral
    }

    var %outline = It is now %whoitis $+ 's turn!

    if ( %outline != $null ) {
      msg %pone %outline
      if ( . !isin %ptwo ) { msg %ptwo %outline }
    }


    halt

  }
  ;below assumes going back to p1 from p2


  if ( %ponehp < 1 ) {
    /fightend %unid %ptwo won
  }

  if ( %ptwohp < 1 ) {
    /fightend %unid %pone collateral
  }




  var %ochan = $readini(c:\script\silviewar.ini,%unid,chan)
  var %minele = $readini(c:\script\silviewar.ini,%unid,artime)
  %minele = $calc(%minele + 2)
  /writeini c:\script\silviewar.ini %unid artime %minele


  var %first = $calc( (%minele) / 5)
  var %second = $calc( $int(%first) * 5 )
  if ( %second == %minele ) {
    if ( %ochan != $null ) { msg %ochan Battle Report, round %minele $+ : %outline }
  }



  /writeini c:\script\silviewar.ini %unid status p1
  /writeini c:\script\silviewar.ini %unid activep %pone
  /writeini c:\script\silviewar.ini %unid time $ctime
  /timer $+ %unid 1 15 /lolifightminder %unid  

  var %ptwon = $readini(c:\script\silviewar.ini,%unid $+ . $+ %pone,name)
  var %outline = It is now %pone $+ 's turn!
  if ( %outline != $null ) {
    msg %pone %outline
    if ( . !isin %ptwo ) { msg %ptwo %outline }
  }




  halt
}



First Generation Attack Routine


alias lolistkre {
  var %defnloli = 100
  var %defnstkr = 6
  var %defnshta = 0
  var %defnbish = 0
  var %defnyndr = 10

  var %attkyndr = 0
  var %attkbish = 0
  var %attkloli = 100
  var %attkstkr = 1



  var %ya = $calc( (%attkstkr * 10000) + ( %attkyndr * 100) )
  var %yb = $calc( ((1 + %attkstkr) * 10000) + ((10 + %attkyndr) * 100)  )
  var %attkhigh = $int($calc(( %ya / %yb)*10000))
  var %attkroll = $rand(1,%attkhigh)

  var %ya = $calc( (%defnstkr * 10000) + ( %defnyndr * 100) )
  var %yb = $calc( ((1 + %defnstkr) * 10000) + ((10 + %defnyndr) * 100)  )
  var %defnhigh = $int($calc(( %ya / %yb)*10000))
  var %defnroll = $rand(1,%defnhigh)





  /echo -s $nick $chr(91) $+ %attkroll $+ / $+ %attkhigh  $+ $chr(93)  attacks SOMEONE   $chr(91) $+ %defnroll $+ / $+ %defnhigh  $+ $chr(93) 



}

alias lolistrike {
  if ( $chan != #silviedebug ) { halt }

  var %ti = $loligamedata($nick,trades).get 
  if ( ( %ti < 1 ) || ( %ti == $null ) ) {
    lolinotice $nick You currently have no turns available for this round. Try after next round.
    halt
  }
  if ( $1 == $null ) {
    lolinotice $nick Format: !strike [person] <mission commission in loli>
    lolinotice $nick Alt:  !strike the bank <mission commission in loli>
    lolinotice $nick Comission is optional.
    lolinotice $nick Remind Keine to add the shelp file stuff
    halt
  }
  var %lolidatanick = $1
  var %loliname = $1
  var %lolispec = $null
  var %lolinet = $network
  var %commission = $2
  if ( %lolidatanick == $null ) { 
    %lolidatanick = $nick 
  }
  if ( $2 == bank ) {
    %lolidatanick = $null
    %lolispec = bank
    %loliname = $network $+ 's bank
    %lolinet = $network
    %commission = $3
  }
  %valueloli = $loligamedata(%lolidatanick,loli,%lolispec,%lolinet).get

  if ( %commission == $null ) { %commission = 0 }

  if ( ( %valueloli == $null ) && ( $1 != $me ) ) {
    lolinotice $nick I don't think they have played my game (or they are on a different network)
    halt
  }

  var %attkstkr = $loligamedata($nick,stkr).get

  if ( ( %attkstkr == $null ) || ( %attkstkr < 1 ) ) {
    lolinotice $nick You have no strikers to lead an attack.
    halt
  }

  var %attkloli = $loligamedata($nick,loli).get
  var %attkyndr = $loligamedata($nick,yndr).get
  var %attkbish = $loligamedata($nick,bish).get  
  var %attkshta = $loligamedata($nick,shta).get
  var %attktrap = $loligamedata($nick,trap).get
  var %attktsun = $loligamedata($nick,tsun).get

  if ( %attkloli < %commission ) {
    lolinotice $nick You don't have %commission loli to pay for this strike.
    halt
  }

  var %attkfrc = $calc((1000 * %attkstkr) + ( 100 * %attkyndr) + ( 50 * %attkbish))
  var %attkstrg = $lolivalue($nick).getbank


  if ( $1 != $me ) {
    var %defnloli = $loligamedata(%lolidatanick,loli,%lolispec,%lolinet).get
    var %defnstkr = $loligamedata(%lolidatanick,stkr,%lolispec,%lolinet).get
    var %defnshta = $loligamedata(%lolidatanick,shta,%lolispec,%lolinet).get
    var %defntsun = $loligamedata(%lolidatanick,tsun,%lolispec,%lolinet).get
    var %defnbish = $loligamedata(%lolidatanick,bish,%lolispec,%lolinet).get
    var %defnyndr = $loligamedata(%lolidatanick,yndr,%lolispec,%lolinet).get
    var %defntrap = $loligamedata(%lolidatanick,trap,%lolispec,%lolinet).get
  }

  if ( ( $1 != $me ) && ( %lolidatanick != $null )) {
    var %defnstrg = $lolivalue(%lolidatanick,%lolinet).getbank 
  }

  if ( $1 == $me ) {
    var %defnloli = 10000000
    var %defntsun = 100
    var %defnstkr = 6
    var %defnbush = 10
    var %defnyndr = $calc(%attkyndr * 2)
    var %defnstrg = $calc(%attkstrg * 2)

  }
  if ( %lolidatanick == $null ) {
    %defnstrg = 100000
  }




  var %defnfrc = $calc((1000 * %defnstkr) + ( 300 * %defnyndr) + ( 100 * %defbish) + ( 50 * %defshta))




  ; lolinotice $nick BATTLE INFORMATION:
  ; lolinotice $nick $nick $+ 's primary attack force: %attkstkr Strikers ( $lolideedroutine($network $+ . $+ $nick).value2 )
  if ( ( %attkyndr != $null ) && ( %attkyndr > 0 ) ) {
    ;   lolinotice $nick $nick $+ 's support attack force: %attkyndr Yandere.
  }
  ; lolinotice $nick You are paying your force the freedom of %commission loli.

  var %defnstkrsr = $lolideedroutine($network $+ . $+ %loliname).value2
  if ( $2 == bank ) {   var %defnstkrsr = $lolideedroutine($network $+ .the.bank).value2 }


  if (( %defnstkr != $null ) && ( %defnstkr > 0 ) && ( $1 != $me ) ) {
    ;lolinotice $nick %loliname $+ 's primary counter-attack force: %defnstkr Strikers ( %defnstkrsr )
  }
  else {
    if ( $1 == $me ) {
      ;   lolinotice $nick $me $+ 's primary counter attack-force: 6 Strikers ( Wanko Personal Striker Defense Force Detactment )
    }
    else {
      ;  lolinotice $nick %loliname has no strikers for defense.
    }
  }




  var %ya = $calc( (%attkstkr * 15000) + ( %attkyndr * 100) )
  var %yb = $calc( ((1 + %attkstkr) * 15000) + ((10 + %attkyndr) * 100)  )
  var %attkhigh = $int($calc(( %ya / %yb)*10000))
  var %attkroll = $rand(1,%attkhigh)

  var %ya = $calc( (%defnstkr * 15000) + ( %defnyndr * 100) )
  var %yb = $calc( ((1.1 + %defnstkr) * 15000) + ((10 + %defnyndr) * 100)  )
  var %defnhigh = $int($calc(( %ya / %yb)*10000))
  var %defnroll = $rand(1,%defnhigh)

  if ( %attkroll > %defnroll ) {
    var %outcome = Wins!
  }  
  if ( %attkroll < %defnroll ) {
    var %outcome = loses!
  }  
  if ( %attkroll = %defnroll ) {
    var %outcome = both go home.
  }  


  ; msg $chan $nick $chr(91) $+ %attkroll $+ / $+ %attkhigh  $+ $chr(93)  attacks  %loliname  $chr(91) $+ %defnroll $+ / $+ %defnhigh  $+ $chr(93) and ... %outcome


  var %ya = %attkloli  ; attk
  var %yb = %attkloli  ; dfns
  /echo -s %attkloli loli
  var %ya = $calc( %ya + ( %attkshta * 2)) 
  var %yb = $calc( %yb + ( %attkshta * 1)) 
  /echo -s %attkshta shta  
  var %ya = $calc( %ya + ( %attktrap * 1)) 
  var %yb = $calc( %yb + ( %attktrap * 5)) 
  /echo -s %attktrap trap
  var %ya = $calc( %ya + ( %attkbish * 5)) 
  var %yb = $calc( %yb + ( %attkbish * 10))
  /echo -s %attkbish bish
  var %ya = $calc( %ya + ( %attktsun * 10))
  var %yb = $calc( %yb + ( %attktsun * 5)) 
  /echo -s %attktsun tsun
  var %ya = $calc( %ya + ( %attkyndr * 16))
  var %yb = $calc( %yb + ( %attkyndr * 4)) 
  /echo -s %attkyndr yndr
  var %ya = $calc( %ya + ( %attkstkr * 100))
  var %yb = $calc( %yb + ( %attkstkr * 50)) 
  /echo -s %attkstkr stkr
  ;  notice $nick 2nd calc... your raw atatck %ya  your raw defense %yb

  var %attkhigh = %ya
  var %attkroll = $rand(1,%attkhigh)
  var %attkdefn = %yb




  var %ya = %defnloli  ; defn
  var %yb = %defnloli  ; dfns
  /echo -s %defnloli loli
  var %ya = $calc( %ya + ( %defnshta * 2)) 
  var %yb = $calc( %yb + ( %defnshta * 1)) 
  /echo -s at %defnshta shta
  var %ya = $calc( %ya + ( %defntrap * 1)) 
  var %yb = $calc( %yb + ( %defntrap * 5)) 
  /echo -s at %defntrap trap
  var %ya = $calc( %ya + ( %defnbish * 5)) 
  var %yb = $calc( %yb + ( %defnbish * 10))
  /echo -s at %defnbish bish
  var %ya = $calc( %ya + ( %defntsun * 10))
  var %yb = $calc( %yb + ( %defntsun * 5)) 
  /echo -s at %defntsun tsun
  var %ya = $calc( %ya + ( %defnyndr * 16))
  var %yb = $calc( %yb + ( %defnyndr * 4)) 
  /echo -s at %defnyndr yndr
  var %ya = $calc( %ya + ( %defnstkr * 100))
  var %yb = $calc( %yb + ( %defnstkr * 50)) 
  /echo -s at %defnstkr stkr

  ; notice $nick 2nd calc... your opponent raw attack %ya  your raw defense %yb

  var %defnhigh = %ya
  var %defnroll = $rand(1,%defnhigh)
  var %defndefn = %yb

  var %outcome = $null

  ;if ( %attkroll > %defnroll ) {
  ;  var %outcome = Wins!
  ;}  
  ;if ( %attkroll < %defnroll ) {
  ;  var %outcome = loses!
  ;}  
  ;if ( %attkroll = %defnroll ) {
  ;  var %outcome = both go home.
  ;}  

  if ( %attkroll > %defndefn ) {
    var %outcome = %outcome wins offensive
  }
  if ( %attkroll < %defndefn ) {
    var %outcome = %outcome loses offensive
  }
  if ( %attkroll == %defndefn ) {
    var %outcome = %outcome stalemates offensive
  }
  %outcome = %outcome and
  if ( %defnroll > %attkdefn ) {
    var %outcome = %outcome loses the counter-offensive
  }
  if ( %defnroll < %attkdefn ) {
    var %outcome = %outcome wins the counter-offensive
  }
  if ( %defnroll == %attkdefn ) {
    var %outcome = %outcome stalemates the counter-offensive
  }



  var %tii = $nick �4,01 $+ $chr(91) $+ %attkroll $+ / $+ %attkhigh  $+ $chr(93) $+ A� 
  var %tii = %tii  �9,01 $+ $chr(91) $+ %attkdefn $+ $chr(93) $+ D�
  var %tii = %tii  attacks  %loliname  �4,01 $+ $chr(91) $+ %defnroll $+ / $+ %defnhigh  $+ $chr(93) $+ A�
  var %tii = %tii  �9,01 $+ $chr(91) $+ %defndefn $+ $chr(93) $+ D�
  var %tii = %tii  and ... %outcome

  msg $chan %tii




  halt
}



Yet Another NickServ Routine 12/25/2008


alias nickserver {
  if ( $prop == $null ) {
    %currentset = $readini(c:\script\nickserver.ini,MASTER,currentset)
    if ( %currentset == $null ) { %currentset = 1 }

    if ( $1 == -- ) {
      /echo -s Found the end
      /writeini c:\script\nickserver.ini %currentset Complete Yes
      inc %currentset
      /writeini c:\script\nickserver.ini MASTER currentset %currentset
      return
    }
    if ( ( $1 == the ) && ( $2 == nick ) ) {
      /writeini C:\script\nickserver.ini %currentset notregistered YES
      /writeini C:\script\nickserver.ini %currentset heading $strip($3)
      /echo -s Found the end
      /writeini c:\script\nickserver.ini %currentset Complete Yes
      inc %currentset
      /writeini c:\script\nickserver.ini MASTER currentset %currentset
      return 
    }  
    if ( $2 == info ) {
      /echo -s Found beginning $gettok($strip($4),1,58)
      /writeini c:\script\nickserver.ini %currentset heading $gettok($strip($4),1,58)
      return
    }
    if ( $3 == using ) {
      /writeini c:\script\nickserver.ini %currentset online YES
      ; so even if the nick isnt registered, it shows in the nickserv list
      ; rewrite this to be more elegent (while loops etc)
      if ( $right($strip($6),2) == $chr(46) $+ $chr(41) ) {
          /writeini c:\script\nickserver.ini %currentset nicks 1
          /writeini c:\script\nickserver.ini %currentset 1 $gettok($strip($6),1,46)
          return
      }
      if ( $right($strip($7),2) == $chr(46) $+ $chr(41) ) {
          /writeini c:\script\nickserver.ini %currentset nicks 1
          /writeini c:\script\nickserver.ini %currentset 1 $gettok($strip($7),1,46)
          return
      }
      if ( $right($strip($8),2) == $chr(46) $+ $chr(41) ) {
          /writeini c:\script\nickserver.ini %currentset nicks 2
          /writeini c:\script\nickserver.ini %currentset 1 $gettok($strip($7),1,44)
          /writeini c:\script\nickserver.ini %currentset 2 $gettok($strip($8),1,46)
      }
      if ( $right($strip($9),2) == $chr(46) $+ $chr(41) ) {
          /writeini c:\script\nickserver.ini %currentset nicks 3
          /writeini c:\script\nickserver.ini %currentset 1 $gettok($strip($7),1,44)
          /writeini c:\script\nickserver.ini %currentset 2 $gettok($strip($8),1,44)
          /writeini c:\script\nickserver.ini %currentset 3 $gettok($strip($9),1,46)
      }
      return
    }
    if ( ( $2 == seen ) && ( $3 == address ) ) {
      /writeini c:\script\nickserver.ini %currentset address $4
      return
    }

    if ( ( $1 == alias ) && ( $2 == of: ) ) {
      /writeini c:\script\nickserver.ini %currentset aliasof $3
      return
    }




  }





}




abandoned code part 2


; this is from on:join
  
  if ( %userlevel > 0 ) && ( $readini(C:\script\users.ini,$nick,address) != $address($nick,1) ) ) {
      describe $chan senses something have changed with $nick $+ .
      msg #silvietest $nick is not at registered address
      
      
 ;     %a = $nickaddcue($nick,address) 
  }
  

;------------------------

on 1:text:!add*:#silvietest:{
  userlevelset
  if ( $nick != %goshujinsama ) {
    notice $nick This is a debug command for %goshujinsama
    halt
  }
  if ( $2 == $null ) {
    notice $nick No user specified.
    halt
  }

  describe $chan looks for $2 $+ .
  %att = $address($2,1)
  ;  if ( %att == $null ) {
  ;    msg $chan I can't see $2 $+ .
  ;    halt
  ;  }   
  ; ----- UN COMMENT THE ABOVE
  if ( $3 == $null ) { %a = $nickaddcue($2,afriend) }
  if ( $3 == plus ) { 
    if ( %userlevel == 1 ) {
      msg $chan Only Goshujin-sama can set the plus flag.
      %a = $nickaddcue($2,afriend) 
    }
    if ( %userlevel == 2 ) {
      %a = $nickaddcue($2,afriendp) 
    }
  }
  if ( %a == 10 ) {
    describe $chan sniffs $2
    /timer10 1 5 /describe $chan eyes $2
  }
  else {
    msg $chan I need some time to learn about $2
    notice $nick I will process in about %a seconds.
  }

  halt
}

on 1:text:!test:#silvietest:{
  /writeini c:\script\nickserv.ini 1 status pass


}




on 1:text:!sync:#silvietest:{
 msg $chan WARNING THIS MAY DO BAD THINGS
      %a = $nickaddcue($nick,address) 


 halt
 
}









on 1:notice:*:*: {
  if ( $nick == Nickserv ) {
    %abt = $nickservseter($1-).grab
  }

  halt
}





alias -l nickaddcue {
  %i = $readini(c:\script\nickserv.ini,MASTER,incue)
  inc %i
  ;so first add appropriate points in cue

  /writeini C:\script\nickserv.ini MASTER incue %i

  /writeini C:\script\nickserv.ini %i nick $nick
  /writeini C:\script\nickserv.ini %i chan $chan
  /writeini C:\script\nickserv.ini %i add $1
  /writeini C:\script\nickserv.ini %i what $2

  ;add whatever here

  if ( ( $2 == afriend ) || ( $2 == afriendp ) ) { 
    msg nickserv info $1
  }
  if ( $2 == address ) {
    notice $1 DEBUG: IF THIS PROCESS FAILS, LET TODKAPUZ KNOW
    notice $1 Your address has changed. Silvie is now researching your nick.   
     msg nickserv info $1
  }

  /timer404 0 10 /nickremcue
  %i = $calc(%i * 10)
  return %i
}

alias -l nickremcue {
  %i = $readini(c:\script\nickserv.ini,MASTER,incue)
  if ( %i == 0 ) {
    /timer404 off
    halt
  }

  ; so would really do whatever with data here

  %j = $readini(c:\script\nickserv.ini,1,what)
  %k = $readini(c:\script\nickserv.ini,1,status)

  if ( %j == address ) {
    if ( %k == $null ) {
        notice $readini(c:\script\nickserv.ini,1,nick) Sorry, $readini(c:\script\nickserv.ini,1,nick) $+ , the NickServ failed to respond. I won't change your information right now.
    }
    if ( %k == fail ) {
        notice $readini(c:\script\nickserv.ini,1,nick) Sorry, $readini(c:\script\nickserv.ini,1,nick) $+ , the NickServ reported your nick is not registered. I won't change your information right now.
        notice $readini(c:\script\nickserv.ini,1,nick) Debug - will be implementing "return to registered nick"
       
    }
    if ( %k = pass ) {
 

       %testnick = $readini(c:\script\nickserv.ini,1,add)
     
     if ( $readini(C:\script\users.ini,$readini(c:\script\nickserv.ini,1,add),address) != $null ) { 
     /remini  c:\script\users.ini HOSTS $readini(C:\script\users.ini,$readini(c:\script\nickserv.ini,1,add),address)
     }
     if ( $readini(C:\script\users.ini,$readini(c:\script\nickserv.ini,1,add),address) == $null ) { 
       msg #silvietest BAD ADDRESS
     }
      notice %testnick Your current Address was: $readini(C:\script\users.ini,%testnick,address)
     /writeini C:\script\users.ini %testnick address $address($readini(c:\script\nickserv.ini,1,add),1)
     /writeini C:\script\users.ini HOSTS $address($readini(c:\script\nickserv.ini,1,add),1) $readini(c:\script\nickserv.ini,1,add)
     notice %testnick Your current address is: $readini(C:\script\users.ini,$readini(c:\script\nickserv.ini,1,add),address)
    
    } 
  }
  if ( ( %j == afriend ) || ( %j == afriendp ) ) {
    if ( %k == $null ) {
      notice $readini(c:\script\nickserv.ini,1,nick) Sorry, $readini(c:\script\nickserv.ini,1,nick) $+ , the NickServ failed to respond. I couldn't friend $readini(c:\script\nickserv.ini,1,add) $+ .
      describe $readini(c:\script\nickserv.ini,1,chan) is not sure about $readini(c:\script\nickserv.ini,1,add) $+ .
    }
    if ( %k == fail ) {
      notice $readini(c:\script\nickserv.ini,1,nick) Sorry, $readini(c:\script\nickserv.ini,1,nick) $+ , $readini(c:\script\nickserv.ini,1,add) is not a registered nick.
      describe $readini(c:\script\nickserv.ini,1,chan) runs away from $readini(c:\script\nickserv.ini,1,add) $+ .
    }
    if ( %k == pass ) { 
      if ( %j == afriend ) {
        %a = $userlevelset( $readini(c:\script\nickserv.ini,1,add) ).friend
        if ( %a == 1 ) { 
          /msg $readini(c:\script\nickserv.ini,1,chan) I can no longer see�11 $readini(c:\script\nickserv.ini,1,add) $+ �. 
        }
        else {
          /msg $readini(c:\script\nickserv.ini,1,chan) Un. Nice to meet you,�11 $readini(c:\script\nickserv.ini,1,add) $+ �. 
          /describe $readini(c:\script\nickserv.ini,1,chan) licks $readini(c:\script\nickserv.ini,1,add) $+ 's cheek.
        }
      }
      if ( %j == afriendp ) {
        %a = $userlevelset( $readini(c:\script\nickserv.ini,1,add) ).cfriend
        if ( %a == 1 ) {
          /msg $readini(c:\script\nickserv.ini,1,chan) I can no longer see�11 $readini(c:\script\nickserv.ini,1,add) $+ �. 
        }
        else {
          /msg $readini(c:\script\nickserv.ini,1,chan) Un. �11 $readini(c:\script\nickserv.ini,1,add) $+ � is a close friend.
          /describe $readini(c:\script\nickserv.ini,1,chan) licks $readini(c:\script\nickserv.ini,1,add) $+ 's cheek and snuggles.
        }
      }
    }
  }

  ; start processing next set

  if ( %i > 1 ) {

    %j = $readini(c:\script\nickserv.ini,2,what)
    msg #silvietest debug : %j
    if ( ( %j == afriend ) || ( %j == afriendp ) ) {
      msg nickserv info $readini(c:\script\nickserv.ini,2,add)

      describe $readini(c:\script\nickserv.ini,2,chan) sniffs $readini(c:\script\nickserv.ini,2,add) $+ .
      /timer10 1 5 /describe $readini(c:\script\nickserv.ini,2,chan) eyes $readini(c:\script\nickserv.ini,2,add) $+ .
    }

  }





  ; roll down data
  /remini c:\script\nickserv.ini 1
  var %o = 1
  while ( %o < %i ) {
    /writeini C:\script\nickserv.ini %o nick $readini(c:\script\nickserv.ini,$calc(%o + 1),nick)
    /writeini C:\script\nickserv.ini %o chan $readini(c:\script\nickserv.ini,$calc(%o + 1),chan)
    /writeini C:\script\nickserv.ini %o add $readini(c:\script\nickserv.ini,$calc(%o + 1),add)
    /writeini C:\script\nickserv.ini %o what $readini(c:\script\nickserv.ini,$calc(%o + 1),what)
    inc %o
  }
  /remini c:\script\nickserv.ini %i
  /writeini c:\script\nickserv.ini MASTER incue $calc( %i - 1)
  halt
}



; this needs to be severely prunned now

alias -l nickservseter {

  ; this is written for lucid, will have to check rizon

  ; ($1).grab     nickserv says $1
  if ( $prop == grab ) {
    %resarchsub = $readini(c:\script\nickserv.ini,1,add)
    if ( %resarchsub == $null ) {
      halt
    }
    if ( %resarchsub isin $1 ) {
      if ( NickServ isin $1 ) {
        /writeini c:\script\nickserv.ini 1 status pass
      }
      %b = not registered
      if ( %b isin $1 ) {
        /writeini c:\script\nickserv.ini 1 status fail
        halt
      }
    }    

    return
  }
}



Holiday



alias test {
  /echo -s $energysilvie(2).get
  %a = $energysilvie(-10000).event
  /echo -s $energysilvie(2).get
}
alias test2 {
  %a = $shockcollar(blah).set
}
alias test3 {
  unset %silviedead
  %a = $energysilvie(-10000).event
}
alias holiday {
  /globaldebug $scriptline The Holdiay Script Automation Unit is Running!
  var %test = $ctime(December 31 2008 08:00:00)
  if ( $ctime < %test ) {
    /globaldebug $scriptline - nothing to do at this time. Resetting.
    /timer5000 1 3600 /holiday
    return
  }
  /timer5000 1 600 /holiday

  if ( $ctime < $ctime(December 31 2008 09:00:00) ) {
    ;jst
    /test
    /globaldebug $scriptline - Energized and set timers
    /timer5001 08:40 1 1 /globalsay Minna! Minna! 
    /timer5002 08:40 1 2 /globalsay Oshogatsu! Oshogatsu! 
    /timer5003 08:40 1 3 /globalsay Japan New Year in 20 minutes!
    /timer5004 08:40 1 15 /globalme puts on her Party Hat!
    /timer5005 08:50 1 1 /globalme gets excited.
    /timer5006 08:50 1 2 /test
    /timer5007 08:56 1 1 /test2
    /timer5008 08:59 1 1 /globalsay Oshogatsu! Oshogatsu!
    /timer5009 08:59 1 2 /globalsay Japan New Year in 58 seconds.
    /timer5010 08:59 1 30 /globalsay 30
    /timer5011 08:59 1 50 /globalsay 10
    /timer5012 08:59 1 55 /globalsay 5
    /timer5013 08:59 1 57 /globalsay 3
    /timer5014 08:59 1 58 /globalsay 2
    /timer5015 08:59 1 59 /globalsay 1
    /timer5016 09:00 1 0 /globalsay HAPPY NEW YEAR JAPAN!
    /timer5017 09:00 1 1 /globalme blows on her noise maker.
    /timer5018 09:00 1 3 /globalsay Akemashite Omedetou Gozaimasu!
    /timer5000 09:05 1 1 /holiday   
    /timer5019 09:02 1 1 /test3
    return
  }
  /timer5000 1 1800 /holiday

  if ( $ctime < $ctime(December 31 2008 17:00:00) ) {
    /globaldebug $scriptline I'm waiting for another New Year!  
    return
  }
  /timer5000 1 600 /holiday
  if ( $ctime < $ctime(December 31 2008 18:00:00) ) {
    /test
    /globaldebug $scriptline - Energized and set timers
    /timer5001 17:40 1 1 /globalsay Minna! Minna! 
    /timer5002 17:40 1 2 /globalsay Oshogatsu! Oshogatsu! 
    /timer5003 17:40 1 3 /globalsay London New Year in 20 minutes!
    /timer5004 17:40 1 15 /globalme puts on her Party Hat!
    /timer5005 17:50 1 1 /globalme gets excited.
    /timer5006 17:50 1 2 /test
    /timer5007 17:56 1 1 /test2
    /timer5008 17:59 1 1 /globalsay Oshogatsu! Oshogatsu!
    /timer5009 17:59 1 2 /globalsay UTC New Year in 58 seconds.
    /timer5010 17:59 1 30 /globalsay 30
    /timer5011 17:59 1 50 /globalsay 10
    /timer5012 17:59 1 55 /globalsay 5
    /timer5013 17:59 1 57 /globalsay 3
    /timer5014 17:59 1 58 /globalsay 2
    /timer5015 17:59 1 59 /globalsay 1
    /timer5016 18:00 1 0 /globalsay HAPPY NEW YEAR LONDON!
    /timer5017 18:00 1 1 /globalme blows on her noise maker.
    /timer5018 18:00 1 3 /globalsay Akemashite Omedetou Gozaimasu!
    /timer5000 18:05 1 1 /holiday   
    /timer5019 18:02 1 1 /test3
    ;utc/gmt
    halt
  }

  if ( $ctime < $ctime(December 31 2008 22:00:00) ) {
    /test
    /globaldebug $scriptline - Energized and set timers
    /timer5001 21:40 1 1 /globalsay Minna! Minna! 
    /timer5002 21:40 1 2 /globalsay Oshogatsu! Oshogatsu! 
    /timer5003 21:40 1 3 /globalsay Atlantic Standard Time New Year in 20 minutes!
    /timer5004 21:40 1 15 /globalme puts on her Party Hat!
    /timer5005 21:50 1 1 /globalme gets excited.
    /timer5006 21:50 1 2 /test
    /timer5007 21:56 1 1 /test2
    /timer5008 21:59 1 1 /globalsay Oshogatsu! Oshogatsu!
    /timer5009 21:59 1 2 /globalsay AST  New Year in 58 seconds.
    /timer5010 21:59 1 30 /globalsay 30
    /timer5011 21:59 1 50 /globalsay 10
    /timer5012 21:59 1 55 /globalsay 5
    /timer5013 21:59 1 57 /globalsay 3
    /timer5014 21:59 1 58 /globalsay 2
    /timer5015 21:59 1 59 /globalsay 1
    /timer5016 22:00 1 0 /globalsay HAPPY NEW YEAR ATLANTIC-ERS!
    /timer5017 22:00 1 1 /globalme blows on her noise maker.
    /timer5018 22:00 1 3 /globalsay Akemashite Omedetou Gozaimasu!
    /timer5000 22:05 1 1 /holiday   
    /timer5019 22:02 1 1 /test3
    halt
    ;ast
  }
  if ( $ctime < $ctime(December 31 2008 23:00:00) ) {
    /globaldebug $scriptline - Energized and set timers
    /timer5001 22:40 1 1 /globalsay Minna! Minna! 
    /timer5002 22:40 1 2 /globalsay Oshogatsu! Oshogatsu! 
    /timer5003 22:40 1 3 /globalsay Eastern Standard Time New Year in 20 minutes!
    /timer5004 22:40 1 15 /globalme puts on her Party Hat!
    /timer5005 22:50 1 1 /globalme gets excited.
    /timer5006 22:50 1 2 /test
    /timer5007 22:56 1 1 /test2
    /timer5008 22:59 1 1 /globalsay Oshogatsu! Oshogatsu!
    /timer5009 22:59 1 2 /globalsay EST New Year in 58 seconds.
    /timer5010 22:59 1 30 /globalsay 30
    /timer5011 22:59 1 50 /globalsay 10
    /timer5012 22:59 1 55 /globalsay 5
    /timer5013 22:59 1 57 /globalsay 3
    /timer5014 22:59 1 58 /globalsay 2
    /timer5015 22:59 1 59 /globalsay 1
    /timer5016 23:00 1 0 /globalsay HAPPY NEW YEAR Eastern Standard Timers!
    /timer5017 23:00 1 1 /globalme blows on her noise maker.
    /timer5018 23:00 1 3 /globalsay Akemashite Omedetou Gozaimasu!
    /timer5000 23:05 1 1 /holiday   
    /timer5019 23:02 1 1 /test3
    halt
    ;est
  }

  if ( $ctime < $ctime(January 1 2009 00:00:00) ) {
    /globaldebug $scriptline - Energized and set timers
    /timer5001 23:40 1 1 /globalsay Minna! Minna! 
    /timer5002 23:40 1 2 /globalsay Oshogatsu! Oshogatsu! 
    /timer5003 23:40 1 3 /globalsay Central Standard Time New Year in 20 minutes!
    /timer5004 23:40 1 15 /globalme puts on her Party Hat!
    /timer5005 23:50 1 1 /globalme gets excited.
    /timer5006 23:50 1 2 /test
    /timer5007 23:56 1 1 /test2
    /timer5008 23:59 1 1 /globalsay Oshogatsu! Oshogatsu!
    /timer5009 23:59 1 2 /globalsay CST New Year in 58 seconds.
    /timer5010 23:59 1 30 /globalsay 30
    /timer5011 23:59 1 50 /globalsay 10
    /timer5012 23:59 1 55 /globalsay 5
    /timer5013 23:59 1 57 /globalsay 3
    /timer5014 23:59 1 58 /globalsay 2
    /timer5015 23:59 1 59 /globalsay 1
    /timer5016 00:00 1 0 /globalsay HAPPY NEW YEAR Central Standard Timers!
    /timer5017 00:00 1 1 /globalme runs and kisses $goshujinsama $+ !
    /timer5018 00:00 1 3 /globalsay Akemashite Omedetou Gozaimasu Goshujin-sama!
    /timer5020 00:00 1 6 /globalsay Akemashita Omedetou Gozaimasu Minna!
    /timer5000 00:05 1 1 /holiday   
    /timer5019 00:02 1 1 /test3


    halt

    ;cst
  }
  if ( $ctime < $ctime(January 1 2009 01:00:00) ) {
    /timer5001 00:40 1 1 /globalsay Minna! Minna! 
    /timer5002 00:40 1 2 /globalsay Oshogatsu! Oshogatsu! 
    /timer5003 00:40 1 3 /globalsay Mountain Standard Time New Year in 20 minutes!
    /timer5004 00:40 1 15 /globalme puts on her Party Hat!
    /timer5005 00:50 1 1 /globalme gets excited.
    /timer5006 00:50 1 2 /test
    /timer5007 00:56 1 1 /test2
    /timer5008 00:59 1 1 /globalsay Oshogatsu! Oshogatsu!
    /timer5009 00:59 1 2 /globalsay MST New Year in 58 seconds.
    /timer5010 00:59 1 30 /globalsay 30
    /timer5011 00:59 1 50 /globalsay 10
    /timer5012 00:59 1 55 /globalsay 5
    /timer5013 00:59 1 57 /globalsay 3
    /timer5014 00:59 1 58 /globalsay 2
    /timer5015 00:59 1 59 /globalsay 1
    /timer5016 01:00 1 0 /globalsay HAPPY NEW YEAR Mountain Standard Timers!
    /timer5017 01:00 1 1 /globalme blows on her noise maker.
    /timer5018 01:00 1 3 /globalsay Akemashite Omedetou Gozaimasu!
    /timer5000 01:05 1 1 /holiday   
    /timer5019 01:02 1 1 /test3
    halt
    ;mst
  }
  if ( $ctime < $ctime(January 1 2009 02:00:00) ) {
    ;pst
    /timer5001 01:40 1 1 /globalsay Minna! Minna! 
    /timer5002 01:40 1 2 /globalsay Oshogatsu! Oshogatsu! 
    /timer5003 01:40 1 3 /globalsay Pacific Standard Time New Year in 20 minutes!
    /timer5004 01:40 1 15 /globalme puts on her Party Hat!
    /timer5005 01:50 1 1 /globalme gets excited.
    /timer5006 01:50 1 2 /test
    /timer5007 01:56 1 1 /test2
    /timer5008 01:59 1 1 /globalsay Oshogatsu! Oshogatsu!
    /timer5009 01:59 1 2 /globalsay Pacific New Year in 58 seconds.
    /timer5010 01:59 1 30 /globalsay 30
    /timer5011 01:59 1 50 /globalsay 10
    /timer5012 01:59 1 55 /globalsay 5
    /timer5013 01:59 1 57 /globalsay 3
    /timer5014 01:59 1 58 /globalsay 2
    /timer5015 01:59 1 59 /globalsay 1
    /timer5016 02:00 1 0 /globalsay HAPPY NEW YEAR Pacific Standard Timers!
    /timer5017 02:00 1 1 /globalme runs and kisses Onee-sama!
    /timer5018 02:00 1 3 /globalsay Akemashite Omedetou Gozaimasu, Onee-sama!!
    /timer5020 02:00 1 6 /globalsay Akemashite Omedetou Gozaimasu, Minna!
    /timer5000 02:05 1 1 /holiday   
    /timer5019 02:02 1 1 /test3

    halt
  }
  if ( $ctime < $ctime(January 1 2009 04:00:00) ) {
    /timer5001 03:40 1 1 /globalsay Minna! Minna! 
    /timer5002 03:40 1 2 /globalsay Oshogatsu! Oshogatsu! 
    /timer5003 03:40 1 3 /globalsay Hawaii New Year in 20 minutes!
    /timer5004 03:40 1 15 /globalme puts on her Party Hat!
    /timer5005 03:50 1 1 /globalme gets excited.
    /timer5006 03:50 1 2 /test
    /timer5007 03:56 1 1 /test2
    /timer5008 03:59 1 1 /globalsay Oshogatsu! Oshogatsu!
    /timer5009 03:59 1 2 /globalsay Hawaii New Year in 58 seconds.
    /timer5010 03:59 1 30 /globalsay 30
    /timer5011 03:59 1 50 /globalsay 10
    /timer5012 03:59 1 55 /globalsay 5
    /timer5013 03:59 1 57 /globalsay 3
    /timer5014 03:59 1 58 /globalsay 2
    /timer5015 03:59 1 59 /globalsay 1
    /timer5016 04:00 1 0 /globalsay HAPPY NEW YEAR Hawaii!!!
    /timer5017 04:00 1 1 /globalme blows on her noise maker.
    /timer5018 04:00 1 3 /globalsay Akemashite Omedetou Gozaimasu!
    /timer5000 04:05 1 1 /holiday   
    /timer5019 04:02 1 1 /test3
    ;hawaii
    halt
  }

  if ( $ctime > $ctime(January 1 2009 04:00:00) ) {


  }

}
alias sanity {
  var %i = 1
  while ( %i <= $timer(0) ) {
    /globaldebug $scriptline Timer = $timer(%i) has $duration($timer(%i).secs) left
    inc %i
  }

}





!santa

on *:text:!santa*:#:{
  if ( $1 != !santa ) { halt }
  %a = $shockcollar(santa).lognoplay
  if ( $2 == ADD ) {
    /write c:\script\xmas.txt $3-
    msg $chan Un. I added $3- to Santa's bag.
    halt
  }
  describe $chan puts on a Santa hat... and peeks in her Santa bag.
  if ( $2 == $null ) {
    if ( $rand(1,10) == 1 ) {
      msg $chan Un. Silvie thinks $nickname was naughty this year.
      halt
    }
    if ( $rand(1,6) == 1 ) {
      describe $chan is distracted by a passing reindeer.
      halt
    }

    msg $chan Hai, $nickname $+ ...
    describe $chan gives $nickname �11,1  $read(c:\script\xmas.txt) �
    halt
  }

  if ( $rand(1,10) == 1 ) {
    msg $chan Un. Silvie thinks $nickname($2) was naughty this year.
    halt
  }
  if ( $rand(1,6) == 1 ) {
    describe $chan is distracted by a passing reindeer.
    halt
  }

  msg $chan Hai, $nickname($2) $+ ...
  describe $chan gives $nickname($2) �11,1  $read(c:\script\xmas.txt) �
  halt


}

abandoned code part 1

on 1:text:!rFriend*:*:{
  if ( $nick != %goshujinsama ) {
    notice $nick This is a debug command for %goshujinsama
    halt
  }
  if ( $2 == $null ) {
    notice $nick No user specified.
    halt
  }
  describe $chan looks for $2 $+ .
  %att = $address($2,1)
  if ( %att == $null ) {
    msg $chan I can't see $2 $+ .
    halt
  }
  describe $chan sniffs $2
  %a = $nickservseter($2,friend,$3).collect
  if ( %a == ERROR ) {
    msg $chan I'm already friending someone. Try $2 again.
    halt
  }


  halt
}

will have to code in all the $nick, $server, blah to get it work right.

and the keine game... just going to be a pain in the buttocks



;     /writeini C:\script\users.ini $nick keinegame 10
  ;  }
  ;  /writeini C:\script\users.ini $nick keinecall $ctime
 
alias -l keinegamepart {
   %a = kimoi yo!
   %b = caved!!!
   %c = kimochi no ii keine
   if ( ( $1 != %a ) && ( $1 != %b ) && ( $1 != %c ) ) {
      msg $chan That's not right, $nick $+ . Your points are: $readini(c:\script\users.ini,$nick,keinepoints)
     /remini c:\script\users.ini $nick keinegame
     /remini c:\script\users.ini $nick keinepoints
      halt
   }
   %ii = $readini(c:\script\users.ini,$nick,keinepos)
   inc %ii
   if ( ( %ii < 18 ) || ( %ii > 25 ) ) {
       msg #silvietest debug normal time
       %iidif = $calc($ctime - ($readini(c:\script\users.ini,$nick,keinegame) + $readini(c:\script\users.ini,$nick,keinecall)))
   }
   if ( ( %ii > 17 ) && ( %ii <25 ) ) {
       msg #silvietest doubletime
       %iidif = $calc($ctime - ($readini(c:\script\users.ini,$nick,keinegame) + ($readini(c:\script\users.ini,$nick,keinecall)/2)))
   }
   
   /writeini c:\script\users.ini $nick keinepos %ii
   /writeini c:\script\users.ini $nick keinecall $ctime
   
   msg #silvietest debug %ii for %iidif 
   
   if ( %ii = 1 ) {
     msg $chan ( + 100 ) ( 100 ) no no kimoku nai yo!
     /writeini c:\script\users.ini $nick keinepoints 100
     halt
   } ; this is the only point exception
   
   
 
 
 halt
}

  
  ;     /writeini C:\script\users.ini $nick keinegame 10
  ;  }
  ;  /writeini C:\script\users.ini $nick keinecall $ctime
 
 if ( $readini(c:\script\users.ini,$nick,keinegame) !=  $null ) {   
  if ( $calc($ctime - $readini(c:\script\users.ini,$nick,lastseen)) < 60 ) {
     %a = $keinegamepart($1-)
  }
  else {
    describe $chan seems uninterested.
    /remini c:\script\users.ini $nick keinegame
    halt
  }
 }  
 

if ( $2- == keine game ) {
    if ( $readini(c:\script\users.ini,$nick,keinegame) == $null ) {
       msg $chan You've never played. I'll set to easy(10).
       /writeini C:\script\users.ini $nick keinegame 10
    }
    /writeini C:\script\users.ini $nick keinecall $ctime
    /writeini C:\script\users.ini $nick keinepoints 0
    /writeini c:\script\users.ini $nick keinepos 0
    msg $chan Ready to play!
    halt
  }