state ingamemenus

// When not using the menus
ifvare mainmenu 0
{
 ifvarg mainmenutransitiontimer 0
 {
  switch mainmenutransitiontimer
   case 1 
    setvar digz 7022
    break
   case 2 
    setvar digz 14043
    break
   case 3
    setvar digz 21065
    break
   case 4 
    setvar digz 28087
    break
   case 5
    setvar digz 35108
    break
   case 6 
    setvar digz 42130
    break
  endswitch
  ifvarg mainmenutransitiontimer 6 setvar digz 49152

  state pal0
  state digx160
  setvar digy 100
  state orientation0 // 3
  setvar tilenum 8191 // For the menu background >.> (2456 or 8191)
  setvar shade 16
  state rs
 }
}

// When using the menus
ifvare mainmenu 1
{ // ifvare mainmenu 1

 ifvarg mainmenutransitiontimer 6
 {
  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 mainmenutransitiontimer 0
 {
  switch mainmenutransitiontimer
   case 1 
    setvar digz 7022
    break
   case 2 
    setvar digz 14043
    break
   case 3
    setvar digz 21065
    break
   case 4 
    setvar digz 28087
    break
   case 5
    setvar digz 35108
    break
   case 6 
    setvar digz 42130
    break
  endswitch
  ifvarg mainmenutransitiontimer 6 setvar digz 49152
  
  state pal0
  state digx160
  setvar digy 100
  state orientation0 // 3
  setvar tilenum 8191 // For the menu background >.> (2456 or 8191)
  setvar shade 16
  state rs
 }

 ifvarg mainmenutransitiontimer 6
 { // ifvarg mainmenutransitiontimer 6

// Game Timer
	state pal22
	setvar shade -63
	state gettruetimerdisplayvars
	setvar digx 42
	setvar digy 26
	setvar tilenum 2822
	state orientation0
	setvar temp 600
	state mt

 state shade0
 setvar digy 20
 state orientation2
  state setquote332
  setvar tilenum 2822
 ifvare itemidinuse -1
 {
  ifvare skillidinuse -1
  {
   ifvare equipmenuinuse -1
   {
    ifvare mainmenusubmenu 0 
    { 
     state digx320
     redefinequote 332 CHARACTERS MENU 
    }
    ifvare mainmenusubmenu 1
    { 
     state digx320
     redefinequote 332 ITEMS MENU
    }
    ifvare mainmenusubmenu 2 
    { 
     state digx320
     redefinequote 332 SYSTEM MENU
    }
    ifvare mainmenusubmenu 3
    { 
     state digx320
     redefinequote 332 STATUS MENU
    }
    ifvare mainmenusubmenu 4
    { 
     state digx320
     redefinequote 332 SKILLS MENU
    }
    ifvare mainmenusubmenu 5
    { 
     state digx320
     redefinequote 332 SUPPORT MENU
    }
    ifvare mainmenusubmenu 6
    { 
     state digx320
     redefinequote 332 EQUIPMENT MENU
    }
    ifvare mainmenusubmenu 7
    { 
     state digx320
     redefinequote 332 WORLDTILE MENU
    }

    ifvare mainmenusubmenu 256
    { 
     state digx320
     redefinequote 332 CHEATS MENU
    }
    state gt
   }
  }
 }

 setvar digx 260 // 260
 setvar digy 26
 ifvare itemidinuse -1
 {
  ifvare skillidinuse -1
  {
   ifvare equipmenuinuse -1
   {
    state pal0
    setvarvar TEMPVAR mainmenupage
    addvar TEMPVAR 1
    redefinequote 332 PG.%d
    qsprintf 332 332 TEMPVAR
   }
   else
   {
    setvarvar TEMPVAR equipmenupage
    addvar TEMPVAR 1
    redefinequote 332 PG.%d
    qsprintf 332 332 TEMPVAR
   }
  }
  else
  {
   state pal22
   setvarvar TEMPVAR skillmenupage
   addvar TEMPVAR 1
   redefinequote 332 PG.%d
   qsprintf 332 332 TEMPVAR
  }
 }
 else
 {
  state pal23
  setvarvar TEMPVAR itemmenupage
  addvar TEMPVAR 1
  redefinequote 332 PG.%d
  qsprintf 332 332 TEMPVAR
 }
 state mt

// Left Side

 ifvare mainmenusubmenu 256
 {
  setvar digx 9
  setvar digy 100
  redefinequote 332 CHEATS
  ifvare mainmenusubmenu 256 state pal20 else state pal0
  state mt
 }
 else
 {
  setvar digx 1
  setvar digy 79
  redefinequote 332 CHARACTERS
  ifvare mainmenusubmenu 0 state pal20 else state pal0
  state mt

  setvar digx 11
  addvar digy 6
  redefinequote 332 ITEMS
  ifvare mainmenusubmenu 1 state pal20 else state pal0
  state mt

  setvar digx 9
  addvar digy 6
  redefinequote 332 SYSTEM
  ifvare mainmenusubmenu 2 state pal20 else state pal0
  state mt

  setvar digx 9
  addvar digy 6
  redefinequote 332 STATUS
  ifvare mainmenusubmenu 3 state pal20 else state pal0
  state mt

  setvar digx 9
  addvar digy 6
  redefinequote 332 SKILLS
  ifvare mainmenusubmenu 4 state pal20 else state pal0
  state mt

  setvar digx 7
  addvar digy 6
  redefinequote 332 SUPPORT
  ifvare mainmenusubmenu 5 state pal20 else state pal0
  state mt

  setvar digx 3
  addvar digy 6
  redefinequote 332 EQUIPMENT
  ifvare mainmenusubmenu 6 state pal20 else state pal0
  state mt

  setvar digx 3
  addvar digy 6
  redefinequote 332 WORLDTILE
  ifvare mainmenusubmenu 7 state pal20 else state pal0
  state mt

 }

// Below Menu // Main Menu

 ifvare mainmenusubmenu 256
 {
  state pal21
  // Line #1
  state digx160 // 89
  setvar digy 183
  redefinequote 1001 
 
  getkeyname 501 30 0
  qstrcat 1001 501
  ifvarand bits 4 redefinequote 502 =EXIT
  else redefinequote 502 =EXIT  
  qstrcat 1001 502
/*
*/
  ifvarand bits 4 nullop
  else
  {
   ifvare mainmenuselection 15
   {
    getkeyname 503 15 0
    qstrcat 1001 503
    redefinequote 504 /
    qstrcat 1001 504
    getkeyname 505 16 0
    qstrcat 1001 505
    redefinequote 506 =CHANGE #  
    qstrcat 1001 506
   }

   getkeyname 507 17 0
   qstrcat 1001 507
   redefinequote 508 =NORMAL MENUS  
   qstrcat 1001 508
 
   getkeyname 509 18 0
   qstrcat 1001 509
   redefinequote 510 =NORMAL MENUS
   qstrcat 1001 510
  }

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

  // Line #2
  state digx160 // 89
  setvar digy 189
  redefinequote 1001 

  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

  getkeyname 505 2 0
  qstrcat 1001 505
  redefinequote 506 =CURSOR LEFT  
  qstrcat 1001 506

  getkeyname 507 3 0
  qstrcat 1001 507
  redefinequote 508 =CURSOR RIGHT
  qstrcat 1001 508 

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

  state setquote332
 }
 else
 {

  state pal21
  // Line #1
  state digx160 // 89
  setvar digy 183
  redefinequote 1001 
 
  getkeyname 501 30 0
  qstrcat 1001 501
  redefinequote 502 =EXIT  
  qstrcat 1001 502

  ifvarg mainmenusubmenu -1 ifvarl mainmenusubmenu 2
  {
   getkeyname 503 31 0
   qstrcat 1001 503
  }
  else
  ifvare mainmenusubmenu 6
  {
   ifvarn equipmenuinuse -1
   {
    getkeyname 503 31 0
    qstrcat 1001 503
   }
  }
  ifvare mainmenusubmenu 7
  {
   getkeyname 503 31 0
   qstrcat 1001 503
  }

  ifvare mainmenusubmenu 0
  {
   ifvare mainmenupage 0 redefinequote 504 =TO PG.2  
   ifvare mainmenupage 1 redefinequote 504 =TO PG.1  
  }
  else
  ifvare mainmenusubmenu 1
  {
   ifvare mainmenupage 0 redefinequote 504 =TO PG.2  
   ifvare mainmenupage 1 redefinequote 504 =TO PG.3  
   ifvare mainmenupage 2 redefinequote 504 =TO PG.4  
   ifvare mainmenupage 3 redefinequote 504 =TO PG.5  
   ifvare mainmenupage 4 redefinequote 504 =TO PG.6  
   ifvare mainmenupage 5 redefinequote 504 =TO PG.1  
  }
  else
  ifvare mainmenusubmenu 2
  {
   redefinequote 504 
  }
  else
  ifvare mainmenusubmenu 3
  {
   redefinequote 504 
  }
  else
  ifvare mainmenusubmenu 4
  {
   redefinequote 504 
  }
  else
  ifvare mainmenusubmenu 5
  {
   redefinequote 504 
  }
  else
  ifvare mainmenusubmenu 6
  {
   ifvare equipmenuinuse -1 redefinequote 504 
   else
   {
    ifvare equipmenupage 0 redefinequote 504 =TO PG.2  
    ifvare equipmenupage 1 redefinequote 504 =TO PG.1  
   }
  }
  else
  ifvare mainmenusubmenu 7
  {
   ifvare mainmenupage 0 redefinequote 504 =TO PG.2  
   ifvare mainmenupage 1 redefinequote 504 =TO PG.3  
   ifvare mainmenupage 2 redefinequote 504 =TO PG.4  
   ifvare mainmenupage 3 redefinequote 504 =TO PG.5  
   ifvare mainmenupage 4 redefinequote 504 =TO PG.6  
   ifvare mainmenupage 5 redefinequote 504 =TO PG.7  
   ifvare mainmenupage 6 redefinequote 504 =TO PG.8  
   ifvare mainmenupage 7 redefinequote 504 =TO PG.9  
   ifvare mainmenupage 8 redefinequote 504 =TO PG.1  
  }
  qstrcat 1001 504


  ifvare mainmenusubmenu 0 // Characters Menu
  {
   getkeyname 505 6 0
   qstrcat 1001 505
   redefinequote 506 =SELECT  
   qstrcat 1001 506
  }
  else
  ifvare mainmenusubmenu 1 // Item Menu
  {
   getkeyname 505 6 0
   qstrcat 1001 505
   redefinequote 506 =SELECT  
   qstrcat 1001 506

   state pal21 
   getkeyname 513 36 0
   qstrcat 1001 513
   ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS redefinequote 514 =DROP 8X  
   else redefinequote 514 =DROP  
   qstrcat 1001 514
  }
  else
  ifvare mainmenusubmenu 2 // Toggle Menu
  {
   getkeyname 505 6 0
   qstrcat 1001 505
   redefinequote 506 =TOGGLE  
   qstrcat 1001 506
  }
  else ifvare mainmenusubmenu 3 nullop // Status Menu
  else ifvare mainmenusubmenu 4 // Skills Menu
  {
   getkeyname 505 6 0
   qstrcat 1001 505

   // Check Spell Type
   redefinequote 506 =USE SKILL  
   ifvare mainmenupage 1 // Jack
   {
    ifvare mainmenuselection 0 redefinequote 506 =USE SKILL  
   }
   ifvare mainmenupage 3 // Ami
   {
    ifvare mainmenuselection 0 redefinequote 506 =TOGGLE SKILL  
    ifvare mainmenuselection 1 redefinequote 506 =USE SKILL  
   }
   ifvare mainmenupage 6 // Ted
   {
    ifvare mainmenuselection 0 redefinequote 506 =USE SKILL  
    ifvare mainmenuselection 1 redefinequote 506 =USE SKILL  
    ifvare mainmenuselection 2 redefinequote 506 =USE SKILL  
   }
   ifvare mainmenupage 8 // Cybanis
   {
    ifvare mainmenuselection 0 redefinequote 506 =USE SKILL  
   }
   ifvare mainmenupage 9 // Nethra/Christina
   {
    ifvare mainmenuselection 0 redefinequote 506 =USE SKILL  
    ifvare mainmenuselection 1 redefinequote 506 =USE SKILL  
    ifvare mainmenuselection 2 redefinequote 506 =USE SKILL  
    ifvare mainmenuselection 3 redefinequote 506 =USE SKILL  
    ifvare mainmenuselection 4 redefinequote 506 =USE SKILL  
    ifvare mainmenuselection 5 redefinequote 506 =USE SKILL  
   }
   ifvare mainmenupage 10 // Paula
   {
    ifvare mainmenuselection 0 redefinequote 506 =USE SKILL  
   }
   ifvare mainmenupage 11 // Lori
   {
    ifvare mainmenuselection 0 redefinequote 506 =TOGGLE SKILL  
    ifvare mainmenuselection 1 redefinequote 506 =TOGGLE SKILL  
   }
   ifvare mainmenupage 13 // Mystery
   {
    ifvare PUBLICBETA? 0
    {
     ifvare mainmenuselection 0 redefinequote 506 =USE SKILL  
     ifvare mainmenuselection 1 redefinequote 506 =USE SKILL  
    }
   }
   ifvare mainmenupage 14 // Maken
   {
    ifvare mainmenuselection 0 redefinequote 506 =TOGGLE SKILL  
    ifvare mainmenuselection 1 redefinequote 506 =USE SKILL  
   }
   qstrcat 1001 506
  }
  else ifvare mainmenusubmenu 5 nullop // Support Menu
  else ifvare mainmenusubmenu 6 // Equipment Menu
  {
   getkeyname 505 6 0

   qstrcat 1001 505
   ifvare equipmenuinuse -1 redefinequote 506 =CHANGE ITEM  
   else redefinequote 506 =EQUIP ITEM  
   qstrcat 1001 506

   ifvare equipmenuinuse -1
   {
    getkeyname 505 36 0
    qstrcat 1001 505
    redefinequote 506 =REMOVE ITEM  
    qstrcat 1001 506
   }
  }
//  else ifvare mainmenusubmenu 7 nullop // Worldtile Menu


  state pal21 
  ifvare itemidinuse -1
  {
   ifvare skillidinuse -1
   {
    ifvare equipmenuinuse -1
    {
     state pal21 
     getkeyname 507 17 0
     qstrcat 1001 507
     ifvarand bits 4 redefinequote 508 =CHEATS  
     else redefinequote 508 =SUB UP  
     qstrcat 1001 508

     state pal21 
     getkeyname 509 18 0
     qstrcat 1001 509
     ifvarand bits 4 redefinequote 510 =CHEATS
     else redefinequote 510 =SUB DN
     qstrcat 1001 510
    }
   }
  }

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

  // Line #2
  state digx160 // 89
  setvar digy 189
  redefinequote 1001 

  ifvarg mainmenusubmenu -1 
  ifvarl mainmenusubmenu 3
  {
   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
  }
  else
  ifvare mainmenusubmenu 4
  {
   ifvarg skillidinuse -1
   {
    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
   }
  }
  else
  ifvare mainmenusubmenu 6
  {
   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
  }
  else
  ifvare mainmenusubmenu 7
  {
   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
  }

  ifvarg mainmenusubmenu -1 
  ifvarl mainmenusubmenu 2
  {
   getkeyname 505 2 0
   qstrcat 1001 505
  }
  else
  ifvarg mainmenusubmenu 2
  ifvarl mainmenusubmenu 8
  {
   getkeyname 505 2 0
   qstrcat 1001 505
  }
  else
  ifvare mainmenusubmenu 2
  {
   ifvare mainmenuselection 11 ifvare autosavetoggle 1
   {
    getkeyname 505 2 0
    qstrcat 1001 505
   }
  }

  ifvarg mainmenusubmenu -1 ifvarl mainmenusubmenu 2 redefinequote 506 =CURSOR LEFT  
  else
  ifvare mainmenusubmenu 2
  {
   ifvare mainmenuselection 11 ifvare autosavetoggle 1
   {
    ifvare AUTOSAVEFREQUENCY 1 redefinequote 506 =MAP LOAD ONLY  
    else ifvare AUTOSAVEFREQUENCY 0 redefinequote 506 =SET TO 120 MIN  
    else redefinequote 506 =-1 MIN  
   }
   else
   {
    redefinequote 506 
   }
  }
  else ifvarg mainmenusubmenu 2 ifvarl mainmenusubmenu 6 redefinequote 506 =SCREEN LEFT  
  else ifvare mainmenusubmenu 6
  {
   ifvare equipmenuinuse -1 redefinequote 506 =SCREEN LEFT  
   else redefinequote 506 =CURSOR LEFT  
  }
  else ifvare mainmenusubmenu 7 // redefinequote 506
  {
   redefinequote 506 =CURSOR LEFT  
  }
  qstrcat 1001 506

  ifvarg mainmenusubmenu -1 
  ifvarl mainmenusubmenu 2
  {
   getkeyname 507 3 0
   qstrcat 1001 507
  }
  else
  ifvarg mainmenusubmenu 2
  ifvarl mainmenusubmenu 8
  {
   getkeyname 507 3 0
   qstrcat 1001 507
  }
  else
  ifvare mainmenusubmenu 2
  {
   ifvare mainmenuselection 11 ifvare autosavetoggle 1
   {
    getkeyname 507 3 0
    qstrcat 1001 507
   }
  }

  ifvarg mainmenusubmenu -1 ifvarl mainmenusubmenu 2 redefinequote 508 =CURSOR RIGHT
  else
  ifvare mainmenusubmenu 2
  {
   ifvare mainmenuselection 11 ifvare autosavetoggle 1
   {
    ifvare AUTOSAVEFREQUENCY 120 redefinequote 508 =MAP LOAD ONLY
    else ifvare AUTOSAVEFREQUENCY 0 redefinequote 508 =SET TO 1 MIN
    else redefinequote 508 =+1 MIN
   }
   else
   {
    redefinequote 508 
   }
  }
  else ifvarg mainmenusubmenu 2 ifvarl mainmenusubmenu 6 redefinequote 508 =SCREEN RIGHT
  else ifvare mainmenusubmenu 6
  {
   ifvare equipmenuinuse -1 redefinequote 508 =SCREEN RIGHT  
   else redefinequote 508 =CURSOR RIGHT  
  }
  else ifvare mainmenusubmenu 7 // redefinequote 508  
  {
   redefinequote 508 =CURSOR RIGHT
  }
  qstrcat 1001 508 

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

  state setquote332

 }

// Above Menu

 ifvare mainmenusubmenu 256 nullop
 else
 {
  state pal23

  setvar digx 1
  setvar digy 1
  redefinequote 332 SKILL = 
  state mt

  ifvare PUBLICBETA? 1 
  {
   setvar digx 1
   addvar digy 6 // setvar digy 7
   redefinequote 332 EPISODE =
   state mt
  }

  setvar digx 1
  addvar digy 6 // setvar digy 13
  redefinequote 332 LEVEL =
  state mt

  state settile3087

  setvar digx 37
  setvar digy 3
  setvarvar varname SKILLLEVEL
  state dn

  ifvare PUBLICBETA? 1 
  {
   setvar digx 45
   addvar digy 6 // setvar digy 9
   setvarvar varname DISPLAYEPISODE
   state dn
  }

  setvar digx 37
  addvar digy 6 // setvar digy 15
  setvarvar varname DISPLAYLEVEL
  state dn

  setvar digx 38
  setvar digy 1
  ifvare SKILLLEVEL 0 redefinequote 332 : ^20EAT IT BOY EAT IT!
  ifvare SKILLLEVEL 1 redefinequote 332 : ^13MANY PIECES OF CAKE!
  ifvare SKILLLEVEL 2 redefinequote 332 : ^0LET'S ROCK THE HOUSE!
  ifvare SKILLLEVEL 3 redefinequote 332 : ^16COME GET SOME MORE!
  ifvare SKILLLEVEL 4 redefinequote 332 : ^21DAMN I'M VERY GOOD!
  ifvare SKILLLEVEL 5 redefinequote 332 : ^10YOU A BAD ENOUGH DUDE?!
  ifvare SKILLLEVEL 6 redefinequote 332 : ^7U R MASOCHIST INCARNATE!
  ifvare SKILLLEVEL 7 redefinequote 332 : ^11I WILL EAT YOUR SOUL!
  ifvare SKILLLEVEL 8 redefinequote 332 : ^14YOU ARE DEATH'S BITCH!!
  ifvare SKILLLEVEL 9 redefinequote 332 : ^6THE END OF YOUR DESTINY!!!
  state mt

  //
  setvar digy -5
  ifvarg MAX_ENEMIES_KILLED_LEVEL 0
  {
   ifvarvare ENEMIES_KILLED_LEVEL MAX_ENEMIES_KILLED_LEVEL state paletteflasher else ifvarvarg ENEMIES_KILLED_LEVEL MAX_ENEMIES_KILLED_LEVEL state paletteflasher else state pal23
   setvar digx 255
   addvar digy 6
   redefinequote 332 KILLS =
   state mt
  }

  ifvarg MAX_SECRETSFOUND_LEVEL 0
  {
   ifvarvare SECRETSFOUND_LEVEL MAX_SECRETSFOUND_LEVEL state paletteflasher else ifvarvarg SECRETSFOUND_LEVEL MAX_SECRETSFOUND_LEVEL state paletteflasher else state pal23
   setvar digx 247
   addvar digy 6
   redefinequote 332 SECRETS =
   state mt
  }

  ifvarg MAX_RANKITEMSFOUND_LEVEL 0
  {
   ifvarvare RANKITEMSFOUND_LEVEL MAX_RANKITEMSFOUND_LEVEL state paletteflasher else ifvarvarg RANKITEMSFOUND_LEVEL MAX_RANKITEMSFOUND_LEVEL state paletteflasher else state pal23
   setvar digx 235
   addvar digy 6
   redefinequote 332 MEMORBILIA =
   state mt
  }

  ifvarg MAX_CIVILIANSSAVED_LEVEL 0
  {
   ifvarvare CIVILIANSSAVED_LEVEL MAX_CIVILIANSSAVED_LEVEL state paletteflasher else ifvarvarg CIVILIANSSAVED_LEVEL MAX_CIVILIANSSAVED_LEVEL state paletteflasher else state pal23
   setvar digx 239
   addvar digy 6
   redefinequote 332 CIV-SAVES =
   state mt
  }

  //
  setvar digy -3
  ifvarg MAX_ENEMIES_KILLED_LEVEL 0
  {
   ifvarvare ENEMIES_KILLED_LEVEL MAX_ENEMIES_KILLED_LEVEL state paletteflasher else ifvarvarg ENEMIES_KILLED_LEVEL MAX_ENEMIES_KILLED_LEVEL state paletteflasher else state pal23
   setvar digx 293
   addvar digy 6
   setvarvar varname ENEMIES_KILLED_LEVEL // getplayer[THISACTOR].actors_killed varname
   state dn
  }

  ifvarg MAX_SECRETSFOUND_LEVEL 0
  {
   ifvarvare SECRETSFOUND_LEVEL MAX_SECRETSFOUND_LEVEL state paletteflasher else ifvarvarg SECRETSFOUND_LEVEL MAX_SECRETSFOUND_LEVEL state paletteflasher else state pal23
   setvar digx 293
   addvar digy 6
   setvarvar varname SECRETSFOUND_LEVEL
   state dn
  }

  ifvarg MAX_RANKITEMSFOUND_LEVEL 0
  {
   ifvarvare RANKITEMSFOUND_LEVEL MAX_RANKITEMSFOUND_LEVEL state paletteflasher else ifvarvarg RANKITEMSFOUND_LEVEL MAX_RANKITEMSFOUND_LEVEL state paletteflasher else state pal23
   setvar digx 293
   addvar digy 6
   setvarvar varname RANKITEMSFOUND_LEVEL
   state dn
  }

  ifvarg MAX_CIVILIANSSAVED_LEVEL 0
  {
   ifvarvare CIVILIANSSAVED_LEVEL MAX_CIVILIANSSAVED_LEVEL state paletteflasher else ifvarvarg CIVILIANSSAVED_LEVEL MAX_CIVILIANSSAVED_LEVEL state paletteflasher else state pal23
   setvar digx 293
   addvar digy 6
   setvarvar varname CIVILIANSSAVED_LEVEL
   state dn
  }

  //
  setvar digy -5
  ifvarg MAX_ENEMIES_KILLED_LEVEL 0
  {
   ifvarvare ENEMIES_KILLED_LEVEL MAX_ENEMIES_KILLED_LEVEL state paletteflasher else ifvarvarg ENEMIES_KILLED_LEVEL MAX_ENEMIES_KILLED_LEVEL state paletteflasher else state pal23
   setvar digx 300
   addvar digy 6
   redefinequote 332 /
   state mt
  }

  ifvarg MAX_SECRETSFOUND_LEVEL 0
  {
   ifvarvare SECRETSFOUND_LEVEL MAX_SECRETSFOUND_LEVEL state paletteflasher else ifvarvarg SECRETSFOUND_LEVEL MAX_SECRETSFOUND_LEVEL state paletteflasher else state pal23
   setvar digx 300
   addvar digy 6
   redefinequote 332 /
   state mt
  }

  ifvarg MAX_RANKITEMSFOUND_LEVEL 0
  {
   ifvarvare RANKITEMSFOUND_LEVEL MAX_RANKITEMSFOUND_LEVEL state paletteflasher else ifvarvarg RANKITEMSFOUND_LEVEL MAX_RANKITEMSFOUND_LEVEL state paletteflasher else state pal23
   setvar digx 300
   addvar digy 6
   redefinequote 332 /

   state mt
  }

  ifvarg MAX_CIVILIANSSAVED_LEVEL 0
  {
   ifvarvare CIVILIANSSAVED_LEVEL MAX_CIVILIANSSAVED_LEVEL state paletteflasher else ifvarvarg CIVILIANSSAVED_LEVEL MAX_CIVILIANSSAVED_LEVEL state paletteflasher else state pal23
   setvar digx 300
   addvar digy 6
   redefinequote 332 /
   state mt
  }

  //
  setvar digy -3
  ifvarg MAX_ENEMIES_KILLED_LEVEL 0
  {
   ifvarvare ENEMIES_KILLED_LEVEL MAX_ENEMIES_KILLED_LEVEL state paletteflasher else ifvarvarg ENEMIES_KILLED_LEVEL MAX_ENEMIES_KILLED_LEVEL state paletteflasher else state pal23
   setvar digx 313
   addvar digy 6
   setvarvar varname MAX_ENEMIES_KILLED_LEVEL // getplayer[THISACTOR].max_actors_killed varname
   state dn
  }

  ifvarg MAX_SECRETSFOUND_LEVEL 0
  {
   ifvarvare SECRETSFOUND_LEVEL MAX_SECRETSFOUND_LEVEL state paletteflasher else ifvarvarg SECRETSFOUND_LEVEL MAX_SECRETSFOUND_LEVEL state paletteflasher else state pal23
   setvar digx 313
   addvar digy 6
   setvarvar varname MAX_SECRETSFOUND_LEVEL
   state dn
  }

  ifvarg MAX_RANKITEMSFOUND_LEVEL 0
  {
   ifvarvare RANKITEMSFOUND_LEVEL MAX_RANKITEMSFOUND_LEVEL state paletteflasher else ifvarvarg RANKITEMSFOUND_LEVEL MAX_RANKITEMSFOUND_LEVEL state paletteflasher else state pal23
   setvar digx 313
   addvar digy 6
   setvarvar varname MAX_RANKITEMSFOUND_LEVEL
   state dn
  }

  ifvarg MAX_CIVILIANSSAVED_LEVEL 0
  {
   ifvarvare CIVILIANSSAVED_LEVEL MAX_CIVILIANSSAVED_LEVEL state paletteflasher else ifvarvarg CIVILIANSSAVED_LEVEL MAX_CIVILIANSSAVED_LEVEL state paletteflasher else state pal23
   setvar digx 313
   addvar digy 6
   setvarvar varname MAX_CIVILIANSSAVED_LEVEL
   state dn
  }
 }

// Item Descriptions and Text Descriptions

  ifvare mainmenusubmenu 0
  {
   state pal23
   setvar digy 177
   ifvare mainmenupage 0
   {
    ifvare mainmenuselection 2 ifvare BUBSY? 1 setvar TEMPVAR3 1
    else ifvare mainmenuselection 3 ifvare AMI? 1 setvar TEMPVAR3 1
    else ifvare mainmenuselection 5 ifvare ESSENCE? 1 setvar TEMPVAR3 1
    else setvar TEMPVAR3 0
   }
   ifvare mainmenupage 1
   {
    ifvare mainmenuselection 1 ifvare NETHRA? 1 setvar TEMPVAR3 1
    else ifvare mainmenuselection 4 ifvare MINAKO? 1 setvar TEMPVAR3 1
    else setvar TEMPVAR3 0
   }

   ifvare TEMPVAR3 1
   {
    state digx160
    redefinequote 1001 
    getkeyname 501 13 0
    qstrcat 1001 501
    redefinequote 502 /
    qstrcat 1001 502
    getkeyname 503 14 0
    qstrcat 1001 503
    redefinequote 504  = TRANSFORM THIS CHARACTER ONE LEVEL [DOWN/UP]
    qstrcat 1001 504
    setvar temp 1001
    qstrlen TEMPVAR 1001
    ifvarg TEMPVAR 0 
    { 
     setvarvar tempb TEMPVAR
     mulvar tempb 2
     subvarvar digx tempb
     subvar digx 2
    }
    state mt
   }
  }

  state setquote332
  ifvare mainmenusubmenu 1
  {
   setvar digy 177
   state pal17
 
   redefinequote 332 ^10[EMPTY INVENTORY SLOT]
   ifvare mainmenupage 0
   {
// Row #1
    ifvare mainmenuselection 0 // Resurrection Chalice
    {
     state checkreschalices
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showchalicedescript
    }
    ifvare mainmenuselection 1 // Eyedrop
    {
     state checkeyedrops
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showeyedropdescript
    }
    ifvare mainmenuselection 2 // Antidote
    {
     state checkantidotes
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showantidotedescript
    }
    ifvare mainmenuselection 3 // Foghorn
    {
     state checkfoghorns
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showfoghorndescript
    }
    ifvare mainmenuselection 4 // Afa's Drops
    {
     state checkafasdrops
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showafasdropdescript
    }
    ifvare mainmenuselection 5 // Portable Medikit
    {
     state checkportablemedikits
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showportablemedikitdescript
    }
// Row #2
    ifvare mainmenuselection 6
    {
     state checkheatsensors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state shownvgogglesdescript
    }
    ifvare mainmenuselection 7
    {
     state checkbootpairs
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showbootsdescript
    }
    ifvare mainmenuselection 8
    {
     state checkholoforms
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showholoformdescript
    }
    ifvare mainmenuselection 9
    {
     state checkjetpacks
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showjetpackdescript
    }
    ifvare mainmenuselection 10
    {
     state checkvitaminxs
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showvitaminxdescript
    }
    ifvare mainmenuselection 11
    {
     state checkscubatanks
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showscubageardescript
    }
// Row #3
    ifvare mainmenuselection 12
    {
     state checkusedbodyarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showusedbodyarmordescript
    }
    ifvare mainmenuselection 13
    {
     state checkusedsuperarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showusedsuperarmordescript
    }
    ifvare mainmenuselection 14
    {
     state checkbodyarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showbodyarmordescript
    }
    ifvare mainmenuselection 15
    {
     state checksuperarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showsuperarmordescript
    }
    ifvare mainmenuselection 16
    {
     state checkatomichealths
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showatomichealthdescript
    }
    ifvare mainmenuselection 17
    {
     state checksuperatoms
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showsuperatomdescript
    }
// Row #4
    ifvare mainmenuselection 18
    {
     state checksmallmedikits
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showsmallmedikitdescript
    }
    ifvare mainmenuselection 19
    {
     state checkmediummedikits
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showmediummedikitdescript
    }
    ifvare mainmenuselection 20
    {
     state checklargemedikits
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showlargemedikitdescript
    }
    ifvare mainmenuselection 21
    {
     state checkextralargemedikits
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showxlargemedikitdescript
    }
    ifvare mainmenuselection 22
    {
     state checkmedpacks
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showmedpackdescript
    }
    ifvare mainmenuselection 23
    {
     state checksurgerykits
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showsurgerykitdescript
    }
   }

   ifvare mainmenupage 1
   {
// Row #1
    ifvare mainmenuselection 0
    {
     state checkusedgreenarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showusedgreenarmordescript
    }
    ifvare mainmenuselection 1
    {
     state checkusedbluearmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showusedbluearmordescript
    }
    ifvare mainmenuselection 2
    {
     state checkusedyellowarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showusedyellowarmordescript
    }
    ifvare mainmenuselection 3
    {
     state checkusedredarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showusedredarmordescript
    }
    ifvare mainmenuselection 4
    {
     state checkusedgreyarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showusedgreyarmordescript
    }
    ifvare mainmenuselection 5
    {
     state checkusedwhitearmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showusedwhitearmordescript
    }
// Row #2
    ifvare mainmenuselection 6
    {
     state checkgreenarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showgreenarmordescript
    }
    ifvare mainmenuselection 7
    {
     state checkbluearmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showbluearmordescript
    }
    ifvare mainmenuselection 8
    {
     state checkyellowarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showyellowarmordescript
    }
    ifvare mainmenuselection 9
    {
     state checkredarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showredarmordescript
    }
    ifvare mainmenuselection 10
    {
     state checkgreyarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showgreyarmordescript
    }
    ifvare mainmenuselection 11
    {
     state checkwhitearmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showwhitearmordescript
    }
// Row #3
    ifvare mainmenuselection 12
    {
     state checkusedrandomarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showusedrandomarmordescript
    }
    ifvare mainmenuselection 13
    {
     state checkrandomarmors
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showrandomarmordescript
    }
    ifvare mainmenuselection 14
    {
     ifvare AMI? 1
     {
      setvar CHARACTERARRAY 4
      getactorvar[CHARACTERARRAY].CHARACTERGOGGLESTIME TEMPVAR
      ifvarg TEMPVAR 0
      {
       redefinequote 332 MERCURY VR GOGGLES: SCANS AND SHOWS ENEMY & NPC STATISTICS.
      }
     }
    }
    ifvare mainmenuselection 15
    {
     ifvare AMI? 1
     {
      ifvare HAVEMERCURYCOMPUTER? 1
      {
       redefinequote 332 MERCURY COMPUTER: EXPLOITS ENEMY WEAKNESSES WHEN USED W/ VR GOGGLES.
      }
     }
    }
    ifvare mainmenuselection 16
    {
     ifvare BUBSY? 1
     {
      state checkbubsylives
      ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showextralifeshirtdescript
     }
    }
    ifvare mainmenuselection 17
    {
     state checkcontinues
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showcontinueitemdescript
    }
// Row #4
    ifvare mainmenuselection 18
    {
     ifvare LISA? 1 ifvare HAVEENERGYSHIELD? 1 state showbioshielddescript
    }
    ifvare mainmenuselection 19
    {
     ifvare LISA? 1 ifvarg CURRENTCELLS 0 state showenergycellsdescript
    }
    ifvare mainmenuselection 20
    {
     state checktelecoils
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showcoilsdescript
    }
    ifvare mainmenuselection 21
    {
     ifvare LISA? 1
     {
      ifvare HAVEHACKERVISION? 1
      {
       redefinequote 332 HACKER VISION: ALLOWS LISA TO SEE SWITCH POSITIONS, KEYPAD CODES, ETC.
      }
     }
    }
    ifvare mainmenuselection 22
    {
     state checktelebeacons
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 redefinequote 332 TELEPORTER BEACON: LEAVES A SPOT TO TELEPORT TO QUICKLY.
    }
    ifvare mainmenuselection 23
    {
     state checkfauxlevelups
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showlevelupitemdescript
    }
   }

   ifvare mainmenupage 2
   {
    ifvare mainmenuselection 0 // Small Energy Drink
    {
     state checksmallenergydrinks
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showsmalledrinkdescript
    }
    ifvare mainmenuselection 1 // Large Energy Drink
    {
     state checklargeenergydrinks
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showlargeedrinkdescript
    }
    ifvare mainmenuselection 2 // Hyper Energy Drink
    {
     state checkhyperenergydrinks
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showhyperedrinkdescript
    }
    ifvare mainmenuselection 3 // Suit of Winter Clothes
    {
     state checkwintersuits
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showwintersuitdescript
    }
    ifvare mainmenuselection 4 // Portable ATM
    {
     ifvarn GOTPORTABLEATM? 0
     {
      redefinequote 332 MOBILE ATM: A MOBILE AND PORTABLE VERSION OF THE ATM. [PERMENANT ITEM]
     }
    }
    ifvare mainmenuselection 5 // Money Radar
    {
     ifvarn GOTMONEYRADAR? 0
     {
      redefinequote 332 MONEY RADAR: LOOKS FOR MONEY AND GEMS NEARBY. [PERMENANT ITEM]
     }
    }

    ifvare mainmenuselection 6 // Silk Carnation
    {
     state checksilkcarnations
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showsilkcarnationdescript
    }
    ifvare mainmenuselection 7 // Rare Pirate Doubloon
    {
     state checkrarepiratedoubloons
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showpiratedoubloondescript
    }
    ifvare mainmenuselection 8 // Pair of Fixed Dice
    {
     state checkfixeddicepairs
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showfixeddicedescript
    }
    ifvare mainmenuselection 9 // Malakian Gem
    {
     state checkmalakiangems
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showmalakiangemdescript
    }
    ifvare mainmenuselection 10 // Safe Lock Box
    {
     state checksafelockboxes
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showsafelockboxdescript
    }
    ifvare mainmenuselection 11 // Secret Recipe
    {
     state checksecretrecipes
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showsecretrecipedescript
    }
    ifvare mainmenuselection 12 // Slurpee Machine
    {
     state checkslurpeemachines
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showslurpeemachinedescript
    }
    ifvare mainmenuselection 13 // Stock Ownership
    {
     state checkstockownerships
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showstockownershipdescript
    }
    ifvare mainmenuselection 14 // Transdimensional Safe
    {
     state checktransdimensionalsafes
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showtranssafedescript
    }
    ifvare mainmenuselection 15 // Bloodpact Shield
    {
     state checkbloodpactshields
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showbloodshielddescript
    }
   }

   ifvare mainmenupage 3
   {
    ifvare mainmenuselection 0 // Zircon Ring [Silver]
    {
     state checksilverzirconrings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showzircon1descript
    }
    ifvare mainmenuselection 1 // Aquamarine Ring [Silver]
    {
     state checksilveraquamarinerings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showaquamarine1descript
    }
    ifvare mainmenuselection 2 // Turquoise Ring [Silver]
    {
     state checksilverturquoiserings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showturquoise1descript
    }
    ifvare mainmenuselection 3 // Emerald Ring [Silver]
    {
     state checksilveremeraldrings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showemerald1descript
    }
    ifvare mainmenuselection 4 // Garnet Ring [Silver]
    {
     state checksilvergarnetrings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showgarnet1descript
    }
    ifvare mainmenuselection 5 // Ruby Ring [Silver]
    {
     state checksilverrubyrings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showruby1descript
    }
    ifvare mainmenuselection 6 // Citrine Ring [Silver]
    {
     state checksilvercitrinerings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showcitrine1descript
    }
    ifvare mainmenuselection 7 // Diamond Ring [Silver]
    {
     state checksilverdiamondrings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showdiamond1descript
    }
    ifvare mainmenuselection 8 // Zircon Ring [Gold]
    {
     state checkgoldzirconrings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showzircon2descript
    }
    ifvare mainmenuselection 9 // Aquamarine Ring [Gold]
    {
     state checkgoldaquamarinerings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showaquamarine2descript
    }
    ifvare mainmenuselection 10 // Turquoise Ring [Gold]
    {
     state checkgoldturquoiserings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showturquoise2descript
    }
    ifvare mainmenuselection 11 // Emerald Ring [Gold]
    {
     state checkgoldemeraldrings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showemerald2descript
    }
    ifvare mainmenuselection 12 // Garnet Ring [Gold]
    {
     state checkgoldgarnetrings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showgarnet2descript
    }
    ifvare mainmenuselection 13 // Ruby Ring [Gold]
    {
     state checkgoldrubyrings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showruby2descript
    }
    ifvare mainmenuselection 14 // Citrine Ring [Gold]
    {
     state checkgoldcitrinerings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showcitrine2descript
    }
    ifvare mainmenuselection 15 // Diamond Ring [Gold]
    {
     state checkgolddiamondrings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showdiamond2descript
    }
/*
    ifvare mainmenuselection 16
    {
    }
    ifvare mainmenuselection 17
    {
    }
*/

    ifvare mainmenuselection 18
    {
     state checkgreentankcapsules
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showtank1capsuledescript
    }
    ifvare mainmenuselection 19
    {
     state checkbluetankcapsules
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showtank2capsuledescript
    }
    ifvare mainmenuselection 20
    {
     state checkredtankcapsules
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showtank3capsuledescript
    }
/*
    ifvare mainmenuselection 21
    {
    }
    ifvare mainmenuselection 22
    {
    }
*/
    ifvare mainmenuselection 23
    {
     ifvarg CARDMEMBERSHIP? 0
     {
      ifvare CARDMEMBERSHIP? 1 redefinequote 332 BRONZE AKAIKUTSU CARD: -15% BUY PRICE/+7.5% SELL PRICE/ETC
      ifvare CARDMEMBERSHIP? 2 redefinequote 332 SILVER AKAIKUTSU CARD: -30% BUY PRICE/+15% SELL PRICE/ETC
      ifvare CARDMEMBERSHIP? 3 redefinequote 332 GOLD AKAIKUTSU CARD: -50% BUY PRICE/+25% SELL PRICE/ETC
      ifvare CARDMEMBERSHIP? 4 redefinequote 332 PLATINUM AKAIKUTSU CARD: -75% BUY PRICE/+37.5% SELL PRICE/ETC
      ifvarg CARDMEMBERSHIP? 4 redefinequote 332 DIAMOND AKAIKUTSU CARD: -99% BUY PRICE/+49.5% SELL PRICE/ETC
     }
    }
   }

   ifvare mainmenupage 4
   {
// Row 1
    ifvare mainmenuselection 0 // Sun Ring
    {
     state checksunrings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showsunringdescript
    }
    ifvare mainmenuselection 1 // Aqua Ring
    {
     state checkaquarings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showaquaringdescript
    }
    ifvare mainmenuselection 2 // Plasma Ring
    {
     state checkplasmarings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showplasmaringdescript
    }
    ifvare mainmenuselection 3 // Spirit Ring
    {
     state checkspiritrings
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showspiritringdescript
    }
    ifvare mainmenuselection 4 // Charm Ankh
    {
     state checkcharmankhs
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showcharmankhdescript
    }
    ifvare mainmenuselection 5 // Mirror Shield
    {
     state checkmirrorshields
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showmirrorshielddescript
    }
// Row 2
    ifvare mainmenuselection 6 // Experience Badge [Blue]
    {
     state checkexpbadges
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showexpbadgedescript
    }
    ifvare mainmenuselection 7 // Rank Badge [Yellow]
    {
     state checkrankbadges
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showrankbadgedescript
    }
    ifvare mainmenuselection 8 // Money Badge [Green]
    {
     state checkmoneybadges
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showmoneybadgedescript
    }
    ifvare mainmenuselection 9 // Tactical Riot Shield
    {
     state checkriotshields
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showriotshielddescript
    }
    ifvare mainmenuselection 10
    {
     state checknyxglovepairs
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state shownyxglovesdescript
    }
    ifvare mainmenuselection 11
    {
     state checkrabbitsfoots
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showrabbitsfootdescript
    }
// Row 3
    ifvare mainmenuselection 12
    {
     state checkjumpbootpairs
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showjumpbootsdescript
    }
    ifvare mainmenuselection 13
    {
     state checkshockabbootpairs
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showshockabbootsdescript
    }
    ifvare mainmenuselection 14
    {
     state checkhappyshoepairs
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showhappyshoesdescript
    }
    ifvare mainmenuselection 15
    {
     state checkstyleshoepairs
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showstyleshoesdescript
    }
    ifvare mainmenuselection 16
    {
     state checkcharmshoepairs
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showcharmshoesdescript
    }
    ifvare mainmenuselection 17
    {
     state checkpowerwrists
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showpowerwristdescript
    }
// Row 4
    ifvare mainmenuselection 18
    {
     state checkhockeymasks
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showhockeymaskdescript
    }
    ifvare mainmenuselection 19
    {
     state checkgemstonecrowns
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showgemstonecrowndescript
    }
    ifvare mainmenuselection 20
    {
     state checkironrunes
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showironrunedescript
    }
    ifvare mainmenuselection 21
    {
     state checktwilightcapes
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showtwilightcapedescript
    }
    ifvare mainmenuselection 22
    {
     state checksnakearmbands
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showsnakearmbanddescript
    }
    ifvare mainmenuselection 23
    {
     state checkmedicbags
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showmedicbagdescript
    }
   }
   ifvare mainmenupage 5
   {
// Row 1
    ifvare mainmenuselection 0
    {
     state checkserpenthelmets
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showserpenthelmetdescript
    }
    ifvare mainmenuselection 1
    {
     state checkenergyincurments
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showenergyincurmentdescript
    }
    ifvare mainmenuselection 2
    {
     state checkyinyangorbs
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showyinyangorbdescript
    }
    ifvare mainmenuselection 3
    {
     state checkshikonjewels
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showshikonjeweldescript
    }
   }

   setvar digx 160
   qstrlen TEMPVAR 332
   ifvarg TEMPVAR 0 
   { 
    setvarvar tempb TEMPVAR
    mulvar tempb 2
    subvarvar digx tempb
    subvar digx 4
   }
   state mt

  }

  state setquote332
  ifvare mainmenusubmenu 2 // Toggle Menu
  {
   setvar digy 177
   state pal17
   ifvare mainmenupage 0
   {
    ifvare mainmenuselection 0 // Damage / Pickup Displays
    {
     ifvare miscdisplaytoggle 0 redefinequote 332 NEITTHER DAMAGE, STATS, MONEY OR REWARDS WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 1 redefinequote 332 ONLY DAMAGE WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 2 redefinequote 332 ONLY STATS WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 3 redefinequote 332 DAMAGE & STATS WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 4 redefinequote 332 ONLY MONEY WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 5 redefinequote 332 DAMAGE & MONEY WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 6 redefinequote 332 STATS & MONEY WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 7 redefinequote 332 DAMAGE, STATS & MONEY WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 8 redefinequote 332 ONLY REWARDS WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 9 redefinequote 332 DAMAGE & REWARDS WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 10 redefinequote 332 STATS & REWARDS WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 11 redefinequote 332 DAMAGE, STATS & REWARDS WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 12 redefinequote 332 MONEY & REWARDS WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 13 redefinequote 332 DAMAGE, MONEY & REWARDS WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 14 redefinequote 332 STATS, MONEY & REWARDS WILL SHOW ON SCREEN.
     ifvare miscdisplaytoggle 15 redefinequote 332 DAMAGE, STATS, MONEY & REWARDS WILL ALL SHOW ON SCREEN.
    }
    ifvare mainmenuselection 1 
    {
     ifvare statusdisplaytoggle 0 redefinequote 332 CURRENT CHARACTER'S STATS, PARTY STATUS, AND RANK WON'T SHOW ON SCREEN.
     ifvare statusdisplaytoggle 1 redefinequote 332 CURRENT CHARACTER'S STATS, PARTY STATUS, AND RANK WILL SHOW ON SCREEN.
    }
    ifvare mainmenuselection 2 
    {
     ifvare debugtoggle 0 redefinequote 332 DEBUGGING VARS NOT ON SCREEN.
     ifvare debugtoggle 1 redefinequote 332 DEBUGGING VARS ON SCREEN.
    }
    ifvare mainmenuselection 3 
    {
     ifvare lifebartogglemode 0 redefinequote 332 HP/AP LIFE BARS AND RANK ICONS WON'T APPEAR OVER PLAYERS, ENEMIES AND NPCS.
     ifvare lifebartogglemode 1 redefinequote 332 HP/AP LIFE BARS AND RANK ICONS WILL APPEAR OVER PLAYERS, ENEMIES AND NPCS.
    }
    ifvare mainmenuselection 4 
    {
     ifvare automedikittoggle 0 redefinequote 332 YOU WON'T AUTOMATICALLY USE YOUR MEDIKIT WHEN INJURED BELOW 100% OF YOUR HP.
     ifvare automedikittoggle 1 redefinequote 332 YOU WILL AUTOMATICALLY USE YOUR MEDIKIT WHEN INJURED BELOW 100% OF YOUR HP.
    }
    ifvare mainmenuselection 5 
    {
     ifvare automantletoggle 0 redefinequote 332 YOU MUST HOLD DOWN THE 'JUMP' KEY TO MANTLE ALONG LEDGE EDGES WHEN IN MIDAIR.
     ifvare automantletoggle 1 redefinequote 332 YOU WILL AUTOMATICALLY MANTLE ALONG LEDGE EDGES WHEN IN MIDAIR.
    }
    ifvare mainmenuselection 6
    {
     ifvare footstepsndtoggle 0 redefinequote 332 PLAYERS & ENEMIES WON'T MAKE SOUNDS WHEN THEY WALK/RUN AND CLIMB LADDERS.
     ifvare footstepsndtoggle 1 redefinequote 332 PLAYERS & ENEMIES WILL MAKE SOUNDS WHEN THEY WALK/RUN AND CLIMB LADDERS.
    }
    ifvare mainmenuselection 7
    {
     ifvare normalhitscantoggle 0 redefinequote 332 AIMING THE CROSSHAIR AT MOST ITEMS WON'T IDENTIFY THEM ON SCREEN.
     ifvare normalhitscantoggle 1 redefinequote 332 AIMING THE CROSSHAIR AT MOST ITEMS WILL IDENTIFY THEM ON SCREEN.
    }
    ifvare mainmenuselection 8
    {
     ifvare vehiclepickuptoggle 0 redefinequote 332 CHARACTERS IN VEHICLES ALWAYS TAKE ITEMS FOR THEMSELVES, NEVER THE VEHICLE.
     ifvare vehiclepickuptoggle 1 redefinequote 332 VEHICLES WILL ALWAYS TAKE ITEMS THEY GRAB AND NOT CHARACTERS INSIDE OF THEM.
     ifvare vehiclepickuptoggle 2 redefinequote 332 CHARACTERS & VEHICLES WILL ALWAYS TAKE ITEMS, BUT CHARACTERS GET THEM FIRST.
     ifvare vehiclepickuptoggle 3 redefinequote 332 CHARACTERS & VEHICLES WILL ALWAYS TAKE ITEMS, BUT VEHICLES GET THEM FIRST.
    }
    ifvare mainmenuselection 9
    {
     ifvare PAINSOUNDSTYPE 0 redefinequote 332 CHARACTERS' PAIN SOUNDS ARE BASED ON THEIR CURRENT HP WHEN HIT BY DAMAGE.
     ifvare PAINSOUNDSTYPE 1 redefinequote 332 CHARACTERS' PAIN SOUNDS ARE BASED ON HOW MUCH DAMAGE IS TAKEN IN PERCENT.
    }
    ifvare mainmenuselection 10
    {
     ifvare rpgdmgdisplaytoggle 0 redefinequote 332 INDIVIDUAL HP/AP HEALING/DAMAGE WILL NOT SHOW FOR EACH ACTOR WHEN IT OCCURS.
     ifvare rpgdmgdisplaytoggle 1 redefinequote 332 INDIVIDUAL HP/AP HEALING/DAMAGE WILL SHOW FOR EACH ACTOR WHEN IT OCCURS.
    }
    ifvare mainmenuselection 11
    {
     ifvare autosavetoggle 0 redefinequote 332 THE GAME WON'T AUTOSAVE AT THE BEGINNING OF ALL MAPS OR ON TIMED INTERVALS.
     ifvare autosavetoggle 1 redefinequote 332 THE GAME WILL AUTOSAVE AT THE BEGINNING OF ALL MAPS AND ON TIMED INTERVALS.
    }
    ifvare mainmenuselection 12
    {
     ifvare weapontoggleselect 0 redefinequote 332 "WEAPON LEFT/RIGHT" WILL CYCLE THROUGH CHARACTERS INSTEAD OF WEAPONS.
     ifvare weapontoggleselect 1 redefinequote 332 "WEAPON LEFT/RIGHT" WILL CYCLE THROUGH WEAPONS INSTEAD OF CHARACTERS.
    }
   }
   setvar digx 160
   qstrlen TEMPVAR 332
   ifvarg TEMPVAR 0 
   { 
    setvarvar tempb TEMPVAR
    mulvar tempb 2
    subvarvar digx tempb
    subvar digx 4
   }
   state mt
  }

/*
  state setquote332
  ifvare mainmenusubmenu 5 nullop // Support Menu
*/ 

  state setquote332
  ifvare mainmenusubmenu 6 // Equipment Menu
  {
   setvar digy 177
   state pal17
   ifvare mainmenuselection 0
   {
    setvarvar CHARACTERARRAY mainmenupage
    addvar CHARACTERARRAY 1
    getactorvar[CHARACTERARRAY].CHARACTEREQUIPSLOTITEM1 EQUIPTEMP
    ifvare equipmenuinuse -1 state showequipmentitemdescript
   }
   ifvare mainmenuselection 1
   {
    setvarvar CHARACTERARRAY mainmenupage
    addvar CHARACTERARRAY 1
    getactorvar[CHARACTERARRAY].CHARACTEREQUIPSLOTITEM2 EQUIPTEMP
    ifvare equipmenuinuse -1 state showequipmentitemdescript
   }
   ifvare mainmenuselection 2
   {
    setvarvar CHARACTERARRAY mainmenupage
    addvar CHARACTERARRAY 1
    getactorvar[CHARACTERARRAY].CHARACTEREQUIPSLOTITEM3 EQUIPTEMP
    ifvare equipmenuinuse -1 state showequipmentitemdescript
   }
   ifvare mainmenuselection 3
   {
    setvarvar CHARACTERARRAY mainmenupage
    addvar CHARACTERARRAY 1
    getactorvar[CHARACTERARRAY].CHARACTEREQUIPSLOTITEM4 EQUIPTEMP
    ifvare equipmenuinuse -1 state showequipmentitemdescript
   }
   ifvare mainmenuselection 4
   {
    setvarvar CHARACTERARRAY mainmenupage
    addvar CHARACTERARRAY 1
    getactorvar[CHARACTERARRAY].CHARACTEREQUIPSLOTITEM5 EQUIPTEMP
    ifvare equipmenuinuse -1 state showequipmentitemdescript
   }
   ifvare mainmenuselection 5
   {
    setvarvar CHARACTERARRAY mainmenupage
    addvar CHARACTERARRAY 1
    getactorvar[CHARACTERARRAY].CHARACTEREQUIPSLOTITEM6 EQUIPTEMP
    ifvare equipmenuinuse -1 state showequipmentitemdescript
   }
   ifvare mainmenuselection 6
   {
    setvarvar CHARACTERARRAY mainmenupage
    addvar CHARACTERARRAY 1
    getactorvar[CHARACTERARRAY].CHARACTEREQUIPSLOTITEM7 EQUIPTEMP
    ifvare equipmenuinuse -1 state showequipmentitemdescript
   }
   ifvare mainmenuselection 7
   {
    setvarvar CHARACTERARRAY mainmenupage
    addvar CHARACTERARRAY 1
    getactorvar[CHARACTERARRAY].CHARACTEREQUIPSLOTITEM8 EQUIPTEMP
    ifvare equipmenuinuse -1 state showequipmentitemdescript
   }
   ifvare equipmenuinuse -1 state mt
  }

  state setquote332
  ifvare mainmenusubmenu 7 // WorldTile Menu
  {
   setvar digy 177
   setvar digx 160
   state pal20
   redefinequote 332 ^10[WORLDTILE NOT YET FOUND!]
   ifvare mainmenupage 0 // Page 1: #1-#25
   {
    ifvare mainmenuselection 0 ifvarand WORLDTILEBITFIELD1 1 redefinequote 332 WORLDTILE #1: ^22"WENDY IN CONFUSION!"
    ifvare mainmenuselection 1 ifvarand WORLDTILEBITFIELD1 2 redefinequote 332 WORLDTILE #2: ^22"AMI AT THE BEACH!"
    ifvare mainmenuselection 2 ifvarand WORLDTILEBITFIELD1 4 redefinequote 332 WORLDTILE #3: ^22"AMI MIZUNO: SENSHI OF ICE AND WATER!"
    ifvare mainmenuselection 3 ifvarand WORLDTILEBITFIELD1 8 redefinequote 332 WORLDTILE #4: ^22"MINAKO AND THE ROSES!"
    ifvare mainmenuselection 4 ifvarand WORLDTILEBITFIELD1 16 redefinequote 332 WORLDTILE #5: ^22"MINAKO AINO: SENSHI OF LOVE AND METAL!"
    ifvare mainmenuselection 5 ifvarand WORLDTILEBITFIELD1 32 redefinequote 332 WORLDTILE #6: ^22"BUBSY: 'SSSSSMOKIN'!!!'"
    ifvare mainmenuselection 6 ifvarand WORLDTILEBITFIELD1 64 redefinequote 332 WORLDTILE #7: ^22"BUBSY WITH THE NERF BALLZOOKA OF DOOM!"
    ifvare mainmenuselection 7 ifvarand WORLDTILEBITFIELD1 128 redefinequote 332 WORLDTILE #8: ^22"SERIA HASSELBAG: LEADER OF TEAM GUPPY!"
    ifvare mainmenuselection 8 ifvarand WORLDTILEBITFIELD1 256 redefinequote 332 WORLDTILE #9: ^22"THE MYSTERIOUS GREEN-HAIRED MAID!"
    ifvare mainmenuselection 9 ifvarand WORLDTILEBITFIELD1 512 redefinequote 332 WORLDTILE #10: ^22"SHAO KAHN: THE CRUEL EMPEROR OF OUTWORLD!"
    ifvare mainmenuselection 10 ifvarand WORLDTILEBITFIELD1 1024 redefinequote 332 WORLDTILE #11: ^22"HAN AND SERENIA: GUARDIAN HEROES!"
    ifvare mainmenuselection 11 ifvarand WORLDTILEBITFIELD1 2048 redefinequote 332 WORLDTILE #12: ^22"THE OMNIOUS MEOW OF KURONEKO-SAMA!"
    ifvare mainmenuselection 12 ifvarand WORLDTILEBITFIELD1 4096 redefinequote 332 WORLDTILE #13: ^22"PAULA POLESTAR: POSSESSOR OF PSYCHIC POWERS!"
    ifvare mainmenuselection 13 ifvarand WORLDTILEBITFIELD1 8192 redefinequote 332 WORLDTILE #14: ^22"PILZ-E HIDES FROM THE PHONE!"
    ifvare mainmenuselection 14 ifvarand WORLDTILEBITFIELD1 16384 redefinequote 332 WORLDTILE #15: ^22"DEEP IMPACT! OH NOES!!"
    ifvare mainmenuselection 15 ifvarand WORLDTILEBITFIELD1 32768 redefinequote 332 WORLDTILE #16: ^22"JANMICHEL HASSELBAG: MUSCLE OF TEAM GUPPY!"
    ifvare mainmenuselection 16 ifvarand WORLDTILEBITFIELD1 65536 redefinequote 332 WORLDTILE #17: ^22"EMILIA ALCANETT: LEADER OF TEAM PINK DOLPHIN!"
    ifvare mainmenuselection 17 ifvarand WORLDTILEBITFIELD1 131072 redefinequote 332 WORLDTILE #18: ^22"LIZA KITSANA: THE BLADE OF TEAM PINK DOLPHIN!""
    ifvare mainmenuselection 18 ifvarand WORLDTILEBITFIELD1 262144 redefinequote 332 WORLDTILE #19: ^22"MURDOCH HOOPER: BRAINS OF TEAM GUPPY!"
    ifvare mainmenuselection 19 ifvarand WORLDTILEBITFIELD1 524288 redefinequote 332 WORLDTILE #20: ^22"WENDY WILKINSON: MAID AND MEDIC OF TEAM GUPPY!"
    ifvare mainmenuselection 20 ifvarand WORLDTILEBITFIELD1 1048576 redefinequote 332 WORLDTILE #21: ^22"SHIZA READY TO NUKE SOMETHING!"
    ifvare mainmenuselection 21 ifvarand WORLDTILEBITFIELD1 2097152 redefinequote 332 WORLDTILE #22: ^22"AMI'S HAPPY AND INFECTOUS SMILE!"
    ifvare mainmenuselection 22 ifvarand WORLDTILEBITFIELD1 4194304 redefinequote 332 WORLDTILE #23: ^22"BUBSY BOBCAT: MOVIE STAR AND YARN LOVER!"
    ifvare mainmenuselection 23 ifvarand WORLDTILEBITFIELD1 8388608 redefinequote 332 WORLDTILE #24: ^22"SERIA RUSHES INTO BATTLE!"
    ifvare mainmenuselection 24 ifvarand WORLDTILEBITFIELD1 16777216 redefinequote 332 WORLDTILE #25: ^22"JANMICHEL ABOUT TO FIRE AWAY!"
   }
   ifvare mainmenupage 1 // Page 2: #26-#50
   {
    ifvare mainmenuselection 0 ifvarand WORLDTILEBITFIELD1 33554432 redefinequote 332 WORLDTILE #26: ^22"THE MYSTERIOUS WOMAN IN THOUGHT!"
    ifvare mainmenuselection 1 ifvarand WORLDTILEBITFIELD1 67108864 redefinequote 332 WORLDTILE #27: ^22"MINAKO SINGS FOR US ALL!"
    ifvare mainmenuselection 2 ifvarand WORLDTILEBITFIELD1 134217728 redefinequote 332 WORLDTILE #28: ^22"A NIGHT ON THE TOWN!"
    ifvare mainmenuselection 3 ifvarand WORLDTILEBITFIELD1 268435456 redefinequote 332 WORLDTILE #29: ^22"DUKE NUKEM AND THE 3D REALMS STAFF!"
    ifvare mainmenuselection 4 ifvarand WORLDTILEBITFIELD1 536870912 redefinequote 332 WORLDTILE #30: ^22"MINAKO LYING DOWN WITH CHARM!"
    ifvare mainmenuselection 5 ifvarand WORLDTILEBITFIELD1 1073741824 redefinequote 332 WORLDTILE #31: ^22"AMI LYING DOWN AND SHY!"
    ifvare mainmenuselection 6 ifvarand WORLDTILEBITFIELD1 2147483648 redefinequote 332 WORLDTILE #32: ^22"LO WANG'S TRAINING!"

    ifvare mainmenuselection 7 ifvarand WORLDTILEBITFIELD2 1 redefinequote 332 WORLDTILE #33: ^22"THE FURY OF THE ANFACIAR!"
    ifvare mainmenuselection 8 ifvarand WORLDTILEBITFIELD2 2 redefinequote 332 WORLDTILE #34: ^22"THE MYSTERIOUS PREDATAR OF DOOM!"
    ifvare mainmenuselection 9 ifvarand WORLDTILEBITFIELD2 4 redefinequote 332 WORLDTILE #35: ^22"KINTARO THE FOUR-ARMED TIGER MAN!"
    ifvare mainmenuselection 10 ifvarand WORLDTILEBITFIELD2 8 redefinequote 332 WORLDTILE #36: ^22"DUKE NUKEM CLEANING UP AROUND TOWN!"
    ifvare mainmenuselection 11 ifvarand WORLDTILEBITFIELD2 16 redefinequote 332 WORLDTILE #37: ^22"MORE OF THE MYSTERIOUS LADY!"
    ifvare mainmenuselection 12 ifvarand WORLDTILEBITFIELD2 32 redefinequote 332 WORLDTILE #38: ^22"A FATED BATTLE: GOKU VERSUS VEGETA!"
    ifvare mainmenuselection 13 ifvarand WORLDTILEBITFIELD2 64 redefinequote 332 WORLDTILE #39: ^22"EMILIA WINKS FROM THE COCKPIT!"
    ifvare mainmenuselection 14 ifvarand WORLDTILEBITFIELD2 128 redefinequote 332 WORLDTILE #40: ^22"NINA WYNDIA: THE BLACK-WINGED PRODIGY!"
    ifvare mainmenuselection 15 ifvarand WORLDTILEBITFIELD2 256 redefinequote 332 WORLDTILE #41: ^22"ED-209: CORRUPTED PROGRAMMING UNLEASHED!"
    ifvare mainmenuselection 16 ifvarand WORLDTILEBITFIELD2 512 redefinequote 332 WORLDTILE #42: ^22"LIZA'S ABOUT TO OWN SOMEONE!"
    ifvare mainmenuselection 17 ifvarand WORLDTILEBITFIELD2 1024 redefinequote 332 WORLDTILE #43: ^22"POTPOURRI VANPU: SPECIALIST OF TEAM PINK DOLPHIN!"
    ifvare mainmenuselection 18 ifvarand WORLDTILEBITFIELD2 2048 redefinequote 332 WORLDTILE #44: ^22"ARIN HITTING A 'PANGYA'!"
    ifvare mainmenuselection 19 ifvarand WORLDTILEBITFIELD2 4096 redefinequote 332 WORLDTILE #45: ^22"THE STORMRAGE OF OUTLAND!"
    ifvare mainmenuselection 20 ifvarand WORLDTILEBITFIELD2 8192 redefinequote 332 WORLDTILE #46: ^22"THE SERPENT RIDERS: TRINITY OF DESTRUCTION!"
    ifvare mainmenuselection 21 ifvarand WORLDTILEBITFIELD2 16384 redefinequote 332 WORLDTILE #47: ^22"THE FEARSOME FIVE: CRIME DONE WITH STYLE!"
    ifvare mainmenuselection 22 ifvarand WORLDTILEBITFIELD2 32768 redefinequote 332 WORLDTILE #48: ^22"NORMAN: THE FEARLESS BODYGUARD OF THE CAPBEARER!"
    ifvare mainmenuselection 23 ifvarand WORLDTILEBITFIELD2 65536 redefinequote 332 WORLDTILE #49: ^22"THE SKYLINES OF TOKYO!"
    ifvare mainmenuselection 24 ifvarand WORLDTILEBITFIELD2 131072 redefinequote 332 WORLDTILE #50: ^22"THE FROG AND THE GRANDLEON!"
   }
   ifvare mainmenupage 2 // Page 3: #51-#75
   {
    ifvare mainmenuselection 0 ifvarand WORLDTILEBITFIELD2 262144 redefinequote 332 WORLDTILE #51: ^22"SCARY LIVING FOREST IS SCARY!"
    ifvare mainmenuselection 1 ifvarand WORLDTILEBITFIELD2 524288 redefinequote 332 WORLDTILE #52: ^22"TEAM GUPPY AND THE GALAXY POLICE!"
    ifvare mainmenuselection 2 ifvarand WORLDTILEBITFIELD2 1048576 redefinequote 332 WORLDTILE #53: ^22"LO WANG MARKS ANOTHER KILL ON HIS LIST!"
    ifvare mainmenuselection 3 ifvarand WORLDTILEBITFIELD2 2097152 redefinequote 332 WORLDTILE #54: ^22"JANMICHEAL'S SPECIAL INTERFACE MODE!"
    ifvare mainmenuselection 4 ifvarand WORLDTILEBITFIELD2 4194304 redefinequote 332 WORLDTILE #55: ^22"THE PALACE OF THE ELEMENTAL GODS!"
    ifvare mainmenuselection 5 ifvarand WORLDTILEBITFIELD2 8388608 redefinequote 332 WORLDTILE #56: ^22"THE ICON OF THE SIN BARES DOWN ON YOU!"
    ifvare mainmenuselection 6 ifvarand WORLDTILEBITFIELD2 16777216 redefinequote 332 WORLDTILE #57: ^22"NICHOLE NEIL: MAGE OF THE GUARDIAN HEROES!"
    ifvare mainmenuselection 7 ifvarand WORLDTILEBITFIELD2 33554432 redefinequote 332 WORLDTILE #58: ^22"THE BIBLOPHILE AND THE WRITER!"
    ifvare mainmenuselection 8 ifvarand WORLDTILEBITFIELD2 67108864 redefinequote 332 WORLDTILE #59: ^22"CHRISTOPHER BERGERT: ARTIST OF MYSTERY!"
    ifvare mainmenuselection 9 ifvarand WORLDTILEBITFIELD2 134217728 redefinequote 332 WORLDTILE #60: ^22"THE LEGEND OF THE EVOLUTIA!"
    ifvare mainmenuselection 10 ifvarand WORLDTILEBITFIELD2 268435456 redefinequote 332 WORLDTILE #61: ^22"PAULA FRIES THE BOOGEY TENT!"
    ifvare mainmenuselection 11 ifvarand WORLDTILEBITFIELD2 536870912 redefinequote 332 WORLDTILE #62: ^22"HAX. LOL K NOOB."
    ifvare mainmenuselection 12 ifvarand WORLDTILEBITFIELD2 1073741824 redefinequote 332 WORLDTILE #63: ^22"ANNET MAYA: THE POWER OF 'EL VIENTO'"
    ifvare mainmenuselection 13 ifvarand WORLDTILEBITFIELD2 2147483648 redefinequote 332 WORLDTILE #64: ^22"THE JUNKYARD LAIR OF THE WYVERNS!"

    ifvare mainmenuselection 14 ifvarand WORLDTILEBITFIELD3 1 redefinequote 332 WORLDTILE #65: ^22"ALL EYES ARE ON POTPOURRI!"
    ifvare mainmenuselection 15 ifvarand WORLDTILEBITFIELD3 2 redefinequote 332 WORLDTILE #66: ^22"TEAM PINK DOLPHIN'S SHOCK AND AWE!"
    ifvare mainmenuselection 16 ifvarand WORLDTILEBITFIELD3 4 redefinequote 332 WORLDTILE #67: ^22"DORAN CARMOTHAS: MUSCLE OF TEAM PINK DOLPHIN!"
    ifvare mainmenuselection 17 ifvarand WORLDTILEBITFIELD3 8 redefinequote 332 WORLDTILE #68: ^22"LIZA AND DORAN IN COMBAT WITH ROBOTS!"
    ifvare mainmenuselection 18 ifvarand WORLDTILEBITFIELD3 16 redefinequote 332 WORLDTILE #69: ^22"THE CONDUCTOR LOOKS ON WITH FRUSTRATION!"
    ifvare mainmenuselection 19 ifvarand WORLDTILEBITFIELD3 32 redefinequote 332 WORLDTILE #70: ^22"TEAM GUPPY MINUS SERIA!"
    ifvare mainmenuselection 20 ifvarand WORLDTILEBITFIELD3 64 redefinequote 332 WORLDTILE #71: ^22"THE ENIGMATIC PAN-G AND THE THIEF DOLPH FISCHER!"
    ifvare mainmenuselection 21 ifvarand WORLDTILEBITFIELD3 128 redefinequote 332 WORLDTILE #72: ^22"THE GALAXY POLICE LEADERS: SYLVIA AND DICKS!"
    ifvare mainmenuselection 22 ifvarand WORLDTILEBITFIELD3 256 redefinequote 332 WORLDTILE #73: ^22"EMILIA LOOKS AHEAD!"
    ifvare mainmenuselection 23 ifvarand WORLDTILEBITFIELD3 512 redefinequote 332 WORLDTILE #74: ^22"SHIZA KANAGUSK: GRAPPLER OF TEAM GUPPY!"
    ifvare mainmenuselection 24 ifvarand WORLDTILEBITFIELD3 1024 redefinequote 332 WORLDTILE #75: ^22"EMILIA'S CURIOSITY!"
   }
   ifvare mainmenupage 3 // Page 4: #76-#100
   {
    ifvare mainmenuselection 0 ifvarand WORLDTILEBITFIELD3 2048 redefinequote 332 WORLDTILE #76: ^22"DORAN: EXTREME CLOSEUP!"
    ifvare mainmenuselection 1 ifvarand WORLDTILEBITFIELD3 4096 redefinequote 332 WORLDTILE #77: ^22"POTPOURRI IS ON THE CASE!"
    ifvare mainmenuselection 2 ifvarand WORLDTILEBITFIELD3 8192 redefinequote 332 WORLDTILE #78: ^22"SERIA, SHIZA AND WENDY IN WAIT!"
    ifvare mainmenuselection 3 ifvarand WORLDTILEBITFIELD3 16384 redefinequote 332 WORLDTILE #79: ^22"SERIA AND MURDOCH'S CONFUSION!"
    ifvare mainmenuselection 4 ifvarand WORLDTILEBITFIELD3 32768 redefinequote 332 WORLDTILE #80: ^22"BATES HAMILL: GALAXY OFFICER OF TRAGEDY!"
    ifvare mainmenuselection 5 ifvarand WORLDTILEBITFIELD3 65536 redefinequote 332 WORLDTILE #81: ^22"CELL WITH A HEAD OF HAIR?!"
    ifvare mainmenuselection 6 ifvarand WORLDTILEBITFIELD3 131072 redefinequote 332 WORLDTILE #82: ^22"ARIN: THE MAGI OF PANGYA!"
    ifvare mainmenuselection 7 ifvarand WORLDTILEBITFIELD3 262144 redefinequote 332 WORLDTILE #83: ^22"ARIN GIVES YOU GREETINGS!"
    ifvare mainmenuselection 8 ifvarand WORLDTILEBITFIELD3 524288 redefinequote 332 WORLDTILE #84: ^22"OOZARU VERSES THE NINE-TAILED FOX!"
    ifvare mainmenuselection 9 ifvarand WORLDTILEBITFIELD3 1048576 redefinequote 332 WORLDTILE #85: ^22"DOG AT THE COUNTER!"
    ifvare mainmenuselection 10 ifvarand WORLDTILEBITFIELD3 2097152 redefinequote 332 WORLDTILE #86: ^22"TTA: KIRBOPHER15 VERSUS CAILEN CROW!"
    ifvare mainmenuselection 11 ifvarand WORLDTILEBITFIELD3 4194304 redefinequote 332 WORLDTILE #87: ^22"TTA: THE MAIN TEAM TOGETHER!"
    ifvare mainmenuselection 12 ifvarand WORLDTILEBITFIELD3 8388608 redefinequote 332 WORLDTILE #88: ^22"THE DESTINED CHILD AND HIS FRIENDS!"
    ifvare mainmenuselection 13 ifvarand WORLDTILEBITFIELD3 16777216 redefinequote 332 WORLDTILE #89: ^22"THE CYBERDEMON, UPGRADED HORROR!"
    ifvare mainmenuselection 14 ifvarand WORLDTILEBITFIELD3 33554432 redefinequote 332 WORLDTILE #90: ^22"LESTAT AND HIS DOBERMAN PALS!"
    ifvare mainmenuselection 15 ifvarand WORLDTILEBITFIELD3 67108864 redefinequote 332 WORLDTILE #91: ^22"RADDITZ WITH COMBAT DAMAGE!"
    ifvare mainmenuselection 16 ifvarand WORLDTILEBITFIELD3 134217728 redefinequote 332 WORLDTILE #92: ^22"RADDITZ: SUPER SAIYA-JIN!"
    ifvare mainmenuselection 17 ifvarand WORLDTILEBITFIELD3 268435456 redefinequote 332 WORLDTILE #93: ^22"AMI DRESSED UP FOR CHRISTMAS!"
    ifvare mainmenuselection 18 ifvarand WORLDTILEBITFIELD3 536870912 redefinequote 332 WORLDTILE #94: ^22"GOKU, RADDITZ AND BARDOCK: FAMILY TIES!"
    ifvare mainmenuselection 19 ifvarand WORLDTILEBITFIELD3 1073741824 redefinequote 332 WORLDTILE #95: ^22"BUBSY: GUITARIST PUNK!"
    ifvare mainmenuselection 20 ifvarand WORLDTILEBITFIELD3 2147483648 redefinequote 332 WORLDTILE #96: ^22"THE CREW OF THE OUTLAW STAR!"

    ifvare mainmenuselection 21 ifvarand WORLDTILEBITFIELD4 1 redefinequote 332 WORLDTILE #97: ^22"THE BEARDED MISFIT GLARES!"
    ifvare mainmenuselection 22 ifvarand WORLDTILEBITFIELD4 2 redefinequote 332 WORLDTILE #98: ^22"DEVIN AND THE POPCORN!"
    ifvare mainmenuselection 23 ifvarand WORLDTILEBITFIELD4 4 redefinequote 332 WORLDTILE #99: ^22"CLINT: KA... ME... HA... ME..."
    ifvare mainmenuselection 24 ifvarand WORLDTILEBITFIELD4 8 redefinequote 332 WORLDTILE #100: ^22"ALEX: EXTREMELY CLOSEUP!"
   }
   ifvare mainmenupage 4 // Page 5: #101-#125
   {
    ifvare mainmenuselection 0 ifvarand WORLDTILEBITFIELD4 16 redefinequote 332 WORLDTILE #101: ^22"DEVIN AT THE COMPUTER!"
    ifvare mainmenuselection 1 ifvarand WORLDTILEBITFIELD4 32 redefinequote 332 WORLDTILE #102: ^22"CLINT: HA!!!!"
    ifvare mainmenuselection 2 ifvarand WORLDTILEBITFIELD4 64 redefinequote 332 WORLDTILE #103: ^22"LINEAR EXTENDS HER GREETINGS!"
    ifvare mainmenuselection 3 ifvarand WORLDTILEBITFIELD4 128 redefinequote 332 WORLDTILE #104: ^22"MINA WYNDIA: THE BLUE HAIRED ANGEL!"
    ifvare mainmenuselection 4 ifvarand WORLDTILEBITFIELD4 256 redefinequote 332 WORLDTILE #105: ^22"NINA'S GLANCE TO YOU!"
    ifvare mainmenuselection 5 ifvarand WORLDTILEBITFIELD4 512 redefinequote 332 WORLDTILE #106: ^22"TOKYO'S SCRAMBLE CROSSINGS!"
    ifvare mainmenuselection 6 ifvarand WORLDTILEBITFIELD4 1024 redefinequote 332 WORLDTILE #107: ^22"THE FACE OF ALL NIGHTMARES!"
    ifvare mainmenuselection 7 ifvarand WORLDTILEBITFIELD4 2048 redefinequote 332 WORLDTILE #108: ^22"THE HEROES OF TOME!"
    ifvare mainmenuselection 8 ifvarand WORLDTILEBITFIELD4 4096 redefinequote 332 WORLDTILE #109: ^22"THE STREETS OF LONDON!"
    ifvare mainmenuselection 9 ifvarand WORLDTILEBITFIELD4 8192 redefinequote 332 WORLDTILE #110: ^22"LINEAR AND YURKA'S CONCERN!"
    ifvare mainmenuselection 10 ifvarand WORLDTILEBITFIELD4 16384 redefinequote 332 WORLDTILE #111: ^22"MAKOTO KINO: SENSHI OF THUNDER AND WOOK!"
    ifvare mainmenuselection 11 ifvarand WORLDTILEBITFIELD4 32768 redefinequote 332 WORLDTILE #112: ^22"REI HINO: SENSHI OF FIRE AND MIND!"
    ifvare mainmenuselection 12 ifvarand WORLDTILEBITFIELD4 65536 redefinequote 332 WORLDTILE #113: ^22"MINAKO'S TENNIS MATCH!"
    ifvare mainmenuselection 13 ifvarand WORLDTILEBITFIELD4 131072 redefinequote 332 WORLDTILE #114: ^22"AMI IN HER SWIMSUIT!"
    ifvare mainmenuselection 14 ifvarand WORLDTILEBITFIELD4 262144 redefinequote 332 WORLDTILE #115: ^22"MONTAGE TO THE GIRL!"
    ifvare mainmenuselection 15 ifvarand WORLDTILEBITFIELD4 524288 redefinequote 332 WORLDTILE #116: ^22"OLD SCHOOL STARGATE SG-1!"
    ifvare mainmenuselection 16 ifvarand WORLDTILEBITFIELD4 1048576 redefinequote 332 WORLDTILE #117: ^22"THE TEAM OF STARGATE ATLANTIS!"
    ifvare mainmenuselection 17 ifvarand WORLDTILEBITFIELD4 2097152 redefinequote 332 WORLDTILE #118: ^22"KENICHI SHIRAHAMA AND MIU FURINJI!"
    ifvare mainmenuselection 18 ifvarand WORLDTILEBITFIELD4 4194304 redefinequote 332 WORLDTILE #119: ^22"AN AIREAL SHOT OF MCKINLEY MONUMENT!"
    ifvare mainmenuselection 19 ifvarand WORLDTILEBITFIELD4 8388608 redefinequote 332 WORLDTILE #120: ^22"HOLLYWOOD ON FIRE!"
    ifvare mainmenuselection 20 ifvarand WORLDTILEBITFIELD4 16777216 redefinequote 332 WORLDTILE #121: ^22"THE GREAY SAIYAMAN AND SAILOR V!"
    ifvare mainmenuselection 21 ifvarand WORLDTILEBITFIELD4 33554432 redefinequote 332 WORLDTILE #122: ^22"ANNET IN LONDON!"
    ifvare mainmenuselection 22 ifvarand WORLDTILEBITFIELD4 67108864 redefinequote 332 WORLDTILE #123: ^22"PAULA AND VEGETA?!"
    ifvare mainmenuselection 23 ifvarand WORLDTILEBITFIELD4 134217728 redefinequote 332 WORLDTILE #124: ^22"PAULA AND THE STRANGE PINK HAIRED GIRL!"
    ifvare mainmenuselection 24 ifvarand WORLDTILEBITFIELD4 268435456 redefinequote 332 WORLDTILE #125: ^22"ANNET MAYA MONTAGE!"
   }
   ifvare mainmenupage 5 // Page 6: #126-#150
   {
    ifvare mainmenuselection 0 ifvarand WORLDTILEBITFIELD4 536870912 redefinequote 332 WORLDTILE #126: ^22"THE BIBLOPHILE AND HER BOOKS!"
    ifvare mainmenuselection 1 ifvarand WORLDTILEBITFIELD4 1073741824 redefinequote 332 WORLDTILE #127: ^22"THE SORCERESS WEAVES HER MAGIC!"
    ifvare mainmenuselection 2 ifvarand WORLDTILEBITFIELD4 2147483648 redefinequote 332 WORLDTILE #128: ^22"THE RED BLAZER!"

    ifvare mainmenuselection 3 ifvarand WORLDTILEBITFIELD5 1 redefinequote 332 WORLDTILE #129: ^22"GUESS WHO IT IS?! GHOST NAPPA!!!"
    ifvare mainmenuselection 4 ifvarand WORLDTILEBITFIELD5 2 redefinequote 332 WORLDTILE #130: ^22"THE SCIENTIST AND THE ARTIST!"
    ifvare mainmenuselection 5 ifvarand WORLDTILEBITFIELD5 4 redefinequote 332 WORLDTILE #131: ^22"DARKWING IN THE MOONLIGHT!"
    ifvare mainmenuselection 6 ifvarand WORLDTILEBITFIELD5 8 redefinequote 332 WORLDTILE #132: ^22"THE OMINOUS GLARE OF THE LICH KING!"
    ifvare mainmenuselection 7 ifvarand WORLDTILEBITFIELD5 16 redefinequote 332 WORLDTILE #133: ^22"MAGMA ISLAND ON THE EDGE OF HELL!"
    ifvare mainmenuselection 8 ifvarand WORLDTILEBITFIELD5 32 redefinequote 332 WORLDTILE #134: ^22"SICHTE MEISTER: THE MAGI OF SPACE-TIME!"
    ifvare mainmenuselection 9 ifvarand WORLDTILEBITFIELD5 64 redefinequote 332 WORLDTILE #135: ^22"SCHWER-MUTA MERKLE: THE MAGI OF TRICKERY!"
    ifvare mainmenuselection 10 ifvarand WORLDTILEBITFIELD5 128 redefinequote 332 WORLDTILE #136: ^22"FREUDIA NEUWAHL: THE MAGI OF ICE!"
    ifvare mainmenuselection 11 ifvarand WORLDTILEBITFIELD5 256 redefinequote 332 WORLDTILE #137: ^22"THE DESTROYER OF UNIVERSES!"
    ifvare mainmenuselection 12 ifvarand WORLDTILEBITFIELD5 512 redefinequote 332 WORLDTILE #138: ^22"AMI: 'IT'S OVER... 9000?!'"
    ifvare mainmenuselection 13 ifvarand WORLDTILEBITFIELD5 1024 redefinequote 332 WORLDTILE #139: ^22"BUBSY: 'WHAT'RE YOU LOOKIN' AT?'"
    ifvare mainmenuselection 14 ifvarand WORLDTILEBITFIELD5 2048 redefinequote 332 WORLDTILE #140: ^22"BUBSY AND FRIENDS VERSUS THE AMAZITORIUM!"
    ifvare mainmenuselection 15 ifvarand WORLDTILEBITFIELD5 4096 redefinequote 332 WORLDTILE #141: ^22"PINK-SKINNED DEATH ON VACATION!"
    ifvare mainmenuselection 16 ifvarand WORLDTILEBITFIELD5 8192 redefinequote 332 WORLDTILE #142: ^22"LISA: 'BOOT TO THE HEAD!'"
    ifvare mainmenuselection 17 ifvarand WORLDTILEBITFIELD5 16384 redefinequote 332 WORLDTILE #143: ^22"PRINCESS DAISY IN THE SUMMER!"
    ifvare mainmenuselection 18 ifvarand WORLDTILEBITFIELD5 32768 redefinequote 332 WORLDTILE #144: ^22"THE GOTHIC GIRL IN THE FOREST!"
    ifvare mainmenuselection 19 ifvarand WORLDTILEBITFIELD5 65536 redefinequote 332 WORLDTILE #145: ^22"THE MANICIAL ORDER AND THE SIGIL!"
    ifvare mainmenuselection 20 ifvarand WORLDTILEBITFIELD5 131072 redefinequote 332 WORLDTILE #146: ^22"THE CONSERVATION OF ENERGY THEOREM!"
    ifvare mainmenuselection 21 ifvarand WORLDTILEBITFIELD5 262144 redefinequote 332 WORLDTILE #147: ^22"PAULA PREPARES FOR THE FUTURE!"
    ifvare mainmenuselection 22 ifvarand WORLDTILEBITFIELD5 524288 redefinequote 332 WORLDTILE #148: ^22"TRIBUTE TO AN OLD FRIEND..."
    ifvare mainmenuselection 23 ifvarand WORLDTILEBITFIELD5 1048576 redefinequote 332 WORLDTILE #149: ^22"A TRUE MISFIT BEYOND ALL DOUBT!"
    ifvare mainmenuselection 24 ifvarand WORLDTILEBITFIELD5 2097152 redefinequote 332 WORLDTILE #150: ^22"A KISS UNDER THE MISTLETOE?!"
   }
   ifvare mainmenupage 6 // Page 7: #151-#175
   {
    ifvare mainmenuselection 0 ifvarand WORLDTILEBITFIELD5 4194304 redefinequote 332 WORLDTILE #151: ^22"SERIA THE ANGEL?!"
    ifvare mainmenuselection 1 ifvarand WORLDTILEBITFIELD5 8388608 redefinequote 332 WORLDTILE #152: ^22"THE THREE SIDES OF INUYASHA!"
    ifvare mainmenuselection 2 ifvarand WORLDTILEBITFIELD5 16777216 redefinequote 332 WORLDTILE #153: ^22"THE TENKA OF EARTH!"
    ifvare mainmenuselection 3 ifvarand WORLDTILEBITFIELD5 33554432 redefinequote 332 WORLDTILE #154: ^22"THE MISCHEVIOUS GIRL WITH PINK HAIR?!"
    ifvare mainmenuselection 4 ifvarand WORLDTILEBITFIELD5 67108864 redefinequote 332 WORLDTILE #155: ^22"THE HERO, THE SIGIL AND THE FALLEN GOD!"
    ifvare mainmenuselection 5 ifvarand WORLDTILEBITFIELD5 134217728 redefinequote 332 WORLDTILE #156: ^22"SOME SAY THIS IS THE WORST OF HELL!"
    ifvare mainmenuselection 6 ifvarand WORLDTILEBITFIELD5 268435456 redefinequote 332 WORLDTILE #157: ^22"AMI THE WAITRESS!"
    ifvare mainmenuselection 7 ifvarand WORLDTILEBITFIELD5 536870912 redefinequote 332 WORLDTILE #158: ^22"PRINCESS PEACH IN THE SUMMER!"
    ifvare mainmenuselection 8 ifvarand WORLDTILEBITFIELD5 1073741824 redefinequote 332 WORLDTILE #159: ^22"THE POWER OF MARX WRATH!"
    ifvare mainmenuselection 9 ifvarand WORLDTILEBITFIELD5 2147483648 redefinequote 332 WORLDTILE #160: ^22"THE FURHER IN THE IRON ARMOR!"
    ifvare mainmenuselection 10 ifvarand WORLDTILEBITFIELD6 1 redefinequote 332 WORLDTILE #161: ^22"THE GIRL IN THE RED PLUGSUIT!"
    ifvare mainmenuselection 11 ifvarand WORLDTILEBITFIELD6 2 redefinequote 332 WORLDTILE #162: ^22"A LEGENDARY BATTLE IN THREES!"
    ifvare mainmenuselection 12 ifvarand WORLDTILEBITFIELD6 4 redefinequote 332 WORLDTILE #163: ^22"MY WHAT A BIG GUN YOU HAVE!"
    ifvare mainmenuselection 13 ifvarand WORLDTILEBITFIELD6 8 redefinequote 332 WORLDTILE #164: ^22"TWO HALVES OF A WHOLE, PART 1!"
    ifvare mainmenuselection 14 ifvarand WORLDTILEBITFIELD6 16 redefinequote 332 WORLDTILE #165: ^22"TWO HALVES OF A WHOLE, PART 2!"
    ifvare mainmenuselection 15 ifvarand WORLDTILEBITFIELD6 32 redefinequote 332 WORLDTILE #166: ^22"THE DARK TEMPLE OF HELL!"
    ifvare mainmenuselection 16 ifvarand WORLDTILEBITFIELD6 64 redefinequote 332 WORLDTILE #167: ^22"IS HIS HEAD ON A TOUNGE?! EW!"
    ifvare mainmenuselection 17 ifvarand WORLDTILEBITFIELD6 128 redefinequote 332 WORLDTILE #168: ^22"THE GATES TO HELL AND DAMNATION!"
    ifvare mainmenuselection 18 ifvarand WORLDTILEBITFIELD6 256 redefinequote 332 WORLDTILE #169: ^22"THE LONE MARINE AND HIS BIG F'N GUN!"
    ifvare mainmenuselection 19 ifvarand WORLDTILEBITFIELD6 512 redefinequote 332 WORLDTILE #170: ^22"AMT: READING WHILE EATING!"
    ifvare mainmenuselection 20 ifvarand WORLDTILEBITFIELD6 1024 redefinequote 332 WORLDTILE #171: ^22"MINAKO: BRIGHT AND HAPPY!"
    ifvare mainmenuselection 21 ifvarand WORLDTILEBITFIELD6 2048 redefinequote 332 WORLDTILE #172: ^22"A DESERT OF GUNS, SHELLS AND GUTS!"
    ifvare mainmenuselection 22 ifvarand WORLDTILEBITFIELD6 4096 redefinequote 332 WORLDTILE #173: ^22"THE CASTLE FORGED IN MAGMA!"
    ifvare mainmenuselection 23 ifvarand WORLDTILEBITFIELD6 8192 redefinequote 332 WORLDTILE #174: ^22"RINPOO STRIKES WITH GREAT VEGENANCE!"
    ifvare mainmenuselection 24 ifvarand WORLDTILEBITFIELD6 16384 redefinequote 332 WORLDTILE #175: ^22"SUPER BUU: MIND TRAP!!"
   }
   ifvare mainmenupage 7 // Page 8: #176-#200
   {
    ifvare mainmenuselection 0 ifvarand WORLDTILEBITFIELD6 32768 redefinequote 332 WORLDTILE #176: ^22"EXPLOSIVE POWER COMES IN SMALL PACKAGES!"
    ifvare mainmenuselection 1 ifvarand WORLDTILEBITFIELD6 65536 redefinequote 332 WORLDTILE #177: ^22"THE SECRET OF BLUE WATER!"
    ifvare mainmenuselection 2 ifvarand WORLDTILEBITFIELD6 131072 redefinequote 332 WORLDTILE #178: ^22"SUPER KAMIKAZE CHRISTMAS GHOST ATTACK!!"
    ifvare mainmenuselection 3 ifvarand WORLDTILEBITFIELD6 262144 redefinequote 332 WORLDTILE #179: ^22"THE ENGIMATE HEERO YUY AND HIS FRTENDS!"
    ifvare mainmenuselection 4 ifvarand WORLDTILEBITFIELD6 524288 redefinequote 332 WORLDTILE #180: ^22"THE SHRINE MAIDEN OF GENSOYKO!"
    ifvare mainmenuselection 5 ifvarand WORLDTILEBITFIELD6 1048576 redefinequote 332 WORLDTILE #181: ^22"'DAMMIT, MY NAME IS *NOT* CHINA!!'"
    ifvare mainmenuselection 6 ifvarand WORLDTILEBITFIELD6 2097152 redefinequote 332 WORLDTILE #182: ^22"'EYE'M DA STRONGEST IN THE WORLD!!'"
    ifvare mainmenuselection 7 ifvarand WORLDTILEBITFIELD6 4194304 redefinequote 332 WORLDTILE #183: ^22"THE BORDERLINES OF GENSOYKO!"
    ifvare mainmenuselection 8 ifvarand WORLDTILEBITFIELD6 8388608 redefinequote 332 WORLDTILE #184: ^22"THE Z-WARRIORS GATHER ONCE AGAIN!"
    ifvare mainmenuselection 9 ifvarand WORLDTILEBITFIELD6 16777216 redefinequote 332 WORLDTILE #185: ^22"THE SCARY WOMANIZING PIG-MASK IS ATTACKED!"
    ifvare mainmenuselection 10 ifvarand WORLDTILEBITFIELD6 33554432 redefinequote 332 WORLDTILE #186: ^22"A PIZZA-DISPENSING ATM MACHINE?! WTH?!"
    ifvare mainmenuselection 11 ifvarand WORLDTILEBITFIELD6 67108864 redefinequote 332 WORLDTILE #187: ^22"THE DOG OF CARBON AND SNOWBALL FIGHTS!"
    ifvare mainmenuselection 12 ifvarand WORLDTILEBITFIELD6 134217728 redefinequote 332 WORLDTILE #188: ^22"'IT'S JUST GRAPE JUICE...'"
    ifvare mainmenuselection 13 ifvarand WORLDTILEBITFIELD6 268435456 redefinequote 332 WORLDTILE #189: ^22"THE CAKE IS NOT A LIE..."
    ifvare mainmenuselection 14 ifvarand WORLDTILEBITFIELD6 536870912 redefinequote 332 WORLDTILE #190: ^22"THE BUBSY TWINS MEET OINKER P. HAMM!"
    ifvare mainmenuselection 15 ifvarand WORLDTILEBITFIELD6 1073741824 redefinequote 332 WORLDTILE #191: ^22"BUBSY DEFENDS THE FOREST CREATURES!"
    ifvare mainmenuselection 16 ifvarand WORLDTILEBITFIELD6 2147483648 redefinequote 332 WORLDTILE #192: ^22"EXPERIENCING 'TECHINCAL DIFFICULTIES'..."
    ifvare mainmenuselection 17 ifvarand WORLDTILEBITFIELD7 1 redefinequote 332 WORLDTILE #193: ^22"THE STAFF OF THE SCARLET DEVIL MANSION!"
    ifvare mainmenuselection 18 ifvarand WORLDTILEBITFIELD7 2 redefinequote 332 WORLDTILE #194: ^22"A PEACH WRAPPED IN RIBBONS!"
    ifvare mainmenuselection 19 ifvarand WORLDTILEBITFIELD7 4 redefinequote 332 WORLDTILE #195: ^22"CHICKEN-MAN IN A SUIT..."
    ifvare mainmenuselection 20 ifvarand WORLDTILEBITFIELD7 8 redefinequote 332 WORLDTILE #196: ^22"THE WRATH OF THE HADES OVERLORD!"
    ifvare mainmenuselection 21 ifvarand WORLDTILEBITFIELD7 16 redefinequote 332 WORLDTILE #197: ^22"EXTERMINATE...!"
    ifvare mainmenuselection 22 ifvarand WORLDTILEBITFIELD7 32 redefinequote 332 WORLDTILE #198: ^22"VIDEL FOUND THE HIDDEN CAMERA!"
    ifvare mainmenuselection 23 ifvarand WORLDTILEBITFIELD7 64 redefinequote 332 WORLDTILE #199: ^22"THE WRATH OF PAULA POLESTAR!"
    ifvare mainmenuselection 24 ifvarand WORLDTILEBITFIELD7 128 redefinequote 332 WORLDTILE #200: ^22"DEVIN AND HIS FURRY, FELINE FRIEND!"
   }
   ifvare mainmenupage 8 // Page 9: #201-#225
   {
    ifvare mainmenuselection 0 ifvarand WORLDTILEBITFIELD7 256 redefinequote 332 WORLDTILE #201: ^22"SCOTT PILGRIM AND THE FANBOY FANTASY..."
    ifvare mainmenuselection 1 ifvarand WORLDTILEBITFIELD7 512 redefinequote 332 WORLDTILE #202: ^22"THE ROMA-FRENCH FORTUNE TELLER..."
    ifvare mainmenuselection 2 ifvarand WORLDTILEBITFIELD7 1024 redefinequote 332 WORLDTILE #203: ^22"ISABELLE THE GREAT WITCH OF TIME..."
    ifvare mainmenuselection 3 ifvarand WORLDTILEBITFIELD7 2048 redefinequote 332 WORLDTILE #204: ^22"SOME MEN JUST WANT TO WATCH THE WORLD BURN!"
    ifvare mainmenuselection 4 ifvarand WORLDTILEBITFIELD7 4096 redefinequote 332 WORLDTILE #205: ^22"CHINA LOOKS DOWN UPON YOUR MEAGER SELF..."
    ifvare mainmenuselection 5 ifvarand WORLDTILEBITFIELD7 8192 redefinequote 332 WORLDTILE #206: ^22"A CROWDED WEDDING..."
    ifvare mainmenuselection 6 ifvarand WORLDTILEBITFIELD7 16384 redefinequote 332 WORLDTILE #207: ^22"THE THREE OF YAMI!"
    ifvare mainmenuselection 7 ifvarand WORLDTILEBITFIELD7 32768 redefinequote 332 WORLDTILE #208: ^22"THE GLORY OF CASTLE VAN JESSENSTEIN!"
    ifvare mainmenuselection 8 ifvarand WORLDTILEBITFIELD7 65536 redefinequote 332 WORLDTILE #209: ^22"CHIIVISTAN: TITLATING MASCOT OF WINDOWS VISTA!"
    ifvare mainmenuselection 9 ifvarand WORLDTILEBITFIELD7 131072 redefinequote 332 WORLDTILE #210: ^22"SAURON VS. THE FREE PEOPLE OF MIDDLE EARTH!"
    ifvare mainmenuselection 10 ifvarand WORLDTILEBITFIELD7 262144 redefinequote 332 WORLDTILE #211: ^22"COCA-COLA VS. PEPSI?!"
    ifvare mainmenuselection 11 ifvarand WORLDTILEBITFIELD7 524288 redefinequote 332 WORLDTILE #212: ^22"OUT OF THE FIRE AND FLAMES..."
    ifvare mainmenuselection 12 ifvarand WORLDTILEBITFIELD7 1048576 redefinequote 332 WORLDTILE #213: ^22"THAT'S... GONNA LEAVE A MARK..."
    ifvare mainmenuselection 13 ifvarand WORLDTILEBITFIELD7 2097152 redefinequote 332 WORLDTILE #214: ^22"THE MASSIVELY EVIL RHAPTHORNE..."
    ifvare mainmenuselection 14 ifvarand WORLDTILEBITFIELD7 4194304 redefinequote 332 WORLDTILE #215: ^22"THE LAKE TO HELL!"
    ifvare mainmenuselection 15 ifvarand WORLDTILEBITFIELD7 8388608 redefinequote 332 WORLDTILE #216: ^22"SAURON IN YO' FACE!"
    ifvare mainmenuselection 16 ifvarand WORLDTILEBITFIELD7 16777216 redefinequote 332 WORLDTILE #217: ^22"AN UNEXPECTED TEA PARTY..."
    ifvare mainmenuselection 17 ifvarand WORLDTILEBITFIELD7 33554432 redefinequote 332 WORLDTILE #218: ^22"THE BATTLE OF THE CATHEDRAL!""
    ifvare mainmenuselection 18 ifvarand WORLDTILEBITFIELD7 67108864 redefinequote 332 WORLDTILE #219: ^22"MALROTH, THE UNTAMED WICKEDNESS!"
    ifvare mainmenuselection 19 ifvarand WORLDTILEBITFIELD7 134217728 redefinequote 332 WORLDTILE #220: ^22"A MAN AND HIS MONSTER FRIENDS..."
    ifvare mainmenuselection 20 ifvarand WORLDTILEBITFIELD7 268435456 redefinequote 332 WORLDTILE #221: ^22"THE GRIM REAPER NEVER LOOKED CUTER..."
    ifvare mainmenuselection 21 ifvarand WORLDTILEBITFIELD7 536870912 redefinequote 332 WORLDTILE #222: ^22"DRAW ME LIKE ONE OF YOUR FRENCH DALEKS..."
    ifvare mainmenuselection 22 ifvarand WORLDTILEBITFIELD7 1073741824 redefinequote 332 WORLDTILE #223: ^22"THE HORRIFYING CYBERDEMON!"
    ifvare mainmenuselection 23 ifvarand WORLDTILEBITFIELD7 2147483648 redefinequote 332 WORLDTILE #224: ^22"THE Z-SENSHI GATHER..."
    ifvare mainmenuselection 24 ifvarand WORLDTILEBITFIELD8 1 redefinequote 332 WORLDTILE #225: ^22"ONE MAN VS. THE LEGIONS OF HELL!"
   }
   ifvare mainmenupage 9 // Page 10: #225-#250
   {
    ifvare mainmenuselection 0 ifvarand WORLDTILEBITFIELD8 2 redefinequote 332 WORLDTILE #226: ^22"MEET FLORA BRISCOLETTI..."
    ifvare mainmenuselection 1 ifvarand WORLDTILEBITFIELD8 4 redefinequote 332 WORLDTILE #227: ^22"MEET BIANCA WHITAKER..."
    ifvare mainmenuselection 2 ifvarand WORLDTILEBITFIELD8 8 redefinequote 332 WORLDTILE #228: ^22"THE SCORPION IN HELL!"
    ifvare mainmenuselection 3 ifvarand WORLDTILEBITFIELD8 16 redefinequote 332 WORLDTILE #229: ^22"WHO IS THIS BLUSHING BRIDE?!"
    ifvare mainmenuselection 4 ifvarand WORLDTILEBITFIELD8 32 redefinequote 332 WORLDTILE #230: ^22"THE GREAT CRYSTAL CAVE!"
    ifvare mainmenuselection 5 ifvarand WORLDTILEBITFIELD8 64 redefinequote 332 WORLDTILE #231: ^22"TOOTSIE-TOY SHOTGUN ON DISPLAY..."
    ifvare mainmenuselection 6 ifvarand WORLDTILEBITFIELD8 128 redefinequote 332 WORLDTILE #232: ^22"BROXIGAR VERSES THE FALLEN TITAN!"
    ifvare mainmenuselection 7 ifvarand WORLDTILEBITFIELD8 256 redefinequote 332 WORLDTILE #233: ^22"THE REMAINTS OF AN OLD LEGACY..."
    ifvare mainmenuselection 8 ifvarand WORLDTILEBITFIELD8 512 redefinequote 332 WORLDTILE #234: ^22"WELCOME TO BETRUGER'S DOMAIN!!"
    ifvare mainmenuselection 9 ifvarand WORLDTILEBITFIELD8 1024 redefinequote 332 WORLDTILE #235: ^22"SAURON VS. ISILDUR... TENSION MOUNTS!"
    ifvare mainmenuselection 10 ifvarand WORLDTILEBITFIELD8 2048 redefinequote 332 WORLDTILE #236: ^22"BATTLE OF THE DEMONIC WET NURSES!"
    ifvare mainmenuselection 11 ifvarand WORLDTILEBITFIELD8 4096 redefinequote 332 WORLDTILE #237: ^22"THE FIVE OF THE T.O.M.E."
    ifvare mainmenuselection 12 ifvarand WORLDTILEBITFIELD8 8192 redefinequote 332 WORLDTILE #238: ^22"WHEN THE FAIL IS SO BAD, REALITY ACTS UP!"
    ifvare mainmenuselection 13 ifvarand WORLDTILEBITFIELD8 16384 redefinequote 332 WORLDTILE #239: ^22"THE ROCK BAND OF OUR MOTHERS!"
    ifvare mainmenuselection 14 ifvarand WORLDTILEBITFIELD8 32768 redefinequote 332 WORLDTILE #240: ^22"THE GAZE OF THE DEVIL!"
    ifvare mainmenuselection 15 ifvarand WORLDTILEBITFIELD8 65536 redefinequote 332 WORLDTILE #241: ^22"INTO THE EYES OF SARUMAN"
    ifvare mainmenuselection 16 ifvarand WORLDTILEBITFIELD8 131072 redefinequote 332 WORLDTILE #242: ^22"THE TWO AGAINST THE LEGIONS OF HELL!"
    ifvare mainmenuselection 17 ifvarand WORLDTILEBITFIELD8 262144 redefinequote 332 WORLDTILE #243: ^22"BEST FRIENDS: FREUDIA AND SPIRITIA"
    ifvare mainmenuselection 18 ifvarand WORLDTILEBITFIELD8 524288 redefinequote 332 WORLDTILE #244: ^22"PSARO THE MANSLAYER EVOLVES!"
    ifvare mainmenuselection 19 ifvarand WORLDTILEBITFIELD8 1048576 redefinequote 332 WORLDTILE #245: ^22"THE STRONGEST ARM WRESTLERS IN THE UNIVERSE!"
    ifvare mainmenuselection 20 ifvarand WORLDTILEBITFIELD8 2097152 redefinequote 332 WORLDTILE #246: ^22"KORAX: CHAOS CORRUPTED BEYOND KNOWLEDGE!"
    ifvare mainmenuselection 21 ifvarand WORLDTILEBITFIELD8 4194304 redefinequote 332 WORLDTILE #247: ^22"FIONA STRIKES BACK!"
    ifvare mainmenuselection 22 ifvarand WORLDTILEBITFIELD8 8388608 redefinequote 332 WORLDTILE #248: ^22"THE SOLIDERS OF PLANET HERA"
    ifvare mainmenuselection 23 ifvarand WORLDTILEBITFIELD8 16777216 redefinequote 332 WORLDTILE #249: ^22"GANDALF VS. DURIN'S BANE: THE CLIMAX OF AGES"
    ifvare mainmenuselection 24 ifvarand WORLDTILEBITFIELD8 33554432 redefinequote 332 WORLDTILE #250: ^22"ZOMA'S SLOUCH OF VILLAINY"
   }
   ifvare mainmenupage 10 // Page 11: #251-#256
   {
    ifvare mainmenuselection 0 ifvarand WORLDTILEBITFIELD8 67108864 redefinequote 332 WORLDTILE #251: ^22"TETROLOGY OF THE NINJA DRAGON!"
    ifvare mainmenuselection 1 ifvarand WORLDTILEBITFIELD8 134217728 redefinequote 332 WORLDTILE #252: ^22"THE COMBINED MIGHT OF JASHIN AND JAQUIO!"
    ifvare mainmenuselection 2 ifvarand WORLDTILEBITFIELD8 268435456 redefinequote 332 WORLDTILE #253: ^22"DETERMINATOR IN PINK!"
    ifvare mainmenuselection 3 ifvarand WORLDTILEBITFIELD8 536870912 redefinequote 332 WORLDTILE #254: ^22"RELAX, HAVE A CUP OF COFFEE FOR LUCK..."
    ifvare mainmenuselection 4 ifvarand WORLDTILEBITFIELD8 1073741824 redefinequote 332 WORLDTILE #255: ^22"THE MIRACLE DOGS OF THE GREAT DEPRESSION!"
    ifvare mainmenuselection 5 ifvarand WORLDTILEBITFIELD8 2147483648 redefinequote 332 WORLDTILE #256: ^22"INTRODUCTING... MISFITTECH STUDIOS!"
   }
   qstrlen TEMPVAR 332
   mulvar TEMPVAR 2
   subvarvar digx TEMPVAR
   subvarvar digx 2
   state mt
  }

  state setquote332
  ifvare mainmenusubmenu 256 // Cheats Menu
  {
   setvar digy 177
   state pal20
   setvar digx 160
   // 1st Row
   ifvare mainmenuselection 0 // Duke Selected
   {
    ifvare DUKE? 0 redefinequote 332 ADDS DUKE NUKEM TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES DUKE NUKEM TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   ifvare mainmenuselection 1 // Jack Selected
   {
    ifvare JACK? 0 redefinequote 332 ADDS JACK WALKER TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES JACK WALKER TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   ifvare mainmenuselection 2 // Bubsy Selected
   {
    ifvare BUBSY? 0 redefinequote 332 ADDS BUBSY BOBCAT TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES BUBSY BOBCAT TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   ifvare mainmenuselection 3 // Ami Selected
   {
    ifvare AMI? 0 redefinequote 332 ADDS AMI MIZUNO TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES AMI MIZUNO TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   ifvare mainmenuselection 4 // Lo Wang Selected
   {
    ifvare LOWANG? 0 redefinequote 332 ADDS HIGA HAKAISHA TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES HIGA HAKAISHA TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   ifvare mainmenuselection 5 // ESSence Selected
   {
    ifvare ESSENCE? 0 redefinequote 332 ADDS ESSENCE MARGALAN TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES ESSENCE MARGALAN TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   ifvare mainmenuselection 6 // Ted Selected
   {
    ifvare TED? 0 redefinequote 332 ADDS TED MALDORAS TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES TED MALDORAS TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   ifvare mainmenuselection 7 // Lisa Selected
   {
    ifvare LISA? 0 redefinequote 332 ADDS LISA BATES TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES LISA BATES TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   // 2nd Row
   ifvare mainmenuselection 8 // Cybanis Selected
   {
    ifvare CYBANIS? 0 redefinequote 332 ADDS CYBANIS MORGANDOS TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES CYBANIS MORGANDOS TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   ifvare mainmenuselection 9 // Nethra Selected
   {
    ifvare NETHRAFORM? 0
    {
     ifvare NETHRA? 0 redefinequote 332 ADDS NETHRA MARBOROSHI TO YOUR CURRENT GROUP OF CHARACTERS.
     else redefinequote 332 REMOVES NETHRA MARBOROSHI TO YOUR CURRENT GROUP OF CHARACTERS.
    }
    else
    {
     ifvare NETHRA? 0 redefinequote 332 ADDS CHRISTINA MITCHELL TO YOUR CURRENT GROUP OF CHARACTERS.
     else redefinequote 332 REMOVES CHRISTINA MITCHELL TO YOUR CURRENT GROUP OF CHARACTERS.
    }
   }
   ifvare mainmenuselection 10 // Paula Selected
   {
    ifvare PAULA? 0 redefinequote 332 ADDS PAULA POLESTAR TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES PAULA POLESTAR TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   ifvare mainmenuselection 11 // Lori Selected
   {
    ifvare LORI? 0 redefinequote 332 ADDS LORI STEPHENS TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES LORI STEPHENS TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   ifvare mainmenuselection 12 // Minako Selected
   {
    ifvare MINAKO? 0 redefinequote 332 ADDS MINAKO AINO TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES MINAKO AINO TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   ifvare mainmenuselection 13 // Mystery Lady Selected
   {
    ifvare PUBLICBETA? 1
    {
     ifvare debugtoggle 0
     {
      ifvare MYSTERY1? 0 redefinequote 332 ADDS ??????? ????????? TO YOUR CURRENT GROUP OF CHARACTERS.
      else redefinequote 332 REMOVES ??????? ????????? TO YOUR CURRENT GROUP OF CHARACTERS.
     }
     else
     {
      ifvare MYSTERY1? 0 redefinequote 332 ADDS HINOTORI GENKAI TO YOUR CURRENT GROUP OF CHARACTERS.
      else redefinequote 332 REMOVES HINOTORI GENKAI TO YOUR CURRENT GROUP OF CHARACTERS.
     }
    }
    else
    {
     ifvare debugtoggle 0
     {
      ifvare MYSTERY1? 0 redefinequote 332 ADDS NAFERIA MABOROSHI TO YOUR CURRENT GROUP OF CHARACTERS.
      else redefinequote 332 REMOVES NAFERIA MABOROSHI TO YOUR CURRENT GROUP OF CHARACTERS.
     }
     else
     {
      ifvare MYSTERY1? 0 redefinequote 332 ADDS NAFERIA MABOROSHI TO YOUR CURRENT GROUP OF CHARACTERS.
      else redefinequote 332 REMOVES NAFERIA MABOROSHI TO YOUR CURRENT GROUP OF CHARACTERS.
     }
    }
   }
   ifvare mainmenuselection 14 // Maken Selected
   {
    ifvare MAKEN? 0 redefinequote 332 ADDS MAKEN SHINKARA TO YOUR CURRENT GROUP OF CHARACTERS.
    else redefinequote 332 REMOVES MAKEN SHINKARA TO YOUR CURRENT GROUP OF CHARACTERS.
   }
   ifvare mainmenuselection 15 // "?" Selected
   {
    ifvare RANDOMCHARACTEROPTION 16 redefinequote 332 COMPLETELY RANDOMIZES YOUR CURRENT GROUP OF CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 15 redefinequote 332 GIVES YOU A COMPLETE PARTY OF 15 CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 14 redefinequote 332 GIVES YOU 14 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 13 redefinequote 332 GIVES YOU 13 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 12 redefinequote 332 GIVES YOU 12 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 11 redefinequote 332 GIVES YOU 11 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 10 redefinequote 332 GIVES YOU 10 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 9 redefinequote 332 GIVES YOU 9 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 8 redefinequote 332 GIVES YOU 8 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 7 redefinequote 332 GIVES YOU 7 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 6 redefinequote 332 GIVES YOU 6 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 5 redefinequote 332 GIVES YOU 5 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 4 redefinequote 332 GIVES YOU 4 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 3 redefinequote 332 GIVES YOU 3 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 2 redefinequote 332 GIVES YOU 2 RANDOMIZED CHARACTERS.
    ifvare RANDOMCHARACTEROPTION 1 redefinequote 332 GIVES YOU 1 RANDOMIZED CHARACTER.
    ifvare RANDOMCHARACTEROPTION 0 redefinequote 332 COMPLETELY RANDOMIZES YOUR CURRENT GROUP OF CHARACTERS.
   }

   ifvare mainmenuselection 16 // "Sword" Selected
   {
    ifvarand CHEATBITFIELD? 8 redefinequote 332 TOGGLES "DAMAGE CHEAT" ON. [DAMAGE X 1000 TO ENEMIES]
    else redefinequote 332 TOGGLES "DAMAGE CHEAT" OFF. [NORMAL DAMAGE TO ENEMIES]
   }
   ifvare mainmenuselection 17 // "Shield" Selected
   {
    ifvarand CHEATBITFIELD? 16 redefinequote 332 TOGGLES "DEFENSE CHEAT" ON. [DAMAGE / 1000 FROM ENEMIES]
    else redefinequote 332 TOGGLES "DEFENSE CHEAT" OFF. [NORMAL DAMAGE FROM ENEMIES]
   }
   ifvare mainmenuselection 18 // "Explosion" Selected
   {
    redefinequote 332 KILLS ALL SPAWNED NON-MAIN-BOSS MONSTERS ON THE CURRENT MAP.
   }
   ifvare mainmenuselection 19 // "Open Chest" Selected
   {
    ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS
    {
     redefinequote 332 GIVES YOU 25 OF ALL INVENTORY ITEMS AND 25 OF ALL ACCESSORIES, PLUS MORE.
    }     
    else
    {
     redefinequote 332 GIVES YOU 25 OF ALL INVENTORY ITEMS AND 25 OF ALL ACCESSORIES.
    }     
   }
   ifvare mainmenuselection 20 // "Bio Shield Advancement" Selected
   {
    ifvare ESHIELDADVANCEMENT 0 redefinequote 332 TOGGLES LISA'S BIO-ENERGY SHIELD TO A STRONGER ADVANCEMENT.
    else ifvare ESHIELDADVANCEMENT 1 redefinequote 332 TOGGLES LISA'S BIO-ENERGY SHIELD TO NORMAL ADVANCEMENT.
   }
   ifvare mainmenuselection 21 // "Empty Green Tank" Selected
   {
    ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS
    {
     redefinequote 332 SPAWNS AN EMPTY GREEN RIOT TANK (MAX STATS) FOR YOU TO DRIVE.
    }    
    else
    {
     redefinequote 332 SPAWNS AN EMPTY GREEN RIOT TANK FOR YOU TO DRIVE.
    }    
   }
   ifvare mainmenuselection 22 // "Empty Blue Tank" Selected
   {
    ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS
    {
     redefinequote 332 SPAWNS AN EMPTY BLUE RIOT TANK (MAX STATS) FOR YOU TO DRIVE.
    }    
    else
    {
     redefinequote 332 SPAWNS AN EMPTY BLUE RIOT TANK FOR YOU TO DRIVE.
    }    
   }
   ifvare mainmenuselection 23 // "Empty Red Tank" Selected
   {
    ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS
    {
     redefinequote 332 SPAWNS AN EMPTY RED RIOT TANK (MAX STATS) FOR YOU TO DRIVE.
    }    
    else
    {
     redefinequote 332 SPAWNS AN EMPTY RED RIOT TANK FOR YOU TO DRIVE.
    }    
   }
   // 4th Row
   ifvare mainmenuselection 24 // "Infinite Quad Damage" Selected
   {
    ifvarand POWERUPCHEATFLAGS? 1 redefinequote 332 DISABLES "INFINITE QUAD DAMAGE" CHEAT
    else redefinequote 332 ENABLES "INFINITE QUAD DAMAGE" CHEAT
   }
   ifvare mainmenuselection 25 // "Infinite Icon of the Defender" Selected
   {
    ifvarand POWERUPCHEATFLAGS? 2 redefinequote 332 DISABLES "INFINITE ICON OF THE DEFENDER" CHEAT
    else redefinequote 332 ENABLES "INFINITE ICON OF THE DEFENDER" CHEAT
   }
   ifvare mainmenuselection 26 // "Infinite Regeneration Ankh" Selected
   {
    ifvarand POWERUPCHEATFLAGS? 4 redefinequote 332 DISABLES "INFINITE REGENERATION ANKH" CHEAT
    else redefinequote 332 ENABLES "INFINITE REGENERATION ANKH" CHEAT
   }
   ifvare mainmenuselection 27 // "Infinite Shield Emblem" Selected
   {
    ifvarand POWERUPCHEATFLAGS? 8 redefinequote 332 DISABLES "INFINITE SHIELD EMBLEM" CHEAT
    else redefinequote 332 ENABLES "INFINITE SHIELD EMBLEM" CHEAT
   }
   ifvare mainmenuselection 28 // "Infinite Vampire Artifact" Selected
   {
    ifvarand POWERUPCHEATFLAGS? 16 redefinequote 332 DISABLES "INFINITE VAMPIRE MASK" CHEAT
    else redefinequote 332 ENABLES "INFINITE VAMPIRE MASK" CHEAT
   }
   ifvare mainmenuselection 29 // "Infinite Ammo" Selected
   {
    ifvarand CHEATBITFIELD? 1 redefinequote 332 DISABLES "INFINITE AMMO" CHEAT
    else redefinequote 332 ENABLES "INFINITE AMMO" CHEAT
   }
   ifvare mainmenuselection 30 // "Infinite Energy/No Energy Use" Selected
   {    
    ifvarand CHEATBITFIELD? 128 redefinequote 332 DISABLES "INFINITE ENERGY/NO ENERGY USE" CHEAT
    else redefinequote 332 ENABLES "INFINITE ENERGY/NO ENERGY USE" CHEAT
   }
   ifvare mainmenuselection 31 // "Equipment Cheat" Selected
   {
    ifvare EQUIPCHEAT? 2
    {
     ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS redefinequote 332 (NO EFFECT)
     else redefinequote 332 DISABLES "-DOUBLE- MAX (8) EQUIPMENT SLOTS" CHEAT
    }
    else
    {
     ifvarvare SHOPCHEATBITTOTAL SHOPCOMBOBITS
     {
      redefinequote 332 ENABLES "-DOUBLE- MAX (8) EQUIPMENT SLOTS" CHEAT
     }
     else
     {
      ifvare EQUIPCHEAT? 1 redefinequote 332 DISABLES "MAX (4) EQUIPMENT SLOTS" CHEAT
      else redefinequote 332 ENABLES "MAX (4) EQUIPMENT SLOTS" CHEAT
     }
    }
   }
   ifvare mainmenuselection 32 // "Shop Cheat" Selected
   {
    redefinequote 332 ENTER THE MAIN DEBUGGING SHOP.
   }
   ifvare mainmenuselection 33 // "ATM Cheat" Selected
   {
    redefinequote 332 ENTER THE ATM SCREEN.
   }
   ifvare mainmenuselection 34 // "Hacker-Vision for All Cheat" Selected
   {
    ifvarand CHEATBITFIELD? 2 redefinequote 332 DISABLES "HACKER-VISION-FOR-ALL" CHEAT
    else redefinequote 332 ENABLES "HACKER-VISION-FOR-ALL" CHEAT
   }
   ifvare mainmenuselection 35 // "Buddha Mode" Selected
   {
    ifvarand CHEATBITFIELD? 4 redefinequote 332 DISABLES "BUDDHA MODE" CHEAT [0 INDESTRUCTIBLE HP]
    else redefinequote 332 ENABLES "BUDDHA MODE" CHEAT [1 INDESTRUCTIBLE HP]
   }
   qstrlen TEMPVAR 332
   mulvar TEMPVAR 2
   subvarvar digx TEMPVAR
   subvarvar digx 2
   state mt
  }

// Main Menu - Character Select

 ifvare mainmenusubmenu 0
 { // ifvare mainmenusubmenu 0
// Show Money
  state pal22
  setvar digx 41
  setvar digy 169
  ifvarg CENTS -1 ifvarl CENTS 10 setvar temp 193
  else setvar temp 194 
  state mt
  // Character Portraits - Page 1

  setvar digx 70
  setvar digy 53
  state digz32768
  state orientation2
  ifvare mainmenupage 0 state menudukestats
  else ifvare mainmenupage 1 state menucybanisstats

  setvar digx 176
  setvar digy 53
  ifvare mainmenupage 0 state menujackstats
  else ifvare mainmenupage 1 state menunethrastats

  setvar digx 70
  setvar digy 85
  ifvare mainmenupage 0 state menububsystats
  else ifvare mainmenupage 1 state menupaulastats

  setvar digx 176
  setvar digy 85
  ifvare mainmenupage 0 state menuamistats
  else ifvare mainmenupage 1 state menuloristats

  setvar digx 70
  setvar digy 117
  ifvare mainmenupage 0 state menulowangstats
  else ifvare mainmenupage 1 state menuminakostats

  setvar digx 176
  setvar digy 117
  ifvare mainmenupage 0 state menuessencestats
  else ifvare mainmenupage 1 state menumystery1stats

  setvar digx 70
  setvar digy 149
  ifvare mainmenupage 0 state menutedstats
  else ifvare mainmenupage 1 state menumakenstats

  setvar digx 176
  setvar digy 149
  ifvare mainmenupage 0 state menulisastats
  else ifvare mainmenupage 1 state menuvehiclestats // Insert Current Vehicle's Stats

// Shows the Selection Cursor Depending on What 'mainmenuselection' is set to [for Characters menu]
  ifvare mainmenuselection 0 { setvar digx 107 setvar digy 53 }
  ifvare mainmenuselection 1 { setvar digx 213 setvar digy 53 }
  ifvare mainmenuselection 2 { setvar digx 107 setvar digy 85 }
  ifvare mainmenuselection 3 { setvar digx 213 setvar digy 85 }
  ifvare mainmenuselection 4 { setvar digx 107 setvar digy 117 }
  ifvare mainmenuselection 5 { setvar digx 213 setvar digy 117 }
  ifvare mainmenuselection 6 { setvar digx 107 setvar digy 149 }
  ifvare mainmenuselection 7 { setvar digx 213 setvar digy 149 }

  state orientation2
  state digz65536
  state pal0
  setvar tilenum 8187 
  state rs
 }

// Main Menu - Items Menu

ifvare mainmenusubmenu 1
{ // ifvare mainmenusubmenu 1

 ifvare mainmenupage 0
 {
  state orientation2

// Row #1
  state checkreschalices
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 52 
   state itemplate

   setvar digz 40960
   setvar tilenum 5159 
   state pal0
   state rs 

   addvar digx 1
   addvar digy 12
   state checkreschalices
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkeyedrops
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 52 
   state itemplate

   setvar digz 23552
   setvar tilenum 5181
   state pal0
   state rs 

   addvar digx 2
   addvar digy 12
   state checkeyedrops
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkantidotes
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 52 
   state itemplate

   setvar digz 30720
   setvar tilenum 5174
   state pal0
   state rs 

   addvar digx 2 // setvar digx 144
   addvar digy 12
   state checkantidotes
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkfoghorns
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 52 
   state itemplate

   setvar digz 18432
   setvar tilenum 5182 
   state pal0
   state rs 

   addvar digx 2
   addvar digy 12
   state checkfoghorns
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkafasdrops
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 52 
   state itemplate

   setvar digz 40960
   setvar tilenum 6027 
   state pal0
   state rs 

   addvar digx 2
   addvar digy 12
   state checkafasdrops
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkportablemedikits
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 52 
   state itemplate

   setvar digz 22528
   setvar tilenum 53
   state pal0
   state rs 

   addvar digx 2
   addvar digy 12
   state checkportablemedikits
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

// Row #2
  state checkheatsensors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 84
   state itemplate

   setvar digz 32768
   setvar tilenum 59
   state pal0
   state rs 

   addvar digx 2
   addvar digy 12
   state checkheatsensors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkbootpairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 84
   state itemplate

   setvar digz 32768

   setvar tilenum 61
   state pal0
   state rs 

   addvar digx 2
   addvar digy 12
   state checkbootpairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkholoforms
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 84
   state itemplate

   addvar digx 1
   setvar digz 18432
   setvar tilenum 1348
   state pal0
   state rs 

   addvar digx 1
   addvar digy 12
   state checkholoforms
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkjetpacks
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 84
   state itemplate

   addvar digx 1
   subvar digy 3
   setvar digz 30720
   setvar tilenum 57
   state pal0
   state rs 

   addvar digx 1
   addvar digy 15
   state checkjetpacks
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkvitaminxs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 84
   state itemplate

   subvar digy 2
   setvar digz 28672
   setvar tilenum 55 
   state pal0
   state rs 

   addvar digx 2
   addvar digy 14
   state checkvitaminxs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkscubatanks
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 84
   state itemplate

   subvar digy 1
   setvar digz 22528
   setvar tilenum 56
   state pal0
   state rs 

   addvar digx 2
   addvar digy 13
   state checkscubatanks
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

// Row #3
  state checkusedbodyarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 116
   state itemplate

   setvar digx 78
   setvar digy 115
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 5533 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5532 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5530 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5531 }
   state pal0
   state rs 

   addvar digx 2
   setvar digy 128
   state checkusedbodyarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkusedsuperarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 116
   state itemplate

   setvar digx 110
   setvar digy 115
   ifvare ARMORAPPEARANCE? 0 { setvar digz 40960 setvar tilenum 5533 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 40960 setvar tilenum 5532 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 20480 setvar tilenum 5530 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 20480 setvar tilenum 5531 }
   state pal24
   state rs 

   state pal0
   addvar digx 2 // setvar digx 112
   setvar digy 128
   state checkusedsuperarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkbodyarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 116
   state itemplate

   setvar digx 142
   setvar digy 115
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 66 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5383 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5381 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5382 }
   state pal0
   state rs 

   addvar digx 2 // setvar digx 144
   setvar digy 128
   state checkbodyarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checksuperarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 116
   state itemplate

   setvar digx 174
   setvar digy 115
   ifvare ARMORAPPEARANCE? 0 { setvar digz 40960 setvar tilenum 66 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 40960 setvar tilenum 5383 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 20480 setvar tilenum 5381 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 20480 setvar tilenum 5382 }
   state pal24
   state rs 

   state pal0
   addvar digx 2 // setvar digx 176
   setvar digy 128
   state checksuperarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkatomichealths
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 116
   state itemplate

   setvar digx 206
   setvar digy 116
   setvar digz 28672
   setvar tilenum 100 
   state pal0
   state rs 

   addvar digx 2 // setvar digx 208
   setvar digy 128
   state checkatomichealths
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checksuperatoms
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 116
   state itemplate

   setvar digx 238
   setvar digy 117
   setvar digz 43008
   setvar tilenum 100 
   state pal16
   state rs 

   addvar digx 2 // setvar digx 240
   setvar digy 128
   state checksuperatoms
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

// Row #4
  state checksmallmedikits
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 148
   state itemplate

   setvar digx 78
   setvar digy 148
   state digz32768
   setvar tilenum 51
   state pal0
   state rs 

   addvar digx 2 // setvar digx 80
   setvar digy 160
   state checksmallmedikits
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkmediummedikits
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 148
   state itemplate

   setvar digx 110
   setvar digy 148
   state digz32768
   setvar tilenum 34
   state pal0
   state rs 

   addvar digx 2 // setvar digx 112
   setvar digy 160
   state checkmediummedikits
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checklargemedikits
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 148
   state itemplate

   setvar digx 142
   setvar digy 148
   state digz32768
   setvar tilenum 52
   state pal0
   state rs 

   addvar digx 2 // setvar digx 144
   setvar digy 160
   state checklargemedikits
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkextralargemedikits
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 148
   state itemplate

   setvar digx 174
   setvar digy 148
   state digz32768
   setvar tilenum 35
   state pal0
   state rs 

   addvar digx 2 // setvar digx 176
   setvar digy 160
   state checkextralargemedikits
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkmedpacks
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 148
   state itemplate

   setvar digx 206
   setvar digy 148
   state digz32768
   setvar tilenum 14
   state pal0
   state rs 

   addvar digx 2 // setvar digx 208
   setvar digy 160
   state checkmedpacks
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checksurgerykits
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 148
   state itemplate

   setvar digx 238
   setvar digy 148
   state digz32768
   setvar tilenum 15
   state pal0
   state rs 

   addvar digx 2 // setvar digx 240
   setvar digy 160
   state checksurgerykits
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }
 }

 ifvare mainmenupage 1
 {

// Row #1
  state checkusedgreenarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 52 
   state itemplate

   setvar digx 78
   setvar digy 51
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 5529 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5528 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5526 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5527 }
   state pal14
   state rs 

   setvar digx 80
   setvar digy 64
   state checkusedgreenarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkusedbluearmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 52 
   state itemplate

   setvar digx 110
   setvar digy 51 
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 5529 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5528 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5526 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5527 }
   state pal16
   state rs 

   setvar digx 112
   setvar digy 64
   state checkusedbluearmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkusedyellowarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 52 
   state itemplate

   setvar digx 142
   setvar digy 51 
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 5529 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5528 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5526 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5527 }
   state pal23
   state rs 

   setvar digx 144
   setvar digy 64
   state checkusedyellowarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkusedredarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 52 
   state itemplate

   setvar digx 174
   setvar digy 51
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 5529 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5528 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5526 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5527 }
   state pal10
   state rs 

   setvar digx 176
   setvar digy 64
   state checkusedredarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkusedgreyarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 52 
   state itemplate

   setvar digx 206
   setvar digy 51
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 5529 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5528 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5526 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5527 }
   state pal13
   state rs 

   setvar digx 208
   setvar digy 64
   state checkusedgreyarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkusedwhitearmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 52 
   state itemplate

   setvar digx 238
   setvar digy 51
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 5529 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5528 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5526 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5527 }
   state pal20
   state rs 

   setvar digx 240
   setvar digy 64
   state checkusedwhitearmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

// Row #2
  state checkgreenarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 84
   state itemplate

   setvar digx 78
   setvar digy 83
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 67 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5416 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5415 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5421 }
   state pal14
   state rs 

   setvar digx 80
   setvar digy 97
   state checkgreenarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkbluearmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 84
   state itemplate

   setvar digx 110
   setvar digy 83
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 67 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5416 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5415 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5421 }
   state pal16
   state rs 

   setvar digx 112
   setvar digy 96
   state checkbluearmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkyellowarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 84
   state itemplate

   setvar digx 142
   setvar digy 83 
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 67 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5416 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5415 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5421 }
   state pal23
   state rs 

   setvar digx 144
   setvar digy 96
   state checkyellowarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkredarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 84
   state itemplate

   setvar digx 174
   setvar digy 83
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 67 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5416 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5415 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5421 }
   state pal10
   state rs 

   setvar digx 176
   setvar digy 96
   state checkredarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkgreyarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 84
   state itemplate

   setvar digx 206
   setvar digy 83
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 67 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5416 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5415 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5421 }
   state pal13
   state rs 

   setvar digx 208
   setvar digy 96
   state checkgreyarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkwhitearmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 84
   state itemplate

   setvar digx 238
   setvar digy 83
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 67 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5416 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5415 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5421 }
   state pal20
   state rs 

   setvar digx 240
   setvar digy 96
   state checkwhitearmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

// Row #3
  state checkusedrandomarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 116
   state itemplate

   setvar digx 78
   setvar digy 115 
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 5529 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5528 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5526 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5527 }
   state pal15
   state rs 

   setvar digx 80
   setvar digy 128
   state checkusedrandomarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkrandomarmors
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 116 
   state itemplate

   setvar digx 110
   setvar digy 115 
   ifvare ARMORAPPEARANCE? 0 { setvar digz 30720 setvar tilenum 67 }
   ifvare ARMORAPPEARANCE? 1 { setvar digz 30720 setvar tilenum 5416 }
   ifvare ARMORAPPEARANCE? 2 { setvar digz 15360 setvar tilenum 5415 }
   ifvare ARMORAPPEARANCE? 3 { setvar digz 15360 setvar tilenum 5421 }
   state pal15
   state rs 

   setvar digx 112
   setvar digy 128
   state checkrandomarmors
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }
  ifvare AMI? 1
  {
   setvar CHARACTERARRAY 4
   getactorvar[CHARACTERARRAY].CHARACTERGOGGLESTIME TEMPVAR
   ifvarg TEMPVAR 0
   {
    setvar digx 142
    setvar digy 116 
    state itemplate

    setvar digx 142
    setvar digy 116
    setvar digz 22528 // 28672
    setvar tilenum 5474 // 5198
    state pal0
    state rs

    setvar digx 141
    setvar digy 128
    state digz98304
    state pal17
    setvar tilenum 8182
    state rs
   }
   ifvare HAVEMERCURYCOMPUTER? 1
   {
    setvar digx 174
    setvar digy 116 
    state itemplate

    setvar digx 174
    setvar digy 116
    setvar digz 24576 // 28672
    setvar tilenum 5476 // 5285
    state pal0
    state rs 

    setvar digx 173
    setvar digy 128
    state digz98304
    state pal17
    setvar tilenum 8182
    state rs
   }
  }

  ifvare BUBSY? 1
  {
   state checkbubsylives
   ifvarg ITEMARRAYID_AMOUNTTEMP 0
   {
    setvar digx 206
    setvar digy 116 
    state itemplate

    setvar digx 206 // 110
    setvar digy 116
    setvar digz 35840
    setvar tilenum 5179
    state pal0
    state rs 

    setvar digx 208 // 110
    setvar digy 128
    state checkbubsylives
    setvarvar varname ITEMARRAYID_AMOUNTTEMP
    state pal23
    state settile3087
    state dn
   }
  }

  state checkcontinues
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 116 
   state itemplate

   setvar digx 238 // 110
   setvar digy 117
   setvar digz 40960
   setvar tilenum 5279
   state pal0
   state rs 

   setvar digx 240 // 110
   setvar digy 128
   state checkcontinues
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

