All pastes #911521 Raw Edit

Untitled

public text v1 · immutable
·published 2008-02-20 19:36 UTC
rendered paste body
/ch2 { 
  var %crimson = 4Crimson: $2 ( $+ $bytes($calc( $2 * 281.6 ),db) $+ )
  var %gold = 7Gold: $1 ( $+ $bytes($calc( $1 * 87 ),db) $+ )
  var %green = 3Green: $3 ( $+ $bytes($calc( $3 * 121.2 ),db) $+ )
  var %blue = 10Blue: $4 ( $+ $bytes($calc( $4 * 668.8 ),db) $+ )
  var %total = $bytes($calc( ( $1 * 87) + ( $2 * 281.6 ) + ( $4 * 668.8 ) + ( $3 * 121.2) ),db)
  var %alsototal = $calc( ( $1 * 87) + ( $2 * 281.6 ) + ( $4 * 668.8 ) + ( $3 * 121.2) )
  var %totwithexp = $calc( %alsototal + $5 )
  if (%totwithexp > 6517215) {
    %diff = $calc( %totwithexp - 6517215 )
    %xtraCrim = $floor( $calc( %diff / 281.6))
    %gainedEXP = $calc( %xtraCrim * 404.8 )
    %realcountCrim1 = $calc( $2 - %xtraCrim )
    %crimson1 = 4Crimson1: %realcountCrim1 ( $+ $bytes($calc( %realcountCrim1 * 281.6 ),db) $+ )
    %crimson2 = 4Crimson2: %xtraCrim ( $+ $bytes($calc( %xtraCrim * 404.8 ),db) $+ )
    %realTotNow = $calc( ( %gainedEXP + ( %realcountCrim1 * 281.6 ) + ( $1 * 87) + ( $4 * 668.8 ) + ( $3 * 121.2 ) ) )

  /say Charms: %gold %crimson1 %crimson2 %green %blue - %realtotNow overall exp. $6- }
  else {
  /say Charms: %gold %crimson %green %blue - %total overall exp. $6- }
}