All pastes #562583 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-12 20:57 UTC
rendered paste body
compare { if ($2 == &) { 
    /set %items $1
    /set %items2 $3-
  }
  else if ($3 == &) { 
    /set %items $1-2
    /set %items2 $4-
  }
  else if ($4 == &) {
    /set %items $1-3
    /set %items2 $5-
  }
  else if ($5 == &) { 
    /set %items $1-4
    /set %items2 $6-
  }
  else if ($6 == &) { 
    /set %items $1-5
    /set %items2 $7-
  }
  else if ($7 == &) { 
    /set %items $1-6
    /set %items2 $8-
  }
  { if ($read(attbonus.txt,w,$+(*,%items,*))) { /set %attack1 $replace($ifmatch,|,7|6,||, ) | if ($read(defbonus.txt,w,$+(*,%items,*))) /set %defence1 $replace($ifmatch,|, 7|6,||, ) | if ($read(otherbonus.txt,w,$+(*,%items,*))) /set %other1 $replace($ifmatch,|, 7|6,||, )
      if ($read(attbonus.txt,w,$+(*,%items2,*))) { /set %attack2 $replace($ifmatch,|,7|6,||, ) | if ($read(defbonus.txt,w,$+(*,%items2,*))) /set %defence2 $replace($ifmatch,|, 7|6,||, ) | if ($read(otherbonus.txt,w,$+(*,%items2,*))) /set %other2 $replace($ifmatch,|, 7|6,||, )
        { 
          /set %att1 $strip($regsubex(%attack1,/[a-z:|]/gi,$null))
          /set %att2 $strip($regsubex(%attack2,/[a-z:|]/gi,$null))
          /set %def1 $strip($regsubex(%defence1,/[a-z:|]/gi,$null))
          /set %def2 $strip($regsubex(%defence2,/[a-z:|]/gi,$null))
          /set %oth1 $strip($regsubex(%other1,/[a-z:|]/gi,$null))
          /set %oth2 $strip($regsubex(%other2,/[a-z:|]/gi,$null))
          /set %thing1.1 $strip($regsubex(%attack1,/[0-9:|+-]/gi,$null))
          /set %thing1.2 $remove(%thing1.1,slash,stab,crush,magic,range)
          /set %thing2.1 $strip($regsubex(%attack2,/[0-9:|+-]/gi,$null))
          /set %thing2.2 $remove(%thing2.1,slash,stab,crush,magic,range)
        }
        { //tokenize 32 %att1
          /set %stab1.1 $1
          /set %slash1.1 $2
          /set %crush1.1 $3
          /set %mage1.1 $4
          /set %range1.1 $5
        }
        {
          //tokenize 32 %att2
          /set %stab1.2 $1
          /set %slash1.2 $2
          /set %crush1.2 $3
          /set %mage1.2 $4
          /set %range1.2 $5
        }
        {
          //tokenize 32 %def1
          /set %stab2.1 $1
          /set %slash2.1 $2
          /set %crush2.1 $3
          /set %mage2.1 $4
          /set %range2.1 $5
        }
        {
          //tokenize 32 %def2
          /set %stab2.2 $1
          /set %slash2.2 $2
          /set %crush2.2 $3
          /set %mage2.2 $4
          /set %range2.2 $5
        }
        {
          //tokenize 32 %oth1
          /set %strength1.1 $1
          /set %prayer1.1 $2
        }
        {
          //tokenize 32 %oth2
          /set %strength1.2 $1
          /set %prayer1.2 $2
        }
        { /msg $$chan 6Compare Bonuses for7 %thing1.2 6and7 %thing2.2 }
        { /msg $$chan 7[6Attack Differences7]6 Stab7:6 $calc(%stab1.1 - %stab1.2) 7|6 Slash7:6 $calc(%slash1.1 - %slash1.2) 7|6 Crush7:6 $calc(%crush1.1 - %crush1.2) 7|6 Magic7:6 $calc(%mage1.1 - %mage1.2) 7|6 Range7:6 $calc(%range1.1 - %range1.2) }
        { /msg $$chan 7[6Defence Differences7]6 Stab7:6 $calc(%stab2.1 - %stab2.2) 7|6 Slash7:6 $calc(%slash2.1 - %slash2.2) 7|6 Crush7:6 $calc(%crush2.1 - %crush2.2) 7|6 Magic7:6 $calc(%mage2.1 - %mage2.2) 7|6 Range7:6 $calc(%range2.1 - %range2.2) }
        { /msg $$chan 7[6Other Differences7]6 Strength7:6 $calc(%strangth1.1 - %strength1.2) 7|6 Prayer7:6 $calc(%prayer1.1 - %prayer1.2) }
      }
    }
  }
  else { /notice $nick $1- Isn't in my database } 
}