Ustnap Script

From whuckaba
Jump to: navigation, search

Hightech flavor

This one makes sure that ustnap is used, and if ustnap is set-off that it was on purpose.... not fool proof.. but close

on 1:ACTION:*pantsu*:#hikikomori:{


  if ( $nick = Ustnap ) {
    ; $4 = new pantsu
    ;%hikilast = $ctime
    if ( $calc($ctime - %hikilast) < 2 ) {
      %hikipantsu = $calc( %hikipantsu + $3 )
    }
    ; msg $chan [HIKIKOMORI PANTSU] Ustnap adds $3 pantsu, for a channel total of %hikipantsu $+ .
    goto GETOUT
  }
  %i = 1
  %f = 0
  %p = 0
  :GETLINE
  %o = $ [ $+ [ %i ] ]

  if ( ( %o > 99 ) && ( %o < 1000 ) ) {
    %p = %o
   
  }
  if ( %o == USTNAP ) {
    %f = 1
  }
  if ( %o == $null ) { goto REALLYOUT }
  inc %i 
  goto getline
  :REALLYOUT
  if ( %f = 1 ) { 
    %hikipantsu = $calc( %hikipantsu - %p )
    %hikilast = $ctime
    ; msg $chan [HIKIKOMORI PANTSU] $nick removes %o pantsu, for a channel total of %hikipantsu $+ .
  }
  :GETOUT
  if ( %hikipantsu > 10000 ) {
    msg $chan My god, Ustnap has been raped and produced %hikipantsu since  $asctime(%hikipantsustart) $+ .
    %hikipantsu = 0
    %hikipantsustart = $ctime
  }
  if ( %hikipantsu < -10000 ) {
    msg $chan My god, give Ustnap some pantsu.. he's missing $calc(-1 * %hikipantsu) since  $asctime(%hikipantsustart) $+ .
    %hikipantsu = 0
    %hikipantsustart = $ctime
  }

}

on 1:TEXT:!pantsu*:#hikikomori:{
  if ( $2 == reset ) {
    if ( ( $nick == Silvie ) || ( $nick == Ustnap ) ) {
      %hikipantsu = 0
      %hikipantsustart = $ctime
    }
    else {
      msg $chan Only Ustnap or Silvie may reset the pantsu counter.
    }
  }

  msg $chan There have been a net of �11,1� %hikipantsu �� pantsu left in the channel since $asctime(%hikipantsustart) $+ .
}



Original Flavor

This just counts pantsu



on 1:ACTION:*pantsu*:#hikikomori:{


  if ( $nick = Ustnap ) {
    ; $4 = new pantsu
    %hikipantsu = $calc( %hikipantsu + $3 )
    ; msg $chan [HIKIKOMORI PANTSU] Ustnap adds $3 pantsu, for a channel total of %hikipantsu $+ .
    goto GETOUT
  }
  %i = 1
  :GETLINE
  %o = $ [ $+ [ %i ] ]
  echo debug %o
  if ( ( %o > 99 ) && ( %o < 1000 ) ) {
    %hikipantsu = $calc( %hikipantsu - %o )
    ; msg $chan [HIKIKOMORI PANTSU] $nick removes %o pantsu, for a channel total of %hikipantsu $+ .
    goto GETOUT
  }
  if ( %o == $null ) { goto GETOUT }
  inc %i 
  goto getline
  :GETOUT
}

on 1:TEXT:!pantsu*:#hikikomori:{
  if ( $2 == reset ) {
    if ( ( $nick == Silvie ) || ( $nick == Ustnap ) ) {
      %hikipantsu = 0
      %hikipantsustart = $ctime
    }
    else {
      msg $chan Only Ustnap or Silvie may reset the pantsu counter.
    }
  }

  msg $chan There have been a net of �11,1� %hikipantsu �� pantsu left in the channel since $asctime(%hikipantsustart) $+ .
}