state skillpricecalc
    // Overflow Checker
    setvarvar OVERFLOW_RAWVALUE_OLD SHOPDOLLARSTEMP2
    ifvare SKILLLEVEL 0 setvarvar OVERFLOW_TEMPMULTI 7500
    ifvare SKILLLEVEL 1 setvarvar OVERFLOW_TEMPMULTI 8125
    ifvare SKILLLEVEL 2 setvarvar OVERFLOW_TEMPMULTI 8750
    ifvare SKILLLEVEL 3 setvarvar OVERFLOW_TEMPMULTI 9375
    ifvare SKILLLEVEL 4 setvarvar OVERFLOW_TEMPMULTI 10000
    ifvare SKILLLEVEL 5 setvarvar OVERFLOW_TEMPMULTI 10000
    ifvare SKILLLEVEL 6 setvarvar OVERFLOW_TEMPMULTI 10625
    ifvare SKILLLEVEL 7 setvarvar OVERFLOW_TEMPMULTI 11250
    ifvare SKILLLEVEL 8 setvarvar OVERFLOW_TEMPMULTI 11875
    ifvare SKILLLEVEL 9 setvarvar OVERFLOW_TEMPMULTI 12500
    setvarvar OVERFLOW_TEMPDIVISOR 10000
    state checkoverflow_custom
    setvarvar SHOPDOLLARSTEMP2 OVERFLOW_RAWVALUE_NEW

     ifvare shopmode 0 // Buying
     {
      setvarvar OVERFLOW_RAWVALUE_OLD SHOPDOLLARSTEMP2
	setvarvar varname RANKPOINTS
	ifvarl varname -262143999 // [O] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 11250
      }
	else ifvarg varname -262144000 ifvarl varname -65536000 // [N] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 11125
      }
	else ifvarg varname -65536001 ifvarl varname -16384000 // [M] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 11000
      }
	else ifvarg varname -16384001 ifvarl varname -4096000 // [L] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10875
      }
	else ifvarg varname -4096001 ifvarl varname -1024000 // [K] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10750
      }
	else ifvarg varname -1024001 ifvarl varname -256000 // [J] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10625
      }
	else ifvarg varname -256001 ifvarl varname -64000 // [I] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10500
      }
	else ifvarg varname -64001 ifvarl varname -16000 // [H] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10375
      }
	else ifvarg varname -16001 ifvarl varname -4000 // [G] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10250
      }
	else ifvarg varname -4001 ifvarl varname 0 // [F] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10125
      }
	else ifvare varname 0 // [-] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10000
      }
	else ifvarg varname 0 ifvarl varname 4001 // [E] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9875
      }
	else ifvarg varname 4000 ifvarl varname 16001 // [D] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9750
      }
	else ifvarg varname 16000 ifvarl varname 64001 // [C] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9625
      }
	else ifvarg varname 64000 ifvarl varname 256001 // [B] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9500
      }
	else ifvarg varname 256000 ifvarl varname 1024001 // [A] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9375
      }
	else ifvarg varname 1024000 ifvarl varname 4096001 // [S] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9250
      }
	else ifvarg varname 4096000 ifvarl varname 16384001 // [SS] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9125
      }
	else ifvarg varname 16384000 ifvarl varname 65536000 // [Z] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9000
      }
	else ifvarg varname 65535999 ifvarl varname 262144000 // [ZZ] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 8875
      }
	else ifvarg varname 262143999 // [NR] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 8750
      }
      setvarvar OVERFLOW_TEMPDIVISOR 10000
      state checkoverflow_custom
      setvarvar SHOPDOLLARSTEMP2 OVERFLOW_RAWVALUE_NEW
     }
     else // Selling
     {
      setvarvar OVERFLOW_RAWVALUE_OLD SHOPDOLLARSTEMP2
	setvarvar varname RANKPOINTS
	ifvarl varname -262143999 // [O] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9250
      }
	else ifvarg varname -262144000 ifvarl varname -65536000 // [N] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9325
      }
	else ifvarg varname -65536001 ifvarl varname -16384000 // [M] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9400
      }
	else ifvarg varname -16384001 ifvarl varname -4096000 // [L] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9475
      }
	else ifvarg varname -4096001 ifvarl varname -1024000 // [K] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9550
      }
	else ifvarg varname -1024001 ifvarl varname -256000 // [J] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9625
      }
	else ifvarg varname -256001 ifvarl varname -64000 // [I] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9700
      }
	else ifvarg varname -64001 ifvarl varname -16000 // [H] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9775
      }
	else ifvarg varname -16001 ifvarl varname -4000 // [G] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9850
      }
	else ifvarg varname -4001 ifvarl varname 0 // [F] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 9925
      }
	else ifvare varname 0 // [-] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10000
      }
	else ifvarg varname 0 ifvarl varname 4001 // [E] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10075
      }
	else ifvarg varname 4000 ifvarl varname 16001 // [D] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10150
      }
	else ifvarg varname 16000 ifvarl varname 64001 // [C] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10225
      }
	else ifvarg varname 64000 ifvarl varname 256001 // [B] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10300
      }
	else ifvarg varname 256000 ifvarl varname 1024001 // [A] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10375
      }
	else ifvarg varname 1024000 ifvarl varname 4096001 // [S] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10450
      }
	else ifvarg varname 4096000 ifvarl varname 16384001 // [SS] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10525
      }
	else ifvarg varname 16384000 ifvarl varname 65536000 // [Z] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10600
      }
	else ifvarg varname 65535999 ifvarl varname 262144000 // [ZZ] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10675
      }
	else ifvarg varname 262143999 // [NR] Rank
      {
       setvarvar OVERFLOW_TEMPMULTI 10750
      }
      setvarvar OVERFLOW_TEMPDIVISOR 10000
      state checkoverflow_custom
      setvarvar SHOPDOLLARSTEMP2 OVERFLOW_RAWVALUE_NEW
     }
ends