// Row #4
  ifvare LISA? 1
  {
   ifvarg HAVEENERGYSHIELD? 0
   {
    setvar digx 78
    setvar digy 148 
    state itemplate

    setvar digx 78 // 110
    setvar digy 148
    setvar digz 8192
    state pal0
    ifvare ESHIELDADVANCEMENT 0 setvar tilenum 5217 else setvar tilenum 5554
    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 8192 }
    ifvarg TEMPVAR5 15 ifvarl TEMPVAR5 64 { state pal17 setvar digz 8397 }
    ifvarg TEMPVAR5 63 ifvarl TEMPVAR5 256 { state pal23 setvar digz 8602 }
    ifvarg TEMPVAR5 255 ifvarl TEMPVAR5 1024 { state pal21 setvar digz 8806 }
    ifvarg TEMPVAR5 1023 { state pal20 setvar digz 9011 }
    state rs 

    setvar digx 80 // 110
    setvar digy 160
    setvarvar varname ESHIELDDMGFACTOR
    state pal22
    state settile3087
    state dn
   }
   ifvarg CURRENTCELLS 0
   {
    setvar digx 110
    setvar digy 148 
    state itemplate

    setvar digx 110 // 110
    setvar digy 148
    setvar digz 4096
    setvar tilenum 5218
    state pal0
    state rs 

    setvar digx 112 // 110
    setvar digy 160
    setvarvar varname CURRENTCELLS
    state pal23
    state settile3087
    state dn
   }
  }
  state checktelecoils
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 148 
   state itemplate

   setvar digx 142 // 78
   setvar digy 148
   setvar digz 22528 // 45056
   setvar tilenum 43 
   state pal0
   state rs 

   setvar digx 144 // 78
   setvar digy 160
   state checktelecoils
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }
  ifvare LISA? 1
  {
   ifvare HAVEHACKERVISION? 1
   {
    setvar digx 174
    setvar digy 148 
    state itemplate

    setvar digx 174
    setvar digy 148
    setvar digz 40960
    setvar tilenum 5289
    state pal0
    state rs

    setvar digx 173
    setvar digy 160
    state digz98304
    state pal17
    setvar tilenum 8182
    state rs
   }
  }

  state checktelebeacons
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 148 
   state itemplate

   setvar digx 206
   setvar digy 148
   state digz40960 // 24576
   setvar tilenum 5352 
   state pal0
   state rs 

   setvar digx 208 // 206
   setvar digy 160
   state checktelebeacons
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkfauxlevelups
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 148 
   state itemplate

   setvar digx 238
   setvar digy 148
   setvar digz 30720
   setvar tilenum 5284 
   state pal0
   state rs 

   setvar digx 240
   setvar digy 160
   state checkfauxlevelups
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }
 }

 ifvare mainmenupage 2
 {
  state orientation2
// Row #1

  state checksmallenergydrinks
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 52
   state itemplate

   setvar digx 78
   setvar digy 52 
   setvar digz 5734
   setvar tilenum 5564 
   state pal0
   state rs 

   addvar digx 2 // setvar digx 78
   setvar digy 64
   state checksmallenergydrinks
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checklargeenergydrinks
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 52
   state itemplate

   setvar digx 110
   setvar digy 52
   setvar digz 5734
   setvar tilenum 5565
   state pal0
   state rs 

   addvar digx 2 // setvar digx 110
   setvar digy 64
   state checklargeenergydrinks
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkhyperenergydrinks
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 52
   state itemplate

   setvar digx 142
   setvar digy 52
   setvar digz 5734
   setvar tilenum 5566
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 64
   state checkhyperenergydrinks
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

//
  state checkwintersuits
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 52
   state itemplate

   setvar digx 174
   setvar digy 52
   ifvare GENDER? 0 { setvar digz 2560 setvar tilenum 6293 }
   ifvare GENDER? 1 { setvar digz 2560 setvar tilenum 6294 }
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 64
   state checkwintersuits
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

//

  ifvarn GOTPORTABLEATM? 0
  {
   setvar digx 206
   setvar digy 52
   state itemplate

   setvar digx 206
   setvar digy 52 
   setvar digz 3072 // 5734
   setvar tilenum 5148
   state pal0
   state rs 

   setvar digx 201
   setvar digy 62
   redefinequote 332 USE
   state setquote332
   state pal22
   state mt

  }
//
  ifvarn GOTMONEYRADAR? 0
  {
   setvar digx 238
   setvar digy 52
   state itemplate

   setvar digx 238
   setvar digy 52 
   setvar digz 5120 // 5734
   setvar tilenum 6089 
   state pal0
   state rs 

   ifvare ISRADARON? 0
   {
    setvar digx 233
    setvar digy 62
    redefinequote 332 OFF
    state setquote332
    state pal22
    state mt
   }
   else
   {
    setvar digx 234
    setvar digy 62
    redefinequote 332 ON
    state setquote332
    state pal22
    state mt
   }
  }

// Row #2
  state checksilkcarnations
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 84
   state itemplate

   setvar digx 78
   setvar digy 84 
   setvar digz 14335 // 5734
   setvar tilenum 6090 
   state pal10
   state rs 

   setvar digx 78
   subvar digx 7
   setvar digy 96
   state checksilkcarnations
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn

   setvar digx 78
   addvar digx 5
   setvar digy 96
   subvar digy 2
   state checksilkcarnations
   ifvarvarg PARTYSIZE ITEMARRAYID_AMOUNTTEMP setvarvar varname ITEMARRAYID_AMOUNTTEMP else setvarvar varname PARTYSIZE
   redefinequote 332 [%d]
   qsprintf 332 332 varname
   ifvarg varname 9 subvar digx 4 else subvar digx 2
   state setquote332
   state pal22
   state mt
  }

  state checkrarepiratedoubloons
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 84
   state itemplate

   setvar digx 110
   setvar digy 84 
   setvar digz 14335 // 5734
   setvar tilenum 6091
   state pal0
   state rs 

   setvar digx 110
   subvar digx 7
   setvar digy 96
   state checkrarepiratedoubloons
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn

   setvar digx 110
   addvar digx 5
   setvar digy 96
   subvar digy 2
   state checkrarepiratedoubloons
   ifvarvarg PARTYSIZE ITEMARRAYID_AMOUNTTEMP setvarvar varname ITEMARRAYID_AMOUNTTEMP else setvarvar varname PARTYSIZE
   redefinequote 332 [%d]
   qsprintf 332 332 varname
   ifvarg varname 9 subvar digx 4 else subvar digx 2
   state setquote332
   state pal22
   state mt
  }

  state checkfixeddicepairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 84
   state itemplate

   setvar digx 142
   setvar digy 84 
   setvar digz 14335 // 17202 // 5734
   setvar tilenum 6092
   state pal0
   state rs 

   setvar digx 142
   subvar digx 7
   setvar digy 96
   state checkfixeddicepairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn

   setvar digx 142
   addvar digx 5
   setvar digy 96
   subvar digy 2
   state checkfixeddicepairs
   ifvarvarg PARTYSIZE ITEMARRAYID_AMOUNTTEMP setvarvar varname ITEMARRAYID_AMOUNTTEMP else setvarvar varname PARTYSIZE
   redefinequote 332 [%d]
   qsprintf 332 332 varname
   ifvarg varname 9 subvar digx 4 else subvar digx 2
   state setquote332
   state pal22
   state mt
  }

  state checkmalakiangems
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 84
   state itemplate

   setvar digx 174
   setvar digy 84 
   setvar digz 14335 // 17202 // 5734
   setvar tilenum 6093
   state pal17
   state rs 

   setvar digx 174
   subvar digx 7
   setvar digy 96
   state checkmalakiangems
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn

   setvar digx 174
   addvar digx 5
   setvar digy 96
   subvar digy 2
   state checkmalakiangems
   ifvarvarg PARTYSIZE ITEMARRAYID_AMOUNTTEMP setvarvar varname ITEMARRAYID_AMOUNTTEMP else setvarvar varname PARTYSIZE
   redefinequote 332 [%d]
   qsprintf 332 332 varname
   ifvarg varname 9 subvar digx 4 else subvar digx 2
   state setquote332
   state pal22
   state mt
  }

  state checksafelockboxes
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 84
   state itemplate

   setvar digx 206
   setvar digy 84 
   setvar digz 14335 // 17202 // 5734
   setvar tilenum 6094
   state pal0
   state rs 

   setvar digx 206
   subvar digx 7
   setvar digy 96
   state checksafelockboxes
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn

   setvar digx 206
   addvar digx 5
   setvar digy 96
   subvar digy 2
   state checksafelockboxes
   ifvarvarg PARTYSIZE ITEMARRAYID_AMOUNTTEMP setvarvar varname ITEMARRAYID_AMOUNTTEMP else setvarvar varname PARTYSIZE
   redefinequote 332 [%d]
   qsprintf 332 332 varname
   ifvarg varname 9 subvar digx 4 else subvar digx 2
   state setquote332
   state pal22
   state mt
  }

  state checksecretrecipes
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 84
   state itemplate

   setvar digx 238
   setvar digy 84 
   setvar digz 14335 // 17202 // 5734
   setvar tilenum 6095
   state pal10
   state rs 

   setvar digx 238
   subvar digx 7
   setvar digy 96
   state checksecretrecipes
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn

   setvar digx 238
   addvar digx 5
   setvar digy 96
   subvar digy 2
   state checksecretrecipes
   ifvarvarg PARTYSIZE ITEMARRAYID_AMOUNTTEMP setvarvar varname ITEMARRAYID_AMOUNTTEMP else setvarvar varname PARTYSIZE
   redefinequote 332 [%d]
   qsprintf 332 332 varname
   ifvarg varname 9 subvar digx 4 else subvar digx 2
   state setquote332
   state pal22
   state mt
  }

// Row #3
  state checkslurpeemachines
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 116
   state itemplate

   setvar digx 78
   setvar digy 116
   setvar digz 14335 // 17202 // 5734
   setvar tilenum 6096
   state pal0
   state rs 

   setvar digx 78
   subvar digx 7
   setvar digy 128
   state checkslurpeemachines
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn

   setvar digx 78
   addvar digx 5
   setvar digy 128
   subvar digy 2
   state checkslurpeemachines
   ifvarvarg PARTYSIZE ITEMARRAYID_AMOUNTTEMP setvarvar varname ITEMARRAYID_AMOUNTTEMP else setvarvar varname PARTYSIZE
   redefinequote 332 [%d]
   qsprintf 332 332 varname
   ifvarg varname 9 subvar digx 4 else subvar digx 2
   state setquote332
   state pal22
   state mt
  }

  state checkstockownerships
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 116
   state itemplate

   setvar digx 110
   setvar digy 116
   setvar digz 14335 // 17202 // 5734
   setvar tilenum 6097
   state pal0
   state rs 

   setvar digx 110
   subvar digx 7
   setvar digy 128
   state checkstockownerships
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn

   setvar digx 110
   addvar digx 5
   setvar digy 128
   subvar digy 2
   state checkstockownerships
   ifvarvarg PARTYSIZE ITEMARRAYID_AMOUNTTEMP setvarvar varname ITEMARRAYID_AMOUNTTEMP else setvarvar varname PARTYSIZE
   redefinequote 332 [%d]
   qsprintf 332 332 varname
   ifvarg varname 9 subvar digx 4 else subvar digx 2
   state setquote332
   state pal22
   state mt
  }

  state checktransdimensionalsafes
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 116
   state itemplate

   setvar digx 142
   setvar digy 116
   setvar digz 14335 // 17202 // 5734
   setvar tilenum 6098
   state pal0
   state rs 

   setvar digx 142
   subvar digx 7
   setvar digy 128
   state checktransdimensionalsafes
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn

   setvar digx 142
   addvar digx 5
   setvar digy 128
   subvar digy 2
   state checktransdimensionalsafes
   ifvarvarg PARTYSIZE ITEMARRAYID_AMOUNTTEMP setvarvar varname ITEMARRAYID_AMOUNTTEMP else setvarvar varname PARTYSIZE
   redefinequote 332 [%d]
   qsprintf 332 332 varname
   ifvarg varname 9 subvar digx 4 else subvar digx 2
   state setquote332
   state pal22
   state mt
  }


  state checkbloodpactshields
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 116
   state itemplate

   setvar digx 174
   setvar digy 116
   setvar digz 14335 // 17202 // 5734
   setvar tilenum 6099
   state pal0
   state rs 

   setvar digx 174
   subvar digx 7
   setvar digy 128
   state checkbloodpactshields
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn

   setvar digx 174
   addvar digx 5
   setvar digy 128
   subvar digy 2
   state checkbloodpactshields
   ifvarvarg PARTYSIZE ITEMARRAYID_AMOUNTTEMP setvarvar varname ITEMARRAYID_AMOUNTTEMP else setvarvar varname PARTYSIZE
   redefinequote 332 [%d]
   qsprintf 332 332 varname
   ifvarg varname 9 subvar digx 4 else subvar digx 2
   state setquote332
   state pal22
   state mt
  }

 }

 ifvare mainmenupage 3
 {
  state orientation2

  // Row #1
  state checksilverzirconrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 52
   state itemplate

   setvar digx 78
   setvar digy 52 
   setvar digz 4096 // 14336
   setvar tilenum 5970 
   state pal11
   state rs 

   addvar digx 2 // setvar digx 78
   addvar digy 12
   state checksilverzirconrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checksilveraquamarinerings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 52
   state itemplate

   setvar digx 110
   setvar digy 52
   setvar digz 4096 // 14336
   setvar tilenum 5970 
   state pal16
   state rs 

   addvar digx 2 // setvar digx 110
   addvar digy 12
   state checksilveraquamarinerings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checksilverturquoiserings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 52 
   state itemplate

   setvar digx 142
   setvar digy 52
   setvar digz 4096 // 14336
   setvar tilenum 5970 
   state pal0
   state rs 

   addvar digx 2 // setvar digx 144
   addvar digy 12
   state checksilverturquoiserings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checksilveremeraldrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 52 
   state itemplate

   setvar digx 174
   setvar digy 52
   setvar digz 4096 // 14336
   setvar tilenum 5970 
   state pal14
   state rs 

   addvar digx 2
   addvar digy 12
   state checksilveremeraldrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checksilvergarnetrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 52 
   state itemplate

   setvar digx 206
   setvar digy 52 
   setvar digz 4096 // 14336
   setvar tilenum 5970 
   state pal21
   state rs 

   addvar digx 2
   addvar digy 12
   state checksilvergarnetrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checksilverrubyrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 52 
   state itemplate

   setvar digx 238
   setvar digy 52 
   setvar digz 4096 // 14336
   setvar tilenum 5970 
   state pal10
   state rs 

   addvar digx 2
   addvar digy 12
   state checksilverrubyrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

// Row #2
  state checksilvercitrinerings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 84
   state itemplate

   setvar digx 78
   setvar digy 84 
   setvar digz 4096 // 14336
   setvar tilenum 5970 
   state pal23
   state rs 

   addvar digx 2 // setvar digx 78
   addvar digy 12
   state checksilvercitrinerings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checksilverdiamondrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 84
   state itemplate

   setvar digx 110
   setvar digy 84
   setvar digz 4096 // 14336
   setvar tilenum 5970 
   state pal12
   state rs 

   addvar digx 2 // setvar digx 110
   addvar digy 12
   state checksilverdiamondrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkgoldzirconrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 84 
   state itemplate

   setvar digx 142
   setvar digy 84
   setvar digz 4096 // 14336
   setvar tilenum 5971
   state pal11
   state rs 

   addvar digx 2 // setvar digx 144
   addvar digy 12
   state checkgoldzirconrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkgoldaquamarinerings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 84 
   state itemplate

   setvar digx 174
   setvar digy 84
   setvar digz 4096 // 14336
   setvar tilenum 5971
   state pal16
   state rs 

   addvar digx 2
   addvar digy 12
   state checkgoldaquamarinerings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkgoldturquoiserings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 84 
   state itemplate

   setvar digx 206
   setvar digy 84 
   setvar digz 4096 // 14336
   setvar tilenum 5971
   state pal0
   state rs 

   addvar digx 2
   addvar digy 12
   state checkgoldturquoiserings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkgoldemeraldrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 84 
   state itemplate

   setvar digx 238
   setvar digy 84 
   setvar digz 4096 // 14336
   setvar tilenum 5971
   state pal14
   state rs 

   addvar digx 2
   addvar digy 12
   state checkgoldemeraldrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

// Row #3
  state checkgoldgarnetrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 116
   state itemplate

   setvar digx 78
   setvar digy 116 
   setvar digz 4096 // 14336
   setvar tilenum 5971
   state pal21
   state rs 

   addvar digx 2 // setvar digx 78
   addvar digy 12
   state checkgoldgarnetrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkgoldrubyrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 116
   state itemplate

   setvar digx 110
   setvar digy 116
   setvar digz 4096 // 14336
   setvar tilenum 5971
   state pal10
   state rs 

   addvar digx 2 // setvar digx 110
   addvar digy 12
   state checkgoldrubyrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkgoldcitrinerings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 116 
   state itemplate

   setvar digx 142
   setvar digy 116
   setvar digz 4096 // 14336
   setvar tilenum 5971
   state pal23
   state rs 

   addvar digx 2 // setvar digx 144
   addvar digy 12
   state checkgoldcitrinerings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkgolddiamondrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 116 
   state itemplate

   setvar digx 174
   setvar digy 116
   setvar digz 4096 // 14336
   setvar tilenum 5971
   state pal12
   state rs 

   addvar digx 2
   addvar digy 12
   state checkgolddiamondrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

   // Item #5

   // Item #6

  // Row #4
  state checkgreentankcapsules
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 148
   state itemplate

   setvar digx 78
   setvar digy 148 
   setvar digz 12288 // 14336
   setvar tilenum 175 
   state pal0
   state rs 

   addvar digx 2 // setvar digx 78
   addvar digy 12
   state checkgreentankcapsules
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkbluetankcapsules
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 148
   state itemplate

   setvar digx 110
   setvar digy 148 
   setvar digz 12288 // 14336
   setvar tilenum 176 
   state pal0
   state rs 

   addvar digx 2 // setvar digx 78
   addvar digy 12
   state checkbluetankcapsules
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkredtankcapsules
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 148
   state itemplate

   setvar digx 142

   setvar digy 148 
   setvar digz 12288 // 14336
   setvar tilenum 177
   state pal0
   state rs 

   addvar digx 2 // setvar digx 78
   addvar digy 12
   state checkredtankcapsules
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  ifvarg CARDMEMBERSHIP? 0
  {
   setvar digx 238
   setvar digy 148 
   state itemplate

   setvar digx 238
   setvar digy 148
   setvar digz 10240
   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 pal0
   state rs

   setvar digx 237
   setvar digy 160
   state digz98304
   state pal17
   setvar tilenum 8182
   state rs
  }
 }

 ifvare mainmenupage 4
 {
  state orientation2

  // Row #1
  state checksunrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 52
   state itemplate

   setvar digx 78
   setvar digy 52 
   setvar digz 57344
   setvar tilenum 6013 
   state pal0
   state rs 

   addvar digx 2 // setvar digx 78
   setvar digy 64
   state checksunrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkaquarings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 52
   state itemplate

   setvar digx 110
   setvar digy 52
   setvar digz 57344
   setvar tilenum 6016
   state pal0
   state rs 

   addvar digx 2 // setvar digx 110
   setvar digy 64
   state checkaquarings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkplasmarings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 52
   state itemplate

   setvar digx 142
   setvar digy 52
   setvar digz 57344
   setvar tilenum 6015
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 64
   state checkplasmarings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkspiritrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 52
   state itemplate

   setvar digx 174
   setvar digy 52
   setvar digz 57344
   setvar tilenum 6014 
   state pal0
   state rs 

   addvar digx 2 // setvar digx 174
   setvar digy 64
   state checkspiritrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkcharmankhs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 52
   state itemplate

   setvar digx 206
   setvar digy 52
   setvar digz 57344
   setvar tilenum 6021 
   state pal0
   state rs 

   addvar digx 2 // setvar digx 206
   setvar digy 64
   state checkcharmankhs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkmirrorshields
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 52
   state itemplate

   setvar digx 238
   setvar digy 52
   setvar digz 57344
   setvar tilenum 6017 
   state pal0
   state rs 

   addvar digx 2 // setvar digx 238
   setvar digy 64
   state checkmirrorshields
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  // Row #2
  state checkexpbadges
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 84
   state itemplate

   setvar digx 78
   setvar digy 84 
   setvar digz 57344
   setvar tilenum 6025 
   state pal0
   state rs 

   addvar digx 2 // setvar digx 78
   setvar digy 96
   state checkexpbadges
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkrankbadges
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 84
   state itemplate

   setvar digx 110
   setvar digy 84
   setvar digz 57344
   setvar tilenum 6024
   state pal0
   state rs 

   addvar digx 2 // setvar digx 110
   setvar digy 96
   state checkrankbadges
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkmoneybadges
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 84
   state itemplate

   setvar digx 142
   setvar digy 84
   setvar digz 57344
   setvar tilenum 6033
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 96
   state checkmoneybadges
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkriotshields
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 84
   state itemplate

   setvar digx 174
   setvar digy 84
   setvar digz 14336 // sprite is 4x the other ones
   setvar tilenum 6034
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 96
   state checkriotshields
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checknyxglovepairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 84
   state itemplate

   setvar digx 206
   setvar digy 84
   setvar digz 8192 // sprite is 7x the other ones
   setvar tilenum 6035
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 96
   state checknyxglovepairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkrabbitsfoots
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 84
   state itemplate

   setvar digx 238
   setvar digy 84
   setvar digz 19114 // sprite is 3x the other ones
   setvar tilenum 6036
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 96
   state checkrabbitsfoots
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

// Row #3
  state checkjumpbootpairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 116
   state itemplate

   setvar digx 78
   setvar digy 116
   setvar digz 28672 // sprite is 2x the other ones
   setvar tilenum 6037
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 128
   state checkjumpbootpairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkshockabbootpairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 116
   state itemplate

   setvar digx 110
   setvar digy 116
   setvar digz 28672 // sprite is 2x the other ones
   setvar tilenum 6038
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 128
   state checkshockabbootpairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkhappyshoepairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 116
   state itemplate

   setvar digx 142
   setvar digy 116
   setvar digz 11469 // sprite is 5x the other ones
   setvar tilenum 6039
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 128
   state checkhappyshoepairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkstyleshoepairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 116
   state itemplate

   setvar digx 174
   setvar digy 116
   setvar digz 11469 // sprite is 5x the other ones
   setvar tilenum 6040
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 128
   state checkstyleshoepairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkcharmshoepairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 116
   state itemplate

   setvar digx 206
   setvar digy 116
   setvar digz 11469 // sprite is 5x the other ones
   setvar tilenum 6041
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 128
   state checkcharmshoepairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkpowerwrists
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 116
   state itemplate

   setvar digx 238
   setvar digy 116
   setvar digz 5735 // sprite is 10x the other ones
   setvar tilenum 6042
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 128
   state checkpowerwrists
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

// Row #4
  state checkhockeymasks
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 148
   state itemplate

   setvar digx 78
   setvar digy 148
   setvar digz 8192 // sprite is 6x the other ones
   setvar tilenum 6044
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 160
   state checkhockeymasks
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkgemstonecrowns
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 148
   state itemplate

   setvar digx 110
   setvar digy 148
   setvar digz 4096 // sprite is 6x the other ones
   setvar tilenum 6045
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 160
   state checkgemstonecrowns
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkironrunes
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 148
   state itemplate

   setvar digx 142
   setvar digy 148
   setvar digz 16384 // sprite is 6x the other ones
   setvar tilenum 6052
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 160
   state checkironrunes
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checktwilightcapes
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 148
   state itemplate

   setvar digx 174
   setvar digy 148
   setvar digz 7168 // sprite is 6x the other ones
   setvar tilenum 6046
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 160
   state checktwilightcapes
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checksnakearmbands
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 148
   state itemplate

   setvar digx 206
   setvar digy 148
   setvar digz 3584 // sprite is 6x the other ones
   setvar tilenum 6047
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 160
   state checksnakearmbands
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkmedicbags
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 148
   state itemplate

   setvar digx 238
   setvar digy 148
   setvar digz 4096 // sprite is 6x the other ones
   setvar tilenum 6048
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 160
   state checkmedicbags
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

 }

 ifvare mainmenupage 5
 {
  state orientation2
  // Row #1
  state checkserpenthelmets
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 52
   state itemplate

   setvar digx 78
   setvar digy 52 
   setvar digz 7168
   setvar tilenum 6049 
   state pal0
   state rs 

   addvar digx 2 // setvar digx 78
   setvar digy 64
   state checkserpenthelmets
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkenergyincurments
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 52
   state itemplate

   setvar digx 110
   setvar digy 52
   setvar digz 28160
   setvar tilenum 6050
   state pal0
   state rs 

   addvar digx 2 // setvar digx 110
   setvar digy 64
   state checkenergyincurments
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkyinyangorbs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 52
   state itemplate

   setvar digx 142
   setvar digy 52
   setvar digz 8192
   setvar tilenum 6051
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 64
   state checkyinyangorbs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkshikonjewels
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 52
   state itemplate

   setvar digx 174
   setvar digy 52
   setvar digz 9558 // sprite is 6x the other ones
   setvar tilenum 6043
   getplayer[THISACTOR].player_par TEMPVAR
   modvar TEMPVAR 6
   ifvare TEMPVAR 0 state pal0
   ifvare TEMPVAR 1 state pal11
   ifvare TEMPVAR 2 state pal21
   ifvare TEMPVAR 3 state pal12
   ifvare TEMPVAR 4 state pal15
   ifvare TEMPVAR 5 state pal23
   state rs 

   addvar digx 2 // setvar digx 174
   setvar digy 64
   state checkshikonjewels
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

 }

  ifvarg mainmenuselection -1 ifvarl mainmenuselection 6 setvar digy 52
  ifvarg mainmenuselection 5 ifvarl mainmenuselection 12 setvar digy 84 // 32
  ifvarg mainmenuselection 11 ifvarl mainmenuselection 18 setvar digy 116 // 32
  ifvarg mainmenuselection 17 ifvarl mainmenuselection 24 setvar digy 148 // 32

  switch mainmenuselection

   case 0 case 6 case 12 case 18
    setvar digx 78
   break

   case 1 case 7 case 13 case 19
    setvar digx 110
   break

   case 2 case 8 case 14 case 20
    setvar digx 142
   break

   case 3 case 9 case 15 case 21
    setvar digx 174
   break

   case 4 case 10 case 16 case 22
    setvar digx 206
   break

   case 5 case 11 case 17 case 23
    setvar digx 238
   break

  endswitch

  state orientation2
  state digz65536
  state pal0
  setvar tilenum 8183 
  state rs
 } // ifvare mainmenusubmenu 1