// Shop Lists
state calcshopitembaseprices
 // Quote 1281 is intended only for shop item names.
 // SHOPDOLLARSTEMP2 = Base Item Price
 // SHOPDOLLARSTEMPMULTI = Multiplier [Used usually for selling items, but can be used for Buying items too]
 // SHOPDOLLARSTEMPDIVISOR = Divisor [Used usually for selling items, but can be used for Buying items too]
 ifvare shopmode 0 // Buying
 {
  ifvare shoppage 0
  {
   ifvare shopitemid 0
   {
    redefinequote 1281 SMALL MEDIKIT
    setvar SHOPDOLLARSTEMP2 75
    setvar SHOPDOLLARSTEMPMULTI 1
    setvar SHOPDOLLARSTEMPDIVISOR 1
   }
   ifvare shopitemid 1
   {
    redefinequote 1281 MEDIUM MEDIKIT
    setvar SHOPDOLLARSTEMP2 135
    setvar SHOPDOLLARSTEMPMULTI 1
    setvar SHOPDOLLARSTEMPDIVISOR 1
   }
   ifvare shopitemid 2
   {
    redefinequote 1281 LARGE MEDIKIT
    setvar SHOPDOLLARSTEMP2 200
    setvar SHOPDOLLARSTEMPMULTI 1
    setvar SHOPDOLLARSTEMPDIVISOR 1
   }
   ifvare shopitemid 3
   {
    redefinequote 1281 EXTRA-LARGE MEDIKIT
    setvar SHOPDOLLARSTEMP2 335
    setvar SHOPDOLLARSTEMPMULTI 1
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 4
   {
    redefinequote 1281 ATOMIC HEALTH
    setvar SHOPDOLLARSTEMP2 625
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 5
   {
    redefinequote 1281 SUPER ATOM
    setvar SHOPDOLLARSTEMP2 4000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 6
   {
    redefinequote 1281 BODY ARMOR
    setvar SHOPDOLLARSTEMP2 500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 7
   {
    redefinequote 1281 SUPER ARMOR
    setvar SHOPDOLLARSTEMP2 1500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 8
   {
    redefinequote 1281 VITAMIN X
    setvar SHOPDOLLARSTEMP2 6400
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 9
   {
    redefinequote 1281 NIGHT-VISION GOGGLES
    setvar SHOPDOLLARSTEMP2 1000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 10
   {
    ifvare CHARACTERSELECTED? 1 redefinequote 1281 HOLODUKE
    ifvare CHARACTERSELECTED? 2 redefinequote 1281 HOLOJACK
    ifvare CHARACTERSELECTED? 3 redefinequote 1281 HOLOBUBSY
    ifvare CHARACTERSELECTED? 4 redefinequote 1281 HOLOAMI
    ifvare CHARACTERSELECTED? 5 redefinequote 1281 HOLOHIGA
    ifvare CHARACTERSELECTED? 6 redefinequote 1281 HOLOESSENCE
    ifvare CHARACTERSELECTED? 7 redefinequote 1281 HOLOTED
    ifvare CHARACTERSELECTED? 8 redefinequote 1281 HOLOLISA
    ifvare CHARACTERSELECTED? 9 redefinequote 1281 HOLOCYBANIS
    ifvare CHARACTERSELECTED? 10 redefinequote 1281 HOLONETHRA
    ifvare CHARACTERSELECTED? 11 redefinequote 1281 HOLOPAULA
    ifvare CHARACTERSELECTED? 12 redefinequote 1281 HOLOLORI
    ifvare CHARACTERSELECTED? 13 redefinequote 1281 HOLOMINAKO
    ifvare CHARACTERSELECTED? 14 redefinequote 1281 HOLO???????
    ifvare CHARACTERSELECTED? 15 redefinequote 1281 HOLOMAKEN
    setvar SHOPDOLLARSTEMP2 1250
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 11
   {
    redefinequote 1281 JETPACK
    setvar SHOPDOLLARSTEMP2 1500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 12
   {
    redefinequote 1281 SCUBA GEAR
    setvar SHOPDOLLARSTEMP2 1500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 13
   {
    redefinequote 1281 PROTECTIVE BOOTS
    setvar SHOPDOLLARSTEMP2 1000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 14
   {
    redefinequote 1281 PORTABLE MEDIKIT
    setvar SHOPDOLLARSTEMP2 2000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 15
   {
    redefinequote 1281 EYEDROP
    setvar SHOPDOLLARSTEMP2 125
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 16
   {
    redefinequote 1281 ANTIDOTE
    setvar SHOPDOLLARSTEMP2 175
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 17
   {
    redefinequote 1281 FOGHORN
    setvar SHOPDOLLARSTEMP2 225
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 18
   {
    redefinequote 1281 RESURRECTION CHALICE
    setvar SHOPDOLLARSTEMP2 3000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 19
   {
    redefinequote 1281 MAXIMUM HP/AP BONUS
    setvar SHOPDOLLARSTEMP2 62500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 20
   {
    redefinequote 1281 ATTACK/DEFENSE BONUS
    setvar SHOPDOLLARSTEMP2 62500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 21
   {
    redefinequote 1281 SPEED BONUS
    setvar SHOPDOLLARSTEMP2 50000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
  }
  else
  ifvare shoppage 1
  {
   ifvare shopitemid 0
   {
    redefinequote 1281 SMALL AMMO SATCHEL
    setvar SHOPDOLLARSTEMP2 27500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 1
   {
    redefinequote 1281 LARGE AMMO SATCHEL
    setvar SHOPDOLLARSTEMP2 100000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 2
   {
    redefinequote 1281 TELEPORTER COILS [8/PK]
    setvar SHOPDOLLARSTEMP2 240
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 3
   {
    redefinequote 1281 EXTRA-LIFE T-SHIRT
    setvar SHOPDOLLARSTEMP2 750000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 4
   {
    redefinequote 1281 CONTINUE ITEM
    setvar SHOPDOLLARSTEMP2 2500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 5
   {
    redefinequote 1281 ENERGY CELLS [5/PK]
    setvar SHOPDOLLARSTEMP2 250
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 6
   {
    redefinequote 1281 ENERGY CELLS [30/PK]
    setvar SHOPDOLLARSTEMP2 1250
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 7
   {
    redefinequote 1281 ENERGY CELLS [80/PK]
    setvar SHOPDOLLARSTEMP2 3250
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 8
   {
    ifvare HAVEENERGYSHIELD? 0
    {
     redefinequote 1281 BIO-CELL ENERGY SHIELD
     setvar SHOPDOLLARSTEMP2 325000
     setvar SHOPDOLLARSTEMPMULTI 1 
     setvar SHOPDOLLARSTEMPDIVISOR 1 
    }
    else
    {
     redefinequote 1281 BIO-CELL ENERGY SHIELD [+]
     setvar SHOPDOLLARSTEMP2 200000
     setvar SHOPDOLLARSTEMPMULTI 1 
     setvar SHOPDOLLARSTEMPDIVISOR 1 
    }
   }
   ifvare shopitemid 9
   {
    redefinequote 1281 AIRTIME BONUS
    setvar SHOPDOLLARSTEMP2 27500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 10
   {
    redefinequote 1281 MANTLE BONUS
    setvar SHOPDOLLARSTEMP2 27500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 11
   {
    redefinequote 1281 AIRJUMP BONUS
    setvar SHOPDOLLARSTEMP2 750000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 12
   {
    redefinequote 1281 AFA'S DROP
    setvar SHOPDOLLARSTEMP2 2500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 13
   {
    redefinequote 1281 SUN RING
    setvar SHOPDOLLARSTEMP2 800000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 14
   {
    redefinequote 1281 AQUA RING
    setvar SHOPDOLLARSTEMP2 800000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 15
   {
    redefinequote 1281 PLASMA RING
    setvar SHOPDOLLARSTEMP2 800000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 16
   {
    redefinequote 1281 SPIRIT RING
    setvar SHOPDOLLARSTEMP2 800000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 17
   {
    redefinequote 1281 CHARM ANKH
    setvar SHOPDOLLARSTEMP2 1250000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 18
   {
    redefinequote 1281 MIRROR SHIELD
    setvar SHOPDOLLARSTEMP2 2000000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 19
   {
    redefinequote 1281 EXPERIENCE BADGE
    setvar SHOPDOLLARSTEMP2 1625000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 20
   {
    redefinequote 1281 RANK BADGE
    setvar SHOPDOLLARSTEMP2 1625000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 21
   {
    redefinequote 1281 MONEY BADGE
    setvar SHOPDOLLARSTEMP2 1625000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
  }
  else
  ifvare shoppage 2
  {
   ifvare shopitemid 0
   {
    redefinequote 1281 PISTOL AMMO [12]
    setvar SHOPDOLLARSTEMP2 200
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 1
   {
    redefinequote 1281 SHOTGUN SHELLS [10]
    setvar SHOPDOLLARSTEMP2 550
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 2
   {
    redefinequote 1281 CHAINGUN BULLETS [50]
    setvar SHOPDOLLARSTEMP2 450
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 3
   {
    redefinequote 1281 RPG MISSILES [5]
    setvar SHOPDOLLARSTEMP2 825
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 4
   {
    redefinequote 1281 PIPEBOMB [1]
    setvar SHOPDOLLARSTEMP2 150
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 5
   {
    redefinequote 1281 BOX OF PIPEBOMBS [5]
    setvar SHOPDOLLARSTEMP2 625
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 6
   {
    redefinequote 1281 SHRINKER CRYSTAL [5]
    setvar SHOPDOLLARSTEMP2 825
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 7
   {
    redefinequote 1281 EXPANDER ANTENNA [20]
    setvar SHOPDOLLARSTEMP2 825
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 8
   {
    redefinequote 1281 DEVASTATOR MISSILES [15]
    setvar SHOPDOLLARSTEMP2 675
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 9
   {
    redefinequote 1281 LASER TRIPBOMB [1]
    setvar SHOPDOLLARSTEMP2 250
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 10
   {
    redefinequote 1281 FREEZETHROWER PACK [25]
    setvar SHOPDOLLARSTEMP2 950
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 11
   {
    redefinequote 1281 POTENTYLENE
    setvar SHOPDOLLARSTEMP2 2500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 12
   {
    redefinequote 1281 RIOT SHIELD
    setvar SHOPDOLLARSTEMP2 1500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 13
   {
    redefinequote 1281 PAIR OF NYX GLOVES
    setvar SHOPDOLLARSTEMP2 1000000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 14
   {
    redefinequote 1281 RABBIT'S FOOT
    setvar SHOPDOLLARSTEMP2 1250000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 15
   {
    redefinequote 1281 PAIR OF JUMP BOOTS
    setvar SHOPDOLLARSTEMP2 1875000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 16
   {
    redefinequote 1281 PAIR OF SHOCKAB BOOTS
    setvar SHOPDOLLARSTEMP2 1875000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 17
   {
    redefinequote 1281 PAIR OF HAPPY SHOES
    setvar SHOPDOLLARSTEMP2 1625000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 18
   {
    redefinequote 1281 PAIR OF STYLE SHOES
    setvar SHOPDOLLARSTEMP2 1625000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 19
   {
    redefinequote 1281 PAIR OF CHARM SHOES
    setvar SHOPDOLLARSTEMP2 1625000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 20
   {
    redefinequote 1281 POWER WRIST
    setvar SHOPDOLLARSTEMP2 2000000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 21
   {
    redefinequote 1281 SMALL ENERGY DRINK
    setvar SHOPDOLLARSTEMP2 1500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
  }
  else
  ifvare shoppage 3
  {
   ifvare shopitemid 0
   {
    redefinequote 1281 LARGE ENERGY DRINK
    setvar SHOPDOLLARSTEMP2 4000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 1
   {
    redefinequote 1281 HYPER ENERGY DRINK
    setvar SHOPDOLLARSTEMP2 80000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 2
   {
    redefinequote 1281 MAXIMUM EP BONUS
    setvar SHOPDOLLARSTEMP2 100000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 3
   {
    redefinequote 1281 SILK CARNATION
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 4
   {
    redefinequote 1281 RARE PIRATE DOUBLOON
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 5
   {
    redefinequote 1281 PAIR OF FIXED DICE
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 6
   {
    redefinequote 1281 MALAKIAN GEM
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 7
   {
    redefinequote 1281 SAFE LOCK BOX
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 8
   {
    redefinequote 1281 SECRET RECIPE
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 9
   {
    redefinequote 1281 SLURPEE MACHINE
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 10
   {
    redefinequote 1281 STOCK OWNERSHIP
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 11
   {
    redefinequote 1281 TRANSDIMENSIONAL SAFE
    setvar SHOPDOLLARSTEMP2 16500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 12
   {
    redefinequote 1281 BLOODPACT SHIELD
    setvar SHOPDOLLARSTEMP2 16500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 13
   {
    redefinequote 1281 GREEN-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 270
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 14
   {
    redefinequote 1281 BLUE-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 405
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 15
   {
    redefinequote 1281 YELLOW-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 605
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 16
   {
    redefinequote 1281 RED-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 725
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 17
   {
    redefinequote 1281 GREY-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 760
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 18
   {
    redefinequote 1281 WHITE-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 805
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 19
   {
    redefinequote 1281 RANDOM-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 505
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 20
   {
    redefinequote 1281 HOCKEY MASK
    setvar SHOPDOLLARSTEMP2 1750000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 21
   {
    redefinequote 1281 GEMSTONE CROWN
    setvar SHOPDOLLARSTEMP2 2250000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
  }
  else
  ifvare shoppage 4
  {
   ifvare shopitemid 0
   {
    redefinequote 1281 IRON RUNE
    setvar SHOPDOLLARSTEMP2 3500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 1
   {
    redefinequote 1281 TWILIGHT CAPE
    setvar SHOPDOLLARSTEMP2 2500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 2
   {
    redefinequote 1281 SNAKE ARMBAND
    setvar SHOPDOLLARSTEMP2 2500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 3
   {
    redefinequote 1281 MEDIC BAG
    setvar SHOPDOLLARSTEMP2 4000000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 4
   {
    redefinequote 1281 SERPENT HELMET
    setvar SHOPDOLLARSTEMP2 3000000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 5
   {
    redefinequote 1281 ENERGY INCURMENT
    setvar SHOPDOLLARSTEMP2 3500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 6
   {
    redefinequote 1281 YIN-YANG ORB
    setvar SHOPDOLLARSTEMP2 3250000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 7
   {
    redefinequote 1281 WINTER SUIT
    setvar SHOPDOLLARSTEMP2 2500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 8
   {
    redefinequote 1281 RIOT-TANK CAPSULE [GREEN]
    setvar SHOPDOLLARSTEMP2 64000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 9
   {
    redefinequote 1281 RIOT-TANK CAPSULE [BLUE]
    setvar SHOPDOLLARSTEMP2 64000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 10
   {
    redefinequote 1281 RIOT-TANK CAPSULE [RED]
    setvar SHOPDOLLARSTEMP2 64000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
  }
 }
 else
 ifvare shopmode 1 // Selling
 { 
  ifvare shoppage 0
  {
   ifvare shopitemid 0
   {
    redefinequote 1281 RESURRECTION CHALICE
    setvar SHOPDOLLARSTEMP2 3000
    setvar SHOPDOLLARSTEMPMULTI 2 
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 1
   {
    redefinequote 1281 EYEDROP
    setvar SHOPDOLLARSTEMP2 125
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 2
   {
    redefinequote 1281 ANTIDOTE
    setvar SHOPDOLLARSTEMP2 175
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 3
   {
    redefinequote 1281 FOGHORN
    setvar SHOPDOLLARSTEMP2 225
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 4
   {
    redefinequote 1281 EXTRA-LIFE T-SHIRT
    setvar SHOPDOLLARSTEMP2 750000
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 5
   {
    redefinequote 1281 CONTINUE ITEM
    setvar SHOPDOLLARSTEMP2 2500000
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 6
   {
    redefinequote 1281 ENERGY CELLS [5/PK]
    setvar SHOPDOLLARSTEMP2 250
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 7
   {
    redefinequote 1281 TELEPORTER COILS [8/PK]
    setvar SHOPDOLLARSTEMP2 240
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 8
   {
    redefinequote 1281 SMALL MEDIKIT
    setvar SHOPDOLLARSTEMP2 75
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 9
   {
    redefinequote 1281 MEDIUM MEDIKIT
    setvar SHOPDOLLARSTEMP2 135
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 10
   {
    redefinequote 1281 LARGE MEDIKIT
    setvar SHOPDOLLARSTEMP2 200
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 11
   {
    redefinequote 1281 EXTRA-LARGE MEDIKIT
    setvar SHOPDOLLARSTEMP2 335
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 12
   {
    redefinequote 1281 BODY ARMOR
    setvar SHOPDOLLARSTEMP2 500
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 13
   {
    redefinequote 1281 SUPER ARMOR
    setvar SHOPDOLLARSTEMP2 1500
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 14
   {
    redefinequote 1281 VITAMIN X
    setvar SHOPDOLLARSTEMP2 6400
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 15
   {
    redefinequote 1281 NIGHT-VISION GOGGLES
    setvar SHOPDOLLARSTEMP2 1000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 16
   {
    ifvare CHARACTERSELECTED? 1 redefinequote 1281 HOLODUKE
    ifvare CHARACTERSELECTED? 2 redefinequote 1281 HOLOJACK
    ifvare CHARACTERSELECTED? 3 redefinequote 1281 HOLOBUBSY
    ifvare CHARACTERSELECTED? 4 redefinequote 1281 HOLOAMI
    ifvare CHARACTERSELECTED? 5 redefinequote 1281 HOLOHIGA
    ifvare CHARACTERSELECTED? 6 redefinequote 1281 HOLOESSENCE
    ifvare CHARACTERSELECTED? 7 redefinequote 1281 HOLOTED
    ifvare CHARACTERSELECTED? 8 redefinequote 1281 HOLOLISA
    ifvare CHARACTERSELECTED? 9 redefinequote 1281 HOLOCYBANIS
    ifvare CHARACTERSELECTED? 10 redefinequote 1281 HOLONETHRA
    ifvare CHARACTERSELECTED? 11 redefinequote 1281 HOLOPAULA
    ifvare CHARACTERSELECTED? 12 redefinequote 1281 HOLOLORI
    ifvare CHARACTERSELECTED? 13 redefinequote 1281 HOLOMINAKO
    ifvare CHARACTERSELECTED? 14 redefinequote 1281 HOLO???????
    ifvare CHARACTERSELECTED? 15 redefinequote 1281 HOLOMAKEN
    setvar SHOPDOLLARSTEMP2 1250
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 17
   {
    redefinequote 1281 JETPACK
    setvar SHOPDOLLARSTEMP2 1500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 18
   {
    redefinequote 1281 SCUBA GEAR
    setvar SHOPDOLLARSTEMP2 1500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 19
   {
    redefinequote 1281 PROTECTIVE BOOTS
    setvar SHOPDOLLARSTEMP2 1000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 20
   {
    redefinequote 1281 PORTABLE MEDIKIT
    setvar SHOPDOLLARSTEMP2 2000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 21
   {
    redefinequote 1281 AFA'S DROP
    setvar SHOPDOLLARSTEMP2 2500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 4
   }
  }
  else
  ifvare shoppage 1
  {
   ifvare shopitemid 0
   {
    redefinequote 1281 SUN RING
    setvar SHOPDOLLARSTEMP2 800000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 1
   {
    redefinequote 1281 AQUA RING
    setvar SHOPDOLLARSTEMP2 800000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 2
   {
    redefinequote 1281 PLASMA RING
    setvar SHOPDOLLARSTEMP2 800000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 3
   {
    redefinequote 1281 SPIRIT RING
    setvar SHOPDOLLARSTEMP2 800000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 4
   {
    redefinequote 1281 CHARM ANKH
    setvar SHOPDOLLARSTEMP2 1250000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 5
   {
    redefinequote 1281 MIRROR SHIELD
    setvar SHOPDOLLARSTEMP2 2000000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 6
   {
    redefinequote 1281 EXPERIENCE BADGE
    setvar SHOPDOLLARSTEMP2 1625000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 7
   {
    redefinequote 1281 RANK BADGE
    setvar SHOPDOLLARSTEMP2 1625000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 8
   {
    redefinequote 1281 MONEY BADGE
    setvar SHOPDOLLARSTEMP2 1625000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 9
   {
    redefinequote 1281 ATOMIC HEALTH
    setvar SHOPDOLLARSTEMP2 625
    setvar SHOPDOLLARSTEMPMULTI 4
    setvar SHOPDOLLARSTEMPDIVISOR 5
   }
   ifvare shopitemid 10
   {
    redefinequote 1281 SUPER ATOM
    setvar SHOPDOLLARSTEMP2 4000
    setvar SHOPDOLLARSTEMPMULTI 4
    setvar SHOPDOLLARSTEMPDIVISOR 5
   }
   ifvare shopitemid 11
   {
    redefinequote 1281 POTENTYLENE
    setvar SHOPDOLLARSTEMP2 2500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 12
   {
    redefinequote 1281 RIOT SHIELD
    setvar SHOPDOLLARSTEMP2 1500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 13
   {
    redefinequote 1281 PAIR OF NYX GLOVES
    setvar SHOPDOLLARSTEMP2 1000000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 14
   {
    redefinequote 1281 RABBIT'S FOOT
    setvar SHOPDOLLARSTEMP2 1250000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 15
   {
    redefinequote 1281 PAIR OF JUMP BOOTS
    setvar SHOPDOLLARSTEMP2 1875000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 16
   {
    redefinequote 1281 PAIR OF SHOCKAB BOOTS
    setvar SHOPDOLLARSTEMP2 1875000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 17
   {
    redefinequote 1281 PAIR OF HAPPY SHOES
    setvar SHOPDOLLARSTEMP2 1625000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 18
   {
    redefinequote 1281 PAIR OF STYLE SHOES
    setvar SHOPDOLLARSTEMP2 1625000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 19
   {
    redefinequote 1281 PAIR OF CHARM SHOES
    setvar SHOPDOLLARSTEMP2 1625000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 20
   {
    redefinequote 1281 POWER WRIST
    setvar SHOPDOLLARSTEMP2 2000000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 21
   {
    redefinequote 1281 SMALL ENERGY DRINK
    setvar SHOPDOLLARSTEMP2 1500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
  }
  else
  ifvare shoppage 2
  {
   ifvare shopitemid 0
   {
    redefinequote 1281 LARGE ENERGY DRINK
    setvar SHOPDOLLARSTEMP2 4000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 1
   {
    redefinequote 1281 HYPER ENERGY DRINK
    setvar SHOPDOLLARSTEMP2 80000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 2
   {
    redefinequote 1281 SILK CARNATION
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 5
   }
   ifvare shopitemid 3
   {
    redefinequote 1281 RARE PIRATE DOUBLOON
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 5
   }
   ifvare shopitemid 4
   {
    redefinequote 1281 PAIR OF FIXED DICE
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 5
   }
   ifvare shopitemid 5
   {
    redefinequote 1281 MALAKIAN GEM
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 5
   }
   ifvare shopitemid 6
   {
    redefinequote 1281 SAFE LOCK BOX
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 5
   }
   ifvare shopitemid 7
   {
    redefinequote 1281 SECRET RECIPE
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 5
   }
   ifvare shopitemid 8
   {
    redefinequote 1281 SLURPEE MACHINE
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 5
   }
   ifvare shopitemid 9
   {
    redefinequote 1281 STOCK OWNERSHIP
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 5
   }
   ifvare shopitemid 10
   {
    redefinequote 1281 TRANSDIMENSIONAL SAFE
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 5
   }
   ifvare shopitemid 11
   {
    redefinequote 1281 BLOODPACT SHIELD
    setvar SHOPDOLLARSTEMP2 16500000 
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 5
   }
   ifvare shopitemid 12
   {
    redefinequote 1281 GREEN-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 270
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 13
   {
    redefinequote 1281 BLUE-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 405
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 14
   {
    redefinequote 1281 YELLOW-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 605
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 15
   {
    redefinequote 1281 RED-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 725
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 16
   {
    redefinequote 1281 GREY-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 760
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 17
   {
    redefinequote 1281 WHITE-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 805
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 18
   {
    redefinequote 1281 RANDOM-CLASS ARMOR
    setvar SHOPDOLLARSTEMP2 505
    setvar SHOPDOLLARSTEMPMULTI 2
    setvar SHOPDOLLARSTEMPDIVISOR 3
   }
   ifvare shopitemid 19
   {
    redefinequote 1281 ZIRCON RING [SILVER]
    setvar SHOPDOLLARSTEMP2 200
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 20
   {
    redefinequote 1281 AQUAMARINE RING [SILVER]
    setvar SHOPDOLLARSTEMP2 800
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 21
   {
    redefinequote 1281 TURQUOISE RING [SILVER]
    setvar SHOPDOLLARSTEMP2 1500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
  }
  else
  ifvare shoppage 3
  {
   ifvare shopitemid 0
   {
    redefinequote 1281 EMERALD RING [SILVER]
    setvar SHOPDOLLARSTEMP2 3000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 1
   {
    redefinequote 1281 GARNET RING [SILVER]
    setvar SHOPDOLLARSTEMP2 5000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 2
   {
    redefinequote 1281 RUBY RING [SILVER]
    setvar SHOPDOLLARSTEMP2 8000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 3
   {
    redefinequote 1281 CITRINE RING [SILVER]
    setvar SHOPDOLLARSTEMP2 20000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 4
   {
    redefinequote 1281 DIAMOND RING [SILVER]
    setvar SHOPDOLLARSTEMP2 100000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 5
   {
    redefinequote 1281 ZIRCON RING [GOLD]
    setvar SHOPDOLLARSTEMP2 350
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 6
   {
    redefinequote 1281 AQUAMARINE RING [GOLD]
    setvar SHOPDOLLARSTEMP2 1600
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 7
   {
    redefinequote 1281 TURQUOISE RING [GOLD]
    setvar SHOPDOLLARSTEMP2 3375
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 8
   {
    redefinequote 1281 EMERALD RING [GOLD]
    setvar SHOPDOLLARSTEMP2 7500
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 9
   {
    redefinequote 1281 GARNET RING [GOLD]
    setvar SHOPDOLLARSTEMP2 13750
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 10
   {
    redefinequote 1281 RUBY RING [GOLD]
    setvar SHOPDOLLARSTEMP2 24000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 11
   {
    redefinequote 1281 CITRINE RING [GOLD]
    setvar SHOPDOLLARSTEMP2 65000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 12
   {
    redefinequote 1281 DIAMOND RING [GOLD]
    setvar SHOPDOLLARSTEMP2 350000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 1 
   }
   ifvare shopitemid 13
   {
    redefinequote 1281 HOCKEY MASK
    setvar SHOPDOLLARSTEMP2 1750000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2 
   }
   ifvare shopitemid 14
   {
    redefinequote 1281 GEMSTONE CROWN
    setvar SHOPDOLLARSTEMP2 2250000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2 
   }
   ifvare shopitemid 15
   {
    redefinequote 1281 IRON RUNE
    setvar SHOPDOLLARSTEMP2 3500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2 
   }
   ifvare shopitemid 16
   {
    redefinequote 1281 TWILIGHT CAPE
    setvar SHOPDOLLARSTEMP2 2500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2 
   }
   ifvare shopitemid 17
   {
    redefinequote 1281 SNAKE ARMBAND
    setvar SHOPDOLLARSTEMP2 2500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2 
   }
   ifvare shopitemid 18
   {
    redefinequote 1281 MEDIC BAG
    setvar SHOPDOLLARSTEMP2 4000000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2 
   }
   ifvare shopitemid 19
   {
    redefinequote 1281 SERPENT HELMET
    setvar SHOPDOLLARSTEMP2 3000000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2 
   }
   ifvare shopitemid 20
   {
    redefinequote 1281 ENERGY INCURMENT
    setvar SHOPDOLLARSTEMP2 3500000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2 
   }
   ifvare shopitemid 21
   {
    redefinequote 1281 YIN-YANG ORB
    setvar SHOPDOLLARSTEMP2 3250000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2 
   }
  }
  else
  ifvare shoppage 4
  {
   ifvare shopitemid 0
   {
    redefinequote 1281 WINTER SUIT
    setvar SHOPDOLLARSTEMP2 2500
    setvar SHOPDOLLARSTEMPMULTI 2 
    setvar SHOPDOLLARSTEMPDIVISOR 3 
   }
   ifvare shopitemid 1
   {
    redefinequote 1281 RIOT-TANK CAPSULE [GREEN]
    setvar SHOPDOLLARSTEMP2 64000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2 
   }
   ifvare shopitemid 2
   {
    redefinequote 1281 RIOT-TANK CAPSULE [BLUE]
    setvar SHOPDOLLARSTEMP2 64000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2
   }
   ifvare shopitemid 3
   {
    redefinequote 1281 RIOT-TANK CAPSULE [RED]
    setvar SHOPDOLLARSTEMP2 64000
    setvar SHOPDOLLARSTEMPMULTI 1 
    setvar SHOPDOLLARSTEMPDIVISOR 2 
   }
  }
 }
 state skillpricecalc
ends

state showholonames_shop
   ifvare CHARACTERSELECTED? 1 redefinequote 332 HOLODUKE
   ifvare CHARACTERSELECTED? 2 redefinequote 332 HOLOJACK
   ifvare CHARACTERSELECTED? 3 redefinequote 332 HOLOBUBSY
   ifvare CHARACTERSELECTED? 4 redefinequote 332 HOLOAMI
   ifvare CHARACTERSELECTED? 5 redefinequote 332 HOLOHIGA
   ifvare CHARACTERSELECTED? 6 redefinequote 332 HOLOESSENCE
   ifvare CHARACTERSELECTED? 7 redefinequote 332 HOLOTED
   ifvare CHARACTERSELECTED? 8 redefinequote 332 HOLOLISA
   ifvare CHARACTERSELECTED? 9 redefinequote 332 HOLOCYBANIS
   ifvare CHARACTERSELECTED? 10 redefinequote 332 HOLONETHRA
   ifvare CHARACTERSELECTED? 11 redefinequote 332 HOLOPAULA
   ifvare CHARACTERSELECTED? 12 redefinequote 332 HOLOLORI
   ifvare CHARACTERSELECTED? 13 redefinequote 332 HOLOMINAKO
   ifvare CHARACTERSELECTED? 14 redefinequote 332 HOLO???????
   ifvare CHARACTERSELECTED? 15 redefinequote 332 HOLOMAKEN
ends

state shop_shownvtime
     setvar shade 0
     setvar digx 303 // 224
     subvar digy 2
     state orientation27
     state pal20
     redefinequote 598 X%
     redefinequote 599 %ld%
     setvarvar TEMP2 NIGHTVISIONTIME
     divvar TEMP2 12
     qsprintf 598 599 TEMP2
     qstrlen TEMPVAR 598
     ifvarg TEMPVAR 0 
     { 
      setvarvar tempb TEMPVAR
      mulvar tempb 2
      subvarvar digx tempb
      subvar digx 2
     }    
     setvar tilenum 3087 // setvar tilenum 3010
     setvar temp 598
     state mt
ends

state shop_calculatefinalprices
   ifvarg SHOPDOLLARSTEMP 21474836 setvar SHOPDOLLARSTEMP 21474836 // Prevents overflow errors with vars by limiting the maximum base-price of an item to $21,474,836
// If using a Silk Carnation [future item]
   state checksilkcarnations
   ifvarvarg PARTYSIZE ITEMARRAYID_AMOUNTTEMP setvarvar SHOPFACTORTEMP ITEMARRAYID_AMOUNTTEMP else setvarvar SHOPFACTORTEMP PARTYSIZE
   mulvar SHOPFACTORTEMP 200 // 2% per item  

   ifvarg SHOPFACTORTEMP 10200 setvar SHOPFACTORTEMP 10200 // Prevents overflow overflow errors with vars by limiting how high the factor for prices can get
   ifvarg SHOPFACTORTEMP 0
   {
    setvarvar TEMP6 SHOPDOLLARSTEMP
    setvarvar OVERFLOW_RAWVALUE_OLD TEMP6
    setvarvar OVERFLOW_TEMPMULTI SHOPFACTORTEMP
    setvarvar OVERFLOW_TEMPDIVISOR 10000
    state checkoverflow_custom
    setvarvar TEMP6 OVERFLOW_RAWVALUE_NEW
    ifvare shopmode 0 subvarvar SHOPDOLLARSTEMP TEMP6 // Buying = Decrease Buy Price
    else addvarvar SHOPDOLLARSTEMP TEMP6 // Selling = Increase Sell Price
 
    ifvarl SHOPDOLLARSTEMP 0 setvar SHOPDOLLARSTEMP 0
   }

   ifvarg CARDMEMBERSHIP? 0
   {
    setvarvar OVERFLOW_RAWVALUE_OLD SHOPDOLLARSTEMP
    ifvare shopmode 0
    {
     ifvare CARDMEMBERSHIP? 1 setvar OVERFLOW_TEMPMULTI 850
     ifvare CARDMEMBERSHIP? 2 setvar OVERFLOW_TEMPMULTI 700
     ifvare CARDMEMBERSHIP? 3 setvar OVERFLOW_TEMPMULTI 500
     ifvare CARDMEMBERSHIP? 4 setvar OVERFLOW_TEMPMULTI 250
     ifvarg CARDMEMBERSHIP? 4 setvar OVERFLOW_TEMPMULTI 10
    }
    else
    {
     ifvare CARDMEMBERSHIP? 1 setvar OVERFLOW_TEMPMULTI 1075
     ifvare CARDMEMBERSHIP? 2 setvar OVERFLOW_TEMPMULTI 1150
     ifvare CARDMEMBERSHIP? 3 setvar OVERFLOW_TEMPMULTI 1250
     ifvare CARDMEMBERSHIP? 4 setvar OVERFLOW_TEMPMULTI 1375
     ifvarg CARDMEMBERSHIP? 4 setvar OVERFLOW_TEMPMULTI 1495
    }
    setvarvar OVERFLOW_TEMPDIVISOR 1000
    state checkoverflow_custom
    setvarvar SHOPDOLLARSTEMP OVERFLOW_RAWVALUE_NEW

    ifvarl SHOPDOLLARSTEMP 0 setvar SHOPDOLLARSTEMP 0
   }

   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS { ifvare shopmode 0 setvar SHOPDOLLARSPRICESINGLE 0 else setvarvar SHOPDOLLARSPRICESINGLE SHOPDOLLARSTEMP } else { setvarvar SHOPDOLLARSPRICESINGLE SHOPDOLLARSTEMP }
   mulvarvar SHOPDOLLARSTEMP shopamount
ends

state shop_displaypricequote
    ifvare shopamount 1
    {
     redefinequote 332 $%d
     qsprintf 332 332 SHOPDOLLARSTEMP
    }
    else
    {
     ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS { ifvare shopmode 0 setvar SHOPDOLLARSPRICESINGLE 0 }
     redefinequote 332 $%d X%d = $%d
     qsprintf 332 332 SHOPDOLLARSPRICESINGLE shopamount SHOPDOLLARSTEMP
    }
    setvar digx 264
    qstrlen TEMP7 332
    mulvar TEMP7 4
    subvarvar digx TEMP7
    ifvarn shopamount 1 subvarvar digx 3

    addvar SHOPDOLLARSTEMP -1
ends

state shop_cheatdisplay1
    setvar SHOPDOLLARSTEMP 0
    state shop_displaypricequote // setvar digx 244 redefinequote 332 $0
ends

    state shop_itemselected1
        ifvarvarg DOLLARS SHOPDOLLARSTEMP state pal22 else state pal21
    ends

    state shop_itemnotselected1
        ifvarvarg DOLLARS SHOPDOLLARSTEMP state pal20 else state pal10
    ends

state shop_selection0cond
   ifvare shopselection 0 state shop_itemselected1
                     else state shop_itemnotselected1
ends

state shop_selection1cond
   ifvare shopselection 1 state shop_itemselected1
                     else state shop_itemnotselected1
ends

state shop_selection2cond
   ifvare shopselection 2 state shop_itemselected1
                     else state shop_itemnotselected1
ends

state shop_selection3cond
   ifvare shopselection 3 state shop_itemselected1
                     else state shop_itemnotselected1
ends

state shop_selection4cond
   ifvare shopselection 4 state shop_itemselected1
                     else state shop_itemnotselected1
ends

state shop_selection5cond
   ifvare shopselection 5 state shop_itemselected1
                     else state shop_itemnotselected1
ends

state shop_selection6cond
   ifvare shopselection 6 state shop_itemselected1
                     else state shop_itemnotselected1
ends

state shop_selection7cond
   ifvare shopselection 7 state shop_itemselected1
                     else state shop_itemnotselected1
ends

state shop_selection8cond
   ifvare shopselection 8 state shop_itemselected1
                     else state shop_itemnotselected1
ends

state shop_selection9cond
   ifvare shopselection 9 state shop_itemselected1
                     else state shop_itemnotselected1
ends

state shop_selection10cond
   ifvare shopselection 10 state shop_itemselected1
                      else state shop_itemnotselected1
ends

state shop_selection11cond
   ifvare shopselection 11 state shop_itemselected1
                      else state shop_itemnotselected1
ends

state shop_selection12cond
   ifvare shopselection 12 state shop_itemselected1
                      else state shop_itemnotselected1
ends

state shop_selection13cond
   ifvare shopselection 13 state shop_itemselected1
                      else state shop_itemnotselected1
ends

state shop_selection14cond
   ifvare shopselection 14 state shop_itemselected1
                      else state shop_itemnotselected1
ends

state shop_selection15cond
   ifvare shopselection 15 state shop_itemselected1
                      else state shop_itemnotselected1
ends

state shop_selection16cond
   ifvare shopselection 16 state shop_itemselected1
                      else state shop_itemnotselected1
ends

state shop_selection17cond
   ifvare shopselection 17 state shop_itemselected1
                      else state shop_itemnotselected1
ends

state shop_selection18cond
   ifvare shopselection 18 state shop_itemselected1
                      else state shop_itemnotselected1
ends

state shop_selection19cond
   ifvare shopselection 19 state shop_itemselected1
                      else state shop_itemnotselected1
ends

state shop_selection20cond
   ifvare shopselection 20 state shop_itemselected1
                      else state shop_itemnotselected1
ends

state shop_selection21cond
   ifvare shopselection 21 state shop_itemselected1
                      else state shop_itemnotselected1
ends

state shop_showvehicleportraits
     ifvare VEHICLETYPE 0 setvar tilenum 7950
     else ifvare VEHICLETYPE 1 setvar tilenum 7951
     else ifvare VEHICLETYPE 2 setvar tilenum 7952
     else setvar tilenum 7955
     state digz16384
     state orientation35
     setvar shade 16
     state pal0
ends

state shop_showinventoryportraits
    state digz16384
    state orientation35
    setvar tilenum 7931
    setvar shade 16
    state pal0
ends

state shop_showinventoryamounts
    state pal15
    setvar digx 300
    subvar digy 2 // setvar digy 152 // 146
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    setvar shade 0
    state dn
ends

state shop_showcharacterportraits
    ifvare CHARACTERSELECTED? 1 setvar tilenum 7936 // Duke
    else ifvare CHARACTERSELECTED? 2 setvar tilenum 7937 // Jack
    else ifvare CHARACTERSELECTED? 3 { ifvare BUBSYFORM? 0 setvar tilenum 7938 else ifvare BUBSYFORM? 1 setvar tilenum 7962 } // Bubsy
    else ifvare CHARACTERSELECTED? 4 { ifvare AMIFORM? 0 setvar tilenum 7939 else ifvare AMIFORM? 1 setvar tilenum 7963 else ifvare AMIFORM? 2 setvar tilenum 7966 } // Ami
    else ifvare CHARACTERSELECTED? 5 setvar tilenum 7940 // Lo Wang
    else ifvare CHARACTERSELECTED? 6 setvar tilenum 7941 // ESSence
    else ifvare CHARACTERSELECTED? 7 setvar tilenum 7942 // Ted
    else ifvare CHARACTERSELECTED? 8 setvar tilenum 7943 // Lisa
    else ifvare CHARACTERSELECTED? 9 setvar tilenum 7944 // Cybanis
    else ifvare CHARACTERSELECTED? 10 { ifvare NETHRAFORM? 0 setvar tilenum 7945 else ifvare NETHRAFORM? 1 setvar tilenum 7964 } // Nethra/Christina
    else ifvare CHARACTERSELECTED? 11 setvar tilenum 7946 // Paula
    else ifvare CHARACTERSELECTED? 12 setvar tilenum 7947 // Lori
    else ifvare CHARACTERSELECTED? 13 { ifvare MINAKOFORM? 0 setvar tilenum 7948 else ifvare MINAKOFORM? 1 setvar tilenum 7965 else ifvare MINAKOFORM? 2 setvar tilenum 7968 } // Minako
    else ifvare CHARACTERSELECTED? 14 setvar tilenum 7957 // Mystery Lady
    else ifvare CHARACTERSELECTED? 15 setvar tilenum 7971 // Maken
    else setvar tilenum 7955 // ?
    state digz16384
    state orientation35
    setvar shade 16
    state pal0
ends

state shop_assesscharacterHP
    state pal21
    redefinequote 598 X%
    redefinequote 599 %ld%
    setvarvar TEMP2 CURRENTHITPOINTS
    mulvar TEMP2 100
    divvarvar TEMP2 MAXHITPOINTS
    qsprintf 598 599 TEMP2
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar temp 598
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    setvar shade 0
ends

state shop_assessvehicleHP
     state pal21
     redefinequote 598 X%
     redefinequote 599 %ld%
     getactorvar[VEHICLEID].ENEMYHP TEMPVAR3
     setvarvar TEMP2 TEMPVAR3
     mulvar TEMP2 100
     getactorvar[VEHICLEID].ENEMYMAXHP TEMPVAR3
     divvarvar TEMP2 TEMPVAR3
     qsprintf 598 599 TEMP2
     qstrlen TEMPVAR 598
     ifvarg TEMPVAR 0 
     { 
      setvarvar tempb TEMPVAR
      mulvar tempb 2
      subvarvar digx tempb
      subvar digx 2
     }    
     setvar tilenum 3087 // setvar tilenum 3010
     state orientation27
     setvar temp 598
     setvar shade 0
ends

state shop_assesscharacterAP
    state pal17
    redefinequote 598 X%
    redefinequote 599 %ld%
    setvarvar TEMP2 CURRENTARMORPOINTS
    mulvar TEMP2 100
    divvarvar TEMP2 MAXARMORPOINTS
    qsprintf 598 599 TEMP2
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    setvar temp 598
    setvar shade 0
ends

state shop_assesscharacterWC
    state pal12
    redefinequote 598 X%
    redefinequote 599 %ld%
    setvarvar TEMP2 winterclothes
    qsprintf 598 599 TEMP2
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    setvar temp 598
    setvar shade 0
ends

state shop_assesscharacterAB
    state pal17
    redefinequote 598 #.#%
    redefinequote 599 %d.%d%
    setvarvar TEMP2 ARMORPERCENT
    modvar TEMP2 100
    setvarvar TEMP3 ARMORPERCENT
    modvar TEMP3 100
    qsprintf 598 599 TEMP2 TEMP3
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    setvar temp 598
    setvar shade 16
ends

state shop_assessvehicleAP
    state pal17
    redefinequote 598 X%
    redefinequote 599 %ld%
    getactorvar[VEHICLEID].ENEMYAP TEMPVAR3
    setvarvar TEMP2 TEMPVAR3
    mulvar TEMP2 100
    getactorvar[VEHICLEID].ENEMYMAXAP TEMPVAR3
    divvarvar TEMP2 TEMPVAR3
    qsprintf 598 599 TEMP2
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    setvar temp 598
    setvar shade 0
ends

state shop_assessvehicleAB
    state pal17
    redefinequote 598 #.#%
    redefinequote 599 %d.%d%
    getactorvar[VEHICLEID].ENEMYARMORPERCENT TEMPVAR3
    setvarvar TEMP2 TEMPVAR3
    divvar TEMP2 10
    setvarvar TEMP3 TEMPVAR3
    modvar TEMP3 10
    qsprintf 598 599 TEMP2 TEMP3
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    setvar temp 598
    setvar shade 16
ends

state shop_assesscharacterFA
    state pal20
    redefinequote 598 X%
    redefinequote 599 %ld%
    setvarvar TEMP2 FIRSTAIDCURRENT
    mulvar TEMP2 100
    divvarvar TEMP2 MAXHITPOINTS
    qsprintf 598 599 TEMP2
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    setvar temp 598
    setvar shade 0
ends

state shop_assessvehicleFA
    state pal20
     redefinequote 598 X%
     redefinequote 599 %ld%
     getactorvar[VEHICLEID].ENEMYFIRSTAID TEMPVAR3
     setvarvar TEMP2 TEMPVAR3
     mulvar TEMP2 100
     getactorvar[VEHICLEID].ENEMYMAXHP TEMPVAR3
     divvarvar TEMP2 TEMPVAR3
     qsprintf 598 599 TEMP2
     qstrlen TEMPVAR 598
     ifvarg TEMPVAR 0 
     { 
      setvarvar tempb TEMPVAR
      mulvar tempb 2
      subvarvar digx tempb
      subvar digx 2
     }    
     setvar tilenum 3087 // setvar tilenum 3010
     state orientation27
     setvar temp 598
     setvar shade 0
ends

state shop_assesscharacterEP
    state pal0
    redefinequote 598 X%
    redefinequote 599 %ld%
    setvarvar TEMP2 CURRENTENERGYPOINTS
    mulvar TEMP2 100
    divvarvar TEMP2 MAXENERGYPOINTS
    qsprintf 598 599 TEMP2
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    setvar temp 598
    setvar shade 0
ends

state shope_showinvsell
    setvar digx 300
    setvar digy 122
    state shop_showinventoryportraits
    state rs
ends

state shop_showmaxammoall
    setvar shade 0
    state pal20
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    setvarvar varname MAXPISTOL
    subvar digy 8 // 224
    state dn
    setvarvar varname MAXSHOTGUN
    addvar digy 6 // 224
    state dn
    setvarvar varname MAXCHAINGUN
    addvar digy 6 // 224
    state dn
    setvarvar varname MAXRPG
    addvar digy 6 // 224
    state dn
    setvarvar varname MAXPIPEBOMB
    addvar digy 6 // 224
    state dn
    setvarvar varname MAXSHRINKER
    addvar digy 6 // 224
    state dn
    setvarvar varname MAXDEVASTATOR
    addvar digy 6 // 224
    state dn
    setvarvar varname MAXTRIPBOMB
    addvar digy 6 // 224
    state dn
    setvarvar varname MAXFREEZER
    addvar digy 6 // 224
    state dn
    setvarvar varname MAXEXPANDER
    addvar digy 6 // 224
    state dn
    ifvare CHARACTERSELECTED? 8
    {
     setvar shade 8
     setvarvar varname MAXCELLS
     addvar digy 6 // 224
     state dn
    }
ends

state shop_showecells
    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state digz16384
    state orientation35
    ifvare LISA? 1 setvarvar tilenum 7943 else setvar tilenum 7955
    setvar shade 16
    state pal0
    state rs

    setvar shade 0
    state pal0
    ifvare LISA? 1 setvarvar varname CURRENTCELLS else setvar varname 0 // Lisa must be available to have Cells, since they are specfic to her only.
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal20
    ifvare LISA? 1 setvarvar varname MAXCELLS else setvar varname 0 // Lisa must be available to have Cells, since they are specfic to her only.
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
ends

state shop_display

 ifvare shop_id -1
 {
  ifvarg shoptransitiontimer 0
  {
   ifvare shoptransitiontimer 1 setvar digz 7022
   else ifvare shoptransitiontimer 2 setvar digz 14043
   else ifvare shoptransitiontimer 3 setvar digz 21065
   else ifvare shoptransitiontimer 4 setvar digz 28087
   else ifvare shoptransitiontimer 5 setvar digz 35108
   else ifvare shoptransitiontimer 6 setvar digz 42130
   else ifvarg shoptransitiontimer 6 setvar digz 49152

   state pal0
   setvar shade 16
   state digx160
   setvar digy 100
   state orientation2 //  state orientation3
   setvar tilenum 2456 // For the shop background >.> (2456 or 8191)
   state rs
  }
 }

 ifvarn shop_id -1
 {
  ifvare shoptype 1 getactor[shopowner].extra shopownerhealth
  setvar digx 46
  setvar digy 20
  setvar tilenum 3087 // setvar tilenum 3010
  state orientation27
  setvarvar varname shopownerhealth
  ifvare debugtoggle 1 state dn

  ifvare shoptype 1 
  { 
   state digx160
   setvar digy 20
   setvar tilenum 3087 // setvar tilenum 3010
   state orientation27
   setvarvar varname shopowner
   ifvare debugtoggle 1 state dn
  }

  setvar digx 274
  setvar digy 20
  setvar tilenum 3087 // setvar tilenum 3010
  state orientation27
  setvarvar varname shop_id
  ifvare debugtoggle 1 state dn

  ifvare shoptype 1 
  { 
   ifvarl shopownerhealth 0 // exits the shop if the owner dies, but only if it's an actor [not a wall or a console cheat-activated shop]
   {
    setvar shop_id -1 
    setvar shoppage 0 
    setvar shopselection 0 
    setvar shopmode 0 
    setvar shopowner -1 
    setvar shopownerhealth -1
    setvar shoptype 0
    sound MENU_EXIT 
   }
  }

  ifvare gameover? 1
  {
    setvar shop_id -1 
    setvar shoppage 0 
    setvar shopselection 0 
    setvar shopmode 0 
    setvar shopowner -1 
    setvar shopownerhealth -1
    setvar shoptype 0
  }
    
  ifvarg shoptransitiontimer 6
  {
   // SHOP BACKGROUND
   state pal4
   state digx160
   setvar digy 100 // 129
   setvar digz 655360
   state orientation2 //  state orientation3
   setvar tilenum 7800 // For the shop background >.> (2456 or 8191)
   state rs
  }
  
  ifvarg shoptransitiontimer 0
  {
   ifvare shoptransitiontimer 1 setvar digz 7022
   else ifvare shoptransitiontimer 2 setvar digz 14043
   else ifvare shoptransitiontimer 3 setvar digz 21065
   else ifvare shoptransitiontimer 4 setvar digz 28087
   else ifvare shoptransitiontimer 5 setvar digz 35108
   else ifvare shoptransitiontimer 6 setvar digz 42130
   else ifvarg shoptransitiontimer 6 setvar digz 49152

   state pal0
   setvar shade 16
   state digx160
   setvar digy 100
   state orientation2 //  state orientation3
   setvar tilenum 2456 // For the shop background >.> (2456 or 8191)
   state rs
  }

  state shade0

// Titles
  ifvarg shoptransitiontimer 6
  { // ifvarg shoptransitiontimer 6

  setvar digy 20
  state orientation2
  state setquote332
  setvar tilenum 2822
  ifvare shopmode 0 
  { 
   setvar digx 256
   redefinequote 332 BUY ITEMS
  }
  else
  ifvare shopmode 1
  { 
   setvar digx 246
   redefinequote 332 SELL ITEMS
  }
  state gt

// Rank Check
 state pal11
 setvar temp 332
 setvarvar digx 50
 setvarvar digy 27

	ifvarl RANKPOINTS -262143999 // [O] Rank
      {
       redefinequote 332 RANK: ^15[O] 
       ifvare shopmode 0 setvar TEMPVAR7 11250
       else setvar TEMPVAR7 9250
      }
	else ifvarg RANKPOINTS -262144000 ifvarl RANKPOINTS -65536000 // [N] Rank
      {
       redefinequote 332 RANK: ^15[N] 
       ifvare shopmode 0 setvar TEMPVAR7 11125
       else setvar TEMPVAR7 9325
      }
	else ifvarg RANKPOINTS -65536001 ifvarl RANKPOINTS -16384000 // [M] Rank
      {
       redefinequote 332 RANK: ^15[M] 
       ifvare shopmode 0 setvar TEMPVAR7 11000
       else setvar TEMPVAR7 9400
      }
	else ifvarg RANKPOINTS -16384001 ifvarl RANKPOINTS -4096000 // [L] Rank
      {
       redefinequote 332 RANK: ^15[L] 
       ifvare shopmode 0 setvar TEMPVAR7 10875
       else setvar TEMPVAR7 9475
      }
	else ifvarg RANKPOINTS -4096001 ifvarl RANKPOINTS -1024000 // [K] Rank
      {
       redefinequote 332 RANK: ^21[K] 
       ifvare shopmode 0 setvar TEMPVAR7 10750
       else setvar TEMPVAR7 9550
      }
	else ifvarg RANKPOINTS -1024001 ifvarl RANKPOINTS -256000 // [J] Rank
      {
       redefinequote 332 RANK: ^21[J] 
       ifvare shopmode 0 setvar TEMPVAR7 10625
       else setvar TEMPVAR7 9625
      }
	else ifvarg RANKPOINTS -256001 ifvarl RANKPOINTS -64000 // [I] Rank
      {
       redefinequote 332 RANK: ^21[I] 
       ifvare shopmode 0 setvar TEMPVAR7 10500
       else setvar TEMPVAR7 9700
      }
	else ifvarg RANKPOINTS -64001 ifvarl RANKPOINTS -16000 // [H] Rank
      {
       redefinequote 332 RANK: ^21[H] 
       ifvare shopmode 0 setvar TEMPVAR7 10375
       else setvar TEMPVAR7 9775
      }
	else ifvarg RANKPOINTS -16001 ifvarl RANKPOINTS -4000 // [G] Rank
      {
       redefinequote 332 RANK: ^21[G] 
       ifvare shopmode 0 setvar TEMPVAR7 10250
       else setvar TEMPVAR7 9850
      }
	else ifvarg RANKPOINTS -4001 ifvarl RANKPOINTS 0 // [F] Rank
      {
       redefinequote 332 RANK: ^21[F] 
       ifvare shopmode 0 setvar TEMPVAR7 10125
       else setvar TEMPVAR7 9925
      }
	else ifvare RANKPOINTS 0 // [-] Rank
      {
       redefinequote 332 RANK: ^20[-] 
       ifvare shopmode 0 setvar TEMPVAR7 10000
       else setvar TEMPVAR7 10000
      }
	else ifvarg RANKPOINTS 0 ifvarl RANKPOINTS 4001 // [E] Rank
      {
       redefinequote 332 RANK: ^0[E] 
       ifvare shopmode 0 setvar TEMPVAR7 9875
       else setvar TEMPVAR7 10075
      }
	else ifvarg RANKPOINTS 4000 ifvarl RANKPOINTS 16001 // [D] Rank
      {
       redefinequote 332 RANK: ^0[D] 
       ifvare shopmode 0 setvar TEMPVAR7 9750
       else setvar TEMPVAR7 10150
      }
	else ifvarg RANKPOINTS 16000 ifvarl RANKPOINTS 64001 // [C] Rank
      {
       redefinequote 332 RANK: ^0[C] 
       ifvare shopmode 0 setvar TEMPVAR7 9675
       else setvar TEMPVAR7 10225
      }
	else ifvarg RANKPOINTS 64000 ifvarl RANKPOINTS 256001 // [B] Rank
      {
       redefinequote 332 RANK: ^0[B] 
       ifvare shopmode 0 setvar TEMPVAR7 9500
       else setvar TEMPVAR7 10300
      }
	else ifvarg RANKPOINTS 256000 ifvarl RANKPOINTS 1024001 // [A] Rank
      {
       redefinequote 332 RANK: ^0[A] 
       ifvare shopmode 0 setvar TEMPVAR7 9375
       else setvar TEMPVAR7 10375
      }
	else ifvarg RANKPOINTS 1024000 ifvarl RANKPOINTS 4096001 // [S] Rank
      {
       redefinequote 332 RANK: ^22[S] 
       ifvare shopmode 0 setvar TEMPVAR7 9250
       else setvar TEMPVAR7 10450
      }
	else ifvarg RANKPOINTS 4096000 ifvarl RANKPOINTS 16384001 // [SS] Rank
      {
       redefinequote 332 RANK: ^22[SS] 
       ifvare shopmode 0 setvar TEMPVAR7 9125
       else setvar TEMPVAR7 10525
      }
	else ifvarg RANKPOINTS 16384000 ifvarl RANKPOINTS 65536000 // [Z] Rank
      {
       redefinequote 332 RANK: ^22[Z] 
       ifvare shopmode 0 setvar TEMPVAR7 9000
       else setvar TEMPVAR7 10600
      }
	else ifvarg RANKPOINTS 65535999 ifvarl RANKPOINTS 262144000 // [ZZ] Rank
      {
       redefinequote 332 RANK: ^22[ZZ] 
       ifvare shopmode 0 setvar TEMPVAR7 8875
       else setvar TEMPVAR7 10675
      }
	else ifvarg RANKPOINTS 262143999 // [NR] Rank
      {
       redefinequote 332 RANK: ^22[NR] 
       ifvare shopmode 0 setvar TEMPVAR7 8750
       else setvar TEMPVAR7 10750
      }
      
      // If using a Silk Carnation [future item]
      state checksilkcarnations
      ifvarvarg PARTYSIZE ITEMARRAYID_AMOUNTTEMP setvarvar SHOPFACTORTEMP ITEMARRAYID_AMOUNTTEMP else setvarvar SHOPFACTORTEMP PARTYSIZE
      mulvar SHOPFACTORTEMP 200 // 2% per item  

      ifvarg SHOPFACTORTEMP 10200 setvar SHOPFACTORTEMP 10200 // Prevents overflow overflow errors with vars by limiting how high the factor for prices can get
      ifvarg SHOPFACTORTEMP 0
      {
       setvarvar TEMP6 TEMPVAR7
       setvarvar OVERFLOW_RAWVALUE_OLD TEMP6
       setvarvar OVERFLOW_TEMPMULTI SHOPFACTORTEMP
       setvarvar OVERFLOW_TEMPDIVISOR 10000
       state checkoverflow_custom
       setvarvar TEMP6 OVERFLOW_RAWVALUE_NEW
       ifvare shopmode 0 subvarvar TEMPVAR7 TEMP6 // Buying = Decrease Buy Price
       else addvarvar TEMPVAR7 TEMP6 // Selling = Increase Sell Price
 
       ifvarl TEMPVAR7 0 setvar TEMPVAR7 0
      }

      ifvarg CARDMEMBERSHIP? 0
      {
       ifvare shopmode 0
       {
        ifvare CARDMEMBERSHIP? 1 { mulvar TEMPVAR7 850 divvar TEMPVAR7 1000 }
        ifvare CARDMEMBERSHIP? 2 { mulvar TEMPVAR7 700 divvar TEMPVAR7 1000 }
        ifvare CARDMEMBERSHIP? 3 { mulvar TEMPVAR7 500 divvar TEMPVAR7 1000 }
        ifvare CARDMEMBERSHIP? 4 { mulvar TEMPVAR7 250 divvar TEMPVAR7 1000 }
        ifvarg CARDMEMBERSHIP? 4 { mulvar TEMPVAR7 10 divvar TEMPVAR7 1000 }
       }
       else
       {
        ifvare CARDMEMBERSHIP? 1 { mulvar TEMPVAR7 1075 divvar TEMPVAR7 1000 }
        ifvare CARDMEMBERSHIP? 2 { mulvar TEMPVAR7 1150 divvar TEMPVAR7 1000 }
        ifvare CARDMEMBERSHIP? 3 { mulvar TEMPVAR7 1250 divvar TEMPVAR7 1000 }
        ifvare CARDMEMBERSHIP? 4 { mulvar TEMPVAR7 1375 divvar TEMPVAR7 1000 }
        ifvarg CARDMEMBERSHIP? 4 { mulvar TEMPVAR7 1495 divvar TEMPVAR7 1000 }
       }

       ifvarl TEMPVAR7 0 setvar TEMPVAR7 0
      }

      setvarvar TEMPVAR4 TEMPVAR7
      divvar TEMPVAR4 100
      setvarvar TEMPVAR5 TEMPVAR7
      modvar TEMPVAR5 100
      ifvarg TEMPVAR5 -1 ifvarl TEMPVAR5 9 redefinequote 888 ^20(%d.0%d% 
      else redefinequote 888 ^20(%d.%d% 
      qsprintf 888 888 TEMPVAR4 TEMPVAR5
      qstrcat 332 888
      ifvare shopmode 0 redefinequote 888 BUY PRICE)
      else redefinequote 888 SELL PRICE)
      qstrcat 332 888
 state mt

// Membership Level?
 ifvarg CARDMEMBERSHIP? 0
 {
  state pal0
  setvarvar digx 257 // digx_test
  setvarvar digy 29 // digy_test
  setvarvar digz 8000 // digz_test
  ifvare CARDMEMBERSHIP? 1 setvar tilenum 5787
  ifvare CARDMEMBERSHIP? 2 setvar tilenum 5788
  ifvare CARDMEMBERSHIP? 3 setvar tilenum 5789
  ifvare CARDMEMBERSHIP? 4 setvar tilenum 5790
  ifvarg CARDMEMBERSHIP? 4 setvar tilenum 5791
  state rs
 }

// Below Menu
 state pal0
 state shade-31

 setvar temp 332
 state pal22
// Item Descriptions
 state digx160
 setvar digy 177

 redefinequote 332 [UNDEFINED]
 ifvare shopmode 0 
 { 
  ifvare shoppage 0
  {
   ifvare shopselection 0 state showsmallmedikitdescript
   ifvare shopselection 1 state showmediummedikitdescript
   ifvare shopselection 2 state showlargemedikitdescript
   ifvare shopselection 3 state showxlargemedikitdescript
   ifvare shopselection 4 state showatomichealthdescript
   ifvare shopselection 5 state showsuperatomdescript
   ifvare shopselection 6 state showbodyarmordescript
   ifvare shopselection 7 state showsuperarmordescript
   ifvare shopselection 8 state showvitaminxdescript
   ifvare shopselection 9 state shownvgogglesdescript
   ifvare shopselection 10 state showholoformdescript
   ifvare shopselection 11 state showjetpackdescript
   ifvare shopselection 12 state showscubageardescript
   ifvare shopselection 13 state showbootsdescript
   ifvare shopselection 14 state showportablemedikitdescript
   ifvare shopselection 15 state showeyedropdescript
   ifvare shopselection 16 state showantidotedescript
   ifvare shopselection 17 state showfoghorndescript
   ifvare shopselection 18 state showchalicedescript
   ifvare shopselection 19 redefinequote 332 MAX HP/AP BONUS: INCREASES THE CHARACTER'S MAX HP & AP BY A SMALL AMOUNT.
   ifvare shopselection 20 redefinequote 332 ATK/DEF BONUS: INCREASES THE CHARACTER'S ATTACK & DEFENSE BY A SMALL AMOUNT.
   ifvare shopselection 21 redefinequote 332 SPEED BONUS: INCREASES THE CHARACTER'S SPEED BY A SMALL AMOUNT.
  }
  ifvare shoppage 1
  {
   ifvare shopselection 0 redefinequote 332 SMALL SATCHEL: INCREASES A RANDOM AMMO TYPE'S MAX BY 1 AMMO PICK-UP.
   ifvare shopselection 1 redefinequote 332 LARGE SATCHEL: INCREASES 4 RANDOM AMMO TYPES' MAXES BY 1 AMMO PICK-UP.
   ifvare shopselection 2 state showcoilsdescript
   ifvare shopselection 3 state showextralifeshirtdescript
   ifvare shopselection 4 state showcontinueitemdescript
   ifvare shopselection 5 state showenergycellsdescript
   ifvare shopselection 6 state showenergycellsdescript
   ifvare shopselection 7 state showenergycellsdescript
   ifvare shopselection 8 state showbioshielddescript
   ifvare shopselection 9 redefinequote 332 AIRTIME BONUS: INCREASES THE CHARACTER'S MAX LUNG-TIME BY A SMALL AMOUNT.
   ifvare shopselection 10 redefinequote 332 MANTLE BONUS: INCREASES THE CHARACTER'S MAX MANTLE-TIME BY A SMALL AMOUNT.
   ifvare shopselection 11 redefinequote 332 AIRJUMP BONUS: INCREASES THE CHARACTER'S AIR-JUMPING LIMIT BY 1.
   ifvare shopselection 12 state showafasdropdescript
   ifvare shopselection 13 state showsunringdescript
   ifvare shopselection 14 state showaquaringdescript
   ifvare shopselection 15 state showplasmaringdescript
   ifvare shopselection 16 state showspiritringdescript
   ifvare shopselection 17 state showcharmankhdescript
   ifvare shopselection 18 state showmirrorshielddescript
   ifvare shopselection 19 state showexpbadgedescript
   ifvare shopselection 20 state showrankbadgedescript
   ifvare shopselection 21 state showmoneybadgedescript
  }
  ifvare shoppage 2
  {
   ifvare shopselection 0 redefinequote 332 PISTOL AMMO: USED WITH THE PISTOL.
   ifvare shopselection 1 redefinequote 332 SHOTGUN SHELLS: USED WITH THE SHOTGUN.
   ifvare shopselection 2 redefinequote 332 CHAINGUN BULLETS: USED WITH THE CHAINGUN CANNON.
   ifvare shopselection 3 redefinequote 332 RPG MISSILES: USED WITH THE RPG LAUNCHER.
   ifvare shopselection 4 redefinequote 332 PIPEBOMB: USED TO LAY TRAPS OR BLOW UP ENEMIES OR WALLS.
   ifvare shopselection 5 redefinequote 332 BOX OF PIPEBOMBS: USED TO LAY TRAPS OR BLOW UP ENEMIES OR WALLS.
   ifvare shopselection 6 redefinequote 332 SHRINKER CRYSTAL: USED WITH THE SHRINKER'S MAIN MODE.
   ifvare shopselection 7 redefinequote 332 EXPANDER ANTENNA: USED WITH SHRINKER'S SECONDARY MODE, THE EXPANDER.
   ifvare shopselection 8 redefinequote 332 DEVASTATOR MISSILES: USED WITH THE DEVASTATOR WEAPON.
   ifvare shopselection 9 redefinequote 332 LASER TRIPBOMBS: USED TO ATTACH ARMED BOMBS TO WALLS FOR TRAPS.
   ifvare shopselection 10 redefinequote 332 FREEZETHROWER PACK: USED WITH THE FREEZETHROWER.
   ifvare shopselection 11 state showlevelupitemdescript
   ifvare shopselection 12 state showriotshielddescript
   ifvare shopselection 13 state shownyxglovesdescript
   ifvare shopselection 14 state showrabbitsfootdescript
   ifvare shopselection 15 state showjumpbootsdescript
   ifvare shopselection 16 state showshockabbootsdescript
   ifvare shopselection 17 state showhappyshoesdescript
   ifvare shopselection 18 state showstyleshoesdescript
   ifvare shopselection 19 state showcharmshoesdescript
   ifvare shopselection 20 state showpowerwristdescript
   ifvare shopselection 21 state showsmalledrinkdescript
  }
  ifvare shoppage 3
  {
   ifvare shopselection 0 state showlargeedrinkdescript
   ifvare shopselection 1 state showhyperedrinkdescript
   ifvare shopselection 2 redefinequote 332 MAX EP BONUS: INCREASES THE CHARACTER'S MAX EP BY A SMALL AMOUNT.
   ifvare shopselection 3 state showsilkcarnationdescript
   ifvare shopselection 4 state showpiratedoubloondescript
   ifvare shopselection 5 state showfixeddicedescript
   ifvare shopselection 6 state showmalakiangemdescript
   ifvare shopselection 7 state showsafelockboxdescript
   ifvare shopselection 8 state showsecretrecipedescript
   ifvare shopselection 9 state showslurpeemachinedescript
   ifvare shopselection 10 state showstockownershipdescript
   ifvare shopselection 11 state showtranssafedescript
   ifvare shopselection 12 state showbloodshielddescript
   ifvare shopselection 13 state showgreenarmordescript
   ifvare shopselection 14 state showbluearmordescript
   ifvare shopselection 15 state showyellowarmordescript
   ifvare shopselection 16 state showredarmordescript
   ifvare shopselection 17 state showgreyarmordescript
   ifvare shopselection 18 state showwhitearmordescript
   ifvare shopselection 19 state showrandomarmordescript
   ifvare shopselection 20 state showhockeymaskdescript
   ifvare shopselection 21 state showgemstonecrowndescript
  }
  ifvare shoppage 4
  {
   ifvare shopselection 0 state showironrunedescript
   ifvare shopselection 1 state showtwilightcapedescript
   ifvare shopselection 2 state showsnakearmbanddescript
   ifvare shopselection 3 state showmedicbagdescript
   ifvare shopselection 4 state showserpenthelmetdescript
   ifvare shopselection 5 state showenergyincurmentdescript
   ifvare shopselection 6 state showyinyangorbdescript
   ifvare shopselection 7 state showwintersuitdescript
   ifvare shopselection 8 state showtank1capsuledescript
   ifvare shopselection 9 state showtank2capsuledescript
   ifvare shopselection 10 state showtank3capsuledescript
  }
 }
 else
 ifvare shopmode 1
 { 
  ifvare shoppage 0
  {
   ifvare shopselection 0 state showchalicedescript
   ifvare shopselection 1 state showeyedropdescript
   ifvare shopselection 2 state showantidotedescript
   ifvare shopselection 3 state showfoghorndescript
   ifvare shopselection 4 state showextralifeshirtdescript
   ifvare shopselection 5 state showcontinueitemdescript
   ifvare shopselection 6 state showenergycellsdescript
   ifvare shopselection 7 state showcoilsdescript
   ifvare shopselection 8 state showsmallmedikitdescript
   ifvare shopselection 9 state showmediummedikitdescript
   ifvare shopselection 10 state showlargemedikitdescript
   ifvare shopselection 11 state showxlargemedikitdescript
   ifvare shopselection 12 state showbodyarmordescript
   ifvare shopselection 13 state showsuperarmordescript
   ifvare shopselection 14 state showvitaminxdescript
   ifvare shopselection 15 state shownvgogglesdescript
   ifvare shopselection 16 state showholoformdescript
   ifvare shopselection 17 state showjetpackdescript
   ifvare shopselection 18 state showscubageardescript
   ifvare shopselection 19 state showbootsdescript
   ifvare shopselection 20 state showportablemedikitdescript
   ifvare shopselection 21 state showafasdropdescript
  }
  ifvare shoppage 1
  {
   ifvare shopselection 0 state showsunringdescript
   ifvare shopselection 1 state showaquaringdescript
   ifvare shopselection 2 state showplasmaringdescript
   ifvare shopselection 3 state showspiritringdescript
   ifvare shopselection 4 state showcharmankhdescript
   ifvare shopselection 5 state showmirrorshielddescript
   ifvare shopselection 6 state showexpbadgedescript
   ifvare shopselection 7 state showrankbadgedescript
   ifvare shopselection 8 state showmoneybadgedescript
   ifvare shopselection 9 state showatomichealthdescript
   ifvare shopselection 10 state showsuperatomdescript
   ifvare shopselection 11 state showlevelupitemdescript
   ifvare shopselection 12 state showriotshielddescript
   ifvare shopselection 13 state shownyxglovesdescript
   ifvare shopselection 14 state showrabbitsfootdescript
   ifvare shopselection 15 state showjumpbootsdescript
   ifvare shopselection 16 state showshockabbootsdescript
   ifvare shopselection 17 state showhappyshoesdescript
   ifvare shopselection 18 state showstyleshoesdescript
   ifvare shopselection 19 state showcharmshoesdescript
   ifvare shopselection 20 state showpowerwristdescript
   ifvare shopselection 21 state showsmalledrinkdescript
  }
  ifvare shoppage 2
  {
   ifvare shopselection 0 state showlargeedrinkdescript
   ifvare shopselection 1 state showhyperedrinkdescript
   ifvare shopselection 2 state showsilkcarnationdescript
   ifvare shopselection 3 state showpiratedoubloondescript
   ifvare shopselection 4 state showfixeddicedescript
   ifvare shopselection 5 state showmalakiangemdescript
   ifvare shopselection 6 state showsafelockboxdescript
   ifvare shopselection 7 state showsecretrecipedescript
   ifvare shopselection 8 state showslurpeemachinedescript
   ifvare shopselection 9 state showstockownershipdescript
   ifvare shopselection 10 state showtranssafedescript
   ifvare shopselection 11 state showbloodshielddescript
   ifvare shopselection 12 state showgreenarmordescript
   ifvare shopselection 13 state showbluearmordescript
   ifvare shopselection 14 state showyellowarmordescript
   ifvare shopselection 15 state showredarmordescript
   ifvare shopselection 16 state showgreyarmordescript
   ifvare shopselection 17 state showwhitearmordescript
   ifvare shopselection 18 state showrandomarmordescript
   ifvare shopselection 19 state showzircon1descript
   ifvare shopselection 20 state showaquamarine1descript
   ifvare shopselection 21 state showturquoise1descript
  }
  ifvare shoppage 3
  {
   ifvare shopselection 0 state showemerald1descript
   ifvare shopselection 1 state showgarnet1descript
   ifvare shopselection 2 state showruby1descript
   ifvare shopselection 3 state showcitrine1descript
   ifvare shopselection 4 state showdiamond1descript
   ifvare shopselection 5 state showzircon2descript
   ifvare shopselection 6 state showaquamarine2descript
   ifvare shopselection 7 state showturquoise2descript
   ifvare shopselection 8 state showemerald2descript
   ifvare shopselection 9 state showgarnet2descript
   ifvare shopselection 10 state showruby2descript
   ifvare shopselection 11 state showcitrine2descript
   ifvare shopselection 12 state showdiamond2descript
   ifvare shopselection 13 state showhockeymaskdescript
   ifvare shopselection 14 state showgemstonecrowndescript
   ifvare shopselection 15 state showironrunedescript
   ifvare shopselection 16 state showtwilightcapedescript
   ifvare shopselection 17 state showsnakearmbanddescript
   ifvare shopselection 18 state showmedicbagdescript
   ifvare shopselection 19 state showserpenthelmetdescript
   ifvare shopselection 20 state showenergyincurmentdescript
   ifvare shopselection 21 state showyinyangorbdescript
  }
  ifvare shoppage 4
  {
   ifvare shopselection 0 state showwintersuitdescript
   ifvare shopselection 1 state showtank1capsuledescript
   ifvare shopselection 2 state showtank2capsuledescript
   ifvare shopselection 3 state showtank3capsuledescript
  }
 }
 qstrlen TEMPVAR 332
 ifvarg TEMPVAR 0 
 { 
  setvarvar tempb TEMPVAR
  mulvar tempb 2
  subvarvar digx tempb
  subvar digx 2
 }
 state mt

 setvar temp 1001
 state pal0
// Key Listings
 state digx160
 setvar digy 183 // 177
 redefinequote 1001 
 getkeyname 501 17 0
 qstrcat 1001 501
 redefinequote 502 /
 qstrcat 1001 502
 getkeyname 503 18 0
 qstrcat 1001 503
 redefinequote 504 =TOGGLE BUY/SELL  
 qstrcat 1001 504

 getkeyname 501 2 0
 qstrcat 1001 501
 redefinequote 502 /
 qstrcat 1001 502
 getkeyname 503 3 0
 qstrcat 1001 503
 redefinequote 504 /
 qstrcat 1001 504
 getkeyname 505 15 0
 qstrcat 1001 505
 redefinequote 506 /
 qstrcat 1001 506
 getkeyname 507 16 0
 qstrcat 1001 507
 redefinequote 508 =QUANITY -1/+1/-10/+10  
 qstrcat 1001 508

 qstrlen TEMPVAR 1001
 ifvarg TEMPVAR 0 
 { 
  setvarvar tempb TEMPVAR
  mulvar tempb 2
  subvarvar digx tempb
  subvar digx 2
 }
 state mt

 state digx160 // 89
 setvar digy 189 // 183
 redefinequote 1001 

 getkeyname 501 30 0
 qstrcat 1001 501
 redefinequote 502 =EXIT  
 qstrcat 1001 502

 getkeyname 503 31 0
 qstrcat 1001 503
 redefinequote 504 =SHIFT PG  
 qstrcat 1001 504

 getkeyname 505 6 0
 qstrcat 1001 505
 ifvare shopmode 0 redefinequote 506 =BUY ITEM  
 else ifvare shopmode 1 redefinequote 506 =SELL ITEM  
 qstrcat 1001 506

 getkeyname 501 0 0
 qstrcat 1001 501
 redefinequote 502 =CURSOR UP  
 qstrcat 1001 502

 getkeyname 503 1 0
 qstrcat 1001 503
 redefinequote 504 =CURSOR DOWN
 qstrcat 1001 504

 setvar temp 1001
 qstrlen TEMPVAR 1001
 ifvarg TEMPVAR 0 
 { 
  setvarvar tempb TEMPVAR
  mulvar tempb 2
  subvarvar digx tempb
  subvar digx 3
 }
 state mt
state pal0

 setvar temp 332
 // Show Current Money
 state pal22
 setvar digx 41
 setvar digy 169
 ifvarg CENTS -1 ifvarl CENTS 10 setvar temp 193 else setvar temp 194 
 state mt

 setvar temp 332
 // Show Item Buy/Sell Quanity
 state pal20
 setvar digx 217
 setvar digy 169
 ifvare shopmode 0 redefinequote 332 BUY QUANITY: %dX
 else redefinequote 332 SELL QUANITY: %dX
 qsprintf 332 332 shopamount
 qstrlen TEMP7 332
 mulvar TEMP7 4
 subvarvar digx TEMP7
 state mt


//************************************************************************************
//************************************************************************************
//**IMPORTANT: FROM HERE ON, YOU NEED TO DEFINE WHICH IDs SHOW WHAT TEXT AND DETAILS**
//************************************************************************************
//************************************************************************************

ifvare shop_id 0
{
 ifvare shopmode 0 // Buying
 {
  ifvare shoppage 0
  {
//*********************************
//*Item Name Displays - Buy Page 1*
//*********************************
   setvar digx 58
   state pal20
   setvar temp 1281
 
   setvar digy 35
   setvar shopitemid 0 
   state calcshopitembaseprices // redefinequote 332 SMALL MEDIKIT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection0cond
   state mt  

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices // redefinequote 332 MEDIUM MEDIKIT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection1cond
   state mt 

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices // redefinequote 332 LARGE MEDIKIT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection2cond
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices // redefinequote 332 EXTRA-LARGE MEDIKIT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection3cond
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices // redefinequote 332 ATOMIC HEALTH
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection4cond
   state mt

   setvar digx 58
   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices // redefinequote 332 SUPER ATOM
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection5cond
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices // redefinequote 332 BODY ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection6cond
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices // redefinequote 332 SUPER ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection7cond
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices // redefinequote 332 VITAMIN X
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection8cond
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices // redefinequote 332 NIGHT VISION GOGGLES
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection9cond
   state mt

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices // state showholonames_shop
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection10cond
   state mt

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices // redefinequote 332 JETPACK
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection11cond
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices // redefinequote 332 SCUBA GEAR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection12cond
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices // redefinequote 332 PROTECTIVE BOOTS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection13cond
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices // redefinequote 332 PORTABLE MEDIKIT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection14cond
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices // redefinequote 332 EYEDROP
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection15cond
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices // redefinequote 332 ANTIDOTE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection16cond
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices // redefinequote 332 FOGHORN
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection17cond
   state mt

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices // redefinequote 332 RESURRECTION CHALICE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection18cond
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices // redefinequote 332 MAXIMUM HP/AP BONUS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection19cond
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices // redefinequote 332 ATTACK/DEFENSE BONUS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection20cond
   state mt

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices // redefinequote 332 SPEED BONUS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection21cond
   state mt


//***********************************
//*Price Quote Displays - Buy Page 1*
//***********************************
   setvar digx 248 // 224
   state pal20
   state setquote332

   setvar digy 35
   setvar shopitemid 0 
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection0cond
   state mt

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection1cond
   state mt 

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection2cond
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection3cond
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection4cond
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection5cond
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection6cond
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection7cond
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection8cond
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection9cond
   state mt

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection10cond
   state mt

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection11cond
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection12cond
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection13cond
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection14cond
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection15cond
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection16cond
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection17cond
   state mt

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection18cond
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection19cond
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection20cond
   state mt

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices 
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection21cond
   state mt
   // Maximum Items per page = 22


//****************************
//*Item Pictures - Buy Page 1*
//****************************
   setvar diga 0
   
   ifvare shopselection 0
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 51
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterHP
    state mt

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 20 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar digx 303 // 224
     subvar digy 2 // setvar digy 136 // 130
     state shop_assessvehicleHP
     state mt
    }

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20 // setvar digy 154 // 224
    state shop_showinventoryportraits
    state rs

    state checksmallmedikits
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 1
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 34
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterHP
    state mt

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 20 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar digx 303 // 224
     subvar digy 2 // setvar digy 136 // 130
     state shop_assessvehicleHP
     state mt
    }

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20 // setvar digy 154 // 224
    state shop_showinventoryportraits
    state rs

    state checkmediummedikits
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 2
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 52
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterHP
    state mt

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 20 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar digx 303 // 224
     subvar digy 2 // setvar digy 136 // 130
     state shop_assessvehicleHP
     state mt
    }

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20 // setvar digy 154 // 224
    state shop_showinventoryportraits
    state rs

    state checklargemedikits
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 3
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 35
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterHP
    state mt

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 20 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar digx 303 // 224
     subvar digy 2 // setvar digy 136 // 130
     state shop_assessvehicleHP
     state mt
    }

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20 // setvar digy 154 // 224
    state shop_showinventoryportraits
    state rs

    state checkextralargemedikits
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 4
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 100
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterHP
    state mt

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 20 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar digx 303 // 224
     subvar digy 2 // setvar digy 136 // 130
     state shop_assessvehicleHP
     state mt
    }

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20 // setvar digy 154 // 224
    state shop_showinventoryportraits
    state rs

    state checkatomichealths
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 5
   {
    state pal16
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz49152
    setvar tilenum 100
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 119 // 119
    state shop_assesscharacterAP
    state mt

    setvar digx 303
    subvar digy 6 // 113
    state shop_assesscharacterHP
    state mt

    setvar digx 303
    addvar digy 12 // 125
    state shop_assesscharacterFA
    state mt

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 15 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar digx 303 // 224
     subvar digy 3 // setvar digy 136 // 130
     state shop_assessvehicleAP
     state mt

     setvar digx 303
     subvar digy 6 // 114
     state shop_assessvehicleHP
     state mt

     setvar digx 303
     addvar digy 12 // 114
     state shop_assessvehicleFA
     state mt
    }

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 15 // setvar digy 154 // 224
    state shop_showinventoryportraits
    state rs

    state checksuperatoms
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts

   }
   ifvare shopselection 6
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    ifvare ARMORAPPEARANCE? 0 { state digz32768 setvar tilenum 66 }
    ifvare ARMORAPPEARANCE? 1 { state digz32768 setvar tilenum 5383 }
    ifvare ARMORAPPEARANCE? 2 { state digz32768 setvar tilenum 5381 }
    ifvare ARMORAPPEARANCE? 3 { state digz32768 setvar tilenum 5382 }
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterAP
    state mt

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 20 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar digx 303 // 224
     subvar digy 2 // setvar digy 136 // 130
     state shop_assessvehicleAP
     state mt
    }

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20 // setvar digy 154 // 224
    state shop_showinventoryportraits
    state rs

    state checkbodyarmors
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 7
   {
    state pal24
    setvar digx 300 // 224
    setvar digy 98 // 224
    ifvare ARMORAPPEARANCE? 0 { state digz49152 setvar tilenum 66 }
    ifvare ARMORAPPEARANCE? 1 { state digz49152 setvar tilenum 5383 }
    ifvare ARMORAPPEARANCE? 2 { state digz49152 setvar tilenum 5381 }
    ifvare ARMORAPPEARANCE? 3 { state digz49152 setvar tilenum 5382 }
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterAP
    state mt

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 20 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar digx 303 // 224
     subvar digy 2 // setvar digy 136 // 130
     state shop_assessvehicleAP
     state mt
    }

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20 // setvar digy 154 // 224
    state shop_showinventoryportraits
    state rs

    state checksuperarmors
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 8
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 5424 // 55
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    setvar digx 303 // 224
    subvar digy 2
    state orientation27
    state pal20
    redefinequote 598 X%
    redefinequote 599 %ld%
    setvarvar TEMP2 STEROIDSTIME
    divvar TEMP2 4
    qsprintf 598 599 TEMP2
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar tilenum 3087 // setvar tilenum 3010
    setvar temp 598
    state mt

    // Vehicles Cannot Use VitaminX

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20
    state shop_showinventoryportraits
    state rs

    state checkvitaminxs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 9
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 59
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    ifvare CHARACTERSELECTED? 4
    {
     ifvare AMI? 1
     {
      setvar shade 0
      state pal20
      setvar digx 300 // 224
      setvar digy 122 // 224
      state digz98304
      setvar tilenum 8182
      state rs
      subvar digy 2
     }
     else state shop_shownvtime
    }
    else
    ifvare CHARACTERSELECTED? 8
    {
     ifvare LISA? 1
     {
      ifvare HAVEHACKERVISION? 1
      {
       setvar shade 0
       state pal20
       setvar digx 300 // 224
       setvar digy 122 // 224
       state digz98304
       setvar tilenum 8182
       state rs
       subvar digy 2
      }
      else state shop_shownvtime
     }
    }
    else state shop_shownvtime

    // Vehicles Cannot Use NVGoggles

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20
    state shop_showinventoryportraits
    state rs

    state checkheatsensors
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 10
   {    
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz24576
    ifvare CHARACTERSELECTED? 6 { state pal24 setvar tilenum 5426 }
    else ifvare CHARACTERSELECTED? 9 { state pal24 setvar tilenum 5430 }
    else { state pal0 setvar tilenum 1348 }
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    setvar digx 303 // 224
    subvar digy 2
    state orientation27
    state pal20
    redefinequote 598 X%
    redefinequote 599 %ld%
    setvarvar TEMP2 HOLOFORMTIME
    divvar TEMP2 24
    qsprintf 598 599 TEMP2
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar tilenum 3087 // setvar tilenum 3010
    setvar temp 598
    state mt

    // Vehicles Cannot Use Holos

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20
    state shop_showinventoryportraits
    state rs

    state checkholoforms
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 11
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 57
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    setvar digx 303 // 224
    subvar digy 2
    state orientation27
    state pal20
    redefinequote 598 X%
    redefinequote 599 %ld%
    setvarvar TEMP2 JETPACKTIME
    divvar TEMP2 16
    qsprintf 598 599 TEMP2
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar tilenum 3087 // setvar tilenum 3010
    setvar temp 598
    state mt

    // Vehicles Cannot Use Jetpacks

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20
    state shop_showinventoryportraits
    state rs

    state checkjetpacks
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 12
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 56
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    setvar digx 303 // 224
    subvar digy 2
    state orientation27
    state pal20
    redefinequote 598 X%
    redefinequote 599 %ld%
    setvarvar TEMP2 SCUBATIME
    divvar TEMP2 64
    qsprintf 598 599 TEMP2
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar tilenum 3087 // setvar tilenum 3010
    setvar temp 598
    state mt

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 20 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar shade 0
     setvar digx 303 // 224
     subvar digy 2 // setvar digy 136 // 130
     state orientation27
     state pal20
     redefinequote 598 X%
     redefinequote 599 %ld%
     getactorvar[VEHICLEID].ENEMYAIRTANKAMOUNT TEMP2 // setvarvar TEMP2 SCUBATIME
     divvar TEMP2 64
     qsprintf 598 599 TEMP2
     qstrlen TEMPVAR 598
     ifvarg TEMPVAR 0 
     { 
      setvarvar tempb TEMPVAR
      mulvar tempb 2
      subvarvar digx tempb
      subvar digx 2
     }    
     setvar tilenum 3087 // setvar tilenum 3010
     setvar temp 598
     state mt
    }

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20
    state shop_showinventoryportraits
    state rs

    state checkscubatanks
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 13
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 61
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    setvar digx 303 // 224
    subvar digy 2
    state orientation27
    state pal20
    redefinequote 598 X%
    redefinequote 599 %ld%
    setvarvar TEMP2 BOOTSTIME
    divvar TEMP2 2
    qsprintf 598 599 TEMP2
    qstrlen TEMPVAR 598
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }    
    setvar tilenum 3087 // setvar tilenum 3010
    setvar temp 598
    state mt

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 20 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar shade 0
     setvar digx 303 // 224
     subvar digy 2 // setvar digy 136 // 130
     state orientation27
     state pal20
     redefinequote 598 X%
     redefinequote 599 %ld%
     getactorvar[VEHICLEID].ENEMYBOOTSAMOUNT TEMP2 // setvarvar TEMP2 SCUBATIME
     divvar TEMP2 2
     qsprintf 598 599 TEMP2
     qstrlen TEMPVAR 598
     ifvarg TEMPVAR 0 
     { 
      setvarvar tempb TEMPVAR
      mulvar tempb 2
      subvarvar digx tempb
      subvar digx 2
     }    
     setvar tilenum 3087 // setvar tilenum 3010
     setvar temp 598
     state mt
    }

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20
    state shop_showinventoryportraits
    state rs

    state checkbootpairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 14
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 53
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterFA
    state mt

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 20 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar digx 303 // 224
     subvar digy 2 // setvar digy 136 // 130
     state shop_assesscharacterFA
     state mt
    }

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20
    state shop_showinventoryportraits
    state rs

    state checkportablemedikits
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 15
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 25676
    setvar tilenum 5181
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkeyedrops
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 16
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 5174
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkantidotes
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 17
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz24576
    setvar tilenum 5182 
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkfoghorns
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 18
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz49152
    setvar tilenum 5159 
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkreschalices
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 19
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 5258
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade -4
    state pal21
    setvarvar varname MAXHITPOINTS
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal22
    setvarvar varname MAXARMORPOINTS
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 18 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar shade -4
     state pal21
     getactorvar[VEHICLEID].ENEMYMAXHP varname // setvarvar varname MAXHITPOINTS
     subvar digy 5 // 224
     setvar tilenum 3087 // setvar tilenum 3010
     state orientation27
     state dn
     state pal22
     getactorvar[VEHICLEID].ENEMYMAXAP varname // setvarvar varname MAXARMORPOINTS
     addvar digy 6 // 224
     setvar tilenum 3087 // setvar tilenum 3010
     state orientation27
     state dn 
    }
   }
   ifvare shopselection 20
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 5300
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 4
    state pal21
    setvarvar varname PLAYERATTACK
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal22
    setvarvar varname PLAYERDEFENSE
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 18 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar shade 4
     state pal21
     getactorvar[VEHICLEID].ACTORATTACK varname // setvarvar varname PLAYERATTACK
     subvar digy 5 // 224
     setvar tilenum 3087 // setvar tilenum 3010
     state orientation27
     state dn
     state pal22
     getactorvar[VEHICLEID].ACTORDEFENSE varname // setvarvar varname PLAYERDEFENSE
     addvar digy 6 // 224
     setvar tilenum 3087 // setvar tilenum 3010
     state orientation27
     state dn
    }
   }
   ifvare shopselection 21
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 5331
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    state pal20
    setvarvar varname CHARACTERSPEEDTRUE
    ifvare debugtoggle 1
    {
     setvar digx 300 // 224
     subvar digy 2 // setvar digy 152 // 146
     setvar tilenum 3087 // setvar tilenum 3010
     state orientation27
     state dn
    }
    else
    {
     setvar digx 299 // 224
     subvar digy 2 // setvar digy 152 // 146
     state orientation27
 
     setvarvar TEMPVAR varname
     subvar TEMPVAR 46500
     divvar TEMPVAR 145
 
     setvarvar TEMPVAR2 varname
     subvar TEMPVAR2 46500
     mulvar TEMPVAR2 100
     divvar TEMPVAR2 145
     modvar TEMPVAR2 100
 
     ifvarg TEMPVAR2 -1 ifvarl TEMPVAR2 10
      redefinequote 598 %ld.0%ld
     else
      redefinequote 598 %ld.%ld

     qsprintf 598 598 TEMPVAR TEMPVAR2
     setvar temp 598
     qstrlen TEMPVAR3 598
     ifvarg TEMPVAR3 0
     {
      subvar TEMPVAR3 1
      mulvar TEMPVAR3 2
      subvarvar digx TEMPVAR3
     }
     state mt
    }
   }
  }
  else
  ifvare shoppage 1
  {
//*********************************
//*Item Name Displays - Buy Page 2*
//*********************************
   setvar digx 58
   state pal20
   setvar temp 1281

   setvar digy 35
   setvar shopitemid 0 
   state calcshopitembaseprices // redefinequote 332 SMALL AMMO SATCHEL
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection0cond
   state mt

   setvar digy 41
   setvar shopitemid 1 
   state calcshopitembaseprices // redefinequote 332 LARGE AMMO SATCHEL
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection1cond
   state mt

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices // redefinequote 332 TELEPORTER COILS [8 / PACK]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection2cond
   state mt
 
   setvar digy 53
   setvar shopitemid 3 
   state calcshopitembaseprices // redefinequote 332 EXTRA-LIFE T-SHIRT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection3cond
   state mt
 
   setvar digy 59
   setvar shopitemid 4 
   state calcshopitembaseprices // redefinequote 332 CONTINUE ITEM
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection4cond
   state mt

   setvar digy 65
   setvar shopitemid 5 
   state calcshopitembaseprices // redefinequote 332 ENERGY CELLS [5 / PACK]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection5cond
   state mt

   setvar digy 71
   setvar shopitemid 6 
   state calcshopitembaseprices // redefinequote 332 ENERGY CELLS [30 / PACK]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection6cond
   state mt

   setvar digy 77
   setvar shopitemid 7 
   state calcshopitembaseprices // redefinequote 332 ENERGY CELLS [80 / PACK]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection7cond
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices // redefinequote 332 BIO-CELLULAR ENERGY SHIELD
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection8cond
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices // redefinequote 332 AIRTIME BONUS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection9cond
   state mt

   setvar digy 95
   setvar shopitemid 10 
   state calcshopitembaseprices // redefinequote 332 MANTLE BONUS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection10cond
   state mt

   setvar digy 101
   setvar shopitemid 11 
   state calcshopitembaseprices // redefinequote 332 AIRJUMP BONUS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection11cond
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices // redefinequote 332 AFA'S DROP
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection12cond
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices // redefinequote 332 SUN RING
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection13cond
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices // redefinequote 332 AQUA RING
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection14cond
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices // redefinequote 332 PLASMA RING
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection15cond
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices // redefinequote 332 SPIRIT RING
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection16cond
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices // redefinequote 332 CHARM ANKH
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection17cond
   state mt

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices // redefinequote 332 MIRROR SHIELD
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection18cond
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices // redefinequote 332 EXPERIENCE BADGE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection19cond
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices // redefinequote 332 RANK BADGE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection20cond
   state mt

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices // redefinequote 332 MONEY BADGE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection21cond
   state mt


//***********************************
//*Price Quote Displays - Buy Page 2*
//***********************************
   setvar digx 248 // 224
   state pal20
   state setquote332
 
   setvar digy 35
   setvar shopitemid 0 
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection0cond
   state mt

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection1cond
   state mt

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection2cond
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection3cond
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection4cond
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection5cond
   state mt

   setvar digy 71
   setvar shopitemid 6 
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection6cond
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection7cond
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection8cond
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection9cond
   state mt

   setvar digy 95
   setvar shopitemid 10 
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection10cond
   state mt

   setvar digy 101
   setvar shopitemid 11 
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection11cond
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection12cond
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection13cond
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection14cond
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection15cond
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection16cond
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection17cond
   state mt

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection18cond
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection19cond
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection20cond
   state mt

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection21cond
   state mt


//****************************
//*Item Pictures - Buy Page 2*
//****************************
   setvar diga 0
   
   ifvare shopselection 0
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 5249
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    state shop_showmaxammoall
   }
   ifvare shopselection 1
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz65536
    setvar tilenum 5250
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    state shop_showmaxammoall
   }
   ifvare shopselection 2
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 24576 // 49152
    setvar tilenum 43 
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checktelecoils
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 3
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz49152
    setvar tilenum 5179
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state digz16384
    state orientation35
    ifvare BUBSY? 1 setvarvar tilenum 7938 else setvar tilenum 7955
    setvar shade 16
    state pal0
    state rs

    state checkbubsylives
    ifvare BUBSY? 1 setvarvar varname ITEMARRAYID_AMOUNTTEMP else setvar varname 0 // Bubsy must be available to have extra lives, since they are specfic to him only
    state shop_showinventoryamounts
   }
   ifvare shopselection 4
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz49152
    setvar tilenum 5279
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkcontinues
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 5
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz6000
    setvar tilenum 5218
    state rs

    state shop_showecells
   }
   ifvare shopselection 6
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz6000
    setvar tilenum 5219
    state rs

    state shop_showecells
   }
   ifvare shopselection 7
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz6000
    setvar tilenum 5220
    state rs

    state shop_showecells
   }
   ifvare shopselection 8
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz12000
    setvarvar TEMPVAR5 CURRENTBIOSHIELDPOWER
    ifvare CHARACTERSELECTED? 8 divvarvar TEMPVAR5 MAXHITPOINTS
    else
    {
     setvar CHARACTERARRAY 8
     getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR4
     divvarvar TEMPVAR5 TEMPVAR4
    }
    ifvarl TEMPVAR5 16 { state pal0 setvar digz 12000 }
    else ifvarg TEMPVAR5 15 ifvarl TEMPVAR5 64 { state pal17 setvar digz 12300 }
    else ifvarg TEMPVAR5 63 ifvarl TEMPVAR5 256 { state pal23 setvar digz 12600 }
    else ifvarg TEMPVAR5 255 ifvarl TEMPVAR5 1024 { state pal21 setvar digz 12900 }
    else ifvarg TEMPVAR5 1023 { state pal20 setvar digz 13200 }

    ifvare ESHIELDADVANCEMENT 0 setvar tilenum 5217 else setvar tilenum 5554
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state digz16384
    state orientation35
    ifvare LISA? 1 setvarvar tilenum 7943 else setvar tilenum 7955
    setvar shade 16
    state pal0
    state rs

    setvar shade 0
    state pal17
    ifvare LISA? 1 { ifvare HAVEENERGYSHIELD? 1 setvarvar varname ESHIELDDMGFACTOR else setvar varname 0 } else setvar varname 0
    subvar digy 2 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
//
   ifvare shopselection 9
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz98304
    setvar tilenum 6001
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    subvar digy 2
    state pal0
    setvarvar varname MAXAIRTIME
    ifvare debugtoggle 1
    {
     setvar digx 300 // 224
     setvar tilenum 3087 // setvar tilenum 3010
     state orientation27
     state dn
    }
    else
    {
     setvar digx 299 // 224
     state orientation27
 
     setvarvar TEMPVAR varname
     divvar TEMPVAR 26
 
     setvarvar TEMPVAR2 varname
     mulvar TEMPVAR2 100
     divvar TEMPVAR2 26
     modvar TEMPVAR2 100
 
     ifvarg TEMPVAR2 -1 ifvarl TEMPVAR2 10
     {
      redefinequote 598 %ld.0%ld
     }
     else
     {
      redefinequote 598 %ld.%ld
     }
     qsprintf 598 598 TEMPVAR TEMPVAR2
     setvar temp 598
     qstrlen TEMPVAR3 598
     ifvarg TEMPVAR3 0
     {
      subvar TEMPVAR3 1
      mulvar TEMPVAR3 2
      subvarvar digx TEMPVAR3
     }
     state mt
    }
   }
   ifvare shopselection 10
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz24576
    setvar tilenum 6012
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    subvar digy 2
    state pal14
    setvarvar varname MANTLINGTIMERMAX
    ifvare debugtoggle 1
    {
     setvar digx 300 // 224
     setvar tilenum 3087 // setvar tilenum 3010
     state orientation27
     state dn
    }
    else
    {
     setvar digx 299 // 224
     state orientation27
 
     setvarvar TEMPVAR varname
     divvar TEMPVAR 26
 
     setvarvar TEMPVAR2 varname
     mulvar TEMPVAR2 100
     divvar TEMPVAR2 26
     modvar TEMPVAR2 100
 
     ifvarg TEMPVAR2 -1 ifvarl TEMPVAR2 10
     {
      redefinequote 598 %ld.0%ld
     }
     else
     {
      redefinequote 598 %ld.%ld
     }
     qsprintf 598 598 TEMPVAR TEMPVAR2
     setvar temp 598
     qstrlen TEMPVAR3 598
     ifvarg TEMPVAR3 0
     {
      subvar TEMPVAR3 1
      mulvar TEMPVAR3 2
      subvarvar digx TEMPVAR3
     }
     state mt
    }
   }
   ifvare shopselection 11
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz16384
    setvar tilenum 6004
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    subvar digy 2
    state pal22
    setvarvar varname PLAYERMAXAIRJUMPS
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 12
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 56320
    setvar tilenum 6027
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkafasdrops
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 13
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz65536
    setvar tilenum 6013
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checksunrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 14
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz65536
    setvar tilenum 6016
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkaquarings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 15
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz65536
    setvar tilenum 6015
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkplasmarings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 16
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz65536
    setvar tilenum 6014
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkspiritrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 17
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz65536
    setvar tilenum 6021
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkcharmankhs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 18
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz65536
    setvar tilenum 6017
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkmirrorshields
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 19
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz65536
    setvar tilenum 6025
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkexpbadges
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 20
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz65536
    setvar tilenum 6024
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkrankbadges
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 21
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz65536
    setvar tilenum 6033
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkmoneybadges
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }

  }
  else
  ifvare shoppage 2
  {
//*********************************
//*Item Name Displays - Buy Page 3*
//*********************************
   setvar digx 58
   state pal20
   setvar temp 1281

   setvar digy 35
   setvar shopitemid 0 
   state calcshopitembaseprices // redefinequote 332 PISTOL AMMO [12]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection0cond
   state mt

   setvar digy 41
   setvar shopitemid 1 
   state calcshopitembaseprices // redefinequote 332 SHOTGUN SHELLS [10]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection1cond
   state mt

   setvar digy 47
   setvar shopitemid 2 
   state calcshopitembaseprices // redefinequote 332 CHAINGUN BULLETS [50]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection2cond
   state mt

   setvar digy 53
   setvar shopitemid 3 
   state calcshopitembaseprices // redefinequote 332 RPG MISSILES [5]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection3cond
   state mt

   setvar digy 59
   setvar shopitemid 4 
   state calcshopitembaseprices // redefinequote 332 PIPEBOMB [1]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection4cond
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices // redefinequote 332 BOX OF PIPEBOMBS [5]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection5cond
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices // redefinequote 332 SHRINKER CRYSTAL [5]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection6cond
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices // redefinequote 332 EXPANDER ANTENNA [20]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection7cond
   state mt

   setvar digy 83
   setvar shopitemid 8 
   state calcshopitembaseprices // redefinequote 332 DEVASTATOR MISSILES [15]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection8cond
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices //  redefinequote 332 LASER TRIPBOMB [1]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection9cond
   state mt

   setvar digy 95
   setvar shopitemid 10 
   state calcshopitembaseprices // redefinequote 332 FREEZETHROWER PACK [25]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection10cond
   state mt

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices // redefinequote 332 POTENTYLENE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection11cond
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices // redefinequote 332 RIOT SHIELD
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection12cond
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices // redefinequote 332 PAIR OF NYX GLOVES
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection13cond
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices // redefinequote 332 RABBIT'S FOOT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection14cond
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices // redefinequote 332 PAIR OF JUMP BOOTS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection15cond
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices // redefinequote 332 PAIR OF SHOCKAB BOOTS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection16cond
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices // redefinequote 332 PAIR OF HAPPY SHOES
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection17cond
   state mt

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices // redefinequote 332 PAIR OF STYLE SHOES
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection18cond
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices // redefinequote 332 PAIR OF CHARM SHOES
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection19cond
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices // redefinequote 332 POWER WRIST
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection20cond
   state mt

   setvar temp 1281
   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices // redefinequote 332 SMALL ENERGY DRINK
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection21cond
   state mt


//***********************************
//*Price Quote Displays - Buy Page 3*
//***********************************
   setvar digx 248 // 224
   state pal20
   state setquote332
 
   setvar digy 35
   setvar shopitemid 0 
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection0cond
   state mt

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection1cond
   state mt

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection2cond
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection3cond
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection4cond
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection5cond
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection6cond
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection7cond
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection8cond
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection9cond
   state mt

   setvar digy 95
   setvar shopitemid 10 
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection10cond
   state mt

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection11cond
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection12cond
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection13cond
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection14cond
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection15cond
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection16cond
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection17cond
   state mt

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection18cond
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection19cond
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection20cond
   state mt

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection21cond
   state mt


//****************************
//*Item Pictures - Buy Page 3*
//****************************
   setvar diga 0
   
   ifvare shopselection 0
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz16384
    setvar tilenum 40
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    state pal0
    getplayer[THISACTOR].ammo_amount 1 TEMPVAR
    setvarvar varname TEMPVAR
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal20
    getplayer[THISACTOR].max_ammo_amount 1 TEMPVAR
    setvarvar varname TEMPVAR
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 1
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 49
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    state pal0
    getplayer[THISACTOR].ammo_amount 2 TEMPVAR
    setvarvar varname TEMPVAR
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal20
    getplayer[THISACTOR].max_ammo_amount 2 TEMPVAR
    setvarvar varname TEMPVAR
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 2
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 41
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    state pal0
    getplayer[THISACTOR].ammo_amount 3 TEMPVAR
    setvarvar varname TEMPVAR
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal20
    getplayer[THISACTOR].max_ammo_amount 3 TEMPVAR
    setvarvar varname TEMPVAR
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 3
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 44
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    state pal0
    getplayer[THISACTOR].ammo_amount 4 TEMPVAR
    setvarvar varname TEMPVAR
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal20
    getplayer[THISACTOR].max_ammo_amount 4 TEMPVAR
    setvarvar varname TEMPVAR
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 4
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 8192
    setvar tilenum 26
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    state pal0
    getplayer[THISACTOR].ammo_amount 5 TEMPVAR
    setvarvar varname TEMPVAR
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal20
    getplayer[THISACTOR].max_ammo_amount 5 TEMPVAR
    setvarvar varname TEMPVAR
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 5
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 47
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    state pal0
    getplayer[THISACTOR].ammo_amount 5 TEMPVAR
    setvarvar varname TEMPVAR
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal20
    getplayer[THISACTOR].max_ammo_amount 5 TEMPVAR
    setvarvar varname TEMPVAR
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 6
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 46
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    state pal0
    getplayer[THISACTOR].ammo_amount 6 TEMPVAR
    setvarvar varname TEMPVAR
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal20
    getplayer[THISACTOR].max_ammo_amount 6 TEMPVAR
    setvarvar varname TEMPVAR
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 7
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 45
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    state pal0
    getplayer[THISACTOR].ammo_amount 11 TEMPVAR
    setvarvar varname TEMPVAR
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal20
    getplayer[THISACTOR].max_ammo_amount 11 TEMPVAR
    setvarvar varname TEMPVAR
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 8
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 42
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    state pal0
    getplayer[THISACTOR].ammo_amount 7 TEMPVAR
    setvarvar varname TEMPVAR
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal20
    getplayer[THISACTOR].max_ammo_amount 7 TEMPVAR
    setvarvar varname TEMPVAR
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 9
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 27
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    state pal0
    getplayer[THISACTOR].ammo_amount 8 TEMPVAR
    setvarvar varname TEMPVAR
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal20
    getplayer[THISACTOR].max_ammo_amount 8 TEMPVAR
    setvarvar varname TEMPVAR
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 10
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 37
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade 0
    state pal0
    getplayer[THISACTOR].ammo_amount 9 TEMPVAR
    setvarvar varname TEMPVAR
    subvar digy 5 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
    state pal20
    getplayer[THISACTOR].max_ammo_amount 9 TEMPVAR
    setvarvar varname TEMPVAR
    addvar digy 6 // 224
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 11
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 30720
    setvar tilenum 5284
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkfauxlevelups
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 12
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 16384
    setvar tilenum 6034
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkriotshields
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 13
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 9362
    setvar tilenum 6035
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checknyxglovepairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 14
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 21845
    setvar tilenum 6036
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkrabbitsfoots
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 15
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 32768
    setvar tilenum 6037
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkjumpbootpairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 16
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 32768
    setvar tilenum 6038
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkshockabbootpairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 17
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 13107
    setvar tilenum 6039
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkhappyshoepairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 18
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 13107
    setvar tilenum 6040
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkstyleshoepairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 19
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 13107
    setvar tilenum 6041
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkcharmshoepairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 20
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 6554
    setvar tilenum 6042
    state rs

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkpowerwrists
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 21
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 6554
    setvar tilenum 5564
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterEP
    state mt

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 140 // 224
    state shop_showinventoryportraits
    state rs

    state checksmallenergydrinks
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }

  }
  else
  ifvare shoppage 3
  {
//*********************************
//*Item Name Displays - Buy Page 4*
//*********************************
   setvar digx 58
   state pal20
   state setquote332

   setvar temp 1281
   setvar digy 35
   setvar shopitemid 0 
   state calcshopitembaseprices // redefinequote 332 LARGE ENERGY DRINK
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection0cond
   state mt

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices // redefinequote 332 HYPER ENERGY DRINK
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection1cond
   state mt

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices // redefinequote 332 MAXIMUM EP BONUS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection2cond
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices // redefinequote 332 SILK CARNATION
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection3cond
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices // redefinequote 332 RARE PIRATE DOUBLOON
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection4cond
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices // redefinequote 332 PAIR OF FIXED DICE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection5cond
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices // redefinequote 332 MALAKIAN GEM
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection6cond
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices // redefinequote 332 SAFE LOCK BOX
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection7cond
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices // redefinequote 332 SECRET RECIPE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection8cond
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices // redefinequote 332 SLURPEE MACHINE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection9cond
   state mt

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices // redefinequote 332 STOCK OWNERSHIP
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection10cond
   state mt

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices // redefinequote 332 TRANSDIMENSIONAL SAFE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection11cond
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices // redefinequote 332 BLOODPACT SHIELD
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection12cond
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices // redefinequote 332 GREEN-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection13cond
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices // redefinequote 332 BLUE-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection14cond
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices // redefinequote 332 YELLOW-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection15cond
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices // redefinequote 332 RED-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection16cond
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices // redefinequote 332 GREY-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection17cond
   state mt

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices // redefinequote 332 WHITE-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection18cond
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices // redefinequote 332 HOCKEY MASK
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection19cond
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices // redefinequote 332 GEMSTONE CROWN
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection20cond
   state mt

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices // redefinequote 332 IRON RUNE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection21cond
   state mt


//***********************************
//*Price Quote Displays - Buy Page 4*
//***********************************
   setvar digx 248 // 224
   state pal20
   state setquote332
 
   setvar digy 35
   setvar shopitemid 0
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection0cond
   state mt

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection1cond
   state mt

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection2cond
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection3cond
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection4cond
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection5cond
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection6cond
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection7cond
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection8cond
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection9cond
   state mt

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection10cond
   state mt

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection11cond
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection12cond
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection13cond
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection14cond
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection15cond
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection16cond
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection17cond
   state mt

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection18cond
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection19cond
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection20cond
   state mt

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection21cond
   state mt



//****************************
//*Item Pictures - Buy Page 4*
//****************************
   setvar diga 0
   
   ifvare shopselection 0
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 6554
    setvar tilenum 5565
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterEP
    state mt

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 140 // 224
    state shop_showinventoryportraits
    state rs

    state checklargeenergydrinks
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 1
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 6554
    setvar tilenum 5566
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterEP
    state mt

    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 140 // 224
    state shop_showinventoryportraits
    state rs

    state checkhyperenergydrinks
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 2
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    state digz32768
    setvar tilenum 5510
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar shade -4
    subvar digy 2
    state pal0
    setvarvar varname MAXENERGYPOINTS
    setvar tilenum 3087 // setvar tilenum 3010
    state orientation27
    state dn
   }
   ifvare shopselection 3
   {
    state pal10
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 16384
    setvar tilenum 6090
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checksilkcarnations
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 4
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 16384
    setvar tilenum 6091
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkrarepiratedoubloons
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 5
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 16384
    setvar tilenum 6092
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkfixeddicepairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 6
   {
    state pal17
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 16384
    setvar tilenum 6093
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkmalakiangems
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 7
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 16384
    setvar tilenum 6094
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checksafelockboxes
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 8
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 16384
    setvar tilenum 6095
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checksecretrecipes
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 9
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 16384
    setvar tilenum 6096
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkslurpeemachines
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 10
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 16384
    setvar tilenum 6097
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkstockownerships
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 11
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 16384
    setvar tilenum 6098
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checktransdimensionalsafes
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 12
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 16384
    setvar tilenum 6099
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkbloodpactshields
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvarg shopselection 12 ifvarl shopselection 20
   {
    ifvare shopselection 13 state pal14
    ifvare shopselection 14 state pal16
    ifvare shopselection 15 state pal23
    ifvare shopselection 16 state pal10
    ifvare shopselection 17 state pal13
    ifvare shopselection 18 state pal20
    ifvare shopselection 19 state pal15
    setvar digx 300 // 224
    setvar digy 100 // 224
    ifvare ARMORAPPEARANCE? 0 { state digz32768 setvar tilenum 67 }
    ifvare ARMORAPPEARANCE? 1 { state digz32768 setvar tilenum 5416 }
    ifvare ARMORAPPEARANCE? 2 { state digz32768 setvar tilenum 5415 }
    ifvare ARMORAPPEARANCE? 3 { state digz32768 setvar tilenum 5421 }
    state rs

    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterAP
    state mt

    // Vehicle Stats
    ifvarn VEHICLEID -1
    {
     setvar digx 300 // 224
     addvar digy 20 // setvar digy 138 // 224
     state shop_showvehicleportraits
     state rs

     setvar digx 303 // 224
     subvar digy 2 // setvar digy 136 // 130
     state shop_assessvehicleAP
     state mt
    }

    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20 // setvar digy 154 // 224
    state shop_showinventoryportraits
    state rs

    ifvare shopselection 13 { state checkgreenarmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    ifvare shopselection 14 { state checkbluearmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    ifvare shopselection 15 { state checkyellowarmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    ifvare shopselection 16 { state checkredarmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    ifvare shopselection 17 { state checkgreyarmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    ifvare shopselection 18 { state checkwhitearmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    ifvare shopselection 19 { state checkrandomarmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    state shop_showinventoryamounts
   }
   ifvare shopselection 20
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 8192
    setvar tilenum 6044
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkhockeymasks
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 21
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 4096
    setvar tilenum 6045
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkgemstonecrowns
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }

  }
  else
  ifvare shoppage 4
  {
//*********************************
//*Item Name Displays - Buy Page 5*
//*********************************
   setvar digx 58
   state pal20
   setvar temp 1281

   setvar digy 35
   setvar shopitemid 0
   state calcshopitembaseprices // redefinequote 332 TWILIGHT CAPE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection0cond
   state mt

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices // redefinequote 332 SNAKE ARMBAND
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection1cond
   state mt

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices // redefinequote 332 MEDIC BAG
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection2cond
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices // redefinequote 332 SERPENT HELMET
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection3cond
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices // redefinequote 332 ENERGY INCURMENT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection4cond
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices // redefinequote 332 YIN-YANG ORB
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection5cond
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices // redefinequote 332 WINTER SUIT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection6cond
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices // redefinequote 332 RIOT-TANK CAPSULE [GREEN]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection7cond
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices // redefinequote 332 RIOT-TANK CAPSULE [BLUE]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection8cond
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices // redefinequote 332 RIOT-TANK CAPSULE [RED]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection9cond
   state mt

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices // redefinequote 332 RIOT-TANK CAPSULE [RED]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
   addvar SHOPDOLLARSTEMP -1
   state shop_selection10cond
   state mt


//***********************************
//*Price Quote Displays - Buy Page 5*
//***********************************
   setvar digx 248 // 224
   state pal20
   state setquote332
 
   setvar digy 35
   setvar shopitemid 0
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection0cond
   state mt

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection1cond
   state mt

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection2cond
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection3cond
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection4cond
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection5cond
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection6cond
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection7cond
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection8cond
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection9cond
   state mt

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state shop_cheatdisplay1
   else
   {
    setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
    mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR 
    state shop_calculatefinalprices
    state shop_displaypricequote
   }
   state shop_selection10cond
   state mt

//****************************
//*Item Pictures - Buy Page 5*
//****************************
   setvar diga 0
   
   ifvare shopselection 0
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 16384 // sprite is 6x the other ones
    setvar tilenum 6052
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkironrunes
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 1
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 7168
    setvar tilenum 6046
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checktwilightcapes
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 2
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 3584
    setvar tilenum 6047
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checksnakearmbands
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 3
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 4096
    setvar tilenum 6048
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkmedicbags
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 4
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 7168
    setvar tilenum 6049 
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkserpenthelmets
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 5
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 28160
    setvar tilenum 6050
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkenergyincurments
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 6
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 8192
    setvar tilenum 6051
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkyinyangorbs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 7
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    ifvare GENDER? 0 { setvar digz 2560 setvar tilenum 6293 }
    ifvare GENDER? 1 { setvar digz 2560 setvar tilenum 6294 }
    state rs

    state pal0
    // Character Stats
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showcharacterportraits
    state rs

    setvar digx 303
    setvar digy 120 // 114
    state shop_assesscharacterWC
    state mt

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    addvar digy 20 // setvar digy 154 // 224
    state shop_showinventoryportraits
    state rs

    state checkwintersuits
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 8
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 10240
    setvar tilenum 175
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkgreentankcapsules
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 9
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 10240
    setvar tilenum 176
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkbluetankcapsules
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }
   ifvare shopselection 10
   {
    state pal0
    setvar digx 300 // 224
    setvar digy 100 // 224
    setvar digz 10240
    setvar tilenum 177
    state rs

    state pal0
    // Inventory Amounts
    setvar digx 300 // 224
    setvar digy 122 // 224
    state shop_showinventoryportraits
    state rs

    state checkredtankcapsules
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state shop_showinventoryamounts
   }

  }
/*
  else
  ifvare shoppage 5
  {
  }
*/
 }
 else
 ifvare shopmode 1 // Selling
 {
  ifvare shoppage 0
  {
//**********************************
//*Item Name Displays - Sell Page 1*
//**********************************
   setvar digx 58
   state pal20
   setvar temp 1281

   setvar digy 35
   setvar shopitemid 0
   state calcshopitembaseprices // redefinequote 332 RESURRECTION CHALICE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkreschalices
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 0 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 41
   setvar shopitemid 1 
   state calcshopitembaseprices // redefinequote 332 EYEDROP
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkeyedrops
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 1 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices // redefinequote 332 ANTIDOTE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkantidotes
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 2 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 53
   setvar shopitemid 3 
   state calcshopitembaseprices // redefinequote 332 FOGHORN
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkfoghorns
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 3 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 59
   setvar shopitemid 4 
   state calcshopitembaseprices // redefinequote 332 EXTRA LIFE T-SHIRT
   ifvare BUBSY? 1
   {
    ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbubsylives
    setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
    ifvare shopselection 4 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   }
   else
   {
    ifvare shopselection 4 state pal21 else state pal10
   }
   state mt  

   setvar digy 65
   setvar shopitemid 5 
   state calcshopitembaseprices // redefinequote 332 CONTINUE ITEM
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkcontinues
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 5 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 71
   setvar shopitemid 6 
   state calcshopitembaseprices // redefinequote 332 ENERGY CELLS [5 / SELL]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else setvarvar ITEMARRAYID_AMOUNTTEMP CURRENTCELLS
   setvarvar TEMPVAR6 5 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 6 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 77
   setvar shopitemid 7 
   state calcshopitembaseprices // redefinequote 332 TELEPORTER COILS [8 / SELL]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checktelecoils
   setvarvar TEMPVAR6 8 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 7 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 }
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 83
   setvar shopitemid 8 
   state calcshopitembaseprices // redefinequote 332 SMALL MEDIKIT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksmallmedikits
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 8 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 89
   setvar shopitemid 9 
   state calcshopitembaseprices // redefinequote 332 MEDIUM MEDIKIT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmediummedikits
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 9 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices // redefinequote 332 LARGE MEDIKIT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checklargemedikits
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 10 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices // redefinequote 332 EXTRA-LARGE MEDIKIT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkextralargemedikits
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 11 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices // redefinequote 332 BODY ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbodyarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 12 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices // redefinequote 332 SUPER ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksuperarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 13 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices // redefinequote 332 VITAMIN X
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkvitaminxs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 14 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices // redefinequote 332 NIGHT VISION GOGGLES
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkheatsensors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 15 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices // state showholonames_shop
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkholoforms
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 16 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices // redefinequote 332 JETPACK
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkjetpacks
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 17 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices // redefinequote 332 SCUBA GEAR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkscubatanks
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 18 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices // redefinequote 332 PROTECTIVE BOOTS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbootpairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 19 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices // redefinequote 332 PORTABLE MEDIKIT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkportablemedikits
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 20 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices // redefinequote 332 AFA'S DROP
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkafasdrops
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 21 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  



//************************************
//*Price Quote Displays - Sell Page 1*
//************************************
   setvar digx 248 // 224
   state pal20
   state setquote332

   setvar digy 35
   setvar shopitemid 0
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkreschalices
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 0 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkeyedrops
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 1 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkantidotes
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 2 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkfoghorns
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 3 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvare BUBSY? 1
   {
    ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbubsylives
    setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
    ifvare shopselection 4 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   }
   else
   {
    ifvare shopselection 4 state pal21 else state pal10
   }
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkcontinues
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 5 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else setvarvar ITEMARRAYID_AMOUNTTEMP CURRENTCELLS
   setvarvar TEMPVAR6 5 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 6 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checktelecoils
   setvarvar TEMPVAR6 8 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 7 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 83
   setvar shopitemid 8 
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksmallmedikits
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 8 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 89
   setvar shopitemid 9 
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmediummedikits
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 9 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checklargemedikits
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 10 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkextralargemedikits
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 11 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbodyarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 12 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksuperarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 13 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkvitaminxs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 14 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkheatsensors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 15 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkholoforms
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 16 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkjetpacks
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 17 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkscubatanks
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 18 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbootpairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 19 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkportablemedikits
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 20 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkafasdrops
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 21 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt



//*****************************
//*Item Pictures - Sell Page 1*
//*****************************
   setvar digx 300 // 224
   setvar digy 100 // 224
   setvar diga 0
   
   ifvare shopselection 0
   {
    state pal0
    state digz49152
    setvar tilenum 5159 
    state checkreschalices
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 1
   {
    state pal0
    setvar digz 25676
    setvar tilenum 5181
    state checkeyedrops
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 2
   {
    state pal0
    state digz32768
    setvar tilenum 5174
    state checkantidotes
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 3
   {
    state pal0
    state digz24576
    setvar tilenum 5182 
    state checkfoghorns
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 4
   {
    state pal0
    state digz49152
    setvar tilenum 5179
    state checkbubsylives
    ifvare BUBSY? 1 setvarvar varname ITEMARRAYID_AMOUNTTEMP else setvar varname 0 // Bubsy must be available to have extra lives, since they are specfic to him only
    state rs
   }
   ifvare shopselection 5
   {
    state pal0
    state digz49152
    setvar tilenum 5277
    state checkcontinues
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 6
   {
    state pal0
    state digz6000
    setvar tilenum 5218
    setvarvar varname CURRENTCELLS
    state rs
   }
   ifvare shopselection 7
   {
    state pal0
    setvar digz 24576 // 49152
    setvar tilenum 43 
    state checktelecoils
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 8
   {
    state pal0
    state digz32768
    setvar tilenum 51
    state checksmallmedikits
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 9
   {
    state pal0
    state digz32768
    setvar tilenum 34
    state checkmediummedikits
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 10
   {
    state pal0
    state digz32768
    setvar tilenum 52
    state checklargemedikits
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 11
   {
    state pal0
    state digz32768
    setvar tilenum 35
    state checkextralargemedikits
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 12
   {
    state pal0
    ifvare ARMORAPPEARANCE? 0 { state digz32768 setvar tilenum 66 }
    ifvare ARMORAPPEARANCE? 1 { state digz32768 setvar tilenum 5383 }
    ifvare ARMORAPPEARANCE? 2 { state digz32768 setvar tilenum 5381 }
    ifvare ARMORAPPEARANCE? 3 { state digz32768 setvar tilenum 5382 }
    state checkbodyarmors
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 13
   {
    state pal24
    ifvare ARMORAPPEARANCE? 0 { state digz49152 setvar tilenum 66 }
    ifvare ARMORAPPEARANCE? 1 { state digz49152 setvar tilenum 5383 }
    ifvare ARMORAPPEARANCE? 2 { state digz49152 setvar tilenum 5381 }
    ifvare ARMORAPPEARANCE? 3 { state digz49152 setvar tilenum 5382 }
    state checksuperarmors
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 14
   {
    state pal0
    state digz32768
    setvar tilenum 5424
    state checkvitaminxs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 15
   {
    state pal0
    state digz32768
    setvar tilenum 59
    state checkheatsensors
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 16
   {
    state pal0
    state digz24576
    ifvare CHARACTERSELECTED? 6 { state pal24 setvar tilenum 5426 }
    else ifvare CHARACTERSELECTED? 9 { state pal24 setvar tilenum 5430 }
    else { state pal0 setvar tilenum 1348 }
    state checkholoforms
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 17
   {
    state pal0
    state digz32768
    setvar tilenum 57
    state checkjetpacks
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 18
   {
    state pal0
    state digz32768
    setvar tilenum 56
    state checkscubatanks
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 19
   {
    state pal0
    state digz32768
    setvar tilenum 61
    state checkbootpairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 20
   {
    state pal0
    state digz32768
    setvar tilenum 53
    state checkportablemedikits
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 21
   {
    state pal0
    setvar digz 56320
    setvar tilenum 6027
    state checkafasdrops
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }

   state shope_showinvsell
   state shop_showinventoryamounts
  }
  else
  ifvare shoppage 1
  {
//**********************************
//*Item Name Displays - Sell Page 2*
//**********************************
   setvar digx 58
   state pal20
   setvar temp 1281

   setvar digy 35
   setvar shopitemid 0
   state calcshopitembaseprices // redefinequote 332 SUN RING
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksunrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 0 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices // redefinequote 332 AQUA RING
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkaquarings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 1 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices // redefinequote 332 PLASMA RING
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkplasmarings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 2 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices // redefinequote 332 SPIRIT RING
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkspiritrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 3 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices // redefinequote 332 CHARM ANKH
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkcharmankhs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 4 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices // redefinequote 332 MIRROR SHIELD
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmirrorshields
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 5 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices // redefinequote 332 EXPERIENCE BADGE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkexpbadges
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 6 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices // redefinequote 332 RANK BADGE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkrankbadges
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 7 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices // redefinequote 332 MONEY BADGE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmoneybadges
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 8 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices // redefinequote 332 ATOMIC HEALTH
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkatomichealths
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 9 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices // redefinequote 332 SUPER ATOM
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksuperatoms
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 10 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices // redefinequote 332 POTENTYLENE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkfauxlevelups
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 11 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices // redefinequote 332 RIOT SHIELD
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkriotshields
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 12 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices // redefinequote 332 PAIR OF NYX GLOVES
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checknyxglovepairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 13 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices // redefinequote 332 RABBIT'S FOOT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkrabbitsfoots
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 14 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices // redefinequote 332 PAIR OF JUMP BOOTS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkjumpbootpairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 15 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices // redefinequote 332 PAIR OF SHOCKAB BOOTS
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkshockabbootpairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 16 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices // redefinequote 332 PAIR OF HAPPY SHOES
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkhappyshoepairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 17 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices // redefinequote 332 PAIR OF STYLE SHOES
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkstyleshoepairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 18 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices // redefinequote 332 PAIR OF CHARM SHOES
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkcharmshoepairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 19 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices // redefinequote 332 POWER WRIST
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkpowerwrists
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 20 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices // redefinequote 332 SMALL ENERGY DRINK
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksmallenergydrinks
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 21 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  


//************************************
//*Price Quote Displays - Sell Page 2*
//************************************
   setvar digx 248 // 224
   state pal20
   state setquote332

   setvar digy 35
   setvar shopitemid 0
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksunrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 0 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkaquarings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 1 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkplasmarings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 2 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkspiritrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 3 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkcharmankhs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 4 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmirrorshields
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 5 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkexpbadges
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 6 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkrankbadges
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 7 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmoneybadges
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 8 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkatomichealths
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 9 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt


   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksuperatoms
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 10 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkfauxlevelups
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 11 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkriotshields
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 12 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checknyxglovepairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 13 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkrabbitsfoots
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 14 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkjumpbootpairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 15 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkshockabbootpairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 16 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkhappyshoepairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 17 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkstyleshoepairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 18 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkcharmshoepairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 19 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkpowerwrists
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 20 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 161
   setvar digx 236
   setvar shopitemid 21
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksmallenergydrinks
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 21 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt




//*****************************
//*Item Pictures - Sell Page 2*
//*****************************
   setvar digx 300 // 224
   setvar digy 100 // 224
   setvar diga 0
   
   ifvare shopselection 0
   {
    state pal0
    state digz65536
    setvar tilenum 6013
    state checksunrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 1
   {
    state pal0
    state digz65536
    setvar tilenum 6016
    state checkaquarings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 2
   {
    state pal0
    state digz65536
    setvar tilenum 6015
    state checkplasmarings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 3
   {
    state pal0
    state digz65536
    setvar tilenum 6014
    state checkspiritrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 4
   {
    state pal0
    state digz65536
    setvar tilenum 6021
    state checkcharmankhs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 5
   {
    state pal0
    state digz65536
    setvar tilenum 6017
    state checkmirrorshields
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 6
   {
    state pal0
    state digz65536
    setvar tilenum 6025
    state checkexpbadges
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 7
   {
    state pal0
    state digz65536
    setvar tilenum 6024
    state checkrankbadges
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 8
   {
    state pal0
    state digz65536
    setvar tilenum 6033
    state checkmoneybadges
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 9
   {
    state pal0
    state digz32768
    setvar tilenum 100
    state checkatomichealths
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 10
   {
    state pal16
    state digz49152
    setvar tilenum 100
    state checksuperatoms
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 11
   {
    state pal16
    setvar digz 30720
    setvar tilenum 5284
    state checkfauxlevelups
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 12
   {
    state pal16
    setvar digz 16384
    setvar tilenum 6034
    state checkriotshields
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 13
   {
    state pal16
    setvar digz 9362
    setvar tilenum 6035
    state checknyxglovepairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 14
   {
    state pal16
    setvar digz 21845
    setvar tilenum 6036
    state checkrabbitsfoots
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 15
   {
    state pal16
    setvar digz 32768
    setvar tilenum 6037
    state checkjumpbootpairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 16
   {
    state pal16
    setvar digz 32768
    setvar tilenum 6038
    state checkshockabbootpairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 17
   {
    state pal16
    setvar digz 13107
    setvar tilenum 6039
    state checkhappyshoepairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 18
   {
    state pal16
    setvar digz 13107
    setvar tilenum 6040
    state checkstyleshoepairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 19
   {
    state pal16
    setvar digz 13107
    setvar tilenum 6041
    state checkcharmshoepairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 20
   {
    state pal16
    setvar digz 6554
    setvar tilenum 6042
    state checkpowerwrists
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 21
   {
    state pal16
    setvar digz 6554
    setvar tilenum 5564
    state checksmallenergydrinks
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }

   state shope_showinvsell
   state shop_showinventoryamounts
  }
  else
  ifvare shoppage 2
  {
//**********************************
//*Item Name Displays - Sell Page 3*
//**********************************
   setvar digx 58
   state pal20
   setvar temp 1281

   setvar digy 35
   setvar shopitemid 0 
   state calcshopitembaseprices // redefinequote 332 LARGE ENERGY DRINK
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checklargeenergydrinks
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 0 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 41
   setvar shopitemid 1 
   state calcshopitembaseprices // redefinequote 332 HYPER ENERGY DRINK
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkhyperenergydrinks
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 1 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices // redefinequote 332 SILK CARNATION
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilkcarnations
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 2 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 53
   setvar shopitemid 3 
   state calcshopitembaseprices // redefinequote 332 RARE PIRATE DOUBLOON
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkrarepiratedoubloons
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 3 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices // redefinequote 332 PAIR OF FIXED DICE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkfixeddicepairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 4 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices // redefinequote 332 MALAKIAN GEM
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmalakiangems
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 5 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices // redefinequote 332 SAFE LOCK BOX
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksafelockboxes
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 6 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 77
   setvar shopitemid 7 
   state calcshopitembaseprices // redefinequote 332 SECRET RECIPE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksecretrecipes
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 7 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 83
   setvar shopitemid 8 
   state calcshopitembaseprices // redefinequote 332 SLURPEE MACHINE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkslurpeemachines
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 8 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 89
   setvar shopitemid 9 
   state calcshopitembaseprices // redefinequote 332 STOCK OWNERSHIP
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkstockownerships
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 9 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices // redefinequote 332 TRANSDIMENSIONAL SAFE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checktransdimensionalsafes
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 10 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices // redefinequote 332 BLOODPACT SHIELD
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbloodpactshields
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 11 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices // redefinequote 332 GREEN-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgreenarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 12 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices // redefinequote 332 BLUE-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbluearmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 13 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices // redefinequote 332 YELLOW-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkyellowarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 14 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices // redefinequote 332 RED-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkredarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 15 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices // redefinequote 332 GREY-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgreyarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 16 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices // redefinequote 332 WHITE-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkwhitearmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 17 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 143
   setvar shopitemid 18 
   state calcshopitembaseprices // redefinequote 332 RANDOM-CLASS ARMOR
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkrandomarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 18 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices // redefinequote 332 ZIRCON RING [SILVER]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilverzirconrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 19 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices // redefinequote 332 AQUAMARINE RING [SILVER]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilveraquamarinerings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 20 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 161
   setvar shopitemid 21 
   state calcshopitembaseprices // redefinequote 332 TURQUOISE RING [SILVER]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilverturquoiserings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 21 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  


//************************************
//*Price Quote Displays - Sell Page 3*
//************************************
   setvar digx 248 // 224
   state pal20
   setvar temp 332

   setvar digy 35
   setvar shopitemid 0
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checklargeenergydrinks
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 0 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkhyperenergydrinks
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 1 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilkcarnations
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 2 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkrarepiratedoubloons
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 3 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkfixeddicepairs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 4 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmalakiangems
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 5 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksafelockboxes
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 6 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksecretrecipes
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 7 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkslurpeemachines
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 8 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkstockownerships
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 9 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checktransdimensionalsafes
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 10 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbloodpactshields
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 11 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgreenarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 12 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbluearmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 13 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkyellowarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 14 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkredarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 15 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgreyarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 16 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkwhitearmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 17 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 143
   setvar shopitemid 18 
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkrandomarmors
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 18 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilverzirconrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 19 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilveraquamarinerings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 20 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilverturquoiserings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 21 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

//*****************************
//*Item Pictures - Sell Page 3*
//*****************************
   setvar digx 300 // 224
   setvar digy 100 // 224
   setvar diga 0
   
   ifvare shopselection 0
   {
    state pal0
    setvar digz 6554
    setvar tilenum 5565
    state checklargeenergydrinks
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 1
   {
    state pal0
    setvar digz 6554
    setvar tilenum 5566
    state checkhyperenergydrinks
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 2
   {
    state pal10
    setvar digz 16384
    setvar tilenum 6090
    state checksilkcarnations
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 3
   {
    state pal0
    setvar digz 16384
    setvar tilenum 6091
    state checkrarepiratedoubloons
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 4
   {
    state pal0
    setvar digz 16384
    setvar tilenum 6092
    state checkfixeddicepairs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 5
   {
    state pal17
    setvar digz 16384
    setvar tilenum 6093
    state checkmalakiangems
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 6
   {
    state pal0
    setvar digz 16384
    setvar tilenum 6094
    state checksafelockboxes
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 7
   {
    state pal0
    setvar digz 16384
    setvar tilenum 6095
    state checksecretrecipes
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 8
   {
    state pal0
    setvar digz 16384
    setvar tilenum 6096
    state checkslurpeemachines
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 9
   {
    state pal0
    setvar digz 16384
    setvar tilenum 6097
    state checkstockownerships
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 10
   {
    state pal0
    setvar digz 16384
    setvar tilenum 6098
    state checktransdimensionalsafes
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 11
   {
    state pal0
    setvar digz 16384
    setvar tilenum 6099
    state checkbloodpactshields
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvarg shopselection 11 ifvarl shopselection 19
   {
    ifvare shopselection 12 state pal14
    ifvare shopselection 13 state pal16
    ifvare shopselection 14 state pal23
    ifvare shopselection 15 state pal10
    ifvare shopselection 16 state pal13
    ifvare shopselection 17 state pal20
    ifvare shopselection 18 state pal15
    ifvare ARMORAPPEARANCE? 0 { state digz32768 setvar tilenum 67 }
    ifvare ARMORAPPEARANCE? 1 { state digz32768 setvar tilenum 5416 }
    ifvare ARMORAPPEARANCE? 2 { state digz32768 setvar tilenum 5415 }
    ifvare ARMORAPPEARANCE? 3 { state digz32768 setvar tilenum 5421 }
    ifvare shopselection 12 { state checkgreenarmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    ifvare shopselection 13 { state checkbluearmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    ifvare shopselection 14 { state checkyellowarmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    ifvare shopselection 15 { state checkredarmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    ifvare shopselection 16 { state checkgreyarmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    ifvare shopselection 17 { state checkwhitearmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    ifvare shopselection 18 { state checkrandomarmors setvarvar varname ITEMARRAYID_AMOUNTTEMP }
    state rs
   }
   ifvare shopselection 19
   {
    state pal11
    setvar digz 4096
    setvar tilenum 5970
    state checksilverzirconrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 20
   {
    state pal16
    setvar digz 4096
    setvar tilenum 5970
    state checksilveraquamarinerings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 21
   {
    state pal0
    setvar digz 4096
    setvar tilenum 5970
    state checksilverturquoiserings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }

   state shope_showinvsell
   state shop_showinventoryamounts
  }
  else
  ifvare shoppage 3
  {
//**********************************
//*Item Name Displays - Sell Page 4*
//**********************************
   setvar digx 58
   state pal20
   setvar temp 1281

   setvar digy 35
   setvar shopitemid 0
   state calcshopitembaseprices // redefinequote 332 EMERALD RING [SILVER]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilveremeraldrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 0 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices // redefinequote 332 GARNET RING [SILVER]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilvergarnetrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 1 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices // redefinequote 332 RUBY RING [SILVER]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilverrubyrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 2 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices // redefinequote 332 CITRINE RING [SILVER]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilvercitrinerings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 3 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices // redefinequote 332 DIAMOND RING [SILVER]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilverdiamondrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 4 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices // redefinequote 332 ZIRCON RING [GOLD]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldzirconrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 5 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices // redefinequote 332 AQUAMARINE RING [GOLD]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldaquamarinerings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 6 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices // redefinequote 332 TURQUOISE RING [GOLD]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldturquoiserings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 7 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices // redefinequote 332 EMERALD RING [GOLD]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldemeraldrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 8 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices // redefinequote 332 GARNET RING [GOLD]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldgarnetrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 9 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices // redefinequote 332 RUBY RING [GOLD]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldrubyrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 10 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices // redefinequote 332 CITRINE RING [GOLD]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldcitrinerings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 11 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices // redefinequote 332 DIAMOND RING [GOLD]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgolddiamondrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 12 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices // redefinequote 332 HOCKEY MASK
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkhockeymasks
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 13 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices // redefinequote 332 GEMSTONE CROWN
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgemstonecrowns
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 14 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices // redefinequote 332 IRON RUNE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkironrunes
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 15 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices // redefinequote 332 TWILIGHT CAPE
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checktwilightcapes
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 16 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices // redefinequote 332 SNAKE ARMBAND
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksnakearmbands
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 17 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices // redefinequote 332 MEDIC BAG
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmedicbags
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 18 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices // redefinequote 332 SERPENT HELMET
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkserpenthelmets
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 19 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices // redefinequote 332 ENERGY INCURMENT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkenergyincurments
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 20 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices // redefinequote 332 YIN-YANG ORB
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkyinyangorbs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 21 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

//************************************
//*Price Quote Displays - Sell Page 4*
//************************************
   setvar digx 248 // 224
   state pal20
   state setquote332

   setvar digy 35
   setvar shopitemid 0
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilveremeraldrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 0 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilvergarnetrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 1 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilverrubyrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 2 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilvercitrinerings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 3 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 59
   setvar shopitemid 4
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilverdiamondrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 4 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 65
   setvar shopitemid 5
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldzirconrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 5 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 71
   setvar shopitemid 6
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldaquamarinerings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 6 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 77
   setvar shopitemid 7
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldturquoiserings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 7 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 83
   setvar shopitemid 8
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldemeraldrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 8 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 89
   setvar shopitemid 9
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldgarnetrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 9 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 95
   setvar shopitemid 10
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldrubyrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 10 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 101
   setvar shopitemid 11
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldcitrinerings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 11 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 107
   setvar shopitemid 12
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgolddiamondrings
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 12 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 113
   setvar shopitemid 13
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkhockeymasks
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 13 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 119
   setvar shopitemid 14
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgemstonecrowns
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 14 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 125
   setvar shopitemid 15
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkironrunes
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 15 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 131
   setvar shopitemid 16
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checktwilightcapes
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 16 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 137
   setvar shopitemid 17
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksnakearmbands
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 17 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 143
   setvar shopitemid 18
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmedicbags
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 18 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 149
   setvar shopitemid 19
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkserpenthelmets
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 19 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 155
   setvar shopitemid 20
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkenergyincurments
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 20 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 161
   setvar shopitemid 21
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkyinyangorbs
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 21 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                      else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt


//*****************************
//*Item Pictures - Sell Page 4*
//*****************************
   setvar digx 300 // 224
   setvar digy 100 // 224
   setvar diga 0
   ifvare shopselection 0
   {
    state pal14
    setvar digz 4096
    setvar tilenum 5970
    state checksilveremeraldrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 1
   {
    state pal21
    setvar digz 4096
    setvar tilenum 5970
    state checksilvergarnetrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 2
   {
    state pal10
    setvar digz 4096
    setvar tilenum 5970
    state checksilverrubyrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 3
   {
    state pal23
    setvar digz 4096
    setvar tilenum 5970
    state checksilvercitrinerings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 4
   {
    state pal12
    setvar digz 4096
    setvar tilenum 5970
    state checksilverdiamondrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 5
   {
    state pal11
    setvar digz 4096
    setvar tilenum 5971
    state checkgoldzirconrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 6
   {
    state pal16
    setvar digz 4096
    setvar tilenum 5971
    state checkgoldaquamarinerings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 7
   {
    state pal0
    setvar digz 4096
    setvar tilenum 5971
    state checkgoldturquoiserings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 8
   {
    state pal14
    setvar digz 4096
    setvar tilenum 5971
    state checkgoldemeraldrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 9
   {
    state pal21
    setvar digz 4096
    setvar tilenum 5971
    state checkgoldgarnetrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 10
   {
    state pal10
    setvar digz 4096
    setvar tilenum 5971
    state checkgoldrubyrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 11
   {
    state pal23
    setvar digz 4096
    setvar tilenum 5971
    state checkgoldcitrinerings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 12
   {
    state pal12
    setvar digz 4096
    setvar tilenum 5971
    state checkgolddiamondrings
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 13
   {
    state pal0
    setvar digz 8192
    setvar tilenum 6044
    state checkhockeymasks
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 14
   {
    state pal0
    setvar digz 4096
    setvar tilenum 6045
    state checkgemstonecrowns
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 15
   {
    state pal0
    setvar digz 16384 // sprite is 6x the other ones
    setvar tilenum 6052
    state checkironrunes
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 16
   {
    state pal0
    setvar digz 7168
    setvar tilenum 6046
    state checktwilightcapes
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 17
   {
    state pal0
    setvar digz 3584
    setvar tilenum 6047
    state checksnakearmbands
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 18
   {
    state pal0
    setvar digz 4096
    setvar tilenum 6048
    state checkmedicbags
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 19
   {
    state pal0
    setvar digz 7168
    setvar tilenum 6049 
    state checkserpenthelmets
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 20
   {
    state pal0
    setvar digz 28160
    setvar tilenum 6050
    state checkenergyincurments
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 21
   {
    state pal0
    setvar digz 8192
    setvar tilenum 6051
    state checkyinyangorbs
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }

   state shope_showinvsell
   state shop_showinventoryamounts
  }
  else
  ifvare shoppage 4
  {
//**********************************
//*Item Name Displays - Sell Page 5*
//**********************************
   setvar digx 58
   state pal20
   setvar temp 1281

   setvar digy 35
   setvar shopitemid 0
   state calcshopitembaseprices // redefinequote 332 WINTER SUIT
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkwintersuits
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 0 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices // redefinequote 332 RIOT TANK CAPSULE [GREEN]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgreentankcapsules
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 1 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt  

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices // redefinequote 332 RIOT TANK CAPSULE [BLUE]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbluetankcapsules
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 2 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices // redefinequote 332 RIOT TANK CAPSULE [RED]
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkredtankcapsules
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 3 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt


//************************************
//*Price Quote Displays - Sell Page 5*
//************************************
   setvar digx 248 // 224
   state pal20
   state setquote332

   setvar digy 35
   setvar shopitemid 0
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkwintersuits
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 0 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 41
   setvar shopitemid 1
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgreentankcapsules
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 1 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 47
   setvar shopitemid 2
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbluetankcapsules
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 2 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

   setvar digy 53
   setvar shopitemid 3
   state calcshopitembaseprices 
   setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2
   mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR
   state shop_calculatefinalprices
   state shop_displaypricequote
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkredtankcapsules
   setvarvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
   ifvare shopselection 3 { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal22 else state pal21 } 
                     else { ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6 state pal20 else state pal10 }
   state mt

//*****************************
//*Item Pictures - Sell Page 5*
//*****************************
   setvar digx 300 // 224
   setvar digy 100 // 224
   setvar diga 0
   ifvare shopselection 0
   {
    state pal0
    ifvare GENDER? 0 { setvar digz 2560 setvar tilenum 6293 }
    ifvare GENDER? 1 { setvar digz 2560 setvar tilenum 6294 }
    state checkwintersuits
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 1
   {
    state pal0
    setvar digz 10240
    setvar tilenum 175
    state checkgreentankcapsules
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 2
   {
    state pal0
    setvar digz 10240
    setvar tilenum 176
    state checkbluetankcapsules
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }
   ifvare shopselection 3
   {
    state pal0
    setvar digz 10240
    setvar tilenum 177
    state checkredtankcapsules
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state rs
   }

   state shope_showinvsell
   state shop_showinventoryamounts
  }
/*
  else
  ifvare shoppage 5
  {
  }
*/
 }

} // ifvare shop_id 0

  } // ifvarg shoptransitiontimer 6
 state pal0
 } // ifvarn shop_id -1
ends

state shop_buyitem
 sound MONEYSOUND
 ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state cheatersound
 ifvare shoptype 1
 {
  ifrnd 85 globalsound SHOP_SOLD1
  else ifrnd 128 globalsound SHOP_SOLD2
  else globalsound SHOP_SOLD3
 }
ends

state shop_sellitem
 stopsound MENU_ERROR
 stopsound SHOP_FAIL
 sound MONEYSOUND
 ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS state cheatersound
ends

state shop_buyfailed
       stopsound MONEYSOUND

       ifvare shoptype 0 globalsound MENU_ERROR
       else ifvare shoptype 1 globalsound SHOP_FAIL

       redefinequote 341 ^10YOU DON'T HAVE ENOUGH MONEY, CHEAPSKATE!
	 setvarvar fta fta_normal setvar ftq 341
ends

state shop_sellfailed
 stopsound MONEYSOUND
 stopsound SHOP_FAIL
 sound MENU_ERROR 
ends

state shop_moveup
 // Sounds
 sound EXITMENUSOUND
 stopsound MENU_SELECTED 
 stopsound MENU_ENTER 
 stopsound MENU_EXIT

   subvar shopselection 1
   // Menus
   ifvare shop_id 0
   {
    ifvare shopmode 0 // Buy Menu
    {
     ifvare shoppage 0
     {
      ifvarl shopselection 0 addvar shopselection 22
     }
     else
     ifvare shoppage 1
     {
      ifvarl shopselection 0 addvar shopselection 22
     }
     else
     ifvare shoppage 2
     {
      ifvarl shopselection 0 addvar shopselection 22
     }
     else
     ifvare shoppage 3
     {
      ifvarl shopselection 0 addvar shopselection 22
     }
     else
     ifvare shoppage 4
     {
      ifvarl shopselection 0 addvar shopselection 11
     }
     else
     ifvare shoppage 5
     {
      ifvare shopselection 0 setvar shopselection 0
     }
    }
    else
    ifvare shopmode 1 // Sell Menu
    {
     ifvare shoppage 0
     {
      ifvarl shopselection 0 addvar shopselection 22
     }
     else
     ifvare shoppage 1
     {
      ifvarl shopselection 0 addvar shopselection 22
     }
     else
     ifvare shoppage 2
     {
      ifvarl shopselection 0 addvar shopselection 22
     }
     else
     ifvare shoppage 3
     {
      ifvarl shopselection 0 addvar shopselection 22
     }
     else
     ifvare shoppage 4
     {
      ifvarl shopselection 0 addvar shopselection 4
     }
    }
   }
ends

state shop_movedown
 // Sounds
 sound EXITMENUSOUND
 stopsound MENU_SELECTED 
 stopsound MENU_ENTER 
 stopsound MENU_EXIT

   addvar shopselection 1
   // Menus
   ifvare shop_id 0
   {
    ifvare shopmode 0
    {
     ifvare shoppage 0
     {
      ifvarg shopselection 21 subvar shopselection 22
     }
     else
     ifvare shoppage 1
     {
      ifvarg shopselection 21 subvar shopselection 22
     }
     else
     ifvare shoppage 2
     {
      ifvarg shopselection 21 subvar shopselection 22
     }
     else
     ifvare shoppage 3
     {
      ifvarg shopselection 21 subvar shopselection 22
     }
     else
     ifvare shoppage 4
     {
      ifvarg shopselection 10 subvar shopselection 11
     }
     else
     ifvare shoppage 5
     {
      ifvare shopselection 0 setvar shopselection 0
     }
    }
    else
    ifvare shopmode 1
    {
     ifvare shoppage 0
     {
      ifvarg shopselection 21 subvar shopselection 22
     }
     else
     ifvare shoppage 1
     {
      ifvarg shopselection 21 subvar shopselection 22
     }
     else
     ifvare shoppage 2
     {
      ifvarg shopselection 21 subvar shopselection 22
     }
     else
     ifvare shoppage 3
     {
      ifvarg shopselection 21 subvar shopselection 22
     }
     else
     ifvare shoppage 4
     {
      ifvarg shopselection 3 subvar shopselection 4
     }
    }
   }
ends

state shop_shiftpage

 // Sounds
 sound MENU_SELECTED 
 stopsound MENU_ENTER 
 stopsound MENU_EXIT

   // Menus
   ifvare shop_id 0
   {
    ifvare shopmode 0 // Buying
    {
     ifvare shoppage 0 setvar shoppage 1
     else ifvare shoppage 1 setvar shoppage 2
     else ifvare shoppage 2 setvar shoppage 3
     else ifvare shoppage 3 setvar shoppage 4
     else ifvare shoppage 4 setvar shoppage 0
//     else ifvare shoppage 5 setvar shoppage 0
    }
    else
    ifvare shopmode 1 // Selling
    {
     ifvare shoppage 0 setvar shoppage 1
     else ifvare shoppage 1 setvar shoppage 2
     else ifvare shoppage 2 setvar shoppage 3
     else ifvare shoppage 3 setvar shoppage 4
     else ifvare shoppage 4 setvar shoppage 0
//     else ifvare shoppage 5 setvar shoppage 0
    }
    setvar shopselection 0
   }
ends

state shop_changemodeup
 sound MENU_SELECTED 
 stopsound MENU_ENTER 
 stopsound MENU_EXIT

 ifvare shop_id 0
 {
  ifvare shopmode 0 { setvar shopmode 1 setvar shoppage 0 setvar shopselection 0 }
  else ifvare shopmode 1 { setvar shopmode 0 setvar shoppage 0 setvar shopselection 0 }
 }
ends

state shop_changemodedown
 sound MENU_SELECTED 
 stopsound MENU_ENTER 
 stopsound MENU_EXIT

 ifvare shop_id 0
 {
  ifvare shopmode 0 { setvar shopmode 1 setvar shoppage 0 setvar shopselection 0 }
  else ifvare shopmode 1 { setvar shopmode 0 setvar shoppage 0 setvar shopselection 0 }
 }
ends

state failedsell
       state shop_sellfailed
       ifvare shopamount 1 redefinequote 341 ^10YOU DON'T HAVE ANY OF THIS ITEM TO SELL!
       else redefinequote 341 ^10YOU DON'T HAVE ENOUGH OF THIS ITEM TO SELL!
	 setvarvar fta fta_normal setvar ftq 341
ends

state selldisplays
        subvarvar DOLLARS SHOPDOLLARSTEMP
        subvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
ends

//*************************************************
//*States for Buying Items [Vehicle Pickup System]*
//*************************************************

// Utilizing a Medic Bag w/ Medikit Items

state medicbag_check2
                getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR3
                mulvarvar TEMPVAR3 TEMPVAR6
                divvar TEMPVAR3 1000

                getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR4
                ifvarg TEMPVAR4 0
                {
                 addvarvar TEMPVAR4 TEMPVAR3
                 getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR5
                 ifvarvarg TEMPVAR4 TEMPVAR5 setvarvar TEMPVAR4 TEMPVAR5
                 setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR4
                }
ends

state shop_medicbag_utilize
              // Check for Medic Bag [Equippable Item]
              setvar DAMAGEMODIFIER 0
              ifvare PLAYEREQUIPSLOTITEM1 24 addvar DAMAGEMODIFIER 10
              ifvare PLAYEREQUIPSLOTITEM2 24 addvar DAMAGEMODIFIER 10
              ifvare PLAYEREQUIPSLOTITEM3 24 addvar DAMAGEMODIFIER 10
              ifvare PLAYEREQUIPSLOTITEM4 24 addvar DAMAGEMODIFIER 10
              ifvare PLAYEREQUIPSLOTITEM5 24 addvar DAMAGEMODIFIER 10
              ifvare PLAYEREQUIPSLOTITEM6 24 addvar DAMAGEMODIFIER 10
              ifvare PLAYEREQUIPSLOTITEM7 24 addvar DAMAGEMODIFIER 10
              ifvare PLAYEREQUIPSLOTITEM8 24 addvar DAMAGEMODIFIER 10
              ifvarg DAMAGEMODIFIER 100 setvar DAMAGEMODIFIER 100
              setvarvar TEMPVAR6 TEMPHEALTH
              mulvarvar TEMPVAR6 DAMAGEMODIFIER
              divvar TEMPVAR6 100
              ifvarg TEMPVAR6 0
              {
               ifvarn CHARACTERSELECTED? 1 { setvar CHARACTERARRAY 1 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 2 { setvar CHARACTERARRAY 2 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 3 { setvar CHARACTERARRAY 3 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 4 { setvar CHARACTERARRAY 4 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 5 { setvar CHARACTERARRAY 5 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 6 { setvar CHARACTERARRAY 6 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 7 { setvar CHARACTERARRAY 7 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 8 { setvar CHARACTERARRAY 8 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 9 { setvar CHARACTERARRAY 9 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 10 { setvar CHARACTERARRAY 10 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 11 { setvar CHARACTERARRAY 11 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 12 { setvar CHARACTERARRAY 12 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 13 { setvar CHARACTERARRAY 13 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 14 { setvar CHARACTERARRAY 14 state medicbag_check2 }
               ifvarn CHARACTERSELECTED? 15 { setvar CHARACTERARRAY 15 state medicbag_check2 }
              }
ends

// Small Medikit

state buyforcharacter_cola
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_MEDIKITITEM
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state gotmedsyoureallyneeded

        // TEMP4 = Maximum HP % to reach
        // tempb = becomes the % of health needed to heal to reach TEMP4 [tempb - TEMPARMOR = tempb]
        setvar tempb 1000
        setvar TEMP4 1000
        setvarvar TEMPARMOR CURRENTHITPOINTS
        mulvar TEMPARMOR 1000
        divvarvar TEMPARMOR MAXHITPOINTS
        subvarvar tempb TEMPARMOR

        setvar TEMPHEALTH 0
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setvar TEMPVAR6 10
        whilevarn TEMPVAR6 0
        {
         ifvarvarl TEMPHEALTH tempb ifvarg ACTORPICKUPAMOUNT 0
         {
          ifvare CHARACTERSELECTED? 13 setvar TEMP7 150 else setvar TEMP7 100
          state secretrecipecheck 
          addvarvar TEMPHEALTH TEMP7

          subvar ACTORPICKUPAMOUNT 1
          addvar tempe 1
         }
         subvar TEMPVAR6 1
        }
        state shop_medicbag_utilize
        mulvarvar TEMPHEALTH MAXHITPOINTS
        divvar TEMPHEALTH 1000
        addvarvar CURRENTHITPOINTS TEMPHEALTH // Adds the actual heal value to the current player health

        state showhealing_playerhp
        ifvarvarg CURRENTHITPOINTS MAXHITPOINTS setvarvar CURRENTHITPOINTS MAXHITPOINTS
        setvar PLAYERHPDAMAGED? -1

        state checksmallmedikits addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d SMALL MEDKITS: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^20BOUGHT A SMALL MEDKIT: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d SMALL MEDKITS: +%ld HP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^20BOUGHT A SMALL MEDKIT: +%ld HP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
ends

state buyforvehicle_cola
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound VEHICLE_HEAL
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        // TEMPVAR5 = Vehicle's Max HP
        // TEMP4 = Maximum HP % to reach
        // tempb = becomes the % of health needed to heal to reach TEMP4 [tempb - TEMPARMOR = tempb]
        setvar tempb 1000
        setvar TEMP4 1000
        setvarvar TEMPARMOR TEMPVAR4
        mulvar TEMPARMOR 1000
        divvarvar TEMPARMOR TEMPVAR5
        subvarvar tempb TEMPARMOR

        setvar TEMPHEALTH 0
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setvar TEMPVAR6 10
        whilevarn TEMPVAR6 0
        {
         ifvarvarl TEMPHEALTH tempb ifvarg ACTORPICKUPAMOUNT 0
         {
          setvar TEMP7 100
          state secretrecipecheck 
          addvarvar TEMPHEALTH TEMP7

          subvar ACTORPICKUPAMOUNT 1
          addvar tempe 1
         }
         subvar TEMPVAR6 1
        }
        mulvarvar TEMPHEALTH TEMPVAR5
        divvar TEMPHEALTH 1000
        addvarvar TEMPVAR4 TEMPHEALTH

        state showhealing_playerhp
        ifvarvarg TEMPVAR4 TEMPVAR5 setvarvar TEMPVAR4 TEMPVAR5
        setactorvar[tempvehicleid].ENEMYHP TEMPVAR4
        setvar VEHICLEHPDAMAGED? -1

        state checksmallmedikits addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^15BOUGHT %d SMALL MEDKITS [VEHICLE]: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^15BOUGHT A SMALL MEDKIT [VEHICLE]: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^15BOUGHT %d SMALL MEDKITS [VEHICLE]: +%ld HP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^15BOUGHT A SMALL MEDKIT [VEHICLE]: +%ld HP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
ends

state buyforinventory_cola
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d SMALL MEDKITS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A SMALL MEDKIT [TO INVENTORY]
        }
        state checksmallmedikits addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
 	  setvarvar fta fta_normal setvar ftq 341
ends

// Medium Medikit

state buyforcharacter_swmedikit
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_MEDIKITITEM
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state gotmedsyoureallyneeded

        // TEMP4 = Maximum HP % to reach
        // tempb = becomes the % of health needed to heal to reach TEMP4 [tempb - TEMPARMOR = tempb]
        setvar tempb 1000
        setvar TEMP4 1000
        setvarvar TEMPARMOR CURRENTHITPOINTS
        mulvar TEMPARMOR 1000
        divvarvar TEMPARMOR MAXHITPOINTS
        subvarvar tempb TEMPARMOR

        setvar TEMPHEALTH 0
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setvar TEMPVAR6 10
        whilevarn TEMPVAR6 0
        {
         ifvarvarl TEMPHEALTH tempb ifvarg ACTORPICKUPAMOUNT 0
         {
          ifvare CHARACTERSELECTED? 13 setvar TEMP7 300 else setvar TEMP7 200
          state secretrecipecheck 
          addvarvar TEMPHEALTH TEMP7

          subvar ACTORPICKUPAMOUNT 1
          addvar tempe 1
         }
         subvar TEMPVAR6 1
        }
        state shop_medicbag_utilize
        mulvarvar TEMPHEALTH MAXHITPOINTS
        divvar TEMPHEALTH 1000
        addvarvar CURRENTHITPOINTS TEMPHEALTH // Adds the actual heal value to the current player health

        state showhealing_playerhp
        ifvarvarg CURRENTHITPOINTS MAXHITPOINTS setvarvar CURRENTHITPOINTS MAXHITPOINTS
        setvar PLAYERHPDAMAGED? -1

        state checkmediummedikits addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d MEDIUM MEDKITS: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^20BOUGHT A MEDIUM MEDKIT: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d MEDIUM MEDKITS: +%ld HP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^20BOUGHT A MEDIUM MEDKIT: +%ld HP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
ends

state buyforvehicle_swmedikit
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound VEHICLE_HEAL
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        // TEMPVAR5 = Vehicle's Max HP
        // TEMP4 = Maximum HP % to reach
        // tempb = becomes the % of health needed to heal to reach TEMP4 [tempb - TEMPARMOR = tempb]
        setvar tempb 1000
        setvar TEMP4 1000
        setvarvar TEMPARMOR TEMPVAR4
        mulvar TEMPARMOR 1000
        divvarvar TEMPARMOR TEMPVAR5
        subvarvar tempb TEMPARMOR

        setvar TEMPHEALTH 0
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setvar TEMPVAR6 10
        whilevarn TEMPVAR6 0
        {
         ifvarvarl TEMPHEALTH tempb ifvarg ACTORPICKUPAMOUNT 0
         {
          setvar TEMP7 200
          state secretrecipecheck 
          addvarvar TEMPHEALTH TEMP7

          subvar ACTORPICKUPAMOUNT 1
          addvar tempe 1
         }
         subvar TEMPVAR6 1
        }
        mulvarvar TEMPHEALTH TEMPVAR5
        divvar TEMPHEALTH 1000
        addvarvar TEMPVAR4 TEMPHEALTH

        state showhealing_playerhp
        ifvarvarg TEMPVAR4 TEMPVAR5 setvarvar TEMPVAR4 TEMPVAR5
        setactorvar[tempvehicleid].ENEMYHP TEMPVAR4
        setvar VEHICLEHPDAMAGED? -1

        state checkmediummedikits addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^15BOUGHT %d MEDIUM MEDKITS [VEHICLE]: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^15BOUGHT A MEDIUM MEDKIT [VEHICLE]: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^15BOUGHT %d MEDIUM MEDKITS [VEHICLE]: +%ld HP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^15BOUGHT A MEDIUM MEDKIT [VEHICLE]: +%ld HP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
ends

state buyforinventory_swmedikit
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d MEDIUM MEDKITS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A MEDIUM MEDKIT [TO INVENTORY]
        }
        state checkmediummedikits addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
 	  setvarvar fta fta_normal setvar ftq 341
ends

// Large Medikit

state buyforcharacter_sixpak
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_MEDIKITITEM
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state gotmedsyoureallyneeded

        // TEMP4 = Maximum HP % to reach
        // tempb = becomes the % of health needed to heal to reach TEMP4 [tempb - TEMPARMOR = tempb]
        setvar tempb 1000
        setvar TEMP4 1000
        setvarvar TEMPARMOR CURRENTHITPOINTS
        mulvar TEMPARMOR 1000
        divvarvar TEMPARMOR MAXHITPOINTS
        subvarvar tempb TEMPARMOR

        setvar TEMPHEALTH 0
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setvar TEMPVAR6 10
        whilevarn TEMPVAR6 0
        {
         ifvarvarl TEMPHEALTH tempb ifvarg ACTORPICKUPAMOUNT 0
         {
          ifvare CHARACTERSELECTED? 13 setvar TEMP7 450 else setvar TEMP7 300
          state secretrecipecheck 
          addvarvar TEMPHEALTH TEMP7

          subvar ACTORPICKUPAMOUNT 1
          addvar tempe 1
         }
         subvar TEMPVAR6 1
        }
        state shop_medicbag_utilize
        mulvarvar TEMPHEALTH MAXHITPOINTS
        divvar TEMPHEALTH 1000
        addvarvar CURRENTHITPOINTS TEMPHEALTH // Adds the actual heal value to the current player health

        state showhealing_playerhp
        ifvarvarg CURRENTHITPOINTS MAXHITPOINTS setvarvar CURRENTHITPOINTS MAXHITPOINTS
        setvar PLAYERHPDAMAGED? -1

        state checklargemedikits addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d LARGE MEDKITS: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^20BOUGHT A LARGE MEDKIT: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d LARGE MEDKITS: +%ld HP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^20BOUGHT A LARGE MEDKIT: +%ld HP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
ends

state buyforvehicle_sixpak
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound VEHICLE_HEAL
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        // TEMPVAR5 = Vehicle's Max HP
        // TEMP4 = Maximum HP % to reach
        // tempb = becomes the % of health needed to heal to reach TEMP4 [tempb - TEMPARMOR = tempb]
        setvar tempb 1000
        setvar TEMP4 1000
        setvarvar TEMPARMOR TEMPVAR4
        mulvar TEMPARMOR 1000
        divvarvar TEMPARMOR TEMPVAR5
        subvarvar tempb TEMPARMOR

        setvar TEMPHEALTH 0
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setvar TEMPVAR6 10
        whilevarn TEMPVAR6 0
        {
         ifvarvarl TEMPHEALTH tempb ifvarg ACTORPICKUPAMOUNT 0
         {
          setvar TEMP7 300
          state secretrecipecheck 
          addvarvar TEMPHEALTH TEMP7

          subvar ACTORPICKUPAMOUNT 1
          addvar tempe 1
         }
         subvar TEMPVAR6 1
        }
        mulvarvar TEMPHEALTH TEMPVAR5
        divvar TEMPHEALTH 1000
        addvarvar TEMPVAR4 TEMPHEALTH

        state showhealing_playerhp
        ifvarvarg TEMPVAR4 TEMPVAR5 setvarvar TEMPVAR4 TEMPVAR5
        setactorvar[tempvehicleid].ENEMYHP TEMPVAR4
        setvar VEHICLEHPDAMAGED? -1

        state checklargemedikits addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^15BOUGHT %d LARGE MEDKITS [VEHICLE]: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^15BOUGHT A LARGE MEDKIT [VEHICLE]: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^15BOUGHT %d LARGE MEDKITS [VEHICLE]: +%ld HP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^15BOUGHT A LARGE MEDKIT [VEHICLE]: +%ld HP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
ends

state buyforinventory_sixpak
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d LARGE MEDKITS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A LARGE MEDKIT [TO INVENTORY]
        }
        state checklargemedikits addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
 	  setvarvar fta fta_normal setvar ftq 341
ends

// Extra-Large Medikit

state buyforcharacter_swbigmedikit
        stopsound MENU_ERROR
        stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_MEDIKITITEM
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state gotmedsyoureallyneeded

        // TEMP4 = Maximum HP % to reach
        // tempb = becomes the % of health needed to heal to reach TEMP4 [tempb - TEMPARMOR = tempb]
        setvar tempb 1000
        setvar TEMP4 1000
        setvarvar TEMPARMOR CURRENTHITPOINTS
        mulvar TEMPARMOR 1000
        divvarvar TEMPARMOR MAXHITPOINTS
        subvarvar tempb TEMPARMOR

        setvar TEMPHEALTH 0
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setvar TEMPVAR6 10
        whilevarn TEMPVAR6 0
        {
         ifvarvarl TEMPHEALTH tempb ifvarg ACTORPICKUPAMOUNT 0
         {
          ifvare CHARACTERSELECTED? 13 setvar TEMP7 750 else setvar TEMP7 500
          state secretrecipecheck 
          addvarvar TEMPHEALTH TEMP7

          subvar ACTORPICKUPAMOUNT 1
          addvar tempe 1
         }
         subvar TEMPVAR6 1
        }
        state shop_medicbag_utilize
        mulvarvar TEMPHEALTH MAXHITPOINTS
        divvar TEMPHEALTH 1000
        addvarvar CURRENTHITPOINTS TEMPHEALTH // Adds the actual heal value to the current player health

        state showhealing_playerhp
        ifvarvarg CURRENTHITPOINTS MAXHITPOINTS setvarvar CURRENTHITPOINTS MAXHITPOINTS
        setvar PLAYERHPDAMAGED? -1

        state checkextralargemedikits addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d EXTRA-LARGE MEDKITS: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^20BOUGHT A EXTRA-LARGE MEDKIT: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d EXTRA-LARGE MEDKITS: +%ld HP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^20BOUGHT A EXTRA-LARGE MEDKIT: +%ld HP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
ends

state buyforvehicle_swbigmedikit
        stopsound MENU_ERROR
        stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound VEHICLE_HEAL
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvar TEMPHEALTH 0
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setvar TEMPVAR6 10
        whilevarn TEMPVAR6 0
        {
         ifvarvarl TEMPHEALTH tempb ifvarg ACTORPICKUPAMOUNT 0
         {
          setvar TEMP7 500
          state secretrecipecheck 
          addvarvar TEMPHEALTH TEMP7

          subvar ACTORPICKUPAMOUNT 1
          addvar tempe 1
         }
         subvar TEMPVAR6 1
        }
        mulvarvar TEMPHEALTH TEMPVAR5
        divvar TEMPHEALTH 1000
        addvarvar TEMPVAR4 TEMPHEALTH

        state showhealing_playerhp
        ifvarvarg TEMPVAR4 TEMPVAR5 setvarvar TEMPVAR4 TEMPVAR5
        setactorvar[tempvehicleid].ENEMYHP TEMPVAR4
        setvar VEHICLEHPDAMAGED? -1

        state checkextralargemedikits addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^15BOUGHT %d EXTRA-LARGE MEDKITS [VEHICLE]: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^15BOUGHT AN EXTRA-LARGE MEDKIT [VEHICLE]: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^15BOUGHT %d EXTRA-LARGE MEDKITS [VEHICLE]: +%ld HP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^15BOUGHT AN EXTRA-LARGE MEDKIT [VEHICLE]: +%ld HP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
ends

state buyforinventory_swbigmedikit
        stopsound MENU_ERROR
        stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d EXTRA-LARGE MEDKITS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A EXTRA-LARGE MEDKIT [TO INVENTORY]
        }
        state checkextralargemedikits addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
 	  setvarvar fta fta_normal setvar ftq 341
ends

// Atomic Health

state buyforcharacter_atom
        stopsound MENU_ERROR
        stopsound SHOP_FAIL
        state shop_buyitem
        globalsound GETATOMICHEALTH
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state gotmedsyoureallyneeded

        // TEMP4 = Maximum HP % to reach
        // tempb = becomes the % of health needed to heal to reach TEMP4 [tempb - TEMPARMOR = tempb]
        setvar tempb 2000
        setvar TEMP4 2000
        setvarvar TEMPARMOR CURRENTHITPOINTS
        mulvar TEMPARMOR 1000
        divvarvar TEMPARMOR MAXHITPOINTS
        subvarvar tempb TEMPARMOR

        setvar TEMPHEALTH 0
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setvar TEMPVAR6 10
        whilevarn TEMPVAR6 0
        {
         ifvarvarl TEMPHEALTH tempb ifvarg ACTORPICKUPAMOUNT 0
         {
          ifvare CHARACTERSELECTED? 1 setvar TEMP7 2000 else setvar TEMP7 500
          state secretrecipecheck 
          addvarvar TEMPHEALTH TEMP7

          subvar ACTORPICKUPAMOUNT 1
          addvar tempe 1
         }
         subvar TEMPVAR6 1
        }
        mulvarvar TEMPHEALTH MAXHITPOINTS
        divvar TEMPHEALTH 1000
        addvarvar CURRENTHITPOINTS TEMPHEALTH // Adds the actual heal value to the current player health

        state showhealing_playerhp
        ifvarvarg CURRENTHITPOINTS MAXHITPOINTSATOMIC setvarvar CURRENTHITPOINTS MAXHITPOINTSATOMIC
        ifvarvarg CURRENTHITPOINTS STATLIMITATOMIC setvarvar CURRENTHITPOINTS STATLIMITATOMIC
        setvar PLAYERHPDAMAGED? -1

        state checkatomichealths addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d ATOMIC HEALTHS: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^20BOUGHT AN ATOMIC HEALTH: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d ATOMIC HEALTHS: +%ld HP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^20BOUGHT AN ATOMIC HEALTH: +%ld HP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
ends

state buyforvehicle_atom
        stopsound MENU_ERROR
        stopsound SHOP_FAIL
        state shop_buyitem
        globalsound GETATOMICHEALTH
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR3        

        // TEMP4 = Maximum HP % to reach
        // tempb = becomes the % of health needed to heal to reach TEMP4 [tempb - TEMPARMOR = tempb]
        setvar tempb 2000
        setvar TEMP4 2000
        setvarvar TEMPARMOR TEMPVAR4
        mulvar TEMPARMOR 1000
        divvarvar TEMPARMOR TEMPVAR3
        subvarvar tempb TEMPARMOR

        setvar TEMPHEALTH 0
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setvar TEMPVAR6 10
        whilevarn TEMPVAR6 0
        {
         ifvarvarl TEMPHEALTH tempb ifvarg ACTORPICKUPAMOUNT 0
         {
          setvar TEMP7 500
          state secretrecipecheck 
          addvarvar TEMPHEALTH TEMP7

          subvar ACTORPICKUPAMOUNT 1
          addvar tempe 1
         }
         subvar TEMPVAR6 1
        }
        mulvarvar TEMPHEALTH TEMPVAR3
        divvar TEMPHEALTH 1000
        addvarvar TEMPVAR4 TEMPHEALTH

        state showhealing_playerhp
        ifvarvarg TEMPVAR4 TEMPVAR5 setvarvar TEMPVAR4 TEMPVAR5
        ifvarvarg TEMPVAR4 STATLIMITATOMIC setvarvar TEMPVAR4 STATLIMITATOMIC
        setactorvar[tempvehicleid].ENEMYHP TEMPVAR4
        setvar VEHICLEHPDAMAGED? -1

        state checkatomichealths addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^15BOUGHT %d ATOMIC HEALTHS [VEHICLE]: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^15BOUGHT AN ATOMIC HEALTH [VEHICLE]: +%d HP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^15BOUGHT %d ATOMIC HEALTHS [VEHICLE]: +%ld HP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^15BOUGHT AN ATOMIC HEALTH [VEHICLE]: +%ld HP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
ends

state buyforinventory_atom
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d ATOMIC HEALTHS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT AN ATOMIC HEALTH [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkatomichealths addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
    	  setvarvar fta fta_normal setvar ftq 341
ends

// Super Atom

state buyforcharacter_superatom
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        state superatomsounds
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state gotmedsyoureallyneeded

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  ifrnd 64 { ifvarl ARMORPERCENT 925 setvar ARMORPERCENT 925 }
	  else ifrnd 85 { ifvarl ARMORPERCENT 950 setvar ARMORPERCENT 950 }
	  else ifrnd 128 { ifvarl ARMORPERCENT 975 setvar ARMORPERCENT 975 }
	  else { ifvarl ARMORPERCENT 1000 setvar ARMORPERCENT 1000 }	
        ifvarvarl CURRENTHITPOINTS MAXHITPOINTSATOMIC setvar PLAYERHPDAMAGED? -1
        setvarvar CURRENTHITPOINTS MAXHITPOINTSATOMIC
        setvarvar TEMPHEALTH MAXHITPOINTSATOMIC
        state showhealing_playerhp
        ifvarvarg CURRENTHITPOINTS STATLIMITATOMIC setvarvar CURRENTHITPOINTS STATLIMITATOMIC
        ifvarvarl FIRSTAIDCURRENT MAXHITPOINTSATOMIC setvar DISPLAYFAFLASHTIMER -28
        setvarvar FIRSTAIDCURRENT MAXHITPOINTSATOMIC
        ifvarvarg FIRSTAIDCURRENT STATLIMITATOMIC setvarvar FIRSTAIDCURRENT STATLIMITATOMIC
        ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTSATOMIC setvar PLAYERAPDAMAGED? -1
        setvarvar CURRENTARMORPOINTS MAXARMORPOINTSATOMIC
        setvarvar RECEIVEDARMOR MAXARMORPOINTSATOMIC
        state showhealing_playerap
        ifvarvarg CURRENTARMORPOINTS STATLIMITATOMIC setvarvar CURRENTARMORPOINTS STATLIMITATOMIC

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checksuperatoms addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUPER ATOMS: 200% HP/AP/FA ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUPER ATOM: 200% HP/AP/FA ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUPER ATOMS: 200% HP/AP/FA
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUPER ATOM: 200% HP/AP/FA
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_superatom
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        state superatomsounds
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        getactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
	  ifrnd 64 { ifvarl TEMPVAR3 925 setvar TEMPVAR3 925 }
	  else ifrnd 85 { ifvarl TEMPVAR3 950 setvar TEMPVAR3 950 }
	  else ifrnd 128 { ifvarl TEMPVAR3 975 setvar TEMPVAR3 975 }
	  else { ifvarl TEMPVAR3 1000 setvar TEMPVAR3 1000 }	
        setactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3

        getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
        getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
        mulvar TEMPVAR5 2
        ifvarvarl TEMPVAR4 TEMPVAR5 setvar VEHICLEHPDAMAGED? -1
        setvarvar TEMPVAR4 TEMPVAR5
        setvarvar TEMPHEALTH TEMPVAR5
        state showhealing_playerhp
        ifvarvarg TEMPVAR4 STATLIMITATOMIC setvarvar TEMPVAR4 STATLIMITATOMIC
        setactorvar[tempvehicleid].ENEMYHP TEMPVAR4

        getactorvar[tempvehicleid].ENEMYFIRSTAID TEMPVAR4
        getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
        mulvar TEMPVAR5 2
        ifvarvarl TEMPVAR4 TEMPVAR5 setactorvar[PLAYERID].VDISPLAYFAFLASHTIMER -28
        setvarvar TEMPVAR4 TEMPVAR5
        ifvarvarg TEMPVAR4 STATLIMITATOMIC setvarvar TEMPVAR4 STATLIMITATOMIC
        setactorvar[tempvehicleid].ENEMYFIRSTAID TEMPVAR4

        getactorvar[tempvehicleid].ENEMYAP TEMPVAR4
        getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
        mulvar TEMPVAR5 2
        ifvarvarl TEMPVAR4 TEMPVAR5 setvar VEHICLEAPDAMAGED? -1
        setvarvar TEMPVAR4 TEMPVAR5
        setvarvar RECEIVEDARMOR TEMPVAR5
        state showhealing_playerap
        ifvarvarg TEMPVAR4 STATLIMITATOMIC setvarvar TEMPVAR4 STATLIMITATOMIC
        setactorvar[tempvehicleid].ENEMYAP TEMPVAR4

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checksuperatoms addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUPER ATOMS FOR YOUR VEHICLE: 200% HP/AP/FA ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUPER ATOM FOR YOUR VEHICLE: 200% HP/AP/FA ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUPER ATOMS FOR YOUR VEHICLE: 200% HP/AP/FA
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUPER ATOM FOR YOUR VEHICLE: 200% HP/AP/FA
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_superatom
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d SUPER ATOMS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A SUPER ATOM [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checksuperatoms addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
    	  setvarvar fta fta_normal setvar ftq 341
ends

// Body Armor

state buyforcharacter_shield
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        ifrnd 128 globalsound USE_ARMORITEM1 else globalsound USE_ARMORITEM2
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  ifrnd 64 { ifvarl ARMORPERCENT 333 setvar ARMORPERCENT 333 }
	  else ifrnd 85 { ifvarl ARMORPERCENT 500 setvar ARMORPERCENT 500 }
	  else ifrnd 128 { ifvarl ARMORPERCENT 750 setvar ARMORPERCENT 750 }
	  else { ifvarl ARMORPERCENT 900 setvar ARMORPERCENT 900 }
        setvarvar CURRENTARMORPOINTS MAXARMORPOINTS
        setvarvar RECEIVEDARMOR MAXARMORPOINTS
        state showhealing_playerap
        setvar PLAYERAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkbodyarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF BODY ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF BODY ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF BODY ARMOR
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF BODY ARMOR
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_shield
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_ARMORITEM3
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        getactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
	  ifrnd 64 { ifvarl TEMPVAR3 333 setvar TEMPVAR3 333 }
	  else ifrnd 85 { ifvarl TEMPVAR3 500 setvar TEMPVAR3 500 }
	  else ifrnd 128 { ifvarl TEMPVAR3 750 setvar TEMPVAR3 750 }
	  else { ifvarl TEMPVAR3 900 setvar TEMPVAR3 900 }
        setactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3

        setvarvar TEMPVAR4 TEMPVAR5
        setvarvar RECEIVEDARMOR TEMPVAR5
        state showhealing_playerap
        setactorvar[tempvehicleid].ENEMYAP TEMPVAR4
        setvar VEHICLEAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkbodyarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF BODY ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF BODY ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF BODY ARMOR [VEHICLE]
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF BODY ARMOR [VEHICLE]!
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_shield
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d SUITS OF BODY ARMOR [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A SUIT OF BODY ARMOR [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkbodyarmors addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
    	  setvarvar fta fta_normal setvar ftq 341
ends

// Super Armor

state buyforcharacter_supershield
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        ifrnd 128 globalsound USE_ARMORITEM1 else globalsound USE_ARMORITEM2
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  ifrnd 64 { ifvarl ARMORPERCENT 333 setvar ARMORPERCENT 333 }
	  else ifrnd 85 { ifvarl ARMORPERCENT 500 setvar ARMORPERCENT 500 }
	  else ifrnd 128 { ifvarl ARMORPERCENT 750 setvar ARMORPERCENT 750 }
	  else { ifvarl ARMORPERCENT 900 setvar ARMORPERCENT 900 }
	  setvarvar CURRENTARMORPOINTS MAXARMORPOINTSATOMIC
        setvarvar RECEIVEDARMOR MAXARMORPOINTSATOMIC
        state showhealing_playerap
        setvar PLAYERAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checksuperarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF SUPER ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF SUPER ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF SUPER ARMOR
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF SUPER ARMOR
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_supershield
        stopsound MENU_ERROR
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_ARMORITEM3
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        getactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
	  ifrnd 64 { ifvarl TEMPVAR3 333 setvar TEMPVAR3 333 }
	  else ifrnd 85 { ifvarl TEMPVAR3 500 setvar TEMPVAR3 500 }
	  else ifrnd 128 { ifvarl TEMPVAR3 750 setvar TEMPVAR3 750 }
	  else { ifvarl TEMPVAR3 900 setvar TEMPVAR3 900 }
        setactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3

        setvarvar TEMPVAR4 TEMPVAR5
        setvarvar RECEIVEDARMOR TEMPVAR5
        state showhealing_playerap
        setactorvar[tempvehicleid].ENEMYAP TEMPVAR4
        setvar VEHICLEAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checksuperarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF SUPER ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF SUPER ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF SUPER ARMOR [VEHICLE]
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF SUPER ARMOR [VEHICLE]!
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_supershield
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d SUITS OF SUPER ARMOR [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A SUIT OF SUPER ARMOR [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checksuperarmors addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
  	  setvarvar fta fta_normal setvar ftq 341
ends

// Scuba Tank

state buyforcharacter_airtank
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  setvar SCUBATIME SCUBA_AMOUNT

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkscubatanks addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d TANKS OF SCUBA GEAR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A TANK OF SCUBA GEAR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d TANKS OF SCUBA GEAR
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A TANK OF SCUBA GEAR
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_airtank
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  setactorvar[tempvehicleid].ENEMYAIRTANKAMOUNT SCUBA_AMOUNT

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkscubatanks addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d TANK OF SCUBA GEAR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A TANK OF SCUBA GEAR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d TANK OF SCUBA GEAR [VEHICLE]
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A TANK OF SCUBA GEAR [VEHICLE]
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_airtank
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d TANKS OF SCUBA GEAR [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A TANK OF SCUBA GEAR [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkscubatanks addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
    	  setvarvar fta fta_normal setvar ftq 341
ends

// Protective Boots

state buyforcharacter_boots
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  setplayer[THISACTOR].boot_amount BOOT_AMOUNT

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkbootpairs addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d PAIRS OF PROTECTIVE BOOTS ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A PAIR OF PROTECTIVE BOOTS ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d PAIRS OF PROTECTIVE BOOTS
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A PAIR OF PROTECTIVE BOOTS
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_boots
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  setactorvar[tempvehicleid].ENEMYBOOTSAMOUNT BOOT_AMOUNT

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkbootpairs addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d PAIRS OF PROTECTIVE BOOTS [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A PAIR OF PROTECTIVE BOOTS [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d PAIRS OF PROTECTIVE BOOTS [VEHICLE]
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A PAIR OF PROTECTIVE BOOTS [VEHICLE]
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_boots
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d PAIRS OF PROTECTIVE BOOTS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A PAIR OF PROTECTIVE BOOTS [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkbootpairs addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
        setvarvar fta fta_normal setvar ftq 341
ends

// Portable Medikit

state buyforcharacter_firstaid
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        ifvare CHARACTERSELECTED? 13
        {
	   setvarvar TEMPVAR MAXHITPOINTS
	   mulvarvar TEMPVAR 3
	   divvarvar TEMPVAR 2
         setvarvar FIRSTAIDCURRENT TEMPVAR
        }
        else setvarvar FIRSTAIDCURRENT MAXHITPOINTS
        setvar DISPLAYFAFLASHTIMER -28

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkportablemedikits addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d PORTABLE MEDIKITS ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A PORTABLE MEDIKIT ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d PORTABLE MEDIKITS
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A PORTABLE MEDIKIT
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_firstaid
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setactorvar[tempvehicleid].ENEMYFIRSTAID TEMPVAR5
        setactorvar[PLAYERID].VDISPLAYFAFLASHTIMER -28

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkportablemedikits addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d PORTABLE MEDIKITS [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A PORTABLE MEDIKIT [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d PORTABLE MEDIKITS [VEHICLE]
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A PORTABLE MEDIKIT [VEHICLE]
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_firstaid
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d PORTABLE MEDIKITS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A PORTABLE MEDIKIT [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkportablemedikits addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
    	  setvarvar fta fta_normal setvar ftq 341
ends

// Max HP/AP Bonus

state buyforcharacter_maxhpapup
          stopsound MENU_ERROR 
		  stopsound SHOP_FAIL
          state shop_buyitem
          globalsound STATBONUSGRAB
          addvar SHOPDOLLARSTEMP 1
          state selldisplays

          setvarvar TEMPVAR8 shopamount
          whilevarn TEMPVAR8 0
          {
           state maxhpapbonusgive
           subvar TEMPVAR8 1
          }

          ifvarg shopamount 1
          {
           redefinequote 341 ^20BOUGHT %d MAX HP/AP BONUSES
           qsprintf 341 341 shopamount
          }
          else
          {
           redefinequote 341 ^20BOUGHT A MAX HP/AP BONUS
          }
          setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_maxhpapup
          stopsound MENU_ERROR 
		  stopsound SHOP_FAIL
          state shop_buyitem
          globalsound STATBONUSGRAB
          addvar SHOPDOLLARSTEMP 1
          state selldisplays

          setvarvar TEMPVAR8 shopamount
          whilevarn TEMPVAR8 0
          {
           state maxhpapbonusgive_vehicle
           subvar TEMPVAR8 1
          }

          ifvarg shopamount 1
          {
           redefinequote 341 ^15BOUGHT %d MAX HP/AP BONUSES [VEHICLE]
           qsprintf 341 341 shopamount
          }
          else
          {
           redefinequote 341 ^15BOUGHT A MAX HP/AP BONUS [VEHICLE]
          }
          setvarvar fta fta_normal setvar ftq 341
ends

// Attack/Defense Bonus

state buyforcharacter_atkdefup
          stopsound MENU_ERROR 
		  stopsound SHOP_FAIL
          state shop_buyitem
          globalsound STATBONUSGRAB
          addvar SHOPDOLLARSTEMP 1
          state selldisplays

          setvarvar TEMPVAR8 shopamount
          whilevarn TEMPVAR8 0
          {
           state atkdefbonusgive
           subvar TEMPVAR8 1
          }

          ifvarg shopamount 1
          {
           redefinequote 341 ^20BOUGHT %d ATTACK/DEFENSE BONUSES
           qsprintf 341 341 shopamount
          }
          else
          {
           redefinequote 341 ^20BOUGHT A ATTACK/DEFENSE BONUS
          }
          setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_atkdefup
          stopsound MENU_ERROR 
		  stopsound SHOP_FAIL
          state shop_buyitem
          globalsound STATBONUSGRAB
          addvar SHOPDOLLARSTEMP 1
          state selldisplays

          setvarvar TEMPVAR8 shopamount
          whilevarn TEMPVAR8 0
          {
           state atkdefbonusgive_vehicle
           subvar TEMPVAR8 1
          }

          ifvarg shopamount 1
          {
           redefinequote 341 ^15BOUGHT %d ATTACK/DEFENSE BONUSES [VEHICLE]
           qsprintf 341 341 shopamount
          }
          else
          {
           redefinequote 341 ^15BOUGHT AN ATTACK/DEFENSE BONUS [VEHICLE]
          }
          setvarvar fta fta_normal setvar ftq 341
ends

// Green Armor [Fresh]

state buyforcharacter_greenarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        ifrnd 128 globalsound USE_ARMORITEM1 else globalsound USE_ARMORITEM2
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  ifvarl ARMORPERCENT 333 setvar ARMORPERCENT 333
        setvarvar CURRENTARMORPOINTS MAXARMORPOINTS
        setvarvar RECEIVEDARMOR MAXARMORPOINTS
        state showhealing_playerap
        setvar PLAYERAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkgreenarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF GREEN-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF GREEN-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF GREEN-CLASS ARMOR
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF GREEN-CLASS ARMOR
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_greenarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_ARMORITEM3
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        getactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
	  ifvarl TEMPVAR3 333 setvar TEMPVAR3 333
        setactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
        setvarvar TEMPVAR4 TEMPVAR5
        setvarvar RECEIVEDARMOR TEMPVAR5
        state showhealing_playerap
        setactorvar[tempvehicleid].ENEMYAP TEMPVAR4
        setvar VEHICLEAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkgreenarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF GREEN-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF GREEN-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF GREEN-CLASS ARMOR [VEHICLE]
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF GREEN-CLASS ARMOR [VEHICLE]
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_greenarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d SUITS OF GREEN-CLASS ARMOR [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A SUIT OF GREEN-CLASS ARMOR [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkgreenarmors addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
    	  setvarvar fta fta_normal setvar ftq 341
ends

// Blue Armor [Fresh]

state buyforcharacter_bluearmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        ifrnd 128 globalsound USE_ARMORITEM1 else globalsound USE_ARMORITEM2
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  ifvarl ARMORPERCENT 500 setvar ARMORPERCENT 500
        setvarvar CURRENTARMORPOINTS MAXARMORPOINTS
        setvarvar RECEIVEDARMOR MAXARMORPOINTS
        state showhealing_playerap
        setvar PLAYERAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkbluearmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF BLUE-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF BLUE-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF BLUE-CLASS ARMOR
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF BLUE-CLASS ARMOR
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_bluearmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_ARMORITEM3
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        getactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
	  ifvarl TEMPVAR3 500 setvar TEMPVAR3 500
        setactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
        setvarvar TEMPVAR4 TEMPVAR5
        setvarvar RECEIVEDARMOR TEMPVAR5
        state showhealing_playerap
        setactorvar[tempvehicleid].ENEMYAP TEMPVAR4
        setvar VEHICLEAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkbluearmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF BLUE-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF BLUE-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF BLUE-CLASS ARMOR [VEHICLE]
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF BLUE-CLASS ARMOR [VEHICLE]
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_bluearmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d SUITS OF BLUE-CLASS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A SUIT OF BLUE-CLASS [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkbluearmors addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
    	  setvarvar fta fta_normal setvar ftq 341
ends

// Yellow Armor [Fresh]

state buyforcharacter_yellowarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        ifrnd 128 globalsound USE_ARMORITEM1 else globalsound USE_ARMORITEM2
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  ifvarl ARMORPERCENT 750 setvar ARMORPERCENT 750
        setvarvar CURRENTARMORPOINTS MAXARMORPOINTS
        setvarvar RECEIVEDARMOR MAXARMORPOINTS
        state showhealing_playerap
        setvar PLAYERAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkyellowarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF YELLOW-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF YELLOW-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF YELLOW-CLASS ARMOR
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF YELLOW-CLASS ARMOR
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_yellowarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_ARMORITEM3
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        getactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
	  ifvarl TEMPVAR3 750 setvar TEMPVAR3 750
        setactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
        setvarvar TEMPVAR4 TEMPVAR5
        setvarvar RECEIVEDARMOR TEMPVAR5
        state showhealing_playerap
        setactorvar[tempvehicleid].ENEMYAP TEMPVAR4
        setvar VEHICLEAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkyellowarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF YELLOW-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF YELLOW-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF YELLOW-CLASS ARMOR [VEHICLE]
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF YELLOW-CLASS ARMOR [VEHICLE]
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_yellowarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d SUITS OF YELLOW-CLASS ARMOR [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A SUIT OF YELLOW-CLASS ARMOR [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkyellowarmors addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
    	  setvarvar fta fta_normal setvar ftq 341
ends

// Red Armor [Fresh]

state buyforcharacter_redarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        ifrnd 128 globalsound USE_ARMORITEM1 else globalsound USE_ARMORITEM2
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  ifvarl ARMORPERCENT 900 setvar ARMORPERCENT 900
        setvarvar CURRENTARMORPOINTS MAXARMORPOINTS
        setvarvar RECEIVEDARMOR MAXARMORPOINTS
        state showhealing_playerap
        setvar PLAYERAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkredarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF RED-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF RED-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF RED-CLASS ARMOR
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF RED-CLASS ARMOR
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_redarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_ARMORITEM3
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        getactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
	  ifvarl TEMPVAR3 900 setvar TEMPVAR3 900
        setactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
        setvarvar TEMPVAR4 TEMPVAR5
        setvarvar RECEIVEDARMOR TEMPVAR5
        state showhealing_playerap
        setactorvar[tempvehicleid].ENEMYAP TEMPVAR4
        setvar VEHICLEAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkredarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF RED-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF RED-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF RED-CLASS ARMOR [VEHICLE]
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF RED-CLASS ARMOR [VEHICLE]
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_redarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d SUITS OF RED-CLASS ARMOR [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A SUIT OF RED-CLASS ARMOR [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkredarmors addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
    	  setvarvar fta fta_normal setvar ftq 341
ends

// Grey Armor [Fresh]

state buyforcharacter_greyarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        ifrnd 128 globalsound USE_ARMORITEM1 else globalsound USE_ARMORITEM2
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        randvar TEMPVAR4 99
        addvar TEMPVAR4 900
	  ifvarvarl ARMORPERCENT TEMPVAR4 setvarvar ARMORPERCENT TEMPVAR4
        setvarvar CURRENTARMORPOINTS MAXARMORPOINTS
        setvarvar RECEIVEDARMOR MAXARMORPOINTS
        state showhealing_playerap
        setvar PLAYERAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkgreyarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF GREY-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF GREY-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF GREY-CLASS ARMOR
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF GREY-CLASS ARMOR
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_greyarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_ARMORITEM3
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        getactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
        randvar TEMPVAR4 99
        addvar TEMPVAR4 900
	  ifvarvarl ARMORPERCENT TEMPVAR4 setvarvar ARMORPERCENT TEMPVAR4
        setactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
        setvarvar TEMPVAR4 TEMPVAR5
        setvarvar RECEIVEDARMOR TEMPVAR5
        state showhealing_playerap
        setactorvar[tempvehicleid].ENEMYAP TEMPVAR4
        setvar VEHICLEAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkgreyarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF GREY-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF GREY-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF GREY-CLASS ARMOR [VEHICLE]
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF GREY-CLASS ARMOR [VEHICLE]
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_greyarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d SUITS OF GREY-CLASS ARMOR [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A SUIT OF GREY-CLASS ARMOR [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkgreyarmors addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
    	  setvarvar fta fta_normal setvar ftq 341
ends

// White Armor [Fresh]

state buyforcharacter_whitearmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        ifrnd 128 globalsound USE_ARMORITEM1 else globalsound USE_ARMORITEM2
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  ifvarl ARMORPERCENT 1000 setvar ARMORPERCENT 1000
        setvarvar CURRENTARMORPOINTS MAXARMORPOINTS
        setvarvar RECEIVEDARMOR MAXARMORPOINTS
        state showhealing_playerap
        setvar PLAYERAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkwhitearmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF WHITE-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF WHITE-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF WHITE-CLASS ARMOR
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF WHITE-CLASS ARMOR
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_whitearmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_ARMORITEM3
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        getactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
	  ifvarl TEMPVAR3 1000 setvar TEMPVAR3 1000
        setactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
        setvarvar TEMPVAR4 TEMPVAR5
        setvarvar RECEIVEDARMOR TEMPVAR5
        state showhealing_playerap
        setactorvar[tempvehicleid].ENEMYAP TEMPVAR4
        setvar VEHICLEAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkgreyarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF WHITE-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF WHITE-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF WHITE-CLASS ARMOR [VEHICLE]
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF WHITE-CLASS ARMOR [VEHICLE]
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_whitearmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d SUITS OF WHITE-CLASS ARMOR [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A SUIT OF WHITE-CLASS ARMOR [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkwhitearmors addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
    	  setvarvar fta fta_normal setvar ftq 341
ends

// Random Armor [Fresh]

state buyforcharacter_randomarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        ifrnd 128 globalsound USE_ARMORITEM1 else globalsound USE_ARMORITEM2
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        randvar TEMPVAR4 900
        addvar TEMPVAR4 100
        ifvarl ARMORPERCENT 100 setvar ARMORPERCENT 100
	  ifvarvarl ARMORPERCENT TEMPVAR4 setvarvar ARMORPERCENT TEMPVAR4
        setvarvar CURRENTARMORPOINTS MAXARMORPOINTS
        setvarvar RECEIVEDARMOR MAXARMORPOINTS
        state showhealing_playerap
        setvar PLAYERAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkrandomarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF RANDOM-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF RANDOM-CLASS ARMOR ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d SUITS OF RANDOM-CLASS ARMOR
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SUIT OF RANDOM-CLASS ARMOR
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforvehicle_randomarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound USE_ARMORITEM3
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        getactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
        randvar TEMPVAR4 900
        addvar TEMPVAR4 100
        ifvarl ARMORPERCENT 100 setvar ARMORPERCENT 100
	  ifvarvarl ARMORPERCENT TEMPVAR4 setvarvar ARMORPERCENT TEMPVAR4
        setactorvar[tempvehicleid].ENEMYARMORPERCENT TEMPVAR3
        setvarvar TEMPVAR4 TEMPVAR5
        setvarvar RECEIVEDARMOR TEMPVAR5
        state showhealing_playerap
        setactorvar[tempvehicleid].ENEMYAP TEMPVAR4
        setvar VEHICLEAPDAMAGED? -1

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkgreyarmors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF RANDOM-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF RANDOM-CLASS ARMOR [VEHICLE] ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^15BOUGHT %d SUITS OF RANDOM-CLASS ARMOR [VEHICLE]
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^15BOUGHT A SUIT OF RANDOM-CLASS ARMOR [VEHICLE]
         }
        }
        setvarvar fta fta_normal setvar ftq 341
ends

state buyforinventory_randomarmor
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d SUITS OF RANDOM-CLASS ARMOR [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A SUIT OF RANDOM-CLASS ARMOR [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkrandomarmors addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
    	  setvarvar fta fta_normal setvar ftq 341
ends

//

state shop_selection
ifvare com_pause 0
{
 // Sounds
 stopsound MENU_SELECTED 
 stopsound MENU_ENTER 
 stopsound MENU_EXIT

  // Menus
  ifvare shop_id 0
  {
//******************
//***Buying Items***
//******************
   ifvare shopmode 0 // Buying Items
   {
    ifvare shoppage 0
    {
     ifvare shopselection 0 
     {
      setvar shopitemid 0 
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        ifvarvarl CURRENTHITPOINTS MAXHITPOINTS
         state buyforcharacter_cola
        else
         state buyforinventory_cola
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         ifvarvarl CURRENTHITPOINTS MAXHITPOINTS
          state buyforcharacter_cola
         else
          state buyforinventory_cola
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5
          state buyforvehicle_cola
         else
          state buyforinventory_cola
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         ifvarvarl CURRENTHITPOINTS MAXHITPOINTS state buyforcharacter_cola
         else
         {
          getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
          getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
          ifvarvarl TEMPVAR4 TEMPVAR5
           state buyforvehicle_cola
          else
           state buyforinventory_cola
         }
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5 state buyforvehicle_cola
         else
         {
          ifvarvarl CURRENTHITPOINTS MAXHITPOINTS
           state buyforcharacter_cola
          else
           state buyforinventory_cola
         }
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 1
     {
      setvar shopitemid 1
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        ifvarvarl CURRENTHITPOINTS MAXHITPOINTS
         state buyforcharacter_swmedikit
        else
         state buyforinventory_swmedikit
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         ifvarvarl CURRENTHITPOINTS MAXHITPOINTS
          state buyforcharacter_swmedikit
         else
          state buyforinventory_swmedikit
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5
          state buyforvehicle_swmedikit
         else
          state buyforinventory_swmedikit
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         ifvarvarl CURRENTHITPOINTS MAXHITPOINTS state buyforcharacter_swmedikit
         else
         {
          getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
          getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
          ifvarvarl TEMPVAR4 TEMPVAR5
           state buyforvehicle_swmedikit
          else
           state buyforinventory_swmedikit
         }
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5 state buyforvehicle_swmedikit
         else
         {
          ifvarvarl CURRENTHITPOINTS MAXHITPOINTS
           state buyforcharacter_swmedikit
          else
           state buyforinventory_swmedikit
         }
        }
       }
      }
      else
      {
       stopsound MONEYSOUND
       sound MENU_ERROR
       redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
	 setvarvar fta fta_normal setvar ftq 341
      }
     }
     else
     ifvare shopselection 2
     {
      setvar shopitemid 2
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        ifvarvarl CURRENTHITPOINTS MAXHITPOINTS
         state buyforcharacter_sixpak
        else
         state buyforinventory_sixpak
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         ifvarvarl CURRENTHITPOINTS MAXHITPOINTS
          state buyforcharacter_sixpak
         else
          state buyforinventory_sixpak
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5
          state buyforvehicle_sixpak
         else
          state buyforinventory_sixpak
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         ifvarvarl CURRENTHITPOINTS MAXHITPOINTS state buyforcharacter_sixpak
         else
         {
          getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
          getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
          ifvarvarl TEMPVAR4 TEMPVAR5
           state buyforvehicle_sixpak
          else
           state buyforinventory_sixpak
         }
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5 state buyforvehicle_sixpak
         else
         {
          ifvarvarl CURRENTHITPOINTS MAXHITPOINTS
           state buyforcharacter_sixpak
          else
           state buyforinventory_sixpak
         }
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 3
     {
      setvar shopitemid 3
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        ifvarvarl CURRENTHITPOINTS MAXHITPOINTS
         state buyforcharacter_swbigmedikit
        else
         state buyforinventory_swbigmedikit
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         ifvarvarl CURRENTHITPOINTS MAXHITPOINTS
          state buyforcharacter_swbigmedikit
         else
          state buyforinventory_swbigmedikit
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5
          state buyforvehicle_swbigmedikit
         else
          state buyforinventory_swbigmedikit
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         ifvarvarl CURRENTHITPOINTS MAXHITPOINTS state buyforcharacter_swbigmedikit
         else
         {
          getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
          getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
          ifvarvarl TEMPVAR4 TEMPVAR5
           state buyforvehicle_swbigmedikit
          else
           state buyforinventory_swbigmedikit
         }
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5 state buyforvehicle_swbigmedikit
         else
         {
          ifvarvarl CURRENTHITPOINTS MAXHITPOINTS
           state buyforcharacter_swbigmedikit
          else
           state buyforinventory_swbigmedikit
         }
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 4
     {
      setvar shopitemid 4
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        ifvarvarl CURRENTHITPOINTS MAXHITPOINTSATOMIC
         state buyforcharacter_atom
        else
         state buyforinventory_atom
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         ifvarvarl CURRENTHITPOINTS MAXHITPOINTSATOMIC
          state buyforcharacter_atom
         else
          state buyforinventory_atom
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
         mulvar TEMPVAR5 2
         ifvarvarl TEMPVAR4 TEMPVAR5
          state buyforvehicle_atom
         else
          state buyforinventory_atom
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         ifvarvarl CURRENTHITPOINTS MAXHITPOINTSATOMIC state buyforcharacter_atom
         else
         {
          getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
          getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
          mulvar TEMPVAR5 2
          ifvarvarl TEMPVAR4 TEMPVAR5
           state buyforvehicle_atom
          else
           state buyforinventory_atom
         }
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         getactorvar[tempvehicleid].ENEMYHP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
         mulvar TEMPVAR5 2
         ifvarvarl TEMPVAR4 TEMPVAR5 state buyforvehicle_atom
         else
         {
          ifvarvarl CURRENTHITPOINTS MAXHITPOINTSATOMIC
           state buyforcharacter_atom
          else
           state buyforinventory_atom
         }
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 5
     {
      setvar shopitemid 5
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        setvar TEMP3 0
        state superatom_checkstatsplayer
        ifvarg TEMP3 0
         state buyforcharacter_superatom
        else
         state buyforinventory_superatom
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         setvar TEMP3 0
         state superatom_checkstatsplayer
         ifvarg TEMP3 0
          state buyforcharacter_superatom
         else
          state buyforinventory_superatom
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         setvar TEMP3 0
         state superatom_checkstatsvehicle
         ifvarg TEMP3 0
          state buyforvehicle_superatom
         else
          state buyforinventory_superatom
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         setvar TEMP3 0
         state superatom_checkstatsplayer
         ifvarg TEMP3 0 state buyforcharacter_superatom
         else
         {
          setvar TEMP3 0
          state superatom_checkstatsvehicle
          ifvarg TEMP3 0
           state buyforvehicle_superatom
          else
           state buyforinventory_superatom
         }
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         setvar TEMP3 0
         state superatom_checkstatsvehicle
         ifvarg TEMP3 0 state buyforvehicle_superatom
         else
         {
          setvar TEMP3 0
          state superatom_checkstatsplayer
          ifvarg TEMP3 0
           state buyforcharacter_superatom
          else
           state buyforinventory_superatom
         }
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 6
     {
      setvar shopitemid 6
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTS
         state buyforcharacter_shield
        else
         state buyforinventory_shield
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTS
          state buyforcharacter_shield
         else
          state buyforinventory_shield
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         getactorvar[tempvehicleid].ENEMYAP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5
          state buyforvehicle_shield
         else
          state buyforinventory_shield
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTS state buyforcharacter_shield
         else
         {
          getactorvar[tempvehicleid].ENEMYAP TEMPVAR4
          getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
          ifvarvarl TEMPVAR4 TEMPVAR5
           state buyforvehicle_shield
          else
           state buyforinventory_shield
         }
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         getactorvar[tempvehicleid].ENEMYAP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5 state buyforvehicle_shield
         else
         {
          ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTS
           state buyforcharacter_shield
          else
           state buyforinventory_shield
         }
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 7
     {
      setvar shopitemid 7
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTSATOMIC
         state buyforcharacter_supershield
        else
         state buyforinventory_supershield
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTSATOMIC
          state buyforcharacter_supershield
         else
          state buyforinventory_supershield
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         getactorvar[tempvehicleid].ENEMYAP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
         mulvar TEMPVAR5 2
         ifvarvarl TEMPVAR4 TEMPVAR5
          state buyforvehicle_supershield
         else
          state buyforinventory_supershield
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTSATOMIC state buyforcharacter_supershield
         else
         {
          getactorvar[tempvehicleid].ENEMYAP TEMPVAR4
          getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
          mulvar TEMPVAR5 2
          ifvarvarl TEMPVAR4 TEMPVAR5
           state buyforvehicle_supershield
          else
           state buyforinventory_supershield
         }
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         getactorvar[tempvehicleid].ENEMYAP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
         mulvar TEMPVAR5 2
         ifvarvarl TEMPVAR4 TEMPVAR5 state buyforvehicle_supershield
         else
         {
          ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTSATOMIC
           state buyforcharacter_supershield
          else
           state buyforinventory_supershield
         }
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 8
     {
      setvar shopitemid 8
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       ifvarl STEROIDSTIME STEROID_AMOUNT
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setvar STEROIDSTIME STEROID_AMOUNT
	  setplayer[THISACTOR].steroids_amount 400

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkvitaminxs addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d BOTTLES OF VITAMIN X ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A BOTTLE OF VITAMIN X ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d BOTTLES OF VITAMIN X
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A BOTTLE OF VITAMIN X
         }
        }
        setvarvar fta fta_normal setvar ftq 341
       }
       else
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d BOTTLES OF VITAMIN X [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A BOTTLE OF VITAMIN X [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkvitaminxs addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
  	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 9
     {
      setvar shopitemid 9
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       ifvarn CHARACTERSELECTED? 4
       {
        ifvarl NIGHTVISIONTIME HEAT_AMOUNT
        {
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         addvar SHOPDOLLARSTEMP 1
         state selldisplays

         setvarvar ACTORPICKUPAMOUNT shopamount
         setvar tempe 0

   	   setplayer[THISACTOR].heat_amount HEAT_AMOUNT

         subvar ACTORPICKUPAMOUNT 1
         addvar tempe 1

         state checkheatsensors addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

         ifvarg ACTORPICKUPAMOUNT 0
         {
          globalsound DUKE_GET
          globalsound FOUND_INVENTORY
          ifvarg tempe 1
          {
           redefinequote 341 ^20BOUGHT %d PAIRS OF NIGHT-VISION GOGGLES ^14[+%d TO INVENTORY!]
           qsprintf 341 341 tempe ACTORPICKUPAMOUNT
          }
          else
          {
           redefinequote 341 ^20BOUGHT A PAIR OF NIGHT-VISION GOGGLES ^14[+%d TO INVENTORY!]
           qsprintf 341 341 ACTORPICKUPAMOUNT
          }
         }
         else
         {
          ifvarg tempe 1
          {
           redefinequote 341 ^20BOUGHT %d PAIRS OF NIGHT-VISION GOGGLES
           qsprintf 341 341 tempe 
          }
          else
          {
           redefinequote 341 ^20BOUGHT A PAIR OF NIGHT-VISION GOGGLES
          }
         }
         setvarvar fta fta_normal setvar ftq 341
        }
        else
        {
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg shopamount 1
         {
          redefinequote 341 ^14BOUGHT %d PAIRS OF NIGHT-VISION GOGGLES [TO INVENTORY]
          qsprintf 341 341 shopamount
         }
         else
         {
          redefinequote 341 ^14BOUGHT A PAIR OF NIGHT-VISION GOGGLES [TO INVENTORY]
         }
         addvar SHOPDOLLARSTEMP 1
         state selldisplays
         state checkheatsensors addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d PAIRS OF NIGHT-VISION GOGGLES [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A PAIR OF NIGHT-VISION GOGGLES [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkheatsensors addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
        setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 10
     {
      setvar shopitemid 10
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       ifvarl HOLOFORMTIME HOLODUKE_AMOUNT
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  setplayer[THISACTOR].holoduke_amount HOLODUKE_AMOUNT

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkholoforms addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          ifvare CHARACTERSELECTED? 1 redefinequote 341 ^20BOUGHT %d HOLODUKES ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 2 redefinequote 341 ^20BOUGHT %d HOLOJACKS ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 3 redefinequote 341 ^20BOUGHT %d HOLOBUBSYS ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 4 redefinequote 341 ^20BOUGHT %d HOLOAMIS ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 5 redefinequote 341 ^20BOUGHT %d HOLOHIGAS ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 6 redefinequote 341 ^20BOUGHT %d HOLOESSENCES ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 7 redefinequote 341 ^20BOUGHT %d HOLOTEDS ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 8 redefinequote 341 ^20BOUGHT %d HOLOLISAS ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 9 redefinequote 341 ^20BOUGHT %d HOLOCYBANISES ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 10 redefinequote 341 ^20BOUGHT %d HOLONETHRAS ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 11 redefinequote 341 ^20BOUGHT %d HOLOPAULAS ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 12 redefinequote 341 ^20BOUGHT %d HOLOLORIS ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 13 redefinequote 341 ^20BOUGHT %d HOLOMINAKOS ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 14 redefinequote 341 ^20BOUGHT %d HOLO???????S ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          ifvare CHARACTERSELECTED? 1 redefinequote 341 ^20BOUGHT A HOLODUKE ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 2 redefinequote 341 ^20BOUGHT A HOLOJACK ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 3 redefinequote 341 ^20BOUGHT A HOLOBUBSY ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 4 redefinequote 341 ^20BOUGHT A HOLOAMI ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 5 redefinequote 341 ^20BOUGHT A HOLOHIGA ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 6 redefinequote 341 ^20BOUGHT A HOLOESSENCE ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 7 redefinequote 341 ^20BOUGHT A HOLOTED ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 8 redefinequote 341 ^20BOUGHT A HOLOLISA ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 9 redefinequote 341 ^20BOUGHT A HOLOCYBANIS ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 10 redefinequote 341 ^20BOUGHT A HOLONETHRA ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 11 redefinequote 341 ^20BOUGHT A HOLOPAULA ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 12 redefinequote 341 ^20BOUGHT A HOLOLORI ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 13 redefinequote 341 ^20BOUGHT A HOLOMINAKO ^14[+%d TO INVENTORY!]
          ifvare CHARACTERSELECTED? 14 redefinequote 341 ^20BOUGHT A HOLO??????? ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          ifvare CHARACTERSELECTED? 1 redefinequote 341 ^20BOUGHT %d HOLODUKES
          ifvare CHARACTERSELECTED? 2 redefinequote 341 ^20BOUGHT %d HOLOJACKS
          ifvare CHARACTERSELECTED? 3 redefinequote 341 ^20BOUGHT %d HOLOBUBSYS
          ifvare CHARACTERSELECTED? 4 redefinequote 341 ^20BOUGHT %d HOLOAMIS
          ifvare CHARACTERSELECTED? 5 redefinequote 341 ^20BOUGHT %d HOLOHIGAS
          ifvare CHARACTERSELECTED? 6 redefinequote 341 ^20BOUGHT %d HOLOESSENCES
          ifvare CHARACTERSELECTED? 7 redefinequote 341 ^20BOUGHT %d HOLOTEDS
          ifvare CHARACTERSELECTED? 8 redefinequote 341 ^20BOUGHT %d HOLOLISAS
          ifvare CHARACTERSELECTED? 9 redefinequote 341 ^20BOUGHT %d HOLOCYBANISES
          ifvare CHARACTERSELECTED? 10 redefinequote 341 ^20BOUGHT %d HOLONETHRAS
          ifvare CHARACTERSELECTED? 11 redefinequote 341 ^20BOUGHT %d HOLOPAULAS
          ifvare CHARACTERSELECTED? 12 redefinequote 341 ^20BOUGHT %d HOLOLORIS
          ifvare CHARACTERSELECTED? 13 redefinequote 341 ^20BOUGHT %d HOLOMINAKOS
          ifvare CHARACTERSELECTED? 14 redefinequote 341 ^20BOUGHT %d HOLO???????S
          qsprintf 341 341 tempe 
         }
         else
         {
          ifvare CHARACTERSELECTED? 1 redefinequote 341 ^20BOUGHT A HOLODUKE
          ifvare CHARACTERSELECTED? 2 redefinequote 341 ^20BOUGHT A HOLOJACK
          ifvare CHARACTERSELECTED? 3 redefinequote 341 ^20BOUGHT A HOLOBUBSY
          ifvare CHARACTERSELECTED? 4 redefinequote 341 ^20BOUGHT A HOLOAMI
          ifvare CHARACTERSELECTED? 5 redefinequote 341 ^20BOUGHT A HOLOHIGA
          ifvare CHARACTERSELECTED? 6 redefinequote 341 ^20BOUGHT A HOLOESSENCE
          ifvare CHARACTERSELECTED? 7 redefinequote 341 ^20BOUGHT A HOLOTED
          ifvare CHARACTERSELECTED? 8 redefinequote 341 ^20BOUGHT A HOLOLISA
          ifvare CHARACTERSELECTED? 9 redefinequote 341 ^20BOUGHT A HOLOCYBANIS
          ifvare CHARACTERSELECTED? 10 redefinequote 341 ^20BOUGHT A HOLONETHRA
          ifvare CHARACTERSELECTED? 11 redefinequote 341 ^20BOUGHT A HOLOPAULA
          ifvare CHARACTERSELECTED? 12 redefinequote 341 ^20BOUGHT A HOLOLORI
          ifvare CHARACTERSELECTED? 13 redefinequote 341 ^20BOUGHT A HOLOMINAKO
          ifvare CHARACTERSELECTED? 14 redefinequote 341 ^20BOUGHT A HOLO???????
         }
        }
        setvarvar fta fta_normal setvar ftq 341
       }
       else
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d HOLOFORMS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A HOLOFORM [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkholoforms addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
        setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 11
     {
      setvar shopitemid 11
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       ifvarl JETPACKTIME JETPACK_AMOUNT
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

	  setplayer[THISACTOR].jetpack_amount JETPACK_AMOUNT

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkjetpacks addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d JETPACKS ^14[+%d TO INVENTORY!]
          qsprintf 341 341 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 341 ^20BOUGHT A JETPACK ^14[+%d TO INVENTORY!]
          qsprintf 341 341 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 341 ^20BOUGHT %d JETPACKS
          qsprintf 341 341 tempe 
         }
         else
         {
          redefinequote 341 ^20BOUGHT A JETPACK
         }
        }
        setvarvar fta fta_normal setvar ftq 341
       }
       else
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d JETPACKS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A JETPACK [TO INVENTORY]
        }
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
        state checkjetpacks addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
        setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 12
     {
      setvar shopitemid 12
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        ifvarl SCUBATIME SCUBA_AMOUNT
         state buyforcharacter_airtank
        else
         state buyforinventory_airtank
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         ifvarl SCUBATIME SCUBA_AMOUNT
          state buyforcharacter_airtank
         else
          state buyforinventory_airtank
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         getactorvar[tempvehicleid].ENEMYAIRTANKAMOUNT TEMPVAR4
         ifvarl TEMPVAR4 SCUBA_AMOUNT
          state buyforvehicle_airtank
         else
          state buyforinventory_airtank
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         ifvarl SCUBATIME SCUBA_AMOUNT  state buyforcharacter_airtank
         else
         {
          getactorvar[tempvehicleid].ENEMYAIRTANKAMOUNT TEMPVAR4
          ifvarl TEMPVAR4 SCUBA_AMOUNT
           state buyforvehicle_airtank
          else
           state buyforinventory_airtank
         }
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         getactorvar[tempvehicleid].ENEMYAIRTANKAMOUNT TEMPVAR4
         ifvarl TEMPVAR4 SCUBA_AMOUNT state buyforvehicle_airtank
         else
         {
          ifvarl SCUBATIME SCUBA_AMOUNT
           state buyforcharacter_airtank
          else
           state buyforinventory_airtank
         }
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 13
     {
      setvar shopitemid 13
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        ifvarl BOOTSTIME BOOT_AMOUNT
         state buyforcharacter_boots
        else
         state buyforinventory_boots
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         ifvarl BOOTSTIME BOOT_AMOUNT
          state buyforcharacter_boots
         else
          state buyforinventory_boots
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         getactorvar[tempvehicleid].ENEMYBOOTSAMOUNT TEMPVAR4
         ifvarl TEMPVAR4 BOOT_AMOUNT
          state buyforvehicle_boots
         else
          state buyforinventory_boots
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         ifvarl BOOTSTIME BOOT_AMOUNT state buyforcharacter_boots
         else
         {
          getactorvar[tempvehicleid].ENEMYBOOTSAMOUNT TEMPVAR4
          ifvarl TEMPVAR4 BOOT_AMOUNT
           state buyforvehicle_boots
          else
           state buyforinventory_boots
         }
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         getactorvar[tempvehicleid].ENEMYBOOTSAMOUNT TEMPVAR4
         ifvarl TEMPVAR4 BOOT_AMOUNT state buyforvehicle_boots
         else
         {
          ifvarl BOOTSTIME BOOT_AMOUNT
           state buyforcharacter_boots
          else
           state buyforinventory_boots
         }
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 14
     {
      setvar shopitemid 14
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        ifvarvarl FIRSTAIDCURRENT MAXHITPOINTS
         state buyforcharacter_firstaid
        else
         state buyforinventory_firstaid
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         ifvarvarl FIRSTAIDCURRENT MAXHITPOINTS
          state buyforcharacter_firstaid
         else
          state buyforinventory_firstaid
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         getactorvar[tempvehicleid].ENEMYFIRSTAID TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5
          state buyforvehicle_firstaid
         else
          state buyforinventory_firstaid
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         ifvarvarl FIRSTAIDCURRENT MAXHITPOINTS state buyforcharacter_firstaid
         else
         {
          getactorvar[tempvehicleid].ENEMYFIRSTAID TEMPVAR4
          getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
          ifvarvarl TEMPVAR4 TEMPVAR5
           state buyforvehicle_firstaid
          else
           state buyforinventory_firstaid
         }
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         getactorvar[tempvehicleid].ENEMYFIRSTAID TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5 state buyforvehicle_firstaid
         else
         {
          ifvarvarl FIRSTAIDCURRENT MAXHITPOINTS
           state buyforcharacter_firstaid
          else
           state buyforinventory_firstaid
         }
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 15
     {
      setvar shopitemid 15
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound FOUND_INVENTORY
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       state checkeyedrops addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount

       ifvarg shopamount 1
       {
        redefinequote 341 ^14BOUGHT %d EYEDROPS [TO INVENTORY]
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^14BOUGHT AN EYEDROP [TO INVENTORY]
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 16
     {
      setvar shopitemid 16
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound FOUND_INVENTORY
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       state checkantidotes addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount

       ifvarg shopamount 1
       {
        redefinequote 341 ^14BOUGHT %d ANTIDOTES [TO INVENTORY]
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^14BOUGHT AN ANTIDOTE [TO INVENTORY]
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 17
     {
      setvar shopitemid 17
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound FOUND_INVENTORY
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       state checkfoghorns addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount

       ifvarg shopamount 1
       {
        redefinequote 341 ^14BOUGHT %d FOGHORNS [TO INVENTORY]
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^14BOUGHT A FOGHORN [TO INVENTORY]
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 18
     {
      setvar shopitemid 18
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound FOUND_BIGITEM
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       state checkreschalices addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount

       ifvarg shopamount 1
       {
        redefinequote 341 ^14BOUGHT %d RESURRECTION CHALICES [TO INVENTORY]
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^14BOUGHT A RESURRECTION CHALICE [TO INVENTORY]
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 19
     {
      setvar shopitemid 19
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        setvarvar TEMPVAR STATLIMIT
        subvar TEMPVAR 1
 	  ifvarvarg MAXHITPOINTS TEMPVAR 	// If Player's Maximum HP is 524288
 	  {
         setvarvar TEMPVAR STATLIMIT
         subvar TEMPVAR 1
         ifvarvarg MAXARMORPOINTS TEMPVAR // If Player's Maximum AP is 524288
         {
          stopsound MONEYSOUND
          sound MENU_ERROR
          redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
	    setvarvar fta fta_normal setvar ftq 341
         }
         else state buyforcharacter_maxhpapup
        }
        else state buyforcharacter_maxhpapup
       }        
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         setvarvar TEMPVAR STATLIMIT
         subvar TEMPVAR 1
 	   ifvarvarg MAXHITPOINTS TEMPVAR 	// If Player's Maximum HP is 524288
 	   {
          setvarvar TEMPVAR STATLIMIT
          subvar TEMPVAR 1
          ifvarvarg MAXARMORPOINTS TEMPVAR // If Player's Maximum AP is 524288
          {
           stopsound MONEYSOUND
           sound MENU_ERROR
           redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
           setvarvar fta fta_normal setvar ftq 341
          }
          else state buyforcharacter_maxhpapup
         }
         else state buyforcharacter_maxhpapup
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         setvarvar TEMPVAR STATLIMIT
         subvar TEMPVAR 1
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
 	   ifvarvarg TEMPVAR5 TEMPVAR
 	   {
          setvarvar TEMPVAR STATLIMIT
          subvar TEMPVAR 1
          getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
          ifvarvarg TEMPVAR5 TEMPVAR
          {
           stopsound MONEYSOUND
           sound MENU_ERROR
           redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
           setvarvar fta fta_normal setvar ftq 341
          }
          else state buyforvehicle_maxhpapup
         }
         else state buyforvehicle_maxhpapup
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         setvarvar TEMPVAR STATLIMIT
         subvar TEMPVAR 1
 	   ifvarvarg MAXHITPOINTS TEMPVAR 	// If Player's Maximum HP is 524288
 	   {
          setvarvar TEMPVAR STATLIMIT
          subvar TEMPVAR 1
          ifvarvarg MAXARMORPOINTS TEMPVAR // If Player's Maximum AP is 524288
          {
           setvarvar TEMPVAR STATLIMIT
           subvar TEMPVAR 1
           getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
 	     ifvarvarg TEMPVAR5 TEMPVAR
           {
            setvarvar TEMPVAR STATLIMIT
            subvar TEMPVAR 1
            getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
            ifvarvarg TEMPVAR5 TEMPVAR
            {
             stopsound MONEYSOUND
             sound MENU_ERROR
             redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
             setvarvar fta fta_normal setvar ftq 341
            }
            else state buyforvehicle_maxhpapup
           }
           else state buyforvehicle_maxhpapup
          }
          else state buyforcharacter_maxhpapup
         }
         else state buyforcharacter_maxhpapup
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         setvarvar TEMPVAR STATLIMIT
         subvar TEMPVAR 1
         getactorvar[tempvehicleid].ENEMYMAXHP TEMPVAR5
 	   ifvarvarg TEMPVAR5 TEMPVAR
 	   {
          setvarvar TEMPVAR STATLIMIT
          subvar TEMPVAR 1
          getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
          ifvarvarg TEMPVAR5 TEMPVAR
          {
           setvarvar TEMPVAR STATLIMIT
           subvar TEMPVAR 1
 	     ifvarvarg MAXHITPOINTS TEMPVAR 	// If Player's Maximum HP is 524288
 	     {
            setvarvar TEMPVAR STATLIMIT
            subvar TEMPVAR 1
            ifvarvarg MAXARMORPOINTS TEMPVAR // If Player's Maximum AP is 524288
            {
             stopsound MONEYSOUND
             sound MENU_ERROR
             redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
             setvarvar fta fta_normal setvar ftq 341
            }
            else state buyforcharacter_maxhpapup
           }
           else state buyforcharacter_maxhpapup
          }
          else state buyforvehicle_maxhpapup
         }
         else state buyforvehicle_maxhpapup
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 20
     {
      setvar shopitemid 20
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        setvarvar TEMPVAR STATLIMIT
        subvar TEMPVAR 1
        ifvarvarg PLAYERATTACK STATLIMIT
        {
         setvarvar TEMPVAR STATLIMIT
         subvar TEMPVAR 1
         ifvarvarg PLAYERDEFENSE STATLIMIT
         {
          stopsound MONEYSOUND
          sound MENU_ERROR
          redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
	    setvarvar fta fta_normal setvar ftq 341
         }
         else state buyforcharacter_atkdefup
        }
        else state buyforcharacter_atkdefup
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         setvarvar TEMPVAR STATLIMIT
         subvar TEMPVAR 1
         ifvarvarg PLAYERATTACK STATLIMIT
         {
          setvarvar TEMPVAR STATLIMIT
          subvar TEMPVAR 1
          ifvarvarg PLAYERDEFENSE STATLIMIT
          {
           stopsound MONEYSOUND
           sound MENU_ERROR
           redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
           setvarvar fta fta_normal setvar ftq 341
          }
          else state buyforcharacter_atkdefup
         }
         else state buyforcharacter_atkdefup
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         setvarvar TEMPVAR STATLIMIT
         subvar TEMPVAR 1
         getactorvar[tempvehicleid].ACTORATTACK TEMPVAR5
         ifvarvarg TEMPVAR5 STATLIMIT
         {
          setvarvar TEMPVAR STATLIMIT
          subvar TEMPVAR 1
          getactorvar[tempvehicleid].ACTORDEFENSE TEMPVAR5
          ifvarvarg TEMPVAR5 STATLIMIT
          {
           stopsound MONEYSOUND
           sound MENU_ERROR
           redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
           setvarvar fta fta_normal setvar ftq 341
          }
          else state buyforvehicle_atkdefup
         }
         else state buyforvehicle_atkdefup
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         setvarvar TEMPVAR STATLIMIT
         subvar TEMPVAR 1
         ifvarvarg PLAYERATTACK STATLIMIT
         {
          setvarvar TEMPVAR STATLIMIT
          subvar TEMPVAR 1
          ifvarvarg PLAYERDEFENSE STATLIMIT
          {
           setvarvar TEMPVAR STATLIMIT
           subvar TEMPVAR 1
           getactorvar[tempvehicleid].ACTORATTACK TEMPVAR5
           ifvarvarg TEMPVAR5 STATLIMIT
           {
            setvarvar TEMPVAR STATLIMIT
            subvar TEMPVAR 1
            getactorvar[tempvehicleid].ACTORDEFENSE TEMPVAR5
            ifvarvarg TEMPVAR5 STATLIMIT
            {
             stopsound MONEYSOUND
             sound MENU_ERROR
             redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
             setvarvar fta fta_normal setvar ftq 341
            }
            else state buyforvehicle_atkdefup
           }
           else state buyforvehicle_atkdefup
          }
          else state buyforcharacter_atkdefup
         }
         else state buyforcharacter_atkdefup
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         setvarvar TEMPVAR STATLIMIT
         subvar TEMPVAR 1
         getactorvar[tempvehicleid].ACTORATTACK TEMPVAR5
         ifvarvarg TEMPVAR5 STATLIMIT
         {
          setvarvar TEMPVAR STATLIMIT
          subvar TEMPVAR 1
          getactorvar[tempvehicleid].ACTORDEFENSE TEMPVAR5
          ifvarvarg TEMPVAR5 STATLIMIT
          {
           setvarvar TEMPVAR STATLIMIT
           subvar TEMPVAR 1
           ifvarvarg PLAYERATTACK STATLIMIT
           {
            setvarvar TEMPVAR STATLIMIT
            subvar TEMPVAR 1
            ifvarvarg PLAYERDEFENSE STATLIMIT
            {
             stopsound MONEYSOUND
             sound MENU_ERROR
             redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
             setvarvar fta fta_normal setvar ftq 341
            }
            else state buyforcharacter_atkdefup
           }
           else state buyforcharacter_atkdefup
          }
          else state buyforvehicle_atkdefup
         }
         else state buyforvehicle_atkdefup
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 21
     {
      setvar shopitemid 21
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       ifvarl CHARACTERSPEEDTRUE 61000
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound STATBONUSGRAB
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar TEMPVAR8 shopamount
        whilevarn TEMPVAR8 0
        {
         state calcspdbonus
         subvar TEMPVAR8 1
        }

        ifvarg shopamount 1
        {
         redefinequote 341 ^15BOUGHT %d SPEED BONUSES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^15BOUGHT AN SPEED BONUS
        }
        setvarvar fta fta_normal setvar ftq 341
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
    }
    ifvare shoppage 1
    {
     ifvare shopselection 0 
     {
      setvar shopitemid 0
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound STATBONUSGRAB
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       setvarvar TEMPVAR8 shopamount
       whilevarn TEMPVAR8 0
       {
        state randomammoincrease
        subvar TEMPVAR8 1
       }

       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d SMALL AMMO SATCHELS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^15BOUGHT A SMALL AMMO SATCHEL
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 1
     {
      setvar shopitemid 1
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound STATBONUSGRAB
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       setvarvar TEMPVAR8 shopamount
       whilevarn TEMPVAR8 0
       {
        state randomammoincrease
        state randomammoincrease
        state randomammoincrease
        state randomammoincrease
        subvar TEMPVAR8 1
       }

       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d LARGE AMMO SATCHELS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^15BOUGHT A LARGE AMMO SATCHEL
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 2
     {
      setvar shopitemid 2
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound DUKE_GET
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       setvar TEMPVAR7 8 mulvarvar TEMPVAR7 shopamount
       state checktelecoils addvarvar ITEMARRAYID_AMOUNTTEMP TEMPVAR7 state setitemidarrayamount
       redefinequote 341 ^20BOUGHT 8 TELEPORTER COILS
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 3
     {
      setvar shopitemid 3
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvare BUBSY? 1
      {
       state checkbubsylives
       setvarvar TEMPVAR6 ITEMARRAYID_AMOUNTTEMP addvarvar TEMPVAR6 shopamount

       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound FOUND_BIGITEM
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkbubsylives addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount

       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d EXTRA-LIFE T-SHIRTS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT AN EXTRA-LIFE T-SHIRT
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else
      {
       stopsound MONEYSOUND
       sound MENU_ERROR
       redefinequote 341 ^10NO ONE CAN USE THIS RIGHT NOW!
       setvarvar fta fta_normal setvar ftq 341
      }
     }
     else
     ifvare shopselection 4
     {
      setvar shopitemid 4
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       state checkcontinues
       setvarvar TEMPVAR6 ITEMARRAYID_AMOUNTTEMP addvarvar TEMPVAR6 shopamount

       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound DUKE_GET
       globalsound FORTUNECOOKIE1
       globalsound FOUND_BIGITEM
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkcontinues addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount

       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d CONTINUE ITEMS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A CONTINUE ITEM
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 5
     {
      setvar shopitemid 5
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       ifvare LISA? 1
       {
        ifvarvarl CURRENTCELLS MAXCELLS
        {
         setvarvar TEMPVAR5 MAXCELLS addvar TEMPVAR5 4
         setvar TEMPVAR6 5 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 CURRENTCELLS
         ifvarvarg TEMPVAR6 TEMPVAR5
         {
          stopsound MONEYSOUND
          sound MENU_ERROR
          redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
 	    setvarvar fta fta_normal setvar ftq 341
         }
         else
         {
          stopsound MENU_ERROR 
		  stopsound SHOP_FAIL
          state shop_buyitem
          globalsound FOUND_INVENTORY
          addvar SHOPDOLLARSTEMP 1
          state selldisplays
          setvarvar TEMPVAR7 5 mulvarvar TEMPVAR7 shopamount
          addvarvar CURRENTCELLS TEMPVAR7

          setvarvar TEMP5 TEMPVAR7
          mulvarvar TEMP5 ESHIELDDMGFACTOR
          ifvarn SHOWDAMAGEPLAYER 0 ifvare CHARACTERSELECTED? 8 ifvare HAVEENERGYSHIELD? 1
          {
           ifvarg TEMP5 0
           {
            setvarvar SHOWDAMAGE TEMP5
            setvar SHOWDAMAGETYPE 5
            setvarvar SHOWDAMAGEACTORID PLAYERID
            state showdamage
           }
          }

          ifvarvarg CURRENTCELLS MAXCELLS { setvarvar CURRENTCELLS MAXCELLS setvarvar DAMAGEINCELL ESHIELDDMGFACTOR }
          redefinequote 341 ^20BOUGHT %d ENERGY CELLS
          qsprintf 341 341 TEMPVAR7
          setvarvar fta fta_normal setvar ftq 341
         }
        }
        else
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU HAVE ENOUGH OF THESE RIGHT NOW!
	   setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10NO ONE CAN USE THIS RIGHT NOW!
        setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 6
     {
      setvar shopitemid 6
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       ifvare LISA? 1
       {
        ifvarvarl CURRENTCELLS MAXCELLS
 	  {
         setvarvar TEMPVAR MAXCELLS
         subvarvar TEMPVAR CURRENTCELLS
         ifvarg TEMPVAR 29
         {
          setvarvar TEMPVAR5 MAXCELLS // addvar TEMPVAR5 29
          setvar TEMPVAR6 30 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 CURRENTCELLS
          ifvarvarg TEMPVAR6 TEMPVAR5
          {
           stopsound MONEYSOUND
           sound MENU_ERROR
           redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
  	     setvarvar fta fta_normal setvar ftq 341
          }
          else
          {
           stopsound MENU_ERROR 
		   stopsound SHOP_FAIL
           state shop_buyitem
           globalsound FOUND_INVENTORY
           addvar SHOPDOLLARSTEMP 1
           state selldisplays
           setvarvar TEMPVAR7 30 mulvarvar TEMPVAR7 shopamount
           addvarvar CURRENTCELLS TEMPVAR7

           setvarvar TEMP5 TEMPVAR7
           mulvarvar TEMP5 ESHIELDDMGFACTOR
           ifvarn SHOWDAMAGEPLAYER 0 ifvare CHARACTERSELECTED? 8 ifvare HAVEENERGYSHIELD? 1
           {
            ifvarg TEMP5 0
            {
             setvarvar SHOWDAMAGE TEMP5
             setvar SHOWDAMAGETYPE 5
             setvarvar SHOWDAMAGEACTORID PLAYERID
             state showdamage
            }
           }
 
           ifvarvarg CURRENTCELLS MAXCELLS { setvarvar CURRENTCELLS MAXCELLS setvarvar DAMAGEINCELL ESHIELDDMGFACTOR }
           redefinequote 341 ^20BOUGHT %d ENERGY CELLS
           qsprintf 341 341 TEMPVAR7
           setvarvar fta fta_normal setvar ftq 341
          }
         }
         else
         {
          stopsound MONEYSOUND
          sound MENU_ERROR
          redefinequote 341 ^10BUY A LESSER DENOMINATION OF THIS ITEM!
 	    setvarvar fta fta_normal setvar ftq 341
         }
        }
        else
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU HAVE ENOUGH OF THESE RIGHT NOW!
	   setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10NO ONE CAN USE THIS RIGHT NOW!
        setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 7
     {
      setvar shopitemid 7
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       ifvare LISA? 1
       {
        ifvarvarl CURRENTCELLS MAXCELLS
 	  {
         setvarvar TEMPVAR MAXCELLS
         subvarvar TEMPVAR CURRENTCELLS
         ifvarg TEMPVAR 79
         {
          setvarvar TEMPVAR5 MAXCELLS // addvar TEMPVAR5 79
          setvar TEMPVAR6 80 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 CURRENTCELLS
          ifvarvarg TEMPVAR6 TEMPVAR5
          {
           stopsound MONEYSOUND
           sound MENU_ERROR
           redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
  	     setvarvar fta fta_normal setvar ftq 341
          }
          else
          {
           stopsound MENU_ERROR 
		   stopsound SHOP_FAIL
           state shop_buyitem
           globalsound FOUND_INVENTORY
           addvar SHOPDOLLARSTEMP 1
           state selldisplays
           setvarvar TEMPVAR7 80 mulvarvar TEMPVAR7 shopamount
           addvarvar CURRENTCELLS TEMPVAR7

           setvarvar TEMP5 TEMPVAR7
           mulvarvar TEMP5 ESHIELDDMGFACTOR
           ifvarn SHOWDAMAGEPLAYER 0 ifvare CHARACTERSELECTED? 8 ifvare HAVEENERGYSHIELD? 1
           {
            ifvarg TEMP5 0
            {
             setvarvar SHOWDAMAGE TEMP5
             setvar SHOWDAMAGETYPE 5
             setvarvar SHOWDAMAGEACTORID PLAYERID
             state showdamage
            }
           }

           ifvarvarg CURRENTCELLS MAXCELLS { setvarvar CURRENTCELLS MAXCELLS setvarvar DAMAGEINCELL ESHIELDDMGFACTOR }
           redefinequote 341 ^20BOUGHT %d ENERGY CELLS
           qsprintf 341 341 TEMPVAR7
           setvarvar fta fta_normal setvar ftq 341
          }
         }
         else
         {
          stopsound MONEYSOUND
          sound MENU_ERROR
          redefinequote 341 ^10BUY A LESSER DENOMINATION OF THIS ITEM!
          setvarvar fta fta_normal setvar ftq 341
         }
        }
        else
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU HAVE ENOUGH OF THESE RIGHT NOW!
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10NO ONE CAN USE THIS RIGHT NOW!
        setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     ifvare shopselection 8
     {
      setvar shopitemid 8
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       ifvare LISA? 1
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        ifvare HAVEENERGYSHIELD? 0
        { 
         ifvarg shopamount 1
         {
          stopsound MONEYSOUND
          sound MENU_ERROR
          redefinequote 341 ^10BUYING MORE THAN 1 OF THESE IS A WASTE OF MONEY!
          setvarvar fta fta_normal setvar ftq 341
         }
         else
         {
          setvar HAVEENERGYSHIELD? 1
          setvar TEMPVAR7 16
          mulvarvar TEMPVAR7 STARTSTATMULTI 
          divvarvar TEMPVAR7 STARTSTATDIVISOR 
          ifvarl TEMPVAR7 1 setvar TEMPVAR7 1
          addvarvar ESHIELDDMGFACTOR TEMPVAR7
          setvarvar DAMAGEINCELL ESHIELDDMGFACTOR
          redefinequote 341 ^20BOUGHT BIO-CELL ENERGY SHIELD FOR LISA!
          addvar SHOPDOLLARSTEMP 1
          state selldisplays
          setvarvar fta fta_normal setvar ftq 341
          state shop_buyitem
          globalsound YEAH
          globalsound YEAH
         }
        }
        else
        { 
         setvarvar TEMPVAR7 16
         mulvarvar TEMPVAR7 STARTSTATMULTI 
         divvarvar TEMPVAR7 STARTSTATDIVISOR 
         ifvarl TEMPVAR7 1 setvar TEMPVAR7 1
         mulvarvar TEMPVAR7 shopamount
         addvarvar ESHIELDDMGFACTOR TEMPVAR7
         setvarvar DAMAGEINCELL ESHIELDDMGFACTOR
         redefinequote 341 ^20UPGRADED LISA'S BIO-CELL ENERGY SHIELD!
         addvar SHOPDOLLARSTEMP 1
         state selldisplays
         setvarvar fta fta_normal setvar ftq 341
         state shop_buyitem
         globalsound YEAH
         globalsound YEAH
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10NO ONE CAN USE THIS RIGHT NOW!
        setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 9
     {
      setvar shopitemid 9
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound STATBONUSGRAB
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       setvarvar TEMPVAR8 shopamount
       whilevarn TEMPVAR8 0
       {
        state airtimebonus
        subvar TEMPVAR8 1
       }

       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d LUNG-TIME BONUSES
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^15BOUGHT A LUNG-TIME BONUS
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 10
     {
      setvar shopitemid 10
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound STATBONUSGRAB
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       setvarvar TEMPVAR8 shopamount
       whilevarn TEMPVAR8 0
       {
        state mantlebonus
        subvar TEMPVAR8 1
       }

       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d MANTLE-STRENGTH BONUSES
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^15BOUGHT A MANTLE-STRENGTH BONUS
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 11
     {
      setvar shopitemid 11
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound STATBONUSGRAB
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       setvarvar TEMPVAR8 shopamount
       whilevarn TEMPVAR8 0
       {
        state airjumpbonus
        subvar TEMPVAR8 1
       }

       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d AIR-JUMP BONUSES
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^15BOUGHT AN AIR-JUMP BONUS
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 12
     {
      setvar shopitemid 12
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound FOUND_INVENTORY
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       state checkafasdrops addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount

       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d AFA'S DROPS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT AN AFA'S DROP
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 13
     {
      setvar shopitemid 13
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checksunrings addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d SUN RINGS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A SUN RING
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 14
     {
      setvar shopitemid 14
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkaquarings addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d AQUA RINGS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A AQUA RING
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 15
     {
      setvar shopitemid 15
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkplasmarings addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d PLASMA RINGS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A PLASMA RING
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 16
     {
      setvar shopitemid 16
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkspiritrings addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d SPIRIT RINGS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A SPIRIT RING
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 17
     {
      setvar shopitemid 17
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkcharmankhs addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d CHARM ANKHS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A CHARM ANKH
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 18
     {
      setvar shopitemid 18
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkmirrorshields addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d MIRROR SHIELDS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A MIRROR SHIELD
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 19
     {
      setvar shopitemid 19
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkexpbadges addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d EXPERIENCE BADGES
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A EXPERIENCE BADGE
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 20
     {
      setvar shopitemid 20
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkrankbadges addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d RANK BADGES
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A RANK BADGE
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 21
     {
      setvar shopitemid 21
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkmoneybadges addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^15BOUGHT %d MONEY BADGES
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A MONEY BADGE
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
    }
    ifvare shoppage 2
    {
     ifvare shopselection 0 // Pistol Ammo
     {
      setvar shopitemid 0
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getplayer[THISACTOR].ammo_amount 1 TEMPVAR
       ifvarvarl TEMPVAR MAXPISTOL
       {
        setvarvar TEMPVAR5 MAXPISTOL addvar TEMPVAR5 11
        setvar TEMPVAR6 12 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 TEMPVAR
        ifvarvarg TEMPVAR6 TEMPVAR5
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
	   setvarvar fta fta_normal setvar ftq 341
        }
        else
        {
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         addvar SHOPDOLLARSTEMP 1
         state selldisplays

         setvar TEMPVAR7 12 mulvarvar TEMPVAR7 shopamount
         addvarvar TEMPVAR TEMPVAR7
         ifvarvarg TEMPVAR MAXPISTOL setvarvar TEMPVAR MAXPISTOL
         setplayer[THISACTOR].ammo_amount 1 TEMPVAR
         ifvarg shopamount 1
         {
          redefinequote 341 ^20BOUGHT %d PISTOL CLIPS!
          qsprintf 341 341 shopamount
         }
         else
         {
          redefinequote 341 ^20BOUGHT A PISTOL CLIP!
         }
         qsprintf 341 341 shopamount
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU HAVE ENOUGH PISTOL BULLETS!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 1 // SHOTGUN SHELLS
     {
      setvar shopitemid 1
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getplayer[THISACTOR].ammo_amount 2 TEMPVAR
       ifvarvarl TEMPVAR MAXSHOTGUN
       {
        setvarvar TEMPVAR5 MAXSHOTGUN addvar TEMPVAR5 9
        setvar TEMPVAR6 10 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 TEMPVAR
        ifvarvarg TEMPVAR6 TEMPVAR5
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
	   setvarvar fta fta_normal setvar ftq 341
        }
        else
        {
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         addvar SHOPDOLLARSTEMP 1
         state selldisplays
         setvar TEMPVAR7 10 mulvarvar TEMPVAR7 shopamount
         addvarvar TEMPVAR TEMPVAR7
         ifvarvarg TEMPVAR MAXSHOTGUN setvarvar TEMPVAR MAXSHOTGUN
         setplayer[THISACTOR].ammo_amount 2 TEMPVAR
         ifvarg shopamount 1
         {
          redefinequote 341 ^20BOUGHT %d BOXES OF SHOTGUN SHELLS!
          qsprintf 341 341 shopamount
         }
         else
         {
          redefinequote 341 ^20BOUGHT A BOX OF SHOTGUN SHELLS!
         }
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU HAVE ENOUGH SHOTGUN SHELLS!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 2 // CHAINGUN BULLETS
     {
      setvar shopitemid 2
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getplayer[THISACTOR].ammo_amount 3 TEMPVAR
       ifvarvarl TEMPVAR MAXCHAINGUN
       {
        setvarvar TEMPVAR5 MAXCHAINGUN addvar TEMPVAR5 49
        setvar TEMPVAR6 50 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 TEMPVAR
        ifvarvarg TEMPVAR6 TEMPVAR5
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
	   setvarvar fta fta_normal setvar ftq 341
        }
        else
        {
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         addvar SHOPDOLLARSTEMP 1
         state selldisplays
         setvar TEMPVAR7 50 mulvarvar TEMPVAR7 shopamount
         addvarvar TEMPVAR TEMPVAR7
         ifvarvarg TEMPVAR MAXCHAINGUN setvarvar TEMPVAR MAXCHAINGUN
         setplayer[THISACTOR].ammo_amount 3 TEMPVAR
         ifvarg shopamount 1
         {
          redefinequote 341 ^20BOUGHT %d BOXES OF CHAINGUN CANNON AMMO!
          qsprintf 341 341 shopamount
         }
         else
         {
          redefinequote 341 ^20BOUGHT A BOX OF CHAINGUN CANNON AMMO!
         }
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU HAVE ENOUGH CHAINGUN BULLETS!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 3 // RPG MISSILES
     {
      setvar shopitemid 3
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getplayer[THISACTOR].ammo_amount 4 TEMPVAR
       ifvarvarl TEMPVAR MAXRPG
       {
        setvarvar TEMPVAR5 MAXRPG addvar TEMPVAR5 4
        setvar TEMPVAR6 5 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 TEMPVAR
        ifvarvarg TEMPVAR6 TEMPVAR5
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
	   setvarvar fta fta_normal setvar ftq 341
        }
        else
        {
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         addvar SHOPDOLLARSTEMP 1
         state selldisplays
         setvar TEMPVAR7 5 mulvarvar TEMPVAR7 shopamount
         addvarvar TEMPVAR TEMPVAR7
         ifvarvarg TEMPVAR MAXRPG setvarvar TEMPVAR MAXRPG
         setplayer[THISACTOR].ammo_amount 4 TEMPVAR
         ifvarg shopamount 1
         {
          redefinequote 341 ^20BOUGHT %d BOXES OF RPG LAUNCHER AMMO!
          qsprintf 341 341 shopamount
         }
         else
         {
          redefinequote 341 ^20BOUGHT A BOX OF RPG LAUNCHER AMMO!
         }
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU HAVE ENOUGH RPG MISSILES!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 4 // Pipebomb [single]
     {
      setvar shopitemid 4
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getplayer[THISACTOR].ammo_amount 5 TEMPVAR
       ifvarvarl TEMPVAR MAXPIPEBOMB
       {
        setvarvar TEMPVAR5 MAXPIPEBOMB // addvar TEMPVAR5 4
        setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 TEMPVAR
        ifvarvarg TEMPVAR6 TEMPVAR5
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
	   setvarvar fta fta_normal setvar ftq 341
        }
        else
        {
         addweapon HANDBOMB_WEAPON 0
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         addvar SHOPDOLLARSTEMP 1
         state selldisplays
         setvar TEMPVAR7 1 mulvarvar TEMPVAR7 shopamount
         addvarvar TEMPVAR TEMPVAR7
         ifvarvarg TEMPVAR MAXPIPEBOMB setvarvar TEMPVAR MAXPIPEBOMB
         setplayer[THISACTOR].ammo_amount 5 TEMPVAR
         ifvarg shopamount 1
         {
          redefinequote 341 ^20BOUGHT %d PIPEBOMBS!
          qsprintf 341 341 shopamount
         }
         else
         {
          redefinequote 341 ^20BOUGHT A PIPEBOMB!
         }
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU HAVE ENOUGH PIPEBOMBS!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 5 // Box of Pipebombs
     {
      setvar shopitemid 5
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getplayer[THISACTOR].ammo_amount 5 TEMPVAR
       ifvarvarl TEMPVAR MAXPIPEBOMB
       {
        setvarvar TEMPVAR5 MAXPIPEBOMB // addvar TEMPVAR5 4
        setvar TEMPVAR6 5 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 TEMPVAR
        ifvarvarg TEMPVAR6 TEMPVAR5
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
	   setvarvar fta fta_normal setvar ftq 341
        }
        else
        {
         addweapon HANDBOMB_WEAPON 0
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         addvar SHOPDOLLARSTEMP 1
         state selldisplays
         setvar TEMPVAR7 5 mulvarvar TEMPVAR7 shopamount
         addvarvar TEMPVAR TEMPVAR7
         ifvarvarg TEMPVAR MAXPIPEBOMB setvarvar TEMPVAR MAXPIPEBOMB
         setplayer[THISACTOR].ammo_amount 5 TEMPVAR
         ifvarg shopamount 1
         {
          redefinequote 341 ^20BOUGHT %d BOXES OF PIPEBOMBS!
          qsprintf 341 341 shopamount
         }
         else
         {
          redefinequote 341 ^20BOUGHT A BOX OF PIPEBOMBS!
         }
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU HAVE ENOUGH PIPEBOMBS!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 6 // Shrinker Crystal
     {
      setvar shopitemid 6
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getplayer[THISACTOR].ammo_amount 6 TEMPVAR
       ifvarvarl TEMPVAR MAXSHRINKER
       {
        setvarvar TEMPVAR5 MAXSHRINKER addvar TEMPVAR5 4
        setvar TEMPVAR6 5 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 TEMPVAR
        ifvarvarg TEMPVAR6 TEMPVAR5
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
	   setvarvar fta fta_normal setvar ftq 341
        }
        else
        {
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         addvar SHOPDOLLARSTEMP 1
         state selldisplays
         setvar TEMPVAR7 5 mulvarvar TEMPVAR7 shopamount
         addvarvar TEMPVAR TEMPVAR7
         ifvarvarg TEMPVAR MAXSHRINKER setvarvar TEMPVAR MAXSHRINKER
         setplayer[THISACTOR].ammo_amount 6 TEMPVAR
         ifvarg shopamount 1
         {
          redefinequote 341 ^20BOUGHT %d SHRINKER CRYSTALS!
          qsprintf 341 341 shopamount
         }
         else
         {
          redefinequote 341 ^20BOUGHT A SHRINKER CRYSTAL!
         }
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU HAVE ENOUGH SHRINKER CRYSTALS!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 7 // Expander Antenna
     {
      setvar shopitemid 7
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getplayer[THISACTOR].ammo_amount 11 TEMPVAR
       ifvarvarl TEMPVAR MAXEXPANDER
       {
        setvarvar TEMPVAR5 MAXEXPANDER addvar TEMPVAR5 19
        setvar TEMPVAR6 20 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 TEMPVAR
        ifvarvarg TEMPVAR6 TEMPVAR5
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
	   setvarvar fta fta_normal setvar ftq 341
        }
        else
        {
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         addvar SHOPDOLLARSTEMP 1
         state selldisplays
         setvar TEMPVAR7 20 mulvarvar TEMPVAR7 shopamount
         addvarvar TEMPVAR TEMPVAR7
         ifvarvarg TEMPVAR MAXEXPANDER setvarvar TEMPVAR MAXEXPANDER
         setplayer[THISACTOR].ammo_amount 11 TEMPVAR
         ifvarg shopamount 1
         {
          redefinequote 341 ^20BOUGHT %d EXPANDER ANTENNAE!
          qsprintf 341 341 shopamount
         }
         else
         {
          redefinequote 341 ^20BOUGHT AN EXPANDER ANTENNA!
         }
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU HAVE ENOUGH EXPANDER ANTENNAE!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 8 // Devastator Missiles
     {
      setvar shopitemid 8
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getplayer[THISACTOR].ammo_amount 7 TEMPVAR
       ifvarvarl TEMPVAR MAXDEVASTATOR
       {
        setvarvar TEMPVAR5 MAXDEVASTATOR addvar TEMPVAR5 14
        setvar TEMPVAR6 15 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 TEMPVAR
        ifvarvarg TEMPVAR6 TEMPVAR5
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
	   setvarvar fta fta_normal setvar ftq 341
        }
        else
        {
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         addvar SHOPDOLLARSTEMP 1
         state selldisplays
         setvar TEMPVAR7 15 mulvarvar TEMPVAR7 shopamount
         addvarvar TEMPVAR TEMPVAR7
         ifvarvarg TEMPVAR MAXDEVASTATOR setvarvar TEMPVAR MAXDEVASTATOR
         setplayer[THISACTOR].ammo_amount 7 TEMPVAR
         ifvarg shopamount 1
         {
          redefinequote 341 ^20BOUGHT %d BOXES OF DEVASTATOR MISSILES!
          qsprintf 341 341 shopamount
         }
         else
         {
          redefinequote 341 ^20BOUGHT A BOX OF DEVASTATOR MISSILES!
         }
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU HAVE ENOUGH DEVASTATOR MISSILES!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 9 // Tripbomb [single]
     {
      setvar shopitemid 9
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getplayer[THISACTOR].ammo_amount 8 TEMPVAR
       ifvarvarl TEMPVAR MAXTRIPBOMB
       {
        setvarvar TEMPVAR5 MAXTRIPBOMB // addvar TEMPVAR5 4
        setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 TEMPVAR
        ifvarvarg TEMPVAR6 TEMPVAR5
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
	   setvarvar fta fta_normal setvar ftq 341
        }
        else
        {
         addweapon TRIPBOMB_WEAPON 0
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         addvar SHOPDOLLARSTEMP 1
         state selldisplays
         setvar TEMPVAR7 1 mulvarvar TEMPVAR7 shopamount
         addvarvar TEMPVAR TEMPVAR7
         ifvarvarg TEMPVAR MAXTRIPBOMB setvarvar TEMPVAR MAXTRIPBOMB
         setplayer[THISACTOR].ammo_amount 8 TEMPVAR
         ifvarg shopamount 1
         {
          redefinequote 341 ^20BOUGHT %d LASER TRIPBOMBS!
          qsprintf 341 341 shopamount
         }
         else
         {
          redefinequote 341 ^20BOUGHT A LASER TRIPBOMB!
         }
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU HAVE ENOUGH LASER TRIPBOMBS!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 10 // Freezethrower Pack
     {
      setvar shopitemid 10
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getplayer[THISACTOR].ammo_amount 9 TEMPVAR
       ifvarvarl TEMPVAR MAXFREEZER
       {
        setvarvar TEMPVAR5 MAXFREEZER addvar TEMPVAR5 24
        setvar TEMPVAR6 25 mulvarvar TEMPVAR6 shopamount addvarvar TEMPVAR6 TEMPVAR
        ifvarvarg TEMPVAR6 TEMPVAR5
        {
         stopsound MONEYSOUND
         sound MENU_ERROR
         redefinequote 341 ^10YOU ARE TRYING TO BUY TOO MUCH OF THIS ITEM!
	   setvarvar fta fta_normal setvar ftq 341
        }
        else
        {
         stopsound MENU_ERROR 
		 stopsound SHOP_FAIL
         state shop_buyitem
         globalsound DUKE_GET
         addvar SHOPDOLLARSTEMP 1
         state selldisplays
         setvar TEMPVAR7 25 mulvarvar TEMPVAR7 shopamount
         addvarvar TEMPVAR TEMPVAR7
         ifvarvarg TEMPVAR MAXFREEZER setvarvar TEMPVAR MAXFREEZER
         setplayer[THISACTOR].ammo_amount 9 TEMPVAR
         ifvarg shopamount 1
         {
          redefinequote 341 ^20BOUGHT %d FREEZETHROWER PACKS!
          qsprintf 341 341 shopamount
         }
         else
         {
          redefinequote 341 ^20BOUGHT A FREEZETHROWER PACK!
         }
         setvarvar fta fta_normal setvar ftq 341
        }
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU HAVE ENOUGH FREEZETHROWER PACKS!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 11 // Potentylene
     {
      setvar shopitemid 11
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound FOUND_INVENTORY
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       state checkfauxlevelups addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount

       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d POTENTYLENES!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A POTENTYLENE!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 12 // Riot Shield
     {
      setvar shopitemid 12
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkriotshields addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d RIOT SHIELDS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A RIOT SHIELD
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 13 // Nyx Gloves
     {
      setvar shopitemid 13
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checknyxglovepairs addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d PAIRS OF NYX GLOVES
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A PAIR OF NYX GLOVES
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 14 // Rabbit's Foot
     {
      setvar shopitemid 14
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkrabbitsfoots addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d RABBIT'S FEET
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A RABBIT'S FOOT
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 15 // Jump Boots
     {
      setvar shopitemid 15
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkjumpbootpairs addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d PAIRS OF JUMP BOOTS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A PAIR OF JUMP BOOTS
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 16 // ShockAb Boots
     {
      setvar shopitemid 16
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkshockabbootpairs addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d PAIRS OF SHOCKAB BOOTS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A PAIR OF SHOCKAB BOOTS
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 17 // Happy Shoes
     {
      setvar shopitemid 17
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkhappyshoepairs addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d PAIRS OF HAPPY SHOES
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A PAIR OF HAPPY SHOES
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 18 // Style Shoes
     {
      setvar shopitemid 18
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkstyleshoepairs addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d PAIRS OF STYLE SHOES
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A PAIR OF STYLE SHOES
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 19 // Charm Shoes
     {
      setvar shopitemid 19
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkcharmshoepairs addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d PAIRS OF CHARM SHOES
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A PAIR OF CHARM SHOES
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 20 // Power Wrist
     {
      setvar shopitemid 20
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkpowerwrists addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d POWER WRISTS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A POWER WRIST
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 21 // Small Energy Drink
     {
      setvar shopitemid 21
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       ifvarvarl CURRENTENERGYPOINTS MAXENERGYPOINTS
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        ifrnd 85 globalsound CANOPENED1
        else ifrnd 128 globalsound CANOPENED2
        else globalsound CANOPENED3
        ifrnd 128 globalsound SODAFIZZ1
        else globalsound SODAFIZZ2
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvar TEMPHEALTH 0
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0
        
        setvar TEMPVAR6 10
        whilevarn TEMPVAR6 0
        {
         ifvarvarl TEMPHEALTH MAXENERGYPOINTS ifvarg ACTORPICKUPAMOUNT 0
         {          
          setvarvar TEMPVAR7 MAXENERGYPOINTS
          mulvar TEMPVAR7 222
          divvar TEMPVAR7 1000
          addvar TEMPVAR7 75

          addvarvar TEMPHEALTH TEMPVAR7
          subvar ACTORPICKUPAMOUNT 1
          addvar tempe 1
         }
         subvar TEMPVAR6 1
        }
        addvarvar CURRENTENERGYPOINTS TEMPHEALTH 
        ifvarvarg CURRENTENERGYPOINTS MAXENERGYPOINTS setvarvar CURRENTENERGYPOINTS MAXENERGYPOINTS

        state checksmallenergydrinks addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d SMALL ENERGY DRINKS: +%ld EP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^20BOUGHT A SMALL ENERGY DRINK: +%ld EP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d SMALL ENERGY DRINKS: +%ld EP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^20BOUGHT A SMALL ENERGY DRINK: +%ld EP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
       }
       else
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d SMALL ENERGY DRINKS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A SMALL ENERGY DRINK [TO INVENTORY]
        }
        state checksmallenergydrinks addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
    	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
    }
    ifvare shoppage 3
    {
     ifvare shopselection 0 // Large Energy Drink
     {
      setvar shopitemid 0 
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       ifvarvarl CURRENTENERGYPOINTS MAXENERGYPOINTS
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        ifrnd 85 globalsound CANOPENED1
        else ifrnd 128 globalsound CANOPENED2
        else globalsound CANOPENED3
        ifrnd 128 globalsound SODAFIZZ1
        else globalsound SODAFIZZ2
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvar TEMPHEALTH 0
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0
        
        setvar TEMPVAR6 10
        whilevarn TEMPVAR6 0
        {
         ifvarvarl TEMPHEALTH MAXENERGYPOINTS ifvarg ACTORPICKUPAMOUNT 0
         {          
          setvarvar TEMPVAR7 MAXENERGYPOINTS
          mulvar TEMPVAR7 667
          divvar TEMPVAR7 1000
          addvar TEMPVAR7 225

          addvarvar TEMPHEALTH TEMPVAR7
          subvar ACTORPICKUPAMOUNT 1
          addvar tempe 1
         }
         subvar TEMPVAR6 1
        }
        addvarvar CURRENTENERGYPOINTS TEMPHEALTH 
        ifvarvarg CURRENTENERGYPOINTS MAXENERGYPOINTS setvarvar CURRENTENERGYPOINTS MAXENERGYPOINTS

        state checklargeenergydrinks addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d LARGE ENERGY DRINKS: +%ld EP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^20BOUGHT A LARGE ENERGY DRINK: +%ld EP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d LARGE ENERGY DRINKS: +%ld EP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^20BOUGHT A LARGE ENERGY DRINK: +%ld EP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
       }
       else
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d LARGE ENERGY DRINKS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A LARGE ENERGY DRINK [TO INVENTORY]
        }
        state checklargeenergydrinks addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
    	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 1 // Hyper Energy Drink
     {
      setvar shopitemid 1
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       ifvarvarl CURRENTENERGYPOINTS MAXENERGYPOINTSATOMIC
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        ifrnd 85 globalsound CANOPENED1
        else ifrnd 128 globalsound CANOPENED2
        else globalsound CANOPENED3
        ifrnd 128 globalsound SODAFIZZ1
        else globalsound SODAFIZZ2
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        setvarvar TEMPHEALTH MAXENERGYPOINTSATOMIC
        setvarvar CURRENTENERGYPOINTS MAXENERGYPOINTSATOMIC

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkhyperenergydrinks addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d HYPER ENERGY DRINKS: +%ld EP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe TEMPHEALTH ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^20BOUGHT A HYPER ENERGY DRINK: +%ld EP ^14[+%d TO INVENTORY!]
          qsprintf 342 342 TEMPHEALTH ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d HYPER ENERGY DRINKS: +%ld EP
          qsprintf 342 342 tempe TEMPHEALTH 
         }
         else
         {
          redefinequote 342 ^20BOUGHT A HYPER ENERGY DRINK: +%ld EP
          qsprintf 342 342 TEMPHEALTH 
         }
        }
        setvarvar fta fta_normal setvar ftq 342
       }
       else
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound DUKE_GET
        globalsound FOUND_INVENTORY
        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d HYPER ENERGY DRINKS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A HYPER ENERGY DRINK [TO INVENTORY]
        }
        state checkhyperenergydrinks addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
        addvar SHOPDOLLARSTEMP 1
        state selldisplays
    	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 2 // Maximum EP Bonus
     {
      setvar shopitemid 2
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       setvarvar TEMPVAR STATLIMIT
       subvar TEMPVAR 1
       ifvarvarl MAXENERGYPOINTS TEMPVAR // If Player's Maximum HP is 524288
       {
        stopsound MENU_ERROR 
		stopsound SHOP_FAIL
        state shop_buyitem
        globalsound STATBONUSGRAB
        addvar SHOPDOLLARSTEMP 1
        state selldisplays

        setvarvar TEMPVAR8 shopamount
        whilevarn TEMPVAR8 0
        {
         state calcmaxepbonus
         subvar TEMPVAR8 1
        }

        ifvarg shopamount 1
        {
         redefinequote 341 ^15BOUGHT %d MAXIMUM EP BONUSES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^15BOUGHT A MAXIMUM EP BONUS
        }
        setvarvar fta fta_normal setvar ftq 341
       }
       else
       {
        stopsound MONEYSOUND
        sound MENU_ERROR
        redefinequote 341 ^10YOU DON'T NEED TO BUY THIS ITEM!
	  setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 3 // Silk Carnation
     {
      setvar shopitemid 3
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       sound FOUND_INVENTORY
       globalsound YEAH
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checksilkcarnations addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d SILK CARNATIONS!!!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A SILK CARNATION!!!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 4 // Rare Pirate Doubloon
     {
      setvar shopitemid 4
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       sound FOUND_INVENTORY
       globalsound YEAH
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkrarepiratedoubloons addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d RARE PIRATE DOUBLOONS!!!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A RARE PIRATE DOUBLOON!!!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 5 // Pair of Fixed Dice
     {
      setvar shopitemid 5
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       sound FOUND_INVENTORY
       globalsound YEAH
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkfixeddicepairs addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d PAIRS OF FIXED DICE!!!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A PAIR OF FIXED DICE!!!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 6 // Malakian Gem
     {
      setvar shopitemid 6
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       sound FOUND_INVENTORY
       globalsound YEAH
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkmalakiangems addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d MALAKIAN GEMS!!!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A MALAKIAN GEM!!!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 7 // Safe Lock Box
     {
      setvar shopitemid 7
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       sound FOUND_INVENTORY
       globalsound YEAH
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checksafelockboxes addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d SAFE LOCK BOXES!!!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A SAFE LOCK BOX!!!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 8 // Secret Recipe
     {
      setvar shopitemid 8
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       sound FOUND_INVENTORY
       globalsound YEAH
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checksecretrecipes addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d SECRET RECIPES!!!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A SECRET RECIPE!!!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 9 // Slurpee Machine
     {
      setvar shopitemid 9
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       sound FOUND_INVENTORY
       globalsound YEAH
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkslurpeemachines addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d SLURPEE MACHINES!!!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A SLURPEE MACHINE!!!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 10 // Stock Ownership
     {
      setvar shopitemid 10
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       sound FOUND_INVENTORY
       globalsound YEAH
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkstockownerships addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d STOCK OWNERSHIPS!!!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A STOCK OWNERSHIP!!!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 11 // Transdimensional Safe
     {
      setvar shopitemid 11
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       sound FOUND_INVENTORY
       globalsound YEAH
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checktransdimensionalsafes addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d TRANSDIMENSIONAL SAFES!!!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A TRANSDIMENSIONAL SAFE!!!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 12 // Bloodpact Shield
     {
      setvar shopitemid 12
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       sound FOUND_INVENTORY
       globalsound YEAH
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkbloodpactshields addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d BLOODPACT SHIELDS!!!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A BLOODPACT SHIELD!!!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvarg shopselection 12 ifvarl shopselection 20
     {
      ifvare shopselection 13 setvar shopitemid 13
      ifvare shopselection 14 setvar shopitemid 14
      ifvare shopselection 15 setvar shopitemid 15
      ifvare shopselection 16 setvar shopitemid 16
      ifvare shopselection 17 setvar shopitemid 17
      ifvare shopselection 18 setvar shopitemid 18
      ifvare shopselection 19 setvar shopitemid 19
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       getactorvar[PLAYERID].VEHICLEID tempvehicleid
       ifvare tempvehicleid -1
       {
        ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTS
        {
         ifvare shopselection 13 state buyforcharacter_greenarmor
         ifvare shopselection 14 state buyforcharacter_bluearmor
         ifvare shopselection 15 state buyforcharacter_yellowarmor
         ifvare shopselection 16 state buyforcharacter_redarmor
         ifvare shopselection 17 state buyforcharacter_greyarmor
         ifvare shopselection 18 state buyforcharacter_whitearmor
         ifvare shopselection 19 state buyforcharacter_randomarmor
        }
        else
        {
         ifvare shopselection 13 state buyforinventory_greenarmor
         ifvare shopselection 14 state buyforinventory_bluearmor
         ifvare shopselection 15 state buyforinventory_yellowarmor
         ifvare shopselection 16 state buyforinventory_redarmor
         ifvare shopselection 17 state buyforinventory_greyarmor
         ifvare shopselection 18 state buyforinventory_whitearmor
         ifvare shopselection 19 state buyforinventory_randomarmor
        }
       }
       else
       {
        ifvare vehiclepickuptoggle 0 // Character Only
        {
         ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTS
         {
          ifvare shopselection 13 state buyforcharacter_greenarmor
          ifvare shopselection 14 state buyforcharacter_bluearmor
          ifvare shopselection 15 state buyforcharacter_yellowarmor
          ifvare shopselection 16 state buyforcharacter_redarmor
          ifvare shopselection 17 state buyforcharacter_greyarmor
          ifvare shopselection 18 state buyforcharacter_whitearmor
          ifvare shopselection 19 state buyforcharacter_randomarmor
         }
         else
         {
          ifvare shopselection 13 state buyforinventory_greenarmor
          ifvare shopselection 14 state buyforinventory_bluearmor
          ifvare shopselection 15 state buyforinventory_yellowarmor
          ifvare shopselection 16 state buyforinventory_redarmor
          ifvare shopselection 17 state buyforinventory_greyarmor
          ifvare shopselection 18 state buyforinventory_whitearmor
          ifvare shopselection 19 state buyforinventory_randomarmor
         }
        }
        ifvare vehiclepickuptoggle 1 // Vehicle Only
        {
         getactorvar[tempvehicleid].ENEMYAP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5
         {
          ifvare shopselection 13 state buyforvehicle_greenarmor
          ifvare shopselection 14 state buyforvehicle_bluearmor
          ifvare shopselection 15 state buyforvehicle_yellowarmor
          ifvare shopselection 16 state buyforvehicle_redarmor
          ifvare shopselection 17 state buyforvehicle_greyarmor
          ifvare shopselection 18 state buyforvehicle_whitearmor
          ifvare shopselection 19 state buyforvehicle_randomarmor
         }
         else
         {
          ifvare shopselection 13 state buyforinventory_greenarmor
          ifvare shopselection 14 state buyforinventory_bluearmor
          ifvare shopselection 15 state buyforinventory_yellowarmor
          ifvare shopselection 16 state buyforinventory_redarmor
          ifvare shopselection 17 state buyforinventory_greyarmor
          ifvare shopselection 18 state buyforinventory_whitearmor
          ifvare shopselection 19 state buyforinventory_randomarmor
         }
        }
        ifvare vehiclepickuptoggle 2 // Character & Vehicle [Character before Vehicle]
        {
         ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTS
         {
          ifvare shopselection 13 state buyforcharacter_greenarmor
          ifvare shopselection 14 state buyforcharacter_bluearmor
          ifvare shopselection 15 state buyforcharacter_yellowarmor
          ifvare shopselection 16 state buyforcharacter_redarmor
          ifvare shopselection 17 state buyforcharacter_greyarmor
          ifvare shopselection 18 state buyforcharacter_whitearmor
          ifvare shopselection 19 state buyforcharacter_randomarmor
         }
         else
         {
          getactorvar[tempvehicleid].ENEMYAP TEMPVAR4
          getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
          ifvarvarl TEMPVAR4 TEMPVAR5
          {
           ifvare shopselection 13 state buyforvehicle_greenarmor
           ifvare shopselection 14 state buyforvehicle_bluearmor
           ifvare shopselection 15 state buyforvehicle_yellowarmor
           ifvare shopselection 16 state buyforvehicle_redarmor
           ifvare shopselection 17 state buyforvehicle_greyarmor
           ifvare shopselection 18 state buyforvehicle_whitearmor
           ifvare shopselection 19 state buyforvehicle_randomarmor
          }
          else
          {
           ifvare shopselection 13 state buyforinventory_greenarmor
           ifvare shopselection 14 state buyforinventory_bluearmor
           ifvare shopselection 15 state buyforinventory_yellowarmor
           ifvare shopselection 16 state buyforinventory_redarmor
           ifvare shopselection 17 state buyforinventory_greyarmor
           ifvare shopselection 18 state buyforinventory_whitearmor
           ifvare shopselection 19 state buyforinventory_randomarmor
          }
         }
        }
        ifvare vehiclepickuptoggle 3 // Vehicle & Character [Vehicle before Character]
        {
         getactorvar[tempvehicleid].ENEMYAP TEMPVAR4
         getactorvar[tempvehicleid].ENEMYMAXAP TEMPVAR5
         ifvarvarl TEMPVAR4 TEMPVAR5
         {
          ifvare shopselection 13 state buyforvehicle_greenarmor
          ifvare shopselection 14 state buyforvehicle_bluearmor
          ifvare shopselection 15 state buyforvehicle_yellowarmor
          ifvare shopselection 16 state buyforvehicle_redarmor
          ifvare shopselection 17 state buyforvehicle_greyarmor
          ifvare shopselection 18 state buyforvehicle_whitearmor
          ifvare shopselection 19 state buyforvehicle_randomarmor
         }
         else
         {
          ifvarvarl CURRENTARMORPOINTS MAXARMORPOINTS
          {
           ifvare shopselection 13 state buyforcharacter_greenarmor
           ifvare shopselection 14 state buyforcharacter_bluearmor
           ifvare shopselection 15 state buyforcharacter_yellowarmor
           ifvare shopselection 16 state buyforcharacter_redarmor
           ifvare shopselection 17 state buyforcharacter_greyarmor
           ifvare shopselection 18 state buyforcharacter_whitearmor
           ifvare shopselection 19 state buyforcharacter_randomarmor
          }
          else
          {
           ifvare shopselection 13 state buyforinventory_greenarmor
           ifvare shopselection 14 state buyforinventory_bluearmor
           ifvare shopselection 15 state buyforinventory_yellowarmor
           ifvare shopselection 16 state buyforinventory_redarmor
           ifvare shopselection 17 state buyforinventory_greyarmor
           ifvare shopselection 18 state buyforinventory_whitearmor
           ifvare shopselection 19 state buyforinventory_randomarmor
          }
         }
        }
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 20 // Hockey Mask
     {
      setvar shopitemid 20
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkhockeymasks addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d HOCKEY MASKS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A HOCKEY MASK
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 21 // Gemstone Crown
     {
      setvar shopitemid 21
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkgemstonecrowns addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d GEMSTONE CROWNS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A GEMSTONE CROWN
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
    }
    ifvare shoppage 4
    {
     ifvare shopselection 0 // Iron Rune
     {
      setvar shopitemid 0
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkironrunes addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d IRON RUNES
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT AN IRON RUNE
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 1 // Twilight Cape
     {
      setvar shopitemid 1
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checktwilightcapes addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d TWILIGHT CAPES
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A TWILIGHT CAPE
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 2 // Snake Armband
     {
      setvar shopitemid 2
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checksnakearmbands addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d SNAKE ARMBANDS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A SNAKE ARMBAND
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 3 // Medic Bag
     {
      setvar shopitemid 3
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkmedicbags addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d MEDIC BAGS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A MEDIC BAG
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 4 // Serpent Helmet
     {
      setvar shopitemid 4
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR 
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkserpenthelmets addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d SERPENT HELMETS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A SERPENT HELMET
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 5 // Energy Incurment
     {
      setvar shopitemid 5
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkenergyincurments addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d ENERGY INCURMENTS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT AN ENERGY INCURMENT
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 6 // Yin-Yang Orb
     {
      setvar shopitemid 6
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound GRAB_EQUIPMENT
       addvar SHOPDOLLARSTEMP 1
       state selldisplays
       state checkyinyangorbs addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount
       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d YIN-YANG ORBS
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT A YIN-YANG ORB
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
//--------------------------------------
//--Multi Buy/Sell continues past here--
//--------------------------------------
     ifvare shopselection 7 // Winter Suit
     {
      setvar shopitemid 7
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR
	   stopsound SHOP_FAIL
       state shop_buyitem
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       ifvarl winterclothes 100
       {
        setvarvar ACTORPICKUPAMOUNT shopamount
        setvar tempe 0

        globalsound YEAH
        setvar winterclothes 100

        subvar ACTORPICKUPAMOUNT 1
        addvar tempe 1

        state checkwintersuits addvarvar ITEMARRAYID_AMOUNTTEMP ACTORPICKUPAMOUNT state setitemidarrayamount

        ifvarg ACTORPICKUPAMOUNT 0
        {
         globalsound DUKE_GET
         globalsound FOUND_INVENTORY
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d WINTER SUITS! ^14[+%d TO INVENTORY!]
          qsprintf 342 342 tempe ACTORPICKUPAMOUNT
         }
         else
         {
          redefinequote 342 ^20BOUGHT A WINTER SUIT! ^14[+%d TO INVENTORY!]
          qsprintf 342 342 ACTORPICKUPAMOUNT
         }
        }
        else
        {
         ifvarg tempe 1
         {
          redefinequote 342 ^20BOUGHT %d WINTER SUITS!
          qsprintf 342 342 tempe 
         }
         else
         {
          redefinequote 342 ^20BOUGHT A WINTER SUIT!
         }
        }
        setvarvar fta fta_normal setvar ftq 342
       }
       else
       {
        globalsound FOUND_INVENTORY
        state checkwintersuits addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount

        ifvarg shopamount 1
        {
         redefinequote 341 ^14BOUGHT %d WINTER SUITS [TO INVENTORY]
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^14BOUGHT A WINTER SUIT! [TO INVENTORY]
        }
        setvarvar fta fta_normal setvar ftq 341
       }
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 8
     {
      setvar shopitemid 8
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound FOUND_INVENTORY
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       state checkgreentankcapsules addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount

       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d GREEN RIOT-TANK CAPSULES!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT AN GREEN RIOT-TANK CAPSULE!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 9
     {
      setvar shopitemid 9
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound FOUND_INVENTORY
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       state checkbluetankcapsules addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount

       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d BLUE RIOT-TANK CAPSULES!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT AN BLUE RIOT-TANK CAPSULE!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
     else
     ifvare shopselection 10
     {
      setvar shopitemid 10
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar SHOPDOLLARSTEMP 0 else { setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices }
      addvar SHOPDOLLARSTEMP -1
      ifvarvarg DOLLARS SHOPDOLLARSTEMP
      {
       stopsound MENU_ERROR
	   stopsound SHOP_FAIL
       state shop_buyitem
       globalsound FOUND_INVENTORY
       addvar SHOPDOLLARSTEMP 1
       state selldisplays

       state checkredtankcapsules addvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount

       ifvarg shopamount 1
       {
        redefinequote 341 ^20BOUGHT %d RED RIOT-TANK CAPSULES!
        qsprintf 341 341 shopamount
       }
       else
       {
        redefinequote 341 ^20BOUGHT AN RED RIOT-TANK CAPSULE!
       }
       setvarvar fta fta_normal setvar ftq 341
      }
      else state shop_buyfailed
     }
    }
/*
    ifvare shoppage 5
    {
    }
*/
   } // ifvare shopmode 0
   else
//*******************
//***Selling Items***
//*******************
   ifvare shopmode 1 // Selling Items
   {
    ifvare shoppage 0
    {
     ifvare shopselection 0 
     {
      setvar shopitemid 0
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkreschalices
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkreschalices subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP        
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d RESURRECTION CHALICES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A RESURRECTION CHALICE
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 1
     {
      setvar shopitemid 1
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkeyedrops
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkeyedrops subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d EYEDROPS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN EYEDROP
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 2
     {
      setvar shopitemid 2
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkantidotes
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkantidotes subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d ANTIDOTES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN ANTIDOTE
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 3
     {
      setvar shopitemid 3
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkfoghorns
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkfoghorns subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d FOGHORNS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A FOGHORN
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 4
     {
      setvar shopitemid 4
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbubsylives
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
       ifvare BUBSY? 1
       {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkbubsylives subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d EXTRA-LIFE T-SHIRTS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN EXTRA-LIFE T-SHIRT
        }
        setvarvar fta fta_normal setvar ftq 341
       }
       else state failedsell
      }
      else
      {
       stopsound MONEYSOUND
       sound MENU_ERROR
       redefinequote 341 ^10YOU DON'T HAVE ANY OF THIS ITEM TO SELL!
       setvarvar fta fta_normal setvar ftq 341
      }
     }
     else
     ifvare shopselection 5
     {
      setvar shopitemid 5
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkcontinues
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkcontinues subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d CONTINUE ITEMS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A CONTINUE ITEM
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 6
     {
      setvar shopitemid 6
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else setvarvar ITEMARRAYID_AMOUNTTEMP CURRENTCELLS
      setvar TEMPVAR6 5 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { setvar TEMPVAR7 5 mulvarvar TEMPVAR7 shopamount subvarvar CURRENTCELLS TEMPVAR7 }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d ENERGY CELLS
         qsprintf 341 341 TEMPVAR7
        }
        else
        {
         redefinequote 341 ^20SOLD 5 ENERGY CELLS
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else
      {
       state shop_sellfailed
       redefinequote 341 ^10YOU DON'T HAVE ENOUGH OF THIS TO SELL!
	 setvarvar fta fta_normal setvar ftq 341
      }
     }
     else
     ifvare shopselection 7
     {
      setvar shopitemid 7
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checktelecoils
      setvar TEMPVAR6 8 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { setvar TEMPVAR7 8 mulvarvar TEMPVAR7 shopamount state checktelecoils subvarvar ITEMARRAYID_AMOUNTTEMP TEMPVAR7 state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d TELEPORTER COILS
         qsprintf 341 341 TEMPVAR7
        }
        else
        {
         redefinequote 341 ^20SOLD 8 TELEPORTER COILS
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else
      {
       state shop_sellfailed
       redefinequote 341 ^10YOU DON'T HAVE ENOUGH OF THIS TO SELL!
	 setvarvar fta fta_normal setvar ftq 341
      }
     }
     else
     ifvare shopselection 8
     {
      setvar shopitemid 8 
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksmallmedikits
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksmallmedikits subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SMALL MEDIKITS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SMALL MEDIKIT
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 9
     {
      setvar shopitemid 9
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmediummedikits
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkmediummedikits subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d MEDIUM MEDIKITS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A MEDIUM MEDIKIT
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 10
     {
      setvar shopitemid 10
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checklargemedikits
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checklargemedikits subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d LARGE MEDIKITS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A LARGE MEDIKIT
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 11
     {
      setvar shopitemid 11
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkextralargemedikits
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkextralargemedikits subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d EXTRA-LARGE MEDIKITS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN EXTRA-LARGE MEDIKIT
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 12
     {
      setvar shopitemid 12
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbodyarmors 
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkbodyarmors subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SUITS OF BODY ARMOR
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SUIT OF BODY ARMOR
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 13
     {
      setvar shopitemid 13
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksuperarmors
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksuperarmors subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SUITS OF SUPER ARMOR
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SUIT OF SUPER ARMOR
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 14
     {
      setvar shopitemid 14
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkvitaminxs
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkvitaminxs subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d BOTTLES OF VITAMIN X
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A BOTTLE OF VITAMIN X
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 15
     {
      setvar shopitemid 15
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkheatsensors
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkheatsensors subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d PAIRS OF NV GOGGLES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A PAIR OF NV GOGGLES
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 16
     {
      setvar shopitemid 16
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkholoforms
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkholoforms subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d HOLOFORMS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A HOLOFORM
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 17
     {
      setvar shopitemid 17
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkjetpacks
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkjetpacks subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d JETPACKS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A JETPACK
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 18
     {
      setvar shopitemid 18
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkscubatanks
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkscubatanks subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SCUBA TANKS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SCUBA TANK
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 19
     {
      setvar shopitemid 19
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbootpairs 
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkbootpairs subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d PAIRS OF PROTECTIVE BOOTS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A PAIR OF PROTECTIVE BOOTS
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 20
     {
      setvar shopitemid 20
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkportablemedikits 
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkportablemedikits subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d PORTABLE MEDIKITS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A PORTABLE MEDIKIT
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 21
     {
      setvar shopitemid 21
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkafasdrops
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkafasdrops subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d AFA'S DROPS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN AFA'S DROP
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
    }
    ifvare shoppage 1
    {
     ifvare shopselection 0
     {
      setvar shopitemid 0
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksunrings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksunrings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SUN RINGS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SUN RING
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 1
     {
      setvar shopitemid 1
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkaquarings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkaquarings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d AQUA RINGS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN AQUA RING
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 2
     {
      setvar shopitemid 2
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkplasmarings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkplasmarings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d PLASMA RINGS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A PLASMA RING
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 3
     {
      setvar shopitemid 3
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkspiritrings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkspiritrings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SPIRIT RINGS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SPIRIT RING
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 4
     {
      setvar shopitemid 4
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkcharmankhs
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkcharmankhs subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d CHARM ANKHS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A CHARM ANKH
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 5
     {
      setvar shopitemid 5
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmirrorshields
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkmirrorshields subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d MIRROR SHIELDS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A MIRROR SHIELD
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 6
     {
      setvar shopitemid 6
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkexpbadges
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkexpbadges subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d EXPERIENCE BADGES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN EXPERIENCE BADGE
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 7
     {
      setvar shopitemid 7
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkrankbadges
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkrankbadges subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d RANK BADGES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A RANK BADGE
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 8
     {
      setvar shopitemid 8
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmoneybadges
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkmoneybadges subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d MONEY BADGES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A MONEY BADGE
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 9
     {
      setvar shopitemid 9
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkatomichealths
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkatomichealths subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d ATOMIC HEALTHS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN ATOMIC HEALTH
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 10
     {
      setvar shopitemid 10
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksuperatoms
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksuperatoms subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SUPER-ATOMS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SUPER-ATOM
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 11
     {
      setvar shopitemid 11
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkfauxlevelups 
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkfauxlevelups subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d POTENTYLENES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A POTENTYLENE
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 12
     {
      setvar shopitemid 12
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkriotshields
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkriotshields subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d RIOT SHIELDS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A RIOT SHIELD
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 13
     {
      setvar shopitemid 13
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checknyxglovepairs
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checknyxglovepairs subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d PAIRS OF NYX GLOVES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A PAIR OF NYX GLOVES
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 14
     {
      setvar shopitemid 14
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkrabbitsfoots
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkrabbitsfoots subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d RABBIT'S FEET
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A RABBIT'S FOOT
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 15
     {
      setvar shopitemid 15
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkjumpbootpairs
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkjumpbootpairs subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d PAIRS OF JUMP BOOTS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A PAIR OF JUMP BOOTS
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 16
     {
      setvar shopitemid 16
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkshockabbootpairs
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkshockabbootpairs subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d PAIRS OF SHOCKAB BOOTS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A PAIR OF SHOCKAB BOOTS
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 17
     {
      setvar shopitemid 17
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkhappyshoepairs
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkhappyshoepairs subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d PAIRS OF HAPPY SHOES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A PAIR OF HAPPY SHOES
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 18
     {
      setvar shopitemid 18
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkstyleshoepairs
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkstyleshoepairs subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d PAIRS OF STYLE SHOES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A PAIR OF STYLE SHOES
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 19
     {
      setvar shopitemid 19
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkcharmshoepairs
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkcharmshoepairs subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d PAIRS OF CHARM SHOES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A PAIR OF CHARM SHOES
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 20
     {
      setvar shopitemid 20
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkpowerwrists
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkpowerwrists subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d POWER WRISTS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A POWER WRIST
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 21
     {
      setvar shopitemid 21
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksmallenergydrinks
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksmallenergydrinks subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SMALL ENERGY DRINKS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SMALL ENERGY DRINK
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
    }
    ifvare shoppage 2
    {
     ifvare shopselection 0
     {
      setvar shopitemid 0
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checklargeenergydrinks
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checklargeenergydrinks subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d LARGE ENERGY DRINKS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A LARGE ENERGY DRINK
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 1
     {
      setvar shopitemid 1
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkhyperenergydrinks
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkhyperenergydrinks subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d HYPER ENERGY DRINKS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A HYPER ENERGY DRINK
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 2
     {
      setvar shopitemid 2
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilkcarnations
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksilkcarnations subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SILK CARNATIONS!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SILK CARNATION!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 3
     {
      setvar shopitemid 3
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkrarepiratedoubloons
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkrarepiratedoubloons subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d RARE PIRATE DOUBLOONS!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A RARE PIRATE DOUBLOON!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 4
     {
      setvar shopitemid 4
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkfixeddicepairs
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkfixeddicepairs subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d PAIRS OF FIXED DICE!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A PAIR OF FIXED DICE!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 5
     {
      setvar shopitemid 5
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmalakiangems
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkmalakiangems subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d MALAKIAN GEMS!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A MALAKIAN GEM!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 6
     {
      setvar shopitemid 6
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksafelockboxes
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksafelockboxes subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SAFE LOCK BOXES!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SAFE LOCK BOX!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 7
     {
      setvar shopitemid 7
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksecretrecipes
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksecretrecipes subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SECRET RECIPES!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SECRET RECIPE!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 8
     {
      setvar shopitemid 8
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkslurpeemachines
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkslurpeemachines subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SLURPEE MACHINES!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SLURPEE MACHINE!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 9
     {
      setvar shopitemid 9
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkstockownerships
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkstockownerships subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d STOCK OWNERSHIPS!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A STOCK OWNERSHIP!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 10
     {
      setvar shopitemid 10
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checktransdimensionalsafes
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checktransdimensionalsafes subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d TRANSDIMENSIONAL SAFES!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A TRANSDIMENSIONAL SAFE!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 11
     {
      setvar shopitemid 11
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbloodpactshields
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkbloodpactshields subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d BLOODPACT SHIELDS!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A BLOODPACT SHIELD!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 12
     {
      setvar shopitemid 12
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgreenarmors
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkgreenarmors subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SUITS OF GREEN-CLASS ARMOR!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SUIT OF GREEN-CLASS ARMOR!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 13
     {
      setvar shopitemid 13
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbluearmors
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkbluearmors subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SUITS OF BLUE-CLASS ARMOR!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SUIT OF BLUE-CLASS ARMOR!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 14
     {
      setvar shopitemid 14
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkyellowarmors
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkyellowarmors subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SUITS OF YELLOW-CLASS ARMOR!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SUIT OF YELLOW-CLASS ARMOR!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 15
     {
      setvar shopitemid 15
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkredarmors
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkredarmors subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SUITS OF RED-CLASS ARMOR!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SUIT OF RED-CLASS ARMOR!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 16
     {
      setvar shopitemid 16
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgreyarmors
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkgreyarmors subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SUITS OF GREY-CLASS ARMOR!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SUIT OF GREY-CLASS ARMOR!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 17
     {
      setvar shopitemid 17
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkwhitearmors
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkwhitearmors subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SUITS OF WHITE-CLASS ARMOR!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SUIT OF WHITE-CLASS ARMOR!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 18
     {
      setvar shopitemid 18
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkrandomarmors
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkrandomarmors subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SUITS OF RANDOM-CLASS ARMOR!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SUIT OF RANDOM-CLASS ARMOR!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 19
     {
      setvar shopitemid 19
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilverzirconrings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksilverzirconrings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d ZIRCON RINGS [SILVER]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A ZIRCON RING [SILVER]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 20
     {
      setvar shopitemid 20
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilveraquamarinerings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksilveraquamarinerings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d AQUAMARINE RINGS [SILVER]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN AQUAMARINE RING [SILVER]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 21
     {
      setvar shopitemid 21
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilverturquoiserings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksilverturquoiserings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d TURQUIOSE RINGS [SILVER]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A TURQUIOSE RING [SILVER]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
    }
    ifvare shoppage 3
    {
     ifvare shopselection 0
     {
      setvar shopitemid 0
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilveremeraldrings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksilveremeraldrings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d EMERALD RINGS [SILVER]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN EMERALD RING [SILVER]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 1
     {
      setvar shopitemid 1
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilvergarnetrings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksilvergarnetrings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d GARNET RINGS [SILVER]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A GARNET RING [SILVER]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 2
     {
      setvar shopitemid 2
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilverrubyrings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksilverrubyrings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d RUBY RINGS [SILVER]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A RUBY RING [SILVER]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 3
     {
      setvar shopitemid 3
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilvercitrinerings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksilvercitrinerings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d CITRINE RINGS [SILVER]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A CITRINE RING [SILVER]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 4
     {
      setvar shopitemid 4
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksilverdiamondrings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksilverdiamondrings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d DIAMOND RINGS [SILVER]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A DIAMOND RING [SILVER]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 5
     {
      setvar shopitemid 5
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldzirconrings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkgoldzirconrings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d ZIRCON RINGS [GOLD]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A ZIRCON RING [GOLD]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 6
     {
      setvar shopitemid 6
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldaquamarinerings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkgoldaquamarinerings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d AQUAMARINE RINGS [GOLD]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN AQUAMARINE RING [GOLD]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 7
     {
      setvar shopitemid 7
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldturquoiserings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkgoldturquoiserings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d TURQUIOSE RINGS [GOLD]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A TURQUIOSE RING [GOLD]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 8
     {
      setvar shopitemid 8
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldemeraldrings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkgoldemeraldrings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d EMERALD RINGS [GOLD]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN EMERALD RING [GOLD]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 9
     {
      setvar shopitemid 9
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldgarnetrings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkgoldgarnetrings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d GARNET RINGS [GOLD]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A GARNET RING [GOLD]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 10
     {
      setvar shopitemid 10
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldrubyrings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkgoldrubyrings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d RUBY RINGS [GOLD]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A RUBY RING [GOLD]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 11
     {
      setvar shopitemid 11
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgoldcitrinerings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkgoldcitrinerings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d CITRINE RINGS [GOLD]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A CITRINE RING [GOLD]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 12
     {
      setvar shopitemid 12
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgolddiamondrings
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkgolddiamondrings subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d DIAMOND RINGS [GOLD]!
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A DIAMOND RING [GOLD]!
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 13
     {
      setvar shopitemid 13
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkhockeymasks
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkhockeymasks subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d HOCKEY MASKS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A HOCKEY MASK
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 14
     {
      setvar shopitemid 14
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgemstonecrowns
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkgemstonecrowns subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d GEMSTONE CROWNS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A GEMSTONE CROWN
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 15
     {
      setvar shopitemid 15
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkironrunes
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkironrunes subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d IRON RUNES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN IRON RUNE
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 16
     {
      setvar shopitemid 16
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checktwilightcapes
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checktwilightcapes subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d TWILIGHT CAPES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A TWILIGHT CAPE
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 17
     {
      setvar shopitemid 17
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checksnakearmbands
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checksnakearmbands subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SNAKE ARMBANDS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SNAKE ARMBAND
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 18
     {
      setvar shopitemid 18
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkmedicbags
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkmedicbags subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d MEDIC BAGS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A MEDIC BAG
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 19
     {
      setvar shopitemid 19
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkserpenthelmets
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkserpenthelmets subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d SERPENT HELMETS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A SERPENT HELMET
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 20
     {
      setvar shopitemid 20
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkenergyincurments
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkenergyincurments subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d ENERGY INCURMENTS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD AN ENERGY INCURMENT
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 21
     {
      setvar shopitemid 21
      state calcshopitembaseprices 
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkyinyangorbs
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkyinyangorbs subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d YIN-YANG ORBS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A YIN-YANG ORB
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
    }
    ifvare shoppage 4
    {
     ifvare shopselection 0
     {
      setvar shopitemid 0
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkwintersuits
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkwintersuits subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d WINTER SUITS
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A WINTER SUIT
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     else
     ifvare shopselection 1
     {
      setvar shopitemid 1
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkgreentankcapsules
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkgreentankcapsules subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d GREEN RIOT-TANK CAPSULES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A GREEN RIOT-TANK CAPSULE
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     ifvare shopselection 2
     {
      setvar shopitemid 2
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkbluetankcapsules
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkbluetankcapsules subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d BLUE RIOT-TANK CAPSULES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A BLUE RIOT-TANK CAPSULE
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
     ifvare shopselection 3
     {
      setvar shopitemid 3
      state calcshopitembaseprices
      ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS setvar ITEMARRAYID_AMOUNTTEMP 1024 else state checkredtankcapsules
      setvar TEMPVAR6 1 mulvarvar TEMPVAR6 shopamount subvar TEMPVAR6 1
      ifvarvarg ITEMARRAYID_AMOUNTTEMP TEMPVAR6
      {
        state shop_sellitem
        ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS nullop else { state checkredtankcapsules subvarvar ITEMARRAYID_AMOUNTTEMP shopamount state setitemidarrayamount }

        setvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMP2 mulvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPMULTI divvarvar SHOPDOLLARSTEMP SHOPDOLLARSTEMPDIVISOR state shop_calculatefinalprices
        addvarvar DOLLARS SHOPDOLLARSTEMP
        addvarvar DISPLAYDOLLARS SHOPDOLLARSTEMP
        state displaymoney
        ifvarg DOLLARS 2147483647 setvar DOLLARS 2147483647
        ifvarg shopamount 1
        {
         redefinequote 341 ^20SOLD %d RED RIOT-TANK CAPSULES
         qsprintf 341 341 shopamount
        }
        else
        {
         redefinequote 341 ^20SOLD A RED RIOT-TANK CAPSULE
        }
        setvarvar fta fta_normal setvar ftq 341
      }
      else state failedsell
     }
//
    }
   } // ifvare shopmode 
  } // ifvare shop_id 0
   // End of Menus
setvar com_pause 6
}
ends