// Main Menu - Toggle Menu [for future placement]

ifvare mainmenusubmenu 2
 { // ifvare mainmenusubmenu 2
  setvar mainmenupage 0
  setvar digx 56
  state pal21
  state setquote332
  setvar digy 45
  redefinequote 332 MISCELLANEOUS DISPLAYS
  ifvare mainmenuselection 0 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 78
  redefinequote 332 PLAYER'S STAT DISPLAYS
  ifvare mainmenuselection 1 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 87
  redefinequote 332 DEBUG VARIABLES
  ifvare mainmenuselection 2 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 96
  redefinequote 332 LIFEBAR & RANKSTAR DISPLAYS
  ifvare mainmenuselection 3 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 105
  redefinequote 332 AUTO-USE MEDIKIT WHEN DAMAGED
  ifvare mainmenuselection 4 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 114
  redefinequote 332 AUTO-MANTLE NEAR CLIFF LEDGES
  ifvare mainmenuselection 5 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 123
  redefinequote 332 ACTOR FOOTSTEP & LADDER SOUNDS
  ifvare mainmenuselection 6 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 132
  redefinequote 332 DEFAULT HITSCANNING OF OBJECTS
  ifvare mainmenuselection 7 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 141
  redefinequote 332 VEHICLES & GRABBING/BUYING ITEMS
  ifvare mainmenuselection 8 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 150
  redefinequote 332 CHARACTERS' PAIN SOUND TOGGLE
  ifvare mainmenuselection 9 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 150
  redefinequote 332 SHOW RPG-STYLE DAMAGE/HEALING
  ifvare mainmenuselection 10 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 150
  redefinequote 332 GAME AUTOSAVES ON INTERVALS
  ifvare mainmenuselection 11 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 150
  redefinequote 332 WEAPON/CHARACTER CYCLE?
  ifvare mainmenuselection 12 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt


  setvar digx 248 // 224
  state pal21
  state shade0
  setvar digy 45
  ifvare miscdisplaytoggle 0
  {
   setvarvar digx 227
   redefinequote 332 ALL OFF
  }
  ifvare miscdisplaytoggle 1
  {
   setvarvar digx 211
   redefinequote 332 DAMAGE ONLY
  }
  ifvare miscdisplaytoggle 2
  {
   setvarvar digx 215
   redefinequote 332 STATS ONLY
  }
  ifvare miscdisplaytoggle 3
  {
   setvarvar digx 198
   redefinequote 332 DAMAGE & STATS
  }
  ifvare miscdisplaytoggle 4
  {
   setvarvar digx 215
   redefinequote 332 MONEY ONLY
  }
  ifvare miscdisplaytoggle 5
  {
   setvarvar digx 198
   redefinequote 332 DAMAGE & MONEY
  }
  ifvare miscdisplaytoggle 6
  {
   setvarvar digx 202
   redefinequote 332 STATS & MONEY
  }
  ifvare miscdisplaytoggle 7
  {
   setvarvar digx 184
   redefinequote 332 DAMAGE/STATS/MONEY
  }
  ifvare miscdisplaytoggle 8
  {
   setvarvar digx 207
   redefinequote 332 REWARDS ONLY
  }
  ifvare miscdisplaytoggle 9
  {
   setvarvar digx 190
   redefinequote 332 DAMAGE & REWARDS
  }
  ifvare miscdisplaytoggle 10
  {
   setvarvar digx 194
   redefinequote 332 STATS & REWARDS
  }
  ifvare miscdisplaytoggle 11
  {
   setvarvar digx 176
   redefinequote 332 DAMAGE/STATS/REWARDS
  }
  ifvare miscdisplaytoggle 12
  {
   setvarvar digx 194
   redefinequote 332 MONEY & REWARDS
  }
  ifvare miscdisplaytoggle 13
  {
   setvarvar digx 176
   redefinequote 332 DAMAGE/MONEY/REWARDS
  }
  ifvare miscdisplaytoggle 14
  {
   setvarvar digx 180
   redefinequote 332 STATS/MONEY/REWARDS
  }
  ifvare miscdisplaytoggle 15
  {
   setvarvar digx 211
   redefinequote 332 ALL ENABLED
  }
  ifvare mainmenuselection 0 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 79
  ifvare statusdisplaytoggle 0
  {
   setvar digx 244
   redefinequote 332 OFF
  }
  ifvare statusdisplaytoggle 1
  {
   setvar digx 248
   redefinequote 332 ON
  }
  ifvare mainmenuselection 1 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 88
  ifvare debugtoggle 0
  {
   setvar digx 244
   redefinequote 332 OFF
  }
  ifvare debugtoggle 1
  {
   setvar digx 248
   redefinequote 332 ON
  }
  ifvare mainmenuselection 2 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 97
  ifvare lifebartogglemode 0
  {
   setvar digx 244
   redefinequote 332 OFF
  }
  ifvare lifebartogglemode 1
  {
   setvar digx 248
   redefinequote 332 ON
  }
  ifvare mainmenuselection 3 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 106
  ifvare automedikittoggle 0
  {
   setvar digx 244
   redefinequote 332 OFF
  }
  ifvare automedikittoggle 1
  {
   setvar digx 248
   redefinequote 332 ON
  }
  ifvare mainmenuselection 4 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 115
  ifvare automantletoggle 0
  {
   setvar digx 244
   redefinequote 332 OFF
  }
  ifvare automantletoggle 1
  {
   setvar digx 248
   redefinequote 332 ON
  }
  ifvare mainmenuselection 5 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 124
  ifvare footstepsndtoggle 0
  {
   setvar digx 244
   redefinequote 332 OFF
  }
  ifvare footstepsndtoggle 1
  {
   setvar digx 248
   redefinequote 332 ON

  }
  ifvare mainmenuselection 6 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 133
  ifvare normalhitscantoggle 0
  {
   setvar digx 244 // 256 - 12
   redefinequote 332 OFF
  }
  ifvare normalhitscantoggle 1
  {
   setvar digx 248 // 256 - 8
   redefinequote 332 ON
  }
  ifvare mainmenuselection 7 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 142
  ifvare vehiclepickuptoggle 0
  {
   setvar digx 216 // 256 - 40
   redefinequote 332 CHARACTERS
  }
  ifvare vehiclepickuptoggle 1
  {
   setvar digx 224 // 256 - 32
   redefinequote 332 VEHICLES
  }
  ifvare vehiclepickuptoggle 2
  {
   setvar digx 220 // 256 - 36
   redefinequote 332 CHAR/VEHI
  }
  ifvare vehiclepickuptoggle 3
  {
   setvar digx 220
   redefinequote 332 VEHI/CHAR
  }
  ifvare mainmenuselection 8 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt
 
  addvar digy 9 // setvar digy 142
  ifvare PAINSOUNDSTYPE 0
  {
   setvar digx 215 // 256 - 40
   redefinequote 332 CURRENT HP
  }
  ifvare PAINSOUNDSTYPE 1
  {
   setvar digx 211 // 256 - 32
   redefinequote 332 PERCENT DMG
  }
  ifvare mainmenuselection 9 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 142
  ifvare rpgdmgdisplaytoggle 0
  {
   setvar digx 244 // 256 - 12
   redefinequote 332 OFF
  }
  ifvare rpgdmgdisplaytoggle 1
  {
   setvar digx 248 // 256 - 8
   redefinequote 332 ON
  }
  ifvare mainmenuselection 10 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 142
  ifvare autosavetoggle 0
  {
   setvar digx 244 // 256 - 12
   redefinequote 332 OFF
  }
  ifvare autosavetoggle 1
  {
   ifvarn AUTOSAVEFREQUENCY 0
   {
    ifvarg AUTOSAVEFREQUENCY -1 ifvarl AUTOSAVEFREQUENCY 10 setvar digx 235
    else ifvarg AUTOSAVEFREQUENCY 9 ifvarl AUTOSAVEFREQUENCY 100 setvar digx 231
    else ifvarg AUTOSAVEFREQUENCY 99 ifvarl AUTOSAVEFREQUENCY 1000 setvar digx 227
    redefinequote 332 %d MIN
    qsprintf 332 332 AUTOSAVEFREQUENCY
   }
   else
   {
    setvar digx 202
    redefinequote 332 MAP LOAD ONLY
   }   
  }
  ifvare mainmenuselection 11 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt

  addvar digy 9 // setvar digy 142
  ifvare weapontoggleselect 0
  {
   setvar digx 216 // 256 - 40
   redefinequote 332 CHARACTERS
  }
  ifvare weapontoggleselect 1
  {
   setvar digx 228 // 256 - 28
   redefinequote 332 WEAPONS
  }
  ifvare mainmenuselection 12 { state pal21 state shade0 } else { state pal21 setvar shade 8 }
  state mt


  state shade0
  state pal0
 } // ifvare mainmenusubmenu 2

// Main Menu - Full Status Menu [?]

ifvare mainmenusubmenu 3
 { // ifvare mainmenusubmenu 3
  setvar digx 70
  setvar digy 53
  state digz32768 // 32768
  state orientation2
  ifvare mainmenupage 0 // Duke
  {
   ifvare DUKE? 1 
   { 
    setvar CHARACTERARRAY 1
    ifvare CHARACTERSELECTED? 1 state shadepulse4
    setvar tilenum 7936 
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 138
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 DUKE NUKEM
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Duke's Info
  }
  else
  ifvare mainmenupage 1 // Jack
  {
   ifvare JACK? 1 
   { 
    setvar CHARACTERARRAY 2
    ifvare CHARACTERSELECTED? 2 state shadepulse4
    setvar tilenum 7937 
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 136
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 JACK WALKER
    
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Jack's Info
  }
  else
  ifvare mainmenupage 2 // Bubsy
  {
   ifvare BUBSY? 1 
   { 
    setvar CHARACTERARRAY 3
    ifvare CHARACTERSELECTED? 3 state shadepulse4
    ifvare BUBSYFORM? 0 setvar tilenum 7938
    else ifvare BUBSYFORM? 1 setvar tilenum 7962
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 136
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 BUBSY BOBCAT
    
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Bubsy's Info
  }
  else
  ifvare mainmenupage 3 // Ami
  {
   ifvare AMI? 1 
   { 
    setvar CHARACTERARRAY 4
    ifvare CHARACTERSELECTED? 4 state shadepulse4
    ifvare AMIFORM? 0 setvar tilenum 7939
    else ifvare AMIFORM? 1 setvar tilenum 7963
    else ifvare AMIFORM? 2 setvar tilenum 7966
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 138
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 AMI MIZUNO
    
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Ami's Info
  }
  else
  ifvare mainmenupage 4 // Higa
  {
   ifvare LOWANG? 1 
   { 
    setvar CHARACTERARRAY 5
    ifvare CHARACTERSELECTED? 5 state shadepulse4
    setvar tilenum 7940
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 134
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 HIGA HAKAISHA
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Higa's Info
  }
  else
  ifvare mainmenupage 5 // ESSence
  {
   ifvare ESSENCE? 1 
   { 
    setvar CHARACTERARRAY 6
    ifvare CHARACTERSELECTED? 6 state shadepulse4
    setvar tilenum 7941
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 128
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 ESSENCE MARGALAN
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show ESSence's Info
  }
  else
  ifvare mainmenupage 6 // Ted
  {
   ifvare TED? 1 
   { 
    setvar CHARACTERARRAY 7
    ifvare CHARACTERSELECTED? 7 state shadepulse4
    setvar tilenum 7942
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 134
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 TED MALDORAS
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Ted's Info
  }
  else
  ifvare mainmenupage 7 // Lisa
  {
   ifvare LISA? 1 
   { 
    setvar CHARACTERARRAY 8
    ifvare CHARACTERSELECTED? 8 state shadepulse4
    setvar tilenum 7943
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 138
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 LISA BATES
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Lisa's Info
  }
  else
  ifvare mainmenupage 8 // Cybanis
  {
   ifvare CYBANIS? 1 
   { 
    setvar CHARACTERARRAY 9
    ifvare CHARACTERSELECTED? 9 state shadepulse4
    setvar tilenum 7944
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 124
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 CYBANIS MORGANDOS
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Cybanis's Info
  }
  else
  ifvare mainmenupage 9 // Nethra
  {
   ifvare NETHRA? 1 
   { 
    setvar CHARACTERARRAY 10
    ifvare CHARACTERSELECTED? 10 state shadepulse4
    ifvare NETHRAFORM? 0 setvar tilenum 7945
    else ifvare NETHRAFORM? 1 setvar tilenum 7964
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    ifvare NETHRAFORM? 0 setvar digx 126
    else ifvare NETHRAFORM? 1 setvar digx 122
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    ifvare NETHRAFORM? 0 redefinequote 332 NETHRA MABOROSHI
    else ifvare NETHRAFORM? 1 redefinequote 332 CHRISTINA MITCHELL
        
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Christina/Nethra's Info
  }
  else
  ifvare mainmenupage 10 // Paula
  {
   ifvare PAULA? 1 
   { 
    setvar CHARACTERARRAY 11
    ifvare CHARACTERSELECTED? 11 state shadepulse4
    setvar tilenum 7946
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 130
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 PAULA POLESTAR
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Paula's Info
  }
  else
  ifvare mainmenupage 11 // Lori
  {
   ifvare LORI? 1 
   { 
    setvar CHARACTERARRAY 12
    ifvare CHARACTERSELECTED? 12 state shadepulse4
    setvar tilenum 7947
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 134
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 LORI STEPHENS
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Lori's Info
  }
  else
  ifvare mainmenupage 12 // Minako
  {
   ifvare MINAKO? 1 
   { 
    setvar CHARACTERARRAY 13
    ifvare CHARACTERSELECTED? 13 state shadepulse4
    ifvare MINAKOFORM? 0 setvar tilenum 7948
    else ifvare MINAKOFORM? 1 setvar tilenum 7965
    else ifvare MINAKOFORM? 2 setvar tilenum 7968
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 136
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 MINAKO AINO
    
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Minako's Info
  }
  else
  ifvare mainmenupage 13 // Mystery Lady
  {
   ifvare MYSTERY1? 1 
   { 
    setvar CHARACTERARRAY 14
    ifvare CHARACTERSELECTED? 14 state shadepulse4
    setvar tilenum 7957
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 128
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    ifvare debugtoggle 0
    {
     ifvare PUBLICBETA? 1 redefinequote 332 ??????? ?????????
     else redefinequote 332 NAFERIA MABOROSHI
    }
    else
    {
     ifvare PUBLICBETA? 1 redefinequote 332 HINOTORI GENKAI
     else redefinequote 332 NAFERIA MABOROSHI
    }
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Mystery Lady's Info
  }
  else
  ifvare mainmenupage 14 // Maken
  {
   ifvare MAKEN? 1 
   { 
    setvar CHARACTERARRAY 15
    ifvare CHARACTERSELECTED? 15 state shadepulse4
    setvar tilenum 7971
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1 state pal2 else state pal0
    } 
    state rs 
    setvar digx 130
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 MAKEN SHINKARA
    state mt

    state statusscreenlist

    state shade0
    state digz32768
   } // Show Maken's Info
  }
 } // ifvare mainmenusubmenu 3

// Main Menu - Skills Menu [?]


ifvare mainmenusubmenu 4
 { // ifvare mainmenusubmenu 4
  ifvare mainmenupage 0 // Duke
  {
   ifvare DUKE? 1 
   { 
    setvar CHARACTERARRAY 1
    ifvare CHARACTERSELECTED? 1 state shadepulse4
    setvar digx 138
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 DUKE NUKEM
    state mt

    state shownoskills

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Duke's Info
  }
  else
  ifvare mainmenupage 1 // Jack
  {
   ifvare JACK? 1 
   { 
    setvar CHARACTERARRAY 2
    ifvare CHARACTERSELECTED? 2 state shadepulse4
    setvar digx 136
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 JACK WALKER
    
    state mt

// Insert Damage Shell Here
    setvar digx 54 // 88 (-34)
    setvar digy 46 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 2
    getactorvar[CHARACTERARRAY].CHARACTERSTATUS? TEMP
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 1 // Damage Shell
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 DAMAGE SHELL   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 DAMAGE SHELL   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 52 // 44 (+26)
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 JACK ERECTS A POWERFUL BARRIER THAT BLOCKS
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 58 // 44 (+26)
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 AROUND 1/3 OF ALL DAMAGE FROM ENEMIES.
    state mt

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Jack's Info
  }
  else
  ifvare mainmenupage 2 // Bubsy
  {
   ifvare BUBSY? 1 
   { 
    setvar CHARACTERARRAY 3
    ifvare CHARACTERSELECTED? 3 state shadepulse4
    setvar digx 136
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 BUBSY BOBCAT
    
    state mt

    state shownoskills

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Bubsy's Info
  }
  else
  ifvare mainmenupage 3 // Ami
  {
   ifvare AMI? 1 
   { 
    setvar CHARACTERARRAY 4
    ifvare CHARACTERSELECTED? 4 state shadepulse4
    setvar digx 138
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 AMI MIZUNO
    
    state mt

    // Has Aqua Protection
    setvar digx 54 // 88 (-34)
    setvar digy 46 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 4
    getactorvar[CHARACTERARRAY].CHARACTERSTATUS? TEMP
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 2 // Mercury Aqua Protection
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    ifvarand CHEATBITFIELD? 128 mulvar varname 0 else { ifvarand TEMP 256 mulvar varname 0 else mulvarvar varname TEMPVAR }
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    ifvarand CHEATBITFIELD? 128 addvar varname 0 else { ifvarand TEMP 256 addvar varname 0 else addvarvar varname TEMPVAR }

    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 0
    {
     ifvarand TEMP 256 state pal0 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     }
     redefinequote 332 MERCURY AQUA PROTECTION   ^21[%d EP]
    }
    else
    {
     ifvarand TEMP 256 state pal16 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     }
     redefinequote 332 MERCURY AQUA PROTECTION   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 52 // 44 (+26)
    ifvare mainmenuselection 0
    {
     ifvarand TEMP 256 state pal0 else 
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     }
    }
    else
    {
     ifvarand TEMP 256 state pal16 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     }
    }
    redefinequote 332 AMI TAKES 80% LESS DAMAGE, BUT DOES 80% LESS
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 58 // 44 (+26)
    ifvare mainmenuselection 0
    {
     ifvarand TEMP 256 state pal0 else 
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     }
    }
    else
    {
     ifvarand TEMP 256 state pal16 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     }
    }
    redefinequote 332 DAMAGE TO ENEMIES.
    state mt

    // Has Mercury Quickening
    setvar digx 54 // 88 (-34)
    setvar digy 64 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 4
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 3 // Mercury Quickening
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 MERCURY QUICKENING   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 MERCURY QUICKENING   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 70 // 44 (+26)
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 AMI SPEEDS UP THE MOVEMENT AND ATTACK OF ONE
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 76 // 44 (+26)
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 PERSON FOR 15 SECONDS OR ADDS 15 MORE SECONDS.
    state mt

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Ami's Info
  }
  else
  ifvare mainmenupage 4 // Higa
  {
   ifvare LOWANG? 1 
   { 
    setvar CHARACTERARRAY 5
    ifvare CHARACTERSELECTED? 5 state shadepulse4
    setvar digx 134
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 HIGA HAKAISHA
    state mt

    state shownoskills

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Higa's Info
  }
  else
  ifvare mainmenupage 5 // ESSence
  {
   ifvare ESSENCE? 1 
   { 
    setvar CHARACTERARRAY 6
    ifvare CHARACTERSELECTED? 6 state shadepulse4
    setvar digx 128
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 ESSENCE MARGALAN
    state mt

    state shownoskills

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show ESSence's Info
  }
  else
  ifvare mainmenupage 6 // Ted
  {
   ifvare TED? 1 
   { 
    setvar CHARACTERARRAY 7
    ifvare CHARACTERSELECTED? 7 state shadepulse4
    setvar digx 134
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 TED MALDORAS
    state mt

    // Has Fortify [Lesser]
    setvar digx 54 // 88 (-34)
    setvar digy 46 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 7
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 4 // Fortify [Lesser]
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 FORTIFY [LESSER]   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 FORTIFY [LESSER]   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 52 // 44 (+26)
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 TED INCREASES ONE PERSON'S ARMOR ABSORBSION
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 58 // 44 (+26)
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 RATE BY 1/5 FROM THEIR PREVIOUS AMOUNT.
    state mt

    // Has Fortify [Moderate]
    setvar digx 54 // 88 (-34)
    setvar digy 64 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 7
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 5 // Fortify [Moderate]
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 FORTIFY [MODERATE]   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 FORTIFY [MODERATE]   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 70 // 44 (+26)
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 TED INCREASES ONE PERSON'S ARMOR ABSORBSION
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 76 // 44 (+26)
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 RATE BY 3/5S FROM THEIR PREVIOUS AMOUNT.
    state mt

    // Has Fortify [Greater]
    setvar digx 54 // 88 (-34)
    setvar digy 82 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 7
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 6 // Fortify [Greater]
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 2
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 FORTIFY [GREATER]   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 FORTIFY [GREATER]   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 88 // 44 (+26)
    ifvare mainmenuselection 2
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 TED INCREASES ONE PERSON'S ARMOR ABSORBSION
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 94 // 44 (+26)
    ifvare mainmenuselection 2
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 RATE BY DOUBLE FROM THEIR PREVIOUS AMOUNT.
    state mt

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Ted's Info
  }
  else
  ifvare mainmenupage 7 // Lisa
  {
   ifvare LISA? 1 
   { 
    setvar CHARACTERARRAY 8
    ifvare CHARACTERSELECTED? 8 state shadepulse4
    setvar digx 138
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 LISA BATES
    state mt

    state shownoskills

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Lisa's Info
  }
  else
  ifvare mainmenupage 8 // Cybanis
  {
   ifvare CYBANIS? 1 
   { 
    setvar CHARACTERARRAY 9
    ifvare CHARACTERSELECTED? 9 state shadepulse4
    setvar digx 124
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 CYBANIS MORGANDOS
    state mt

    // Has Bloodlusting
    setvar digx 54 // 88 (-34)
    setvar digy 46 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 9
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 7 // Bloodlusting
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 BLOODLUSTING   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 BLOODLUSTING   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 52 // 44 (+26)
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 CYBANIS INCREASES ONE CHARACTER'S CRITICAL HIT
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 58 // 44 (+26)
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 RATE BY 1/4 PLUS ANOTHER 20+% FOR 15 SECONDS.
    state mt

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Cybanis's Info
  }
  else
  ifvare mainmenupage 9 // Nethra
  {
   ifvare NETHRA? 1 
   { 
    setvar CHARACTERARRAY 10
    ifvare CHARACTERSELECTED? 10 state shadepulse4
    ifvare NETHRAFORM? 0 setvar digx 126
    else ifvare NETHRAFORM? 1 setvar digx 122
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    ifvare NETHRAFORM? 0 redefinequote 332 NETHRA MABOROSHI
    else ifvare NETHRAFORM? 1 redefinequote 332 CHRISTINA MITCHELL
        
    state mt

    // Has Lesser Resurrection
    setvar digx 54 // 88 (-34)
    setvar digy 46 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 10
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 8 // Lesser Resurrection
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 LESSER RESURRECTION   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 LESSER RESURRECTION   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 52 // 44 (+26)
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    ifvare NETHRAFORM? 0 redefinequote 332 NETHRA RESURRECTS ONE CHARACTER WITH 40% OF
    else ifvare NETHRAFORM? 1 redefinequote 332 CHRISTINA RESURRECTS ONE CHARACTER WITH 40% OF
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 58 // 44 (+26)
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 THEIR HP INTACT UPON REVIVAL.
    state mt

    // Has Heal Life [Lesser]
    setvar digx 54 // 88 (-34)
    setvar digy 64 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 10
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 9 // Heal Life [Lesser]
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 HEAL LIFE [LESSER]   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 HEAL LIFE [LESSER]   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 70 // 44 (+26)
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    ifvare NETHRAFORM? 0 redefinequote 332 NETHRA WILL HEAL ONE PERSON'S HP BY 33%, UP
    else ifvare NETHRAFORM? 1 redefinequote 332 CHRISTINA WILL HEAL ONE PERSON'S HP BY 33%, UP
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 76 // 44 (+26)
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 TO 133% OF THEIR MAXIMUM HP.
    state mt

    // Has Cure Ailment [Moderate]
    setvar digx 54 // 88 (-34)
    setvar digy 82 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 10
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 10 // Cure Ailment [Moderate]
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 2
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 CURE AILMENT [MODERATE]   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 CURE AILMENT [MODERATE]   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 88 // 44 (+26)
    ifvare mainmenuselection 2
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    ifvare NETHRAFORM? 0 redefinequote 332 NETHRA WILL CURE "DIMNESS", "POISON" AND 
    else ifvare NETHRAFORM? 1 redefinequote 332 CHRISTINA WILL CURE "DIMNESS", "POISON" AND
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 94 // 44 (+26)
    ifvare mainmenuselection 2
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 "CONFUSION" FROM ONE PERSON.
    state mt

    // Has Heal Life [Lesser]
    setvar digx 54 // 88 (-34)
    setvar digy 100 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 10
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 11 // Heal Life [Lesser]
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 3
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 HEAL LIFE [GREATER]   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 HEAL LIFE [GREATER]   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 106 // 44 (+26)
    ifvare mainmenuselection 3
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    ifvare NETHRAFORM? 0 redefinequote 332 NETHRA WILL HEAL ONE PERSON'S HP BY 66%, UP
    else ifvare NETHRAFORM? 1 redefinequote 332 CHRISTINA WILL HEAL ONE PERSON'S HP BY 66%, UP
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 112 // 44 (+26)
    ifvare mainmenuselection 3
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 TO 166% OF THEIR MAXIMUM HP.
    state mt

    // Has Greater Resurrection
    setvar digx 54 // 88 (-34)
    setvar digy 118 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 10
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname

    setvar USESKILLARRAY 12 // Greater Resurrection
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 4
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 GREATER RESURRECTION   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 GREATER RESURRECTION   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 124 // 44 (+26)
    ifvare mainmenuselection 4
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    ifvare NETHRAFORM? 0 redefinequote 332 NETHRA RESURRECTS ONE CHARACTER WITH 80% OF
    else ifvare NETHRAFORM? 1 redefinequote 332 CHRISTINA RESURRECTS ONE CHARACTER WITH 80% OF
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 130 // 44 (+26)
    ifvare mainmenuselection 4
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 THEIR HP INTACT UPON REVIVAL.
    state mt

    // Has Cure Ailment [Greatest]
    setvar digx 54 // 88 (-34)
    setvar digy 136 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 10
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 13 // Cure Ailment [Greatest]
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 5
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 CURE AILMENT [GREATEST]   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 CURE AILMENT [GREATEST]   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 142 // 44 (+26)
    ifvare mainmenuselection 5
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    ifvare NETHRAFORM? 0 redefinequote 332 NETHRA WILL CURE "DIMNESS", "POISON", 
    else ifvare NETHRAFORM? 1 redefinequote 332 CHRISTINA WILL CURE "DIMNESS", "POISON",
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 148 // 44 (+26)
    ifvare mainmenuselection 5
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 "CONFUSION" AND "SLOW" FROM ONE PERSON.
    state mt

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Christina/Nethra's Info
  }
  else
  ifvare mainmenupage 10 // Paula
  {
   ifvare PAULA? 1 
   { 
    setvar CHARACTERARRAY 11
    ifvare CHARACTERSELECTED? 11 state shadepulse4
    setvar digx 130
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 PAULA POLESTAR
    state mt

    // Has PK Shield
    setvar digx 54 // 88 (-34)
    setvar digy 46 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 11
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 14 // PK Shield
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 PSYCHOKENETIC SHIELD   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 PSYCHOKENETIC SHIELD   ^14[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 52 // 44 (+26)
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 PAULA CREATES A SHIELD THAT BLOCKS OR REFLECTS
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 58 // 44 (+26)
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 6 PSYCHIC/MAGIC/MYSTIC-TYPE ATTACKS PER USE.
    state mt

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Paula's Info
  }
  else
  ifvare mainmenupage 11 // Lori
  {
   ifvare LORI? 1 
   { 
    setvar CHARACTERARRAY 12
    ifvare CHARACTERSELECTED? 12 state shadepulse4
    setvar digx 134
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 LORI STEPHENS
    state mt

    // Has Triad Refractor
    setvar digx 54 // 88 (-34)
    setvar digy 46 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 12
    getactorvar[CHARACTERARRAY].CHARACTERSTATUS? TEMP
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 15 // Triad Refractor
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    ifvarand CHEATBITFIELD? 128 mulvar varname 0 else { ifvarand TEMP 32 mulvar varname 0 else mulvarvar varname TEMPVAR }
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    ifvarand CHEATBITFIELD? 128 addvar varname 0 else { ifvarand TEMP 32 addvar varname 0 else addvarvar varname TEMPVAR }
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 0
    {
     ifvarand TEMP 32 state pal0 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     }
     redefinequote 332 TRIAD REFRACTOR   ^21[%d EP]
    }
    else
    {
     ifvarand TEMP 32 state pal16 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     }
     redefinequote 332 TRIAD REFRACTOR   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 52 // 44 (+26)
    ifvare mainmenuselection 0
    {
     ifvarand TEMP 32 state pal0 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     }
    }
    else
    {
     ifvarand TEMP 32 state pal16 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     }
    }
    redefinequote 332 DAMAGE TO LORI IS CUT BY 50% AND THE REST PLUS
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 58 // 44 (+26)
    ifvare mainmenuselection 0
    {
     ifvarand TEMP 32 state pal0 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     }
    }
    else
    {
     ifvarand TEMP 32 state pal16 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     }
    }
    redefinequote 332 EXTRA IS DEFLECTED TO THE ATTACKING ENEMY.
    state mt

    // Has Triad Ragnarok
    setvar digx 54 // 88 (-34)
    setvar digy 64 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 12
    getactorvar[CHARACTERARRAY].CHARACTERSTATUS? TEMP
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 16 // Triad Ragnarok
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    ifvarand CHEATBITFIELD? 128 mulvar varname 0 else { ifvarand TEMP 64 mulvar varname 0 else mulvarvar varname TEMPVAR }
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    ifvarand CHEATBITFIELD? 128 addvar varname 0 else { ifvarand TEMP 64 addvar varname 0 else addvarvar varname TEMPVAR }
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 1
    {
     ifvarand TEMP 64 state pal0 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     }
     redefinequote 332 TRIAD RAGNAROK   ^21[%d EP]
    }
    else
    {
     ifvarand TEMP 64 state pal16 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     }
     redefinequote 332 TRIAD RAGNAROK   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 70 // 44 (+26)
    ifvare mainmenuselection 1
    {
     ifvarand TEMP 64 state pal0 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     }
    }
    else
    {
     ifvarand TEMP 64 state pal16 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     }
    }
    redefinequote 332 WHEN LORI TAKES MORE THAN 5% DAMAGE FROM
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 76 // 44 (+26)
    ifvare mainmenuselection 1
    {
     ifvarand TEMP 64 state pal0 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     }
    }
    else
    {
     ifvarand TEMP 64 state pal16 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     }
    }
    redefinequote 332 ATTACKS, SHE WILL GET RANDOM STATISTICAL BOOSTS.
    state mt

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Lori's Info
  }
  else
  ifvare mainmenupage 12 // Minako
  {
   ifvare MINAKO? 1 
   { 
    setvar CHARACTERARRAY 13
    ifvare CHARACTERSELECTED? 13 state shadepulse4

    setvar digx 136
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 MINAKO AINO
    
    state mt

    state shownoskills

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Minako's Info
  }
  else
  ifvare mainmenupage 13 // Mystery Lady
  {
   ifvare MYSTERY1? 1 
   { 
    setvar CHARACTERARRAY 14
    ifvare CHARACTERSELECTED? 14 state shadepulse4
    setvar digx 128
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    ifvare debugtoggle 0
    {
     ifvare PUBLICBETA? 1 redefinequote 332 ??????? ?????????
     else redefinequote 332 NAFERIA MABOROSHI
    }
    else
    {
     ifvare PUBLICBETA? 1 redefinequote 332 HINOTORI GENKAI
     else redefinequote 332 NAFERIA MABOROSHI
    }
    state mt


   ifvare PUBLICBETA? 1 state shownoskills
   else
   {
    // Has Resurrection Prime
    setvar digx 54 // 88 (-34)
    setvar digy 46 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 14
    getactorvar[CHARACTERARRAY].CHARACTERSTATUS? TEMP
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 17 // Resurrection Prime
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 RESURRECTION PRIME   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 RESURRECTION PRIME   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 52 // 44 (+26)
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    ifvare debugtoggle 0
    {
     ifvare PUBLICBETA? 1 redefinequote 332 ??????? IS ABLE TO RESURRECT ANY ALLY AND
     else redefinequote 332 NAFERIA IS ABLE TO RESURRECT ANY ALLY AND
    }
    else
    {
     ifvare PUBLICBETA? 1 redefinequote 332 HINOTORI IS ABLE TO RESURRECT ANY ALLY AND
     else redefinequote 332 NAFERIA IS ABLE TO RESURRECT ANY ALLY AND
    }
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 58 // 44 (+26)
    ifvare mainmenuselection 0
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 RESTORES THEIR HP TO 200% IN THE PROCESS.
    state mt

    // Has Resurrection Ultima
    setvar digx 54 // 88 (-34)
    setvar digy 64 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 14
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 18 // Resurrection Ultima
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 RESURRECTION ULTIMA   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 RESURRECTION ULTIMA   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 70 // 44 (+26)
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    ifvare debugtoggle 0
    {
     ifvare PUBLICBETA? 1 redefinequote 332 ??????? IS ABLE TO RESURRECT ALL ALLIES AND
     else redefinequote 332 NAFERIA IS ABLE TO RESURRECT ALL ALLIES AND
    }
    else
    {
     ifvare PUBLICBETA? 1 redefinequote 332 HINOTORI IS ABLE TO RESURRECT ALL ALLIES AND
     else redefinequote 332 NAFERIA IS ABLE TO RESURRECT ALL ALLIES AND
    }
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 76 // 44 (+26)
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 RESTORES THEIR HP TO 200% IN THE PROCESS.
    state mt
   }


    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Mystery Lady's Info
  }
  else
  ifvare mainmenupage 14 // Maken
  {
   ifvare MAKEN? 1 
   { 
    setvar CHARACTERARRAY 15
    ifvare CHARACTERSELECTED? 15 state shadepulse4
    setvar digx 130
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 MAKEN SHINKARA
    state mt

    // Has Triad Blitzkrieg
    setvar digx 54 // 88 (-34)
    setvar digy 46 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 15
    getactorvar[CHARACTERARRAY].CHARACTERSTATUS? TEMP
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 19 // Triad Blitzkrieg
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    ifvarand CHEATBITFIELD? 128 mulvar varname 0 else { ifvarand TEMP 2048 mulvar varname 0 else mulvarvar varname TEMPVAR }
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    ifvarand CHEATBITFIELD? 128 addvar varname 0 else { ifvarand TEMP 2048 addvar varname 0 else addvarvar varname TEMPVAR }
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 0
    {
     ifvarand TEMP 2048 state pal0 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     }
     redefinequote 332 TRIAD BLITZKRIEG   ^21[%d EP]
    }
    else
    {
     ifvarand TEMP 2048 state pal16 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     }
     redefinequote 332 TRIAD BLITZKRIEG   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 52 // 44 (+26)
    ifvare mainmenuselection 0
    {
     ifvarand TEMP 2048 state pal0 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     }
    }
    else
    {
     ifvarand TEMP 2048 state pal16 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     }
    }
    redefinequote 332 ALL DAMAGE INFLICTED BY MAKEN IGNORES 75% OF
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 58 // 44 (+26)
    ifvare mainmenuselection 0
    {
     ifvarand TEMP 2048 state pal0 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     }
    }
    else
    {
     ifvarand TEMP 2048 state pal16 else
     {
      getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
      ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     }
    }
    redefinequote 332 HER VICTIMS' DEFENSE STAT, BUT NOT RESISTANCES.
    state mt

    // Has Triad Booster
    setvar digx 54 // 88 (-34)
    setvar digy 64 // 44 (+26)
    state setquote332
    setvar CHARACTERARRAY 15
    getactorvar[CHARACTERARRAY].CHARACTERMAXEP varname
    setvar USESKILLARRAY 20 // Triad Booster
    getactorvar[USESKILLARRAY].USESKILLPERCENTCOST TEMPVAR
    state check-skillenergycost-mulmenu
    divvar varname 100
    getactorvar[USESKILLARRAY].USESKILLEXACTCOST TEMPVAR
    state check-skillenergycost-addmenu
    setvarvar SKILLUSERARRAY CHARACTERARRAY
    setvarvar ENERGYCOST_TEMP varname state energycost_check setvarvar varname ENERGYCOST_TEMP
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
     redefinequote 332 TRIAD BOOSTER   ^21[%d EP]
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
     redefinequote 332 TRIAD BOOSTER   ^10[%d EP]
    }
    qsprintf 332 332 varname
    state mt

    setvar digx 70 // 88 (-34)
    setvar digy 70 // 44 (+26)
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 MAKEN INCREASES THE ATTACK/DEFENSE OF ONE PERSON
    state mt
    setvar digx 70 // 88 (-34)
    setvar digy 76 // 44 (+26)
    ifvare mainmenuselection 1
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal22
    }
    else
    {
     getactorvar[CHARACTERARRAY].CHARACTEREP TEMPVAR5
     ifvarvarl TEMPVAR5 varname state pal4 else state pal14
    }
    redefinequote 332 BY 25% EACH FOR 15 SECS OR ADDS 15 MORE SECS.
    state mt

    state showepskillsmenu
    state shade0
    state digz32768
   } // Show Maken's Info
  }
 } // ifvare mainmenusubmenu 4

//********************************
//********************************
//**Main Menu - Support Menu [?]**
//********************************
//********************************

ifvare mainmenusubmenu 5
 { // ifvare mainmenusubmenu 5
  setvar digx 66
  setvar digy 49
  state digz24576 // 32768 = 32x32
  state orientation2

  ifvare mainmenupage 0 // Duke
  {
   ifvare DUKE? 1 
   { 
    setvar CHARACTERARRAY 1
    ifvare CHARACTERSELECTED? 1 state shadepulse4
    setvar tilenum 7936 
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 138
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 DUKE NUKEM
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 VITALITY
    state pal10
    setvarvar digx 418 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 ATOMIC
    state pal16
    setvarvar digx 450 // digx_test
    setvarvar digy 40 // digy_test
    state gtz


    state supportmenutext1

    setvar tilenum 8150 // "Vitality" Affinity
    setvar digx 215
    setvar digy 48
    setvar digz 32768
    state pal0
    state rs 
    setvar tilenum 8143 // "Atomic" Affinity
    setvar digx 230
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs 

    // Jack Icon
    setvar digx 60
    setvar digy 74
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 86
    state showsupport_bubsyicon

    // Ami Icon
    setvar digx 60
    setvar digy 98
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 110
    state showsupport_lowangicon

    // ESSence Icon
    setvar digx 60
    setvar digy 122
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 134
    state showsupport_tedicon

    // Lisa Icon
    setvar digx 60
    setvar digy 146
    state showsupport_lisaicon


    // Cybanis Icon
    setvar digx 166
    setvar digy 74
    state showsupport_cybanisicon

    // Nethra/Christina Icon
    setvar digx 166
    setvar digy 86
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 98
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 110
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 122
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Duke's Info
  }
  ifvare mainmenupage 1 // Jack
  {
   ifvare JACK? 1 
   { 
    setvar CHARACTERARRAY 2
    ifvare CHARACTERSELECTED? 2 state shadepulse4
    setvar tilenum 7937
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 136
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 JACK WALKER
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 TECHNIQUE
    state pal23
    setvarvar digx 415 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 POISON
    state pal11
    setvarvar digx 450 // digx_test
    setvarvar digy 40 // digy_test
    state gtz


    state supportmenutext1

    setvar tilenum 8157 // "Technique" Affinity
    setvar digx 215
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state pal0
    state rs
    setvar tilenum 8145 // "Poison" Affinity
    setvar digx 230
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state pal0
    state rs

    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 86
    state showsupport_bubsyicon

    // Ami Icon
    setvar digx 60
    setvar digy 98
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 110
    state showsupport_lowangicon

    // ESSence Icon
    setvar digx 60
    setvar digy 122
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 134
    state showsupport_tedicon

    // Lisa Icon
    setvar digx 60
    setvar digy 146
    state showsupport_lisaicon


    // Cybanis Icon
    setvar digx 166
    setvar digy 74
    state showsupport_cybanisicon

    // Nethra/Christina Icon
    setvar digx 166
    setvar digy 86
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 98
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 110
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 122
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Jack's Info
  }
  ifvare mainmenupage 2 // Bubsy
  {
   ifvare BUBSY? 1 
   { 
    setvar CHARACTERARRAY 3
    ifvare CHARACTERSELECTED? 3 state shadepulse4
    ifvare BUBSYFORM? 0 setvar tilenum 7938
    else ifvare BUBSYFORM? 1 setvar tilenum 7962
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 136
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 BUBSY BOBCAT
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 STRENGTH
    state pal15
    setvarvar digx 415 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 LIGHT FEET
    state pal0
    setvarvar digx 444 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    state supportmenutext1

    setvar tilenum 8149 // "Strength" Affinity
    setvar digx 215
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8152 // "Light Feet" Affinity
    setvar digx 230
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs

    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Ami Icon
    setvar digx 60
    setvar digy 98
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 110
    state showsupport_lowangicon

    setvar digx 60
    setvar digy 122
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 134
    state showsupport_tedicon

    // Lisa Icon
    setvar digx 60
    setvar digy 146
    state showsupport_lisaicon


    // Cybanis Icon
    setvar digx 166
    setvar digy 74
    state showsupport_cybanisicon

    // Nethra/Christina Icon
    setvar digx 166
    setvar digy 86
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 98
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 110
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 122
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Bubsy's Info
  }
  ifvare mainmenupage 3 // Ami
  {
   ifvare AMI? 1 
   { 
    setvar CHARACTERARRAY 4
    ifvare CHARACTERSELECTED? 4 state shadepulse4
    ifvare AMIFORM? 0 setvar tilenum 7939
    else ifvare AMIFORM? 1 setvar tilenum 7963
    else ifvare AMIFORM? 2 setvar tilenum 7966
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 138
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 AMI MIZUNO
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 ICE
    state pal0
    setvar shade 4
    setvarvar digx 426 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 WATER
    state pal0
    setvar shade -4
    setvarvar digx 452 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    setvar shade 0
    state supportmenutext1

    setvar tilenum 8161 // "Ice" Affinity
    setvar digx 215
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8162 // "Water" Affinity
    setvar digx 230
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs

    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 98
    state showsupport_bubsyicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 110
    state showsupport_lowangicon

    // ESSence Icon
    setvar digx 60
    setvar digy 122
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 134
    state showsupport_tedicon

    // Lisa Icon
    setvar digx 60
    setvar digy 146
    state showsupport_lisaicon


    // Cybanis Icon
    setvar digx 166
    setvar digy 74
    state showsupport_cybanisicon

    // Nethra/Christina Icon
    setvar digx 166
    setvar digy 86
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 98
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 110
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 122
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Ami's Info
  }
  ifvare mainmenupage 4 // Lo Wang
  {
   ifvare LOWANG? 1 
   { 
    setvar CHARACTERARRAY 5
    ifvare CHARACTERSELECTED? 5 state shadepulse4
    setvar tilenum 7940
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 134
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 HIGA HAKAISHA
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 PRIMEVAL
    state pal10
    setvarvar digx 417 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 LIFEFORCE
    state pal21
    setvarvar digx 444 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    state supportmenutext1

    setvar tilenum 8158 // "Primeval" Affinity

    setvar digx 215
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8153 // "Lifeforce" Affinity
    setvar digx 230
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs

    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 98
    state showsupport_bubsyicon

    // Ami Icon
    setvar digx 60
    setvar digy 110
    state showsupport_amiicon

    // ESSence Icon
    setvar digx 60
    setvar digy 122
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 134
    state showsupport_tedicon

    // Lisa Icon
    setvar digx 60
    setvar digy 146
    state showsupport_lisaicon


    // Cybanis Icon
    setvar digx 166
    setvar digy 74
    state showsupport_cybanisicon

    // Nethra/Christina Icon
    setvar digx 166
    setvar digy 86
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 98
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 110
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 122
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Higa's Info
  }
  ifvare mainmenupage 5 // ESSence
  {
   ifvare ESSENCE? 1 
   { 
    setvar CHARACTERARRAY 6
    ifvare CHARACTERSELECTED? 6 state shadepulse4
    setvar tilenum 7941
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 128
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 ESSENCE MARGALAN
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 ARMOR
    state pal13
    setvarvar digx 422 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 STYLE
    state pal23
    setvarvar digx 451 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    state supportmenutext1

    setvar tilenum 8141 // "Armor" Affinity
    setvar digx 215
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8160 // "Style" Affinity
    setvar digx 230
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
 
    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 98
    state showsupport_bubsyicon    

    // Ami Icon
    setvar digx 60
    setvar digy 110
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 122
    state showsupport_lowangicon

    // Ted Icon
    setvar digx 60
    setvar digy 134
    state showsupport_tedicon

    // Lisa Icon
    setvar digx 60
    setvar digy 146
    state showsupport_lisaicon


    // Cybanis Icon
    setvar digx 166
    setvar digy 74
    state showsupport_cybanisicon

    // Nethra/Christina Icon
    setvar digx 166
    setvar digy 86
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 98
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 110
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 122
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show ESSence's Info
  }
  ifvare mainmenupage 6 // Ted
  {
   ifvare TED? 1 
   { 
    setvar CHARACTERARRAY 7
    ifvare CHARACTERSELECTED? 7 state shadepulse4
    setvar tilenum 7942
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 134
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 TED MALDORAS
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 EXPLOSIVES
    state pal21
    setvarvar digx 413 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 FIRE
    state pal21
    setvarvar digx 454 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    state supportmenutext1

    setvar tilenum 8147 // "Explosives" Affinity
    setvar digx 215
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8148 // "Fire" Affinity
    setvar digx 230
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs

    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 98
    state showsupport_bubsyicon

    // Ami Icon
    setvar digx 60
    setvar digy 110
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 122
    state showsupport_lowangicon

    // ESSence Icon
    setvar digx 60
    setvar digy 134
    state showsupport_essenceicon

    // Lisa Icon
    setvar digx 60
    setvar digy 146
    state showsupport_lisaicon


    // Cybanis Icon
    setvar digx 166
    setvar digy 74
    state showsupport_cybanisicon

    // Nethra/Christina Icon
    setvar digx 166
    setvar digy 86
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 98
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 110
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 122
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Ted's Info
  }
  ifvare mainmenupage 7 // Lisa
  {
   ifvare LISA? 1 
   { 
    setvar CHARACTERARRAY 8
    ifvare CHARACTERSELECTED? 8 state shadepulse4
    setvar tilenum 7943 
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 138
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 LISA BATES
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 ION
    state pal21
    setvarvar digx 427 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 INSTINCT
    state pal14
    setvarvar digx 448 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    state supportmenutext1

    setvar tilenum 8146 // "Ion" Affinity
    setvar digx 215 // + 73
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8159 // "Instinct" Affinity
    setvar digx 230 // + 6
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs

    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 98
    state showsupport_bubsyicon

    // Ami Icon
    setvar digx 60
    setvar digy 110
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 122
    state showsupport_lowangicon

    // ESSence Icon
    setvar digx 60
    setvar digy 134
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 146
    state showsupport_tedicon


    // Cybanis Icon
    setvar digx 166
    setvar digy 74
    state showsupport_cybanisicon

    // Nethra/Christina Icon
    setvar digx 166
    setvar digy 86
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 98
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 110
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 122
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Lisa's Info
  }
  ifvare mainmenupage 8 // Cybanis
  {
   ifvare CYBANIS? 1 
   { 
    setvar CHARACTERARRAY 9
    ifvare CHARACTERSELECTED? 9 state shadepulse4
    setvar tilenum 7944
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 124
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 CYBANIS MORGANDOS
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 PSYCHOKENESIS
    state pal21
    setvarvar digx 407 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 ENDURANCE
    state pal12
    setvarvar digx 443 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    state supportmenutext1

    setvar tilenum 8144 // "Psychokenesis" Affinity
    setvar digx 215 // + 73
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8165 // "Endurance" Affinity
    setvar digx 230 // + 6
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs

    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 98
    state showsupport_bubsyicon

    // Ami Icon
    setvar digx 60
    setvar digy 110
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 122
    state showsupport_lowangicon

    // ESSence Icon
    setvar digx 60
    setvar digy 134
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 146
    state showsupport_tedicon


    // Lisa Icon
    setvar digx 166
    setvar digy 74
    state showsupport_lisaicon

    // Nethra/Christina Icon
    setvar digx 166
    setvar digy 86
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 98
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 110
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 122
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Cybanis's Info
  }
  ifvare mainmenupage 9 // Christina/Nethra
  {
   ifvare NETHRA? 1 
   { 
    setvar CHARACTERARRAY 10
    ifvare CHARACTERSELECTED? 10 state shadepulse4
    ifvare NETHRAFORM? 0 setvar tilenum 7945
    else ifvare NETHRAFORM? 1 setvar tilenum 7964
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    ifvare NETHRAFORM? 0 setvar digx 126
    else ifvare NETHRAFORM? 1 setvar digx 122
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    ifvare NETHRAFORM? 0 redefinequote 332 NETHRA MABOROSHI
    else ifvare NETHRAFORM? 1 redefinequote 332 CHRISTINA MITCHELL
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 ICE
    state pal0
    setvar shade 4
    setvarvar digx 426 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar shade 0
    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 ELECTRIC
    state pal20
    setvarvar digx 446 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    state supportmenutext1

    setvar tilenum 8161 // "Ice" Affinity
    setvar digx 215 // + 73
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8163 // "Electric" Affinity
    setvar digx 230 // + 6
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs

    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 98
    state showsupport_bubsyicon

    // Ami Icon
    setvar digx 60
    setvar digy 110
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 122
    state showsupport_lowangicon

    // ESSence Icon
    setvar digx 60
    setvar digy 134
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 146
    state showsupport_tedicon


    // Lisa Icon
    setvar digx 166
    setvar digy 74
    state showsupport_lisaicon

    // Cybanis Icon
    setvar digx 166
    setvar digy 86
    state showsupport_cybanisicon

    // Paula Icon
    setvar digx 166
    setvar digy 98
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 110
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 122
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Christina/Nethra's Info
  }
  ifvare mainmenupage 10 // Paula
  {
   ifvare PAULA? 1 
   { 
    setvar CHARACTERARRAY 11
    ifvare CHARACTERSELECTED? 11 state shadepulse4
    setvar tilenum 7946
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 130
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 PAULA POLESTAR
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 PSIONICS
    state pal0
    setvarvar digx 418 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar shade 0
    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 AGILITY
    state pal15
    setvarvar digx 450 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    state supportmenutext1

    setvar tilenum 8167 // "Psionics" Affinity
    setvar digx 215 // + 73
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8164 // "Agility" Affinity
    setvar digx 230 // + 6
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs

    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 98
    state showsupport_bubsyicon

    // Ami Icon
    setvar digx 60
    setvar digy 110
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 122
    state showsupport_lowangicon

    // ESSence Icon
    setvar digx 60
    setvar digy 134
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 146
    state showsupport_tedicon


    // Lisa Icon
    setvar digx 166
    setvar digy 74
    state showsupport_lisaicon

    // Cybanis Icon
    setvar digx 166
    setvar digy 86
    state showsupport_cybanisicon

    // Christina/Nethra Icon
    setvar digx 166
    setvar digy 98
    state showsupport_nethraicon

    // Lori Icon
    setvar digx 166
    setvar digy 110
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 122
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Paula's Info
  }
  ifvare mainmenupage 11 // Lori
  {
   ifvare LORI? 1 
   { 
    setvar CHARACTERARRAY 12
    ifvare CHARACTERSELECTED? 12 state shadepulse4
    setvar tilenum 7947
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 134
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 LORI STEPHENS
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 STRENGTH
    state pal15
    setvarvar digx 415 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 APTITUDE
    state pal23
    setvarvar digx 447 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    state supportmenutext1

    setvar tilenum 8149 // "Strength" Affinity
    setvar digx 215 // + 73
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8156 // "Aptitude" Affinity
    setvar digx 230 // + 6
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs

    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 98
    state showsupport_bubsyicon

    // Ami Icon
    setvar digx 60
    setvar digy 110
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 122
    state showsupport_lowangicon

    // ESSence Icon
    setvar digx 60
    setvar digy 134
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 146
    state showsupport_tedicon


    // Lisa Icon
    setvar digx 166
    setvar digy 74
    state showsupport_lisaicon

    // Cybanis Icon
    setvar digx 166
    setvar digy 86
    state showsupport_cybanisicon

    // Christina/Nethra Icon
    setvar digx 166
    setvar digy 98
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 110
    state showsupport_paulaicon

    // Minako Icon
    setvar digx 166
    setvar digy 122
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Lori's Info
  }
  ifvare mainmenupage 12 // Minako
  {
   ifvare MINAKO? 1 
   { 
    setvar CHARACTERARRAY 13
    ifvare CHARACTERSELECTED? 13 state shadepulse4
    ifvare MINAKOFORM? 0 setvar tilenum 7948
    else ifvare MINAKOFORM? 1 setvar tilenum 7965
    else ifvare MINAKOFORM? 2 setvar tilenum 7968
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 136
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 MINAKO AINO    
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 METAL
    state pal13
    setvarvar digx 422 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 RESILIENCE
    state pal11
    setvarvar digx 444 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    state supportmenutext1

    setvar tilenum 8155 // "Metal" Affinity
    setvar digx 215 // + 73
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8151 // "Resilience" Affinity
    setvar digx 230 // + 6
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
 
    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 98
    state showsupport_bubsyicon

    // Ami Icon
    setvar digx 60
    setvar digy 110
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 122
    state showsupport_lowangicon

    // ESSence Icon
    setvar digx 60
    setvar digy 134
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 146
    state showsupport_tedicon


    // Lisa Icon
    setvar digx 166
    setvar digy 74
    state showsupport_lisaicon

    // Cybanis Icon
    setvar digx 166
    setvar digy 86
    state showsupport_cybanisicon

    // Christina/Nethra Icon
    setvar digx 166
    setvar digy 98
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 110
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 122
    state showsupport_loriicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 134
    state showsupport_mystery1icon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Minako's Info
  }
  ifvare mainmenupage 13 // "Mystery Lady"
  {
   ifvare MYSTERY1? 1 
   { 
    setvar CHARACTERARRAY 14
    ifvare CHARACTERSELECTED? 14 state shadepulse4
    setvar tilenum 7957 
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 128
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    ifvare debugtoggle 0
    {
     ifvare PUBLICBETA? 1 redefinequote 332 ??????? ?????????
     else redefinequote 332 NAFERIA MABOROSHI
    }
    else
    {
     ifvare PUBLICBETA? 1 redefinequote 332 HINOTORI GENKAI
     else redefinequote 332 NAFERIA MABOROSHI
    }
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 LIFEFORCE
    state pal21
    setvarvar digx 414 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 ATHLETICS
    state pal0
    setvarvar digx 445 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    state supportmenutext1

    setvar tilenum 8153 // "Lifeforce" Affinity
    setvar digx 215 // + 73
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8154 // "Athletics" Affinity
    setvar digx 230 // + 6
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs

    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 98
    state showsupport_bubsyicon

    // Ami Icon
    setvar digx 60
    setvar digy 110
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 122
    state showsupport_lowangicon

    // ESSence Icon
    setvar digx 60
    setvar digy 134
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 146
    state showsupport_tedicon


    // Lisa Icon
    setvar digx 166
    setvar digy 74
    state showsupport_lisaicon

    // Cybanis Icon
    setvar digx 166
    setvar digy 86
    state showsupport_cybanisicon

    // Christina/Nethra Icon
    setvar digx 166
    setvar digy 98
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 110
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 122
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 134
    state showsupport_minakoicon

    // Maken Icon
    setvar digx 166
    setvar digy 146
    state showsupport_makenicon

    state shade0
    state digz32768
   } // Show Mystery Lady's Info
  }
  ifvare mainmenupage 14 // Maken
  {
   ifvare MAKEN? 1 
   { 
    setvar CHARACTERARRAY 15
    ifvare CHARACTERSELECTED? 15 state shadepulse4
    setvar tilenum 7971
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 130
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 MAKEN SHINKARA
    state mt

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 LUCK
    state pal11
    setvarvar digx 423 // digx_test
    setvarvar digy 57 // digy_test
    state gtz

    setvar tilenum 2822 // 3072 
    setvar digz 16384 // 54613 // 57344
    setvar textscale 16384 // 54613 // 57344
    redefinequote 332 SHIELD
    state pal14
    setvarvar digx 450 // digx_test
    setvarvar digy 40 // digy_test
    state gtz

    state supportmenutext1

    setvar tilenum 8166 // "Luck" Affinity
    setvar digx 215 // + 73
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs
    setvar tilenum 8142 // "Shield" Affinity
    setvar digx 230 // + 6
    setvar digy 48
    setvar digz 32768 // 32768 = 32x32
    state pal0
    state rs

    // Duke Icon
    setvar digx 60
    setvar digy 74
    state showsupport_dukeicon

    // Jack Icon
    setvar digx 60
    setvar digy 86
    state showsupport_jackicon

    // Bubsy Icon
    setvar digx 60
    setvar digy 98
    state showsupport_bubsyicon

    // Ami Icon
    setvar digx 60
    setvar digy 110
    state showsupport_amiicon

    // Lo Wang Icon
    setvar digx 60
    setvar digy 122
    state showsupport_lowangicon

    // ESSence Icon
    setvar digx 60
    setvar digy 134
    state showsupport_essenceicon

    // Ted Icon
    setvar digx 60
    setvar digy 146
    state showsupport_tedicon


    // Lisa Icon
    setvar digx 166
    setvar digy 74
    state showsupport_lisaicon

    // Cybanis Icon
    setvar digx 166
    setvar digy 86
    state showsupport_cybanisicon

    // Christina/Nethra Icon
    setvar digx 166
    setvar digy 98
    state showsupport_nethraicon

    // Paula Icon
    setvar digx 166
    setvar digy 110
    state showsupport_paulaicon

    // Lori Icon
    setvar digx 166
    setvar digy 122
    state showsupport_loriicon

    // Minako Icon
    setvar digx 166
    setvar digy 134
    state showsupport_minakoicon

    // "Mystery Lady" Icon
    setvar digx 166
    setvar digy 146
    state showsupport_mystery1icon

    state shade0
    state digz32768
   } // Show Maken's Info
  }  
 } // ifvare mainmenusubmenu 5

// Main Menu - Equipment Menu [?]

ifvare mainmenusubmenu 6
 { // ifvare mainmenusubmenu 6
//
  setvar digx 70
  setvar digy 53
  state digz32768 // 32768
  state orientation2
  ifvare mainmenupage 0 // Duke
  {
   ifvare DUKE? 1 
   { 
    setvar CHARACTERARRAY 1
    ifvare CHARACTERSELECTED? 1 state shadepulse4
    setvar tilenum 7936 
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 138
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 DUKE NUKEM
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Duke's Info
  }
  ifvare mainmenupage 1 // Jack
  {
   ifvare JACK? 1 
   { 
    setvar CHARACTERARRAY 2
    ifvare CHARACTERSELECTED? 2 state shadepulse4
    setvar tilenum 7937
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 136
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 JACK WALKER
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Jack's Info
  }
  ifvare mainmenupage 2 // Bubsy
  {
   ifvare BUBSY? 1 
   { 
    setvar CHARACTERARRAY 3
    ifvare CHARACTERSELECTED? 3 state shadepulse4
    ifvare BUBSYFORM? 0 setvar tilenum 7938
    else ifvare BUBSYFORM? 1 setvar tilenum 7962
    {
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvarl TEMPVAR 1
     {
      state pal2
     }
     else
     {
      state pal0
     }
    } 
    state rs 
    setvar digx 136
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 BUBSY BOBCAT
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Bubsy's Info
  }
  ifvare mainmenupage 3 // Ami
  {
   ifvare AMI? 1 
   { 
    setvar CHARACTERARRAY 4
    ifvare CHARACTERSELECTED? 4 state shadepulse4
    ifvare AMIFORM? 0 setvar tilenum 7939
    else ifvare AMIFORM? 1 setvar tilenum 7963
    else ifvare AMIFORM? 2 setvar tilenum 7966
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 138
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 AMI MIZUNO
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Ami's Info
  }
  ifvare mainmenupage 4 // Lo Wang
  {
   ifvare LOWANG? 1 
   { 
    setvar CHARACTERARRAY 5
    ifvare CHARACTERSELECTED? 5 state shadepulse4
    setvar tilenum 7940
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 134
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 HIGA HAKAISHA
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Higa's Info
  }
  ifvare mainmenupage 5 // ESSence
  {
   ifvare ESSENCE? 1 
   { 
    setvar CHARACTERARRAY 6
    ifvare CHARACTERSELECTED? 6 state shadepulse4
    setvar tilenum 7941
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 128
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 ESSENCE MARGALAN
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show ESSence's Info
  }
  ifvare mainmenupage 6 // Ted
  {
   ifvare TED? 1 
   { 
    setvar CHARACTERARRAY 7
    ifvare CHARACTERSELECTED? 7 state shadepulse4
    setvar tilenum 7942
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 134
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 TED MALDORAS
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Ted's Info
  }
  ifvare mainmenupage 7 // Lisa
  {
   ifvare LISA? 1 
   { 
    setvar CHARACTERARRAY 8
    ifvare CHARACTERSELECTED? 8 state shadepulse4
    setvar tilenum 7943 
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 138
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 LISA BATES
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Lisa's Info
  }
  ifvare mainmenupage 8 // Cybanis
  {
   ifvare CYBANIS? 1 
   { 
    setvar CHARACTERARRAY 9
    ifvare CHARACTERSELECTED? 9 state shadepulse4
    setvar tilenum 7944
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 124
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 CYBANIS MORGANDOS
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Cybanis's Info
  }
  ifvare mainmenupage 9 // Christina/Nethra
  {
   ifvare NETHRA? 1 
   { 
    setvar CHARACTERARRAY 10
    ifvare CHARACTERSELECTED? 10 state shadepulse4
    ifvare NETHRAFORM? 0 setvar tilenum 7945
    else ifvare NETHRAFORM? 1 setvar tilenum 7964
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    ifvare NETHRAFORM? 0 setvar digx 126
    else ifvare NETHRAFORM? 1 setvar digx 122
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    ifvare NETHRAFORM? 0 redefinequote 332 NETHRA MABOROSHI
    else ifvare NETHRAFORM? 1 redefinequote 332 CHRISTINA MITCHELL
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Christina/Nethra's Info
  }
  ifvare mainmenupage 10 // Paula
  {
   ifvare PAULA? 1 
   { 
    setvar CHARACTERARRAY 11
    ifvare CHARACTERSELECTED? 11 state shadepulse4
    setvar tilenum 7946
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 130
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 PAULA POLESTAR
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Paula's Info
  }
  ifvare mainmenupage 11 // Lori
  {
   ifvare LORI? 1 
   { 
    setvar CHARACTERARRAY 12
    ifvare CHARACTERSELECTED? 12 state shadepulse4
    setvar tilenum 7947
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 134
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 LORI STEPHENS
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Lori's Info
  }
  ifvare mainmenupage 12 // Minako
  {
   ifvare MINAKO? 1 
   { 
    setvar CHARACTERARRAY 13
    ifvare CHARACTERSELECTED? 13 state shadepulse4
    ifvare MINAKOFORM? 0 setvar tilenum 7948
    else ifvare MINAKOFORM? 1 setvar tilenum 7965
    else ifvare MINAKOFORM? 2 setvar tilenum 7968
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 136
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 MINAKO AINO
    
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Minako's Info
  }
  ifvare mainmenupage 13 // "Mystery Lady"
  {
   ifvare MYSTERY1? 1 
   { 
    setvar CHARACTERARRAY 14
    ifvare CHARACTERSELECTED? 14 state shadepulse4
    setvar tilenum 7957 
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 128
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    ifvare debugtoggle 0
    {
     ifvare PUBLICBETA? 1 redefinequote 332 ??????? ?????????
     else redefinequote 332 NAFERIA MABOROSHI
    }
    else
    {
     ifvare PUBLICBETA? 1 redefinequote 332 HINOTORI GENKAI
     else redefinequote 332 NAFERIA MABOROSHI
    }
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Mystery Lady's Info
  }
  ifvare mainmenupage 14 // Maken
  {
   ifvare MAKEN? 1 
   { 
    setvar CHARACTERARRAY 15
    ifvare CHARACTERSELECTED? 15 state shadepulse4
    setvar tilenum 7971
    getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
    ifvarl TEMPVAR 1 state pal2 else state pal0
    state rs 
    setvar digx 130
    setvar digy 38
    state pal23
    state orientation2
    state setquote332
    redefinequote 332 MAKEN SHINKARA
    state mt

    state showequipmentmenu

    state shade0
    state digz32768
   } // Show Maken's Info
  }  
//
 
 } // ifvare mainmenusubmenu 6

// Main Menu - WorldTile Menu [?]

 ifvare mainmenusubmenu 7
 { // ifvare mainmenusubmenu 7
  state orientation2
  setvar digz 8192 // 65536
  state pal0

  // Smaller Picture Displays [when a picture is not selected]

   // Tile Position #1 [Row 1, Column 1]
   state tiledisplayr1c1

   // Tile Position #2 [Row 1, Column 2]
   state tiledisplayr1c2

   // Tile Position #3 [Row 1, Column 3]
   state tiledisplayr1c3

   // Tile Position #4 [Row 1, Column 4]
   state tiledisplayr1c4

   // Tile Position #5 [Row 1, Column 5]
   state tiledisplayr1c5


   // Tile Position #6 [Row 2, Column 1]
   state tiledisplayr2c1

   // Tile Position #7 [Row 2, Column 2]
   state tiledisplayr2c2

   // Tile Position #8 [Row 2, Column 3]
   state tiledisplayr2c3

   // Tile Position #9 [Row 2, Column 4]
   state tiledisplayr2c4

   // Tile Position #10 [Row 2, Column 5]
   state tiledisplayr2c5
 

   // Tile Position #11 [Row 3, Column 1]
   state tiledisplayr3c1

   // Tile Position #12 [Row 3, Column 2]
   state tiledisplayr3c2

   // Tile Position #13 [Row 3, Column 3]
   state tiledisplayr3c3

   // Tile Position #14 [Row 3, Column 4]
   state tiledisplayr3c4

   // Tile Position #15 [Row 3, Column 5]
   state tiledisplayr3c5

 
   // Tile Position #16 [Row 4, Column 1]
   state tiledisplayr4c1

   // Tile Position #17 [Row 4, Column 2]
   state tiledisplayr4c2

   // Tile Position #18 [Row 4, Column 3]
   state tiledisplayr4c3

   // Tile Position #19 [Row 4, Column 4]
   state tiledisplayr4c4

   // Tile Position #20 [Row 4, Column 5]
   state tiledisplayr4c5
 

   // Tile Position #21 [Row 5, Column 1]
   state tiledisplayr5c1

   // Tile Position #22 [Row 5, Column 2]
   state tiledisplayr5c2

   // Tile Position #23 [Row 5, Column 3]
   state tiledisplayr5c3

   // Tile Position #24 [Row 5, Column 4]
   state tiledisplayr5c4

   // Tile Position #25 [Row 5, Column 5]
   state tiledisplayr5c5




  // Larger Picture Displays [when a picture IS selected]
  state orientation2
  setvar digz 12288 // 8192
  state pal0

  ifvare mainmenuselection 0 state tiledisplayr1c1
  ifvare mainmenuselection 1 state tiledisplayr1c2
  ifvare mainmenuselection 2 state tiledisplayr1c3
  ifvare mainmenuselection 3 state tiledisplayr1c4
  ifvare mainmenuselection 4 state tiledisplayr1c5

  ifvare mainmenuselection 5 state tiledisplayr2c1
  ifvare mainmenuselection 6 state tiledisplayr2c2
  ifvare mainmenuselection 7 state tiledisplayr2c3
  ifvare mainmenuselection 8 state tiledisplayr2c4
  ifvare mainmenuselection 9 state tiledisplayr2c5

  ifvare mainmenuselection 10 state tiledisplayr3c1
  ifvare mainmenuselection 11 state tiledisplayr3c2
  ifvare mainmenuselection 12 state tiledisplayr3c3
  ifvare mainmenuselection 13 state tiledisplayr3c4
  ifvare mainmenuselection 14 state tiledisplayr3c5

  ifvare mainmenuselection 15 state tiledisplayr4c1
  ifvare mainmenuselection 16 state tiledisplayr4c2
  ifvare mainmenuselection 17 state tiledisplayr4c3
  ifvare mainmenuselection 18 state tiledisplayr4c4
  ifvare mainmenuselection 19 state tiledisplayr4c5

  ifvare mainmenuselection 20 state tiledisplayr5c1
  ifvare mainmenuselection 21 state tiledisplayr5c2
  ifvare mainmenuselection 22 state tiledisplayr5c3
  ifvare mainmenuselection 23 state tiledisplayr5c4
  ifvare mainmenuselection 24 state tiledisplayr5c5

  // Cursor

  state orientation2
  ifvare mainmenupage 10 { ifvarg mainmenuselection 5 setvar digz 16384 else setvar digz 24576 } else setvar digz 24576
//  setvar digz 24576 // 16384
  setvar tilenum 8178
  state pal0

  ifvarg mainmenuselection -1 ifvarl mainmenuselection 5 setvar digy 47
  ifvarg mainmenuselection 4 ifvarl mainmenuselection 10 setvar digy 73
  ifvarg mainmenuselection 9 ifvarl mainmenuselection 15 setvar digy 99
  ifvarg mainmenuselection 14 ifvarl mainmenuselection 20 setvar digy 125
  ifvarg mainmenuselection 19 ifvarl mainmenuselection 25 setvar digy 151

  switch mainmenuselection
   case 0 case 5 case 10 case 15 case 20
    setvar digx 78
   break
   case 1 case 6 case 11 case 16 case 21
    setvar digx 119
   break
   case 2 case 7 case 12 case 17 case 22
    state digx160
   break
   case 3 case 8 case 13 case 18 case 23
    setvar digx 201
   break
   case 4 case 9 case 14 case 19 case 24
    setvar digx 242
   break
  endswitch

  state rs

// Calculations

  setvar WORLDTILECOUNT 0
  ifvarand WORLDTILEBITFIELD1 1 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 2 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 4 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 8 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 16 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 32 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 64 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 128 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 256 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 512 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 1024 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 2048 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 4096 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 8192 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 16384 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 32768 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 65536 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 131072 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 262144 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 524288 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 1048576 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 2097152 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 4194304 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 8388608 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 16777216 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 33554432 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 67108864 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 134217728 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 268435456 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 536870912 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 1073741824 state addworldtilecount
  ifvarand WORLDTILEBITFIELD1 2147483648 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 1 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 2 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 4 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 8 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 16 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 32 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 64 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 128 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 256 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 512 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 1024 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 2048 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 4096 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 8192 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 16384 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 32768 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 65536 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 131072 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 262144 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 524288 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 1048576 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 2097152 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 4194304 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 8388608 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 16777216 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 33554432 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 67108864 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 134217728 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 268435456 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 536870912 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 1073741824 state addworldtilecount
  ifvarand WORLDTILEBITFIELD2 2147483648 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 1 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 2 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 4 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 8 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 16 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 32 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 64 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 128 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 256 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 512 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 1024 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 2048 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 4096 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 8192 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 16384 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 32768 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 65536 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 131072 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 262144 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 524288 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 1048576 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 2097152 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 4194304 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 8388608 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 16777216 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 33554432 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 67108864 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 134217728 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 268435456 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 536870912 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 1073741824 state addworldtilecount
  ifvarand WORLDTILEBITFIELD3 2147483648 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 1 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 2 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 4 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 8 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 16 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 32 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 64 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 128 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 256 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 512 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 1024 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 2048 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 4096 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 8192 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 16384 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 32768 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 65536 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 131072 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 262144 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 524288 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 1048576 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 2097152 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 4194304 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 8388608 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 16777216 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 33554432 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 67108864 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 134217728 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 268435456 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 536870912 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 1073741824 state addworldtilecount
  ifvarand WORLDTILEBITFIELD4 2147483648 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 1 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 2 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 4 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 8 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 16 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 32 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 64 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 128 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 256 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 512 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 1024 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 2048 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 4096 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 8192 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 16384 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 32768 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 65536 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 131072 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 262144 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 524288 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 1048576 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 2097152 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 4194304 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 8388608 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 16777216 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 33554432 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 67108864 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 134217728 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 268435456 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 536870912 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 1073741824 state addworldtilecount
  ifvarand WORLDTILEBITFIELD5 2147483648 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 1 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 2 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 4 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 8 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 16 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 32 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 64 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 128 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 256 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 512 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 1024 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 2048 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 4096 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 8192 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 16384 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 32768 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 65536 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 131072 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 262144 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 524288 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 1048576 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 2097152 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 4194304 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 8388608 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 16777216 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 33554432 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 67108864 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 134217728 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 268435456 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 536870912 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 1073741824 state addworldtilecount
  ifvarand WORLDTILEBITFIELD6 2147483648 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 1 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 2 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 4 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 8 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 16 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 32 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 64 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 128 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 256 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 512 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 1024 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 2048 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 4096 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 8192 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 16384 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 32768 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 65536 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 131072 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 262144 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 524288 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 1048576 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 2097152 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 4194304 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 8388608 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 16777216 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 33554432 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 67108864 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 134217728 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 268435456 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 536870912 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 1073741824 state addworldtilecount
  ifvarand WORLDTILEBITFIELD7 2147483648 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 1 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 2 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 4 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 8 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 16 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 32 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 64 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 128 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 256 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 512 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 1024 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 2048 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 4096 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 8192 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 16384 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 32768 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 65536 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 131072 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 262144 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 524288 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 1048576 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 2097152 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 4194304 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 8388608 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 16777216 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 33554432 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 67108864 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 134217728 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 268435456 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 536870912 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 1073741824 state addworldtilecount
  ifvarand WORLDTILEBITFIELD8 2147483648 state addworldtilecount

   state settile3087
   setvar digx 148
   setvar digy 168
   state pal21
   setvarvar varname WORLDTILECOUNT
   state dn

   setvar digx 157
   setvar digy 166
   state showslash
   state mt

   setvar digx 172
   setvar digy 168
   state pal21
   setvar varname 256 // Worldtile Maximum
   state dn

   setvar digx 196
   setvar digy 166
   setvarvar TEMPVAR WORLDTILECOUNT
   mulvar TEMPVAR 10000
   divvar TEMPVAR 256 // Worldtile Maximum
   setvarvar varname TEMPVAR
   setvarvar PERCENTUPPER varname
   divvar PERCENTUPPER 100
   setvarvar PERCENTLOWER varname
   modvar PERCENTLOWER 100
   ifvarg PERCENTLOWER -1
    ifvarl PERCENTLOWER 10
   {
    redefinequote 553 [%d.0%d%]
    redefinequote 554 [%d.0%d%]
   }
   else
   {
    redefinequote 553 [%d.%d%]
    redefinequote 554 [%d.%d%]
   }
   qsprintf 553 554 PERCENTUPPER PERCENTLOWER
   setvar temp 553
   state mt

   // WORLDTILECOUNT
 } // ifvare mainmenusubmenu 7


// Main Menu - Cheats Menu

 ifvare mainmenusubmenu 256
 { // ifvare mainmenusubmenu 256

  // Character Stuff - Row #1
  setvar digx 77
  setvar digy 47
  state digz24576
  state orientation2
  setvar tilenum 7936
  setvar CHARACTERARRAY 1
  state checkcharacterstatuspic
  ifvare DUKE? 1
  {
   ifvare CHARACTERSELECTED? 1 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 101
  setvar digy 47
  state digz24576
  state orientation2
  setvar tilenum 7937
  setvar CHARACTERARRAY 2
  state checkcharacterstatuspic
  ifvare JACK? 1
  {
   ifvare CHARACTERSELECTED? 2 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 125
  setvar digy 47
  state digz24576
  state orientation2
  ifvare BUBSYFORM? 0 setvar tilenum 7938 else ifvare BUBSYFORM? 1 setvar tilenum 7962
  setvar CHARACTERARRAY 3
  state checkcharacterstatuspic
  ifvare BUBSY? 1
  {
   ifvare CHARACTERSELECTED? 3 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 149
  setvar digy 47
  state digz24576
  state orientation2
  ifvare AMIFORM? 0 setvar tilenum 7939 else ifvare AMIFORM? 1 setvar tilenum 7963 else ifvare AMIFORM? 2 setvar tilenum 7966
  setvar CHARACTERARRAY 4
  state checkcharacterstatuspic
  ifvare AMI? 1
  {
   ifvare CHARACTERSELECTED? 4 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 173
  setvar digy 47
  state digz24576
  state orientation2
  setvar tilenum 7940
  setvar CHARACTERARRAY 5
  state checkcharacterstatuspic
  ifvare LOWANG? 1
  {
   ifvare CHARACTERSELECTED? 5 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 197
  setvar digy 47
  state digz24576
  state orientation2
  setvar tilenum 7941
  setvar CHARACTERARRAY 6
  state checkcharacterstatuspic
  ifvare ESSENCE? 1
  {
   ifvare CHARACTERSELECTED? 6 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 221
  setvar digy 47
  state digz24576
  state orientation2
  setvar tilenum 7942
  setvar CHARACTERARRAY 7
  state checkcharacterstatuspic
  ifvare TED? 1
  {
   ifvare CHARACTERSELECTED? 7 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 245
  setvar digy 47
  state digz24576
  state orientation2
  setvar tilenum 7943
  setvar CHARACTERARRAY 8
  state checkcharacterstatuspic
  ifvare LISA? 1
  {
   ifvare CHARACTERSELECTED? 8 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0


  // Character Stuff - Row #2
  setvar digx 77
  setvar digy 71
  state digz24576
  state orientation2
  setvar tilenum 7944
  setvar CHARACTERARRAY 9
  state checkcharacterstatuspic
  ifvare CYBANIS? 1
  {
   ifvare CHARACTERSELECTED? 9 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 101
  setvar digy 71
  state digz24576
  state orientation2
  ifvare NETHRAFORM? 0 setvar tilenum 7945 else ifvare NETHRAFORM? 1 setvar tilenum 7964
  setvar CHARACTERARRAY 10
  state checkcharacterstatuspic
  ifvare NETHRA? 1
  {
   ifvare CHARACTERSELECTED? 10 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 125
  setvar digy 71
  state digz24576
  state orientation2
  setvar tilenum 7946
  setvar CHARACTERARRAY 11
  state checkcharacterstatuspic
  ifvare PAULA? 1
  {
   ifvare CHARACTERSELECTED? 11 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 149
  setvar digy 71
  state digz24576
  state orientation2
  setvar tilenum 7947
  setvar CHARACTERARRAY 12
  state checkcharacterstatuspic
  ifvare LORI? 1
  {
   ifvare CHARACTERSELECTED? 12 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 173
  setvar digy 71
  state digz24576
  state orientation2
  ifvare MINAKOFORM? 0 setvar tilenum 7948 else ifvare MINAKOFORM? 1 setvar tilenum 7965 else ifvare MINAKOFORM? 2 setvar tilenum 7968
  setvar CHARACTERARRAY 13
  state checkcharacterstatuspic
  ifvare MINAKO? 1
  {
   ifvare CHARACTERSELECTED? 13 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 197
  setvar digy 71
  state digz24576
  state orientation2
  setvar tilenum 7957
  setvar CHARACTERARRAY 14
  state checkcharacterstatuspic
  ifvare MYSTERY1? 1
  {
   ifvare CHARACTERSELECTED? 14 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  setvar digx 221
  setvar digy 71
  state digz24576
  state orientation2
  setvar tilenum 7971
  setvar CHARACTERARRAY 15
  state checkcharacterstatuspic
  ifvare MAKEN? 1
  {
   ifvare CHARACTERSELECTED? 15 state shadepulse4 else state shade0
  }
  else setvar shade 18
  state rs 
  state shade0

  // Random Party
  setvar digx 245
  setvar digy 71
  state orientation2
  setvar tilenum 7955
  state pal0
  state rs 
  state shade0

  ifvarg RANDOMCHARACTEROPTION 0 ifvarl RANDOMCHARACTEROPTION 16
  {
   state orientation2
   setvarvar digx 247 // digx_test
   setvarvar digy 72 // digy_test
   setvarvar digz 32768 // digz_test
   setvarvar textscale 32768 // digz_test
   setvar tilenum 2837
   setvarvar varname RANDOMCHARACTEROPTION
   state dnz
  } 
  else
  {
   state orientation2
   setvarvar digx 476 // digx_test
   setvarvar digy 72 // digy_test
   setvarvar digz 32768 // digz_test
   setvarvar textscale 32768 // digz_test
   setvar tilenum STARTALPHANUM
   redefinequote 332 ANY #
   setvar temp 332
   state gtz
  }

  // Extra Stuff - Row #3 - Misc

  // "Toggle Damage Cheat" Button
  setvar digx 77
  setvar digy 107
  state digz24576
  state orientation2
  setvar tilenum 7935
  state pal0
  ifvarand CHEATBITFIELD? 8 state shade0 else setvar shade 18
  state rs 
  state shade0

  // "Toggle Defense Cheat" Button
  setvar digx 101
  setvar digy 107
  state digz24576
  state orientation2
  setvar tilenum 7934
  state pal0
  ifvarand CHEATBITFIELD? 16 state shade0 else setvar shade 18
  state rs 
  state shade0

  // "Kill-Monsters Cheat" Button
  setvar digx 125
  setvar digy 107
  state digz24576
  state orientation2
  setvar tilenum 7933
  state pal0
  ifvarvarl ENEMIES_KILLED_LEVEL MAX_ENEMIES_KILLED_LEVEL state shade0 else setvar shade 18
  state rs 
  state shade0

  // "Give Inventory Cheat" Button
  setvar digx 149
  setvar digy 107
  state digz24576
  state orientation2
  setvar tilenum 7932
  setvar shade 9
  state pal0
  state rs 
  state shade0

  // "Bio Shield Advancement" Button
  setvar digx 173
  setvar digy 107
  state digz24576
  state orientation2
  ifvare ESHIELDADVANCEMENT 0 setvar tilenum 7929 else setvar tilenum 7930
  setvar shade 9
  state pal0
  state rs 
  state shade0

  // "Spawn Empty Green Riot Tank" Button
  setvar digx 197
  setvar digy 107
  state digz24576
  state orientation2
  setvar tilenum 7950
  setvar shade 9
  state pal0
  state rs 
  state shade0

  // "Spawn Empty Blue Riot Tank" Button
  setvar digx 221
  setvar digy 107
  state digz24576
  state orientation2
  setvar tilenum 7951
  setvar shade 9
  state pal0
  state rs 
  state shade0

  // "Spawn Empty Red Riot Tank" Button
  setvar digx 245
  setvar digy 107
  state digz24576
  state orientation2
  setvar tilenum 7952
  setvar shade 9
  state pal0
  state rs 
  state shade0

  // Extra Stuff - Row #4 - Misc2

  // "Infinite Quad" Button
  setvar digx 77
  setvar digy 131
  state orientation2
  setvar tilenum 7899
  ifvarand POWERUPCHEATFLAGS? 1 state shade0 else setvar shade 18
  state pal0
  state rs 
  state shade0

  // "Infinite Invuln" Button
  setvar digx 101
  setvar digy 131
  state orientation2
  setvar tilenum 7900
  ifvarand POWERUPCHEATFLAGS? 2 state shade0 else setvar shade 18
  state pal0
  state rs 
  state shade0

  // "Infinite Regen" Button
  setvar digx 125
  setvar digy 131
  state orientation2
  setvar tilenum 7901
  ifvarand POWERUPCHEATFLAGS? 4 state shade0 else setvar shade 18
  state pal0
  state rs 
  state shade0

  // "Infinite APRegen" Button
  setvar digx 149
  setvar digy 131
  state orientation2
  setvar tilenum 7902
  ifvarand POWERUPCHEATFLAGS? 8 state shade0 else setvar shade 18
  state pal0
  state rs 
  state shade0

  // "Infinite Vampire" Button
  setvar digx 173
  setvar digy 131
  state orientation2
  setvar tilenum 7903
  ifvarand POWERUPCHEATFLAGS? 16 state shade0 else setvar shade 18
  state pal0
  state rs 
  state shade0

  // "Infinite Ammo" Button
  setvar digx 197
  setvar digy 131
  state orientation2
  setvar tilenum 7904
  ifvarand CHEATBITFIELD? 1 state shade0 else setvar shade 18
  state pal0
  state rs 
  state shade0

  // "Infinite Energy/No Energy Use" Button
  setvar digx 221
  setvar digy 131
  state orientation2
  setvar tilenum 7905
  ifvarand CHEATBITFIELD? 128 state shade0 else setvar shade 18
  state pal0
  state rs 
  state shade0

  // "Equipment Cheat" Button
  setvar digx 245
  setvar digy 131
  state orientation2
  ifvare EQUIPCHEAT? 2 setvar tilenum 7910 else setvar tilenum 7906
  ifvarg EQUIPCHEAT? 0 state shade0 else setvar shade 18
  state pal0
  state rs 
  state shade0

  // Extra Stuff - Row #5 - Misc3

  // "Instant Shop" Button
  setvar digx 77
  setvar digy 155
  state orientation2
  setvar tilenum 7907
  setvar shade 9
  state pal0
  state rs 
  state shade0

  // "Instant ATM" Button
  setvar digx 101
  setvar digy 155
  state orientation2
  setvar tilenum 7908
  setvar shade 9
  state pal0
  state rs 
  state shade0

  // "Hacker-Vision-For-All" Button
  setvar digx 125
  setvar digy 155
  state orientation2
  setvar tilenum 7909
  ifvarand CHEATBITFIELD? 2 state shade0 else setvar shade 18
  state pal0
  state rs 
  state shade0

  // "Buddha Mode" Button
  setvar digx 149
  setvar digy 155
  state orientation2
  setvar tilenum 7896
  ifvarand CHEATBITFIELD? 4 state shade0 else setvar shade 18
  state pal0
  state rs 
  state shade0

  ifvarg mainmenuselection -1 ifvarl mainmenuselection 8 setvar digy 47
  ifvarg mainmenuselection 7 ifvarl mainmenuselection 16 setvar digy 71
  ifvarg mainmenuselection 15 ifvarl mainmenuselection 24 setvar digy 107
  ifvarg mainmenuselection 23 ifvarl mainmenuselection 32 setvar digy 131
  ifvarg mainmenuselection 31 ifvarl mainmenuselection 40 setvar digy 155

  switch mainmenuselection 
   case 0 case 8 case 16 case 24 case 32
    setvar digx 77
   break
   case 1 case 9 case 17 case 25 case 33
    setvar digx 101
   break
   case 2 case 10 case 18 case 26 case 34
    setvar digx 125
   break
   case 3 case 11 case 19 case 27 case 35
    setvar digx 149
   break
   case 4 case 12 case 20 case 28 case 36
    setvar digx 173
   break
   case 5 case 13 case 21 case 29 case 37
    setvar digx 197
   break
   case 6 case 14 case 22 case 30 case 38
    setvar digx 221
   break
   case 7 case 15 case 23 case 31 case 39
    setvar digx 245
   break
  endswitch

  state digz49152
  state orientation2
  setvar tilenum 8183
  state pal0
  state rs 
  state shade0

 } // ifvare mainmenusubmenu 256

//************************************************************************
//************************************************************************
//************************************************************************
//****THE FOLLOWING DEALS WITH USING EQUIPMENT ON MEMBERS OF YOUR TEAM****
//************************************************************************
//************************************************************************
//************************************************************************
 
ifvarg equipmenuinuse 0
  ifvarl equipmenuinuse 9 // 5
 { // ifvarg equipmenuinuse -0 ifvarl equipmenuinuse 5
  state orientation2

  state pal0
  state digx160
  setvar digy 100
  state digz49152
  state orientation3
  setvar tilenum 8191 // For the menu background >.> (2456 or 8191)
  setvar shade 12
  state rs
 
  state pal15
  setvar shade 0
  setvar digx 260 // 260
  setvar digy 26
  setvarvar TEMPVAR equipmenupage
  addvar TEMPVAR 1
  redefinequote 332 PG.%d
  qsprintf 332 332 TEMPVAR
  state mt

  state shade0
  setvar digy 20
  state orientation2
  state setquote332
  setvar tilenum 2822
  state pal21
  setvar digx 195
  redefinequote 332 SELECT THE ITEM
  state gt

 ifvare equipmenupage 0
 {
  state orientation2

// Row 1
  state checksunrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 52
   state itemplate

   setvar digx 78 // 78
   setvar digy 52
   setvar digz 57344
   setvar tilenum 6013 
   state pal0
   state rs 

   setvar digx 80 // 78
   setvar digy 64
   state checksunrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkaquarings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 52
   state itemplate

   setvar digx 110 // 110
   setvar digy 52
   setvar digz 57344
   setvar tilenum 6016
   state pal0
   state rs 

   setvar digx 112 // 78
   setvar digy 64
   state checkaquarings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkplasmarings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 52
   state itemplate

   setvar digx 142 // 142
   setvar digy 52
   setvar digz 57344
   setvar tilenum 6015
   state pal0
   state rs 

   setvar digx 144 // 78
   setvar digy 64
   state checkplasmarings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkspiritrings
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 52
   state itemplate

   setvar digx 174 // 176
   setvar digy 52
   setvar digz 57344
   setvar tilenum 6014 
   state pal0
   state rs 

   setvar digx 176 // 78
   setvar digy 64
   state checkspiritrings
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkcharmankhs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 52
   state itemplate

   setvar digx 206 // 204
   setvar digy 52
   setvar digz 57344
   setvar tilenum 6021 
   state pal0
   state rs 

   setvar digx 208 // 206
   setvar digy 64
   state checkcharmankhs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkmirrorshields
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 52
   state itemplate

   setvar digx 238 // 232
   setvar digy 52
   setvar digz 57344
   setvar tilenum 6017 
   state pal0
   state rs 

   setvar digx 240 // 234
   setvar digy 64
   state checkmirrorshields
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23

   state settile3087
   state dn
  }

// Row 2
  state checkexpbadges
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 84
   state itemplate

   setvar digx 78 // 78
   setvar digy 84 
   setvar digz 57344
   setvar tilenum 6025 
   state pal0
   state rs 

   setvar digx 80 // 78
   setvar digy 96
   state checkexpbadges
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkrankbadges
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 84
   state itemplate

   setvar digx 110 // 110
   setvar digy 84
   setvar digz 57344
   setvar tilenum 6024
   state pal0
   state rs 

   setvar digx 112 // 78
   setvar digy 96
   state checkrankbadges
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkmoneybadges
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 84
   state itemplate

   setvar digx 142 // 142
   setvar digy 84
   setvar digz 57344
   setvar tilenum 6033
   state pal0
   state rs 

   setvar digx 144 // 78
   setvar digy 96
   state checkmoneybadges
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkriotshields
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 84
   state itemplate

   setvar digx 174 // 142
   setvar digy 84
   setvar digz 14336 // sprite is 4x the other ones
   setvar tilenum 6034
   state pal0
   state rs 

   setvar digx 176 // 78
   setvar digy 96
   state checkriotshields
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checknyxglovepairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 84
   state itemplate

   setvar digx 206 // 142
   setvar digy 84
   setvar digz 8192 // sprite is 4x the other ones
   setvar tilenum 6035
   state pal0
   state rs 

   setvar digx 208 // 78
   setvar digy 96
   state checknyxglovepairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkrabbitsfoots
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 84
   state itemplate

   setvar digx 238 // 232
   setvar digy 84
   setvar digz 19114
   setvar tilenum 6036 
   state pal0
   state rs 

   setvar digx 240 // 234
   setvar digy 96
   state checkrabbitsfoots
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23

   state settile3087
   state dn
  }

// Row 3
  state checkjumpbootpairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 116
   state itemplate

   setvar digx 78
   setvar digy 116
   setvar digz 28672 // sprite is 2x the other ones
   setvar tilenum 6037
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 128
   state checkjumpbootpairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkshockabbootpairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 116
   state itemplate

   setvar digx 110
   setvar digy 116
   setvar digz 28672 // sprite is 2x the other ones
   setvar tilenum 6038
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 128
   state checkshockabbootpairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkhappyshoepairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 116
   state itemplate

   setvar digx 142
   setvar digy 116
   setvar digz 11469 // sprite is 5x the other ones
   setvar tilenum 6039
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 128
   state checkhappyshoepairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkstyleshoepairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 116
   state itemplate

   setvar digx 174
   setvar digy 116
   setvar digz 11469 // sprite is 5x the other ones
   setvar tilenum 6040
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 128
   state checkstyleshoepairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkcharmshoepairs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 116
   state itemplate

   setvar digx 206
   setvar digy 116
   setvar digz 11469 // sprite is 5x the other ones
   setvar tilenum 6041
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 128
   state checkcharmshoepairs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkpowerwrists
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 116
   state itemplate

   setvar digx 238
   setvar digy 116
   setvar digz 5735 // sprite is 10x the other ones
   setvar tilenum 6042
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 128
   state checkpowerwrists
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }


// Row #4
// Row #4
  state checkhockeymasks
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 148
   state itemplate

   setvar digx 78
   setvar digy 148
   setvar digz 8192 // sprite is 6x the other ones
   setvar tilenum 6044
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 160
   state checkhockeymasks
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkgemstonecrowns
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 148
   state itemplate

   setvar digx 110
   setvar digy 148
   setvar digz 4096 // sprite is 6x the other ones
   setvar tilenum 6045
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 160
   state checkgemstonecrowns
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkironrunes
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 148
   state itemplate

   setvar digx 142
   setvar digy 148
   setvar digz 16384 // sprite is 6x the other ones
   setvar tilenum 6052
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 160
   state checkironrunes
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn

  }

  state checktwilightcapes
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 148
   state itemplate

   setvar digx 174
   setvar digy 148
   setvar digz 7168 // sprite is 6x the other ones
   setvar tilenum 6046
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 160
   state checktwilightcapes
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checksnakearmbands
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 206
   setvar digy 148
   state itemplate

   setvar digx 206
   setvar digy 148
   setvar digz 3584 // sprite is 6x the other ones
   setvar tilenum 6047
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 160
   state checksnakearmbands
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkmedicbags
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 238
   setvar digy 148
   state itemplate

   setvar digx 238
   setvar digy 148
   setvar digz 4096 // sprite is 6x the other ones
   setvar tilenum 6048
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 160
   state checkmedicbags
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }
 }

 ifvare equipmenupage 1
 {
  state orientation2
  // Row #1
  state checkserpenthelmets
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 78
   setvar digy 52
   state itemplate

   setvar digx 78
   setvar digy 52 
   setvar digz 7168
   setvar tilenum 6049 
   state pal0
   state rs 

   addvar digx 2 // setvar digx 78
   setvar digy 64
   state checkserpenthelmets
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkenergyincurments
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 110
   setvar digy 52
   state itemplate

   setvar digx 110
   setvar digy 52
   setvar digz 28160
   setvar tilenum 6050
   state pal0
   state rs 

   addvar digx 2 // setvar digx 110
   setvar digy 64
   state checkenergyincurments
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkyinyangorbs
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 142
   setvar digy 52
   state itemplate

   setvar digx 142
   setvar digy 52
   setvar digz 8192
   setvar tilenum 6051
   state pal0
   state rs 

   addvar digx 2 // setvar digx 142
   setvar digy 64
   state checkyinyangorbs
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

  state checkshikonjewels
  ifvarg ITEMARRAYID_AMOUNTTEMP 0
  {
   setvar digx 174
   setvar digy 52
   state itemplate

   setvar digx 174
   setvar digy 52
   setvar digz 9558 // sprite is 6x the other ones
   setvar tilenum 6043
   getplayer[THISACTOR].player_par TEMPVAR
   modvar TEMPVAR 6
   ifvare TEMPVAR 0 state pal0
   ifvare TEMPVAR 1 state pal11
   ifvare TEMPVAR 2 state pal21
   ifvare TEMPVAR 3 state pal12
   ifvare TEMPVAR 4 state pal15
   ifvare TEMPVAR 5 state pal23
   state rs 

   addvar digx 2 // setvar digx 174
   setvar digy 64
   state checkshikonjewels
   setvarvar varname ITEMARRAYID_AMOUNTTEMP
   state pal23
   state settile3087
   state dn
  }

 }

// Row 1
  setvar digy 177
  state pal17

  redefinequote 332 ^10[EMPTY SLOT]
  ifvare equipmenupage 0
  {
   ifvare equipmenuselection 0 // Sun Ring
   {
    state checksunrings
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showsunringdescript
   }
   ifvare equipmenuselection 1 // Aqua Ring
   {
    state checkaquarings
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showaquaringdescript
   }
   ifvare equipmenuselection 2 // Plasma Ring
   {
    state checkplasmarings
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showplasmaringdescript
   }
   ifvare equipmenuselection 3 // Spirit Ring
   {
    state checkspiritrings
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showspiritringdescript
   }
   ifvare equipmenuselection 4 // Charm Ankh
   {
    state checkcharmankhs
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showcharmankhdescript
   }
   ifvare equipmenuselection 5 // Mirror Shield
   {
    state checkmirrorshields
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showmirrorshielddescript
   }
// Row 2
   ifvare equipmenuselection 6 // Experience Badge [Blue]
   {
    state checkexpbadges
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showexpbadgedescript
   }
   ifvare equipmenuselection 7 // Rank Badge [Yellow]
   {
    state checkrankbadges
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showrankbadgedescript
   }
   ifvare equipmenuselection 8 // Money Badge [Green]
   {
    state checkmoneybadges
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showmoneybadgedescript
   }
   ifvare equipmenuselection 9 // Tactical Riot Shield
   {
    state checkriotshields
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showriotshielddescript
   }
   ifvare equipmenuselection 10 // Nyx Gloves
   {
    state checknyxglovepairs
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state shownyxglovesdescript
   }
   ifvare equipmenuselection 11 // Rabbit's Foot
   {
    state checkrabbitsfoots
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showrabbitsfootdescript
   }
// Row 3
   ifvare equipmenuselection 12 // Jump Boots
   {
    state checkjumpbootpairs
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showjumpbootsdescript
   }
   ifvare equipmenuselection 13 // ShockAb Boots
   {
    state checkshockabbootpairs
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showshockabbootsdescript
   }
   ifvare equipmenuselection 14 // Happy Shoes
   {
    state checkhappyshoepairs
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showhappyshoesdescript
   }
   ifvare equipmenuselection 15 // Style Shoes
   {
    state checkstyleshoepairs
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showstyleshoesdescript
   }
   ifvare equipmenuselection 16 // Charm Shoes
   {
    state checkcharmshoepairs
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showcharmshoesdescript
   }
   ifvare equipmenuselection 17
   {
    state checkpowerwrists
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showpowerwristdescript
   }
// Row 4
   ifvare equipmenuselection 18
   {
    state checkhockeymasks
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showhockeymaskdescript
   }
   ifvare equipmenuselection 19
   {
    state checkgemstonecrowns
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showgemstonecrowndescript
   }
   ifvare equipmenuselection 20
   {
    state checkironrunes
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showironrunedescript
   }
   ifvare equipmenuselection 21
   {
    state checktwilightcapes
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showtwilightcapedescript
   }
   ifvare equipmenuselection 22
   {
    state checksnakearmbands
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showsnakearmbanddescript
   }
   ifvare equipmenuselection 23
   {
    state checkmedicbags
    ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showmedicbagdescript
   }
  }
  else
  ifvare equipmenupage 1
  {
// Row 1
    ifvare equipmenuselection 0
    {
     state checkserpenthelmets
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showserpenthelmetdescript
    }
    ifvare equipmenuselection 1
    {
     state checkenergyincurments
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showenergyincurmentdescript
    }
    ifvare equipmenuselection 2
    {
     state checkyinyangorbs
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showyinyangorbdescript
    }
    ifvare equipmenuselection 3
    {
     state checkshikonjewels
     ifvarg ITEMARRAYID_AMOUNTTEMP 0 state showshikonjeweldescript
    }
  }
/*
  else
  ifvare equipmenupage 2
  {
  }
*/

  setvar digx 160
  qstrlen TEMPVAR 332
  ifvarg TEMPVAR 0 
  { 
   setvarvar tempb TEMPVAR
   mulvar tempb 2
   subvarvar digx tempb
   subvar digx 4
  }
  state mt

  ifvarg equipmenuselection -1 ifvarl equipmenuselection 6 setvar digy 52
  ifvarg equipmenuselection 5 ifvarl equipmenuselection 12 setvar digy 84 // 32
  ifvarg equipmenuselection 11 ifvarl equipmenuselection 18 setvar digy 116 // 32
  ifvarg equipmenuselection 17 ifvarl equipmenuselection 24 setvar digy 148 // 32

  switch equipmenuselection
   case 0 case 6 case 12 case 18
    setvar digx 78
   break
   case 1 case 7 case 13 case 19
    setvar digx 110
   break
   case 2 case 8 case 14 case 20
    setvar digx 142
   break
   case 3 case 9 case 15 case 21
    setvar digx 174
   break
   case 4 case 10 case 16 case 22
    setvar digx 206
   break
   case 5 case 11 case 17 case 23
    setvar digx 238
   break
  endswitch

  state orientation2
  state digz65536
  state pal0
  setvar tilenum 8183 
  state rs

 } // ifvarg equipmenuinuse -0 ifvarl equipmenuinuse 5


//*********************************************************************
//*********************************************************************
//*********************************************************************
//****THE FOLLOWING DEALS WITH USING SKILLS ON MEMBERS OF YOUR TEAM****
//*********************************************************************
//*********************************************************************
//********************************************************************* 

 ifvarg skillidinuse -1
 { // ifvarg skillidinuse -1
  state pal0
  state digx160
  setvar digy 100
  state digz49152
  state orientation3
  setvar tilenum 8191 // For the menu background >.> (2456 or 8191)
  setvar shade 12
  state rs
 
  state pal11
  setvar shade 0
  setvar digx 260 // 260
  setvar digy 26
  setvarvar TEMPVAR skillmenupage
  addvar TEMPVAR 1
  redefinequote 332 PG.%d
  qsprintf 332 332 TEMPVAR
  state mt

  state shade0
  setvar digy 20
  state orientation2
  state setquote332
  setvar tilenum 2822
  state pal22
  setvar digx 171
  redefinequote 332 SELECT THE RECIPIENT
  state gt

// Character Displays
  setvar digx 70
  setvar digy 53
  state digz32768
  state orientation2
  ifvare skillmenupage 0 state menudukestats
  else ifvare skillmenupage 1 state menucybanisstats
 
  setvar digx 176
  setvar digy 53
  ifvare skillmenupage 0 state menujackstats
  else ifvare skillmenupage 1 state menunethrastats
 
  setvar digx 70
  setvar digy 85
  ifvare skillmenupage 0 state menububsystats
  else ifvare skillmenupage 1 state menupaulastats

  setvar digx 176
  setvar digy 85
  ifvare skillmenupage 0 state menuamistats
  else ifvare skillmenupage 1 state menuloristats
	 
  setvar digx 70
  setvar digy 117
  ifvare skillmenupage 0 state menulowangstats
  else ifvare skillmenupage 1 state menuminakostats
	
  setvar digx 176
  setvar digy 117
  ifvare skillmenupage 0 state menuessencestats
  else ifvare skillmenupage 1 state menumystery1stats
 	
  setvar digx 70
  setvar digy 149
  ifvare skillmenupage 0 state menutedstats
  else ifvare skillmenupage 1 state menumakenstats
	
  setvar digx 176
  setvar digy 149
  ifvare skillmenupage 0 state menulisastats
  else ifvare skillmenupage 1 state menuvehiclestats // Insert Vehicle's Stats
	
// Shows the Selection Cursor Depending on What 'skillmenuselection' is set to [for Characters menu]

   ifvarg skillmenuselection -1 ifvarl skillmenuselection 2 setvar digy 53
   ifvarg skillmenuselection 1 ifvarl skillmenuselection 4 setvar digy 85
   ifvarg skillmenuselection 3 ifvarl skillmenuselection 6 setvar digy 117
   ifvarg skillmenuselection 5 ifvarl skillmenuselection 8 setvar digy 149

   switch skillmenuselection
    case 0 case 2 case 4 case 6
     setvar digx 107
    break
    case 1 case 3 case 5 case 7
     setvar digx 213
    break
   endswitch

   state orientation2
   state digz65536
   state pal0
   setvar tilenum 8187 
   state rs
   
   ifvare mainmenusubmenu 4
   {
    state pal0
    state shade0
    state settile3087
    setvarvar CHARACTERARRAY mainmenupage addvar CHARACTERARRAY 1
    state showepskillsmenu
   }


 } // ifvarg skillidinuse -1

//********************************************************************
//********************************************************************
//********************************************************************
//****THE FOLLOWING DEALS WITH USING ITEMS ON MEMBERS OF YOUR TEAM****
//********************************************************************
//********************************************************************
//******************************************************************** 

 ifvarg itemidinuse -1
 { // ifvarg itemidinuse -1
  state pal0
  state digx160
  setvar digy 100
  state digz49152
  state orientation3
  setvar tilenum 8191 // For the menu background >.> (2456 or 8191)
  setvar shade 12
  state rs
 
  state shade0
  setvar digy 20
  state orientation2
  state setquote332
  setvar tilenum 2822
  state pal23
  setvar digx 171
  redefinequote 332 SELECT THE RECIPIENT
  state gt

// Character Displays
  setvar digx 70
  setvar digy 53
  state digz32768
  state orientation2
  ifvare itemmenupage 0 state menudukestats
  else ifvare itemmenupage 1 state menucybanisstats
 
  setvar digx 176
  setvar digy 53
  ifvare itemmenupage 0 state menujackstats
  else ifvare itemmenupage 1 state menunethrastats
 
  setvar digx 70
  setvar digy 85
  ifvare itemmenupage 0 state menububsystats
  else ifvare itemmenupage 1 state menupaulastats

  setvar digx 176
  setvar digy 85
  ifvare itemmenupage 0 state menuamistats
  else ifvare itemmenupage 1 state menuloristats
	 
  setvar digx 70
  setvar digy 117
  ifvare itemmenupage 0 state menulowangstats
  else ifvare itemmenupage 1 state menuminakostats
	
  setvar digx 176
  setvar digy 117
  ifvare itemmenupage 0 state menuessencestats
  else ifvare itemmenupage 1 state menumystery1stats
 	
  setvar digx 70
  setvar digy 149
  ifvare itemmenupage 0 state menutedstats
  else ifvare itemmenupage 1 state menumakenstats
	
  setvar digx 176
  setvar digy 149
  ifvare itemmenupage 0 state menulisastats
  else ifvare itemmenupage 1 state menuvehiclestats // Insert Vehicle's Stats
	
// Shows the Selection Cursor Depending on What 'itemmenuselection' is set to [for Characters menu]
   ifvarg itemmenuselection -1 ifvarl itemmenuselection 2 setvar digy 53
   ifvarg itemmenuselection 1 ifvarl itemmenuselection 4 setvar digy 85
   ifvarg itemmenuselection 3 ifvarl itemmenuselection 6 setvar digy 117
   ifvarg itemmenuselection 5 ifvarl itemmenuselection 8 setvar digy 149

   switch itemmenuselection
    case 0 case 2 case 4 case 6
     setvar digx 107
    break
    case 1 case 3 case 5 case 7
     setvar digx 213
    break
   endswitch

   state orientation2
   state digz65536
   state pal0
   setvar tilenum 8187 
   state rs
 } // ifvarg itemidinuse -1


 } // ifvarg mainmenutransitiontimer 6
} // ifvare mainmenu 1

ends