// CHARACTER SPECFIC VARIABLES

state setjumpcounter
  setplayer[THISACTOR].jumping_counter jumpcounter
ends

state getjumpheights

 ifvare PLAYERJUMPSTRENGTHTEMP 0 setplayer[THISACTOR].jumping_counter 0
 ifvare PLAYERJUMPSTRENGTHTEMP 1
 {
  ifvarg jumpcounter 0
  {
   setvar jumpcounter 1441 // (-8) [+1440]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 2
 {
  ifvare jumpcounter 181
  {
   setvar jumpcounter 1441 // (-7) [+1260]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 3
 {
  ifvare jumpcounter 361
  {
   setvar jumpcounter 1441 // (-6) [+1080]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 4
 {
  ifvare jumpcounter 541
  {
   setvar jumpcounter 1441 // (-5) [+900]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 5
 {
  ifvare jumpcounter 721
  {
   setvar jumpcounter 1441 // (-4) [+720]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 6
 {
  ifvare jumpcounter 901
  {
   setvar jumpcounter 1441 // (-3) [+540]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 7
 {
  ifvare jumpcounter 1081
  {
   setvar jumpcounter 1441 // (-2) [+360]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 8
 {
  ifvare jumpcounter 1261
  {
   setvar jumpcounter 1441 // (-1) [+180]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 9
 {
  ifvare jumpcounter 1441
  {
   setvar jumpcounter 1441 // (+0) [+-0]
   state setjumpcounter
  }
 } 
 ifvare PLAYERJUMPSTRENGTHTEMP 10
 {
  ifvare jumpcounter 1261 // 181
  {
   setvar jumpcounter 1082 // (+1) [-179]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 11
 {
  ifvare jumpcounter 1261 // 361
  {
   setvar jumpcounter 902 // (+2) [-359]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 12
 {
  ifvare jumpcounter 1261 // 541
  {
   setvar jumpcounter 722 // (+3) [-539]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 13
 {
  ifvare jumpcounter 1261 // 541
  {
   setvar jumpcounter 542 // (+4) [-719]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 14
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 362 // (+5) [-899]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 15
 {
  ifvare jumpcounter 1261
  {
   setvar jumpcounter 182 // (+6) [-1079]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 16
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 17
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 1083 // (+1) [-179]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 18
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 903 // (+2) [-359]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 19
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 723 // (+3) [-539]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 20
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 543 // (+4) [-719]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 21
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 363 // (+5) [-899]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 22
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 183 // (+6) [-1079]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 23
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 24
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 1084 // (+1) [-179]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 25
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 904 // (+2) [-359]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 26
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 724 // (+3) [-539]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 27
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 544 // (+4) [-719]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 28
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 364 // (+5) [-899]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 29
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 184 // (+6) [-1079]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 30
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 31
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 1085 // (+1) [-179]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 32
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 905 // (+2) [-359]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 33
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 725 // (+3) [-539]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 34
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 545 // (+4) [-719]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 35
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 365 // (+5) [-899]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 36
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 185 // (+6) [-1079]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 37
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 38
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 1086 // (+1) [-179]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 39
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 906 // (+2) [-359]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 40
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 726 // (+3) [-539]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 41
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 546 // (+4) [-719]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 42
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 366 // (+5) [-899]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 43
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 186 // (+6) [-1079]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 44
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 45
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1264
  {
   setvar jumpcounter 1087 // (+1) [-179]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 46
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1264
  {
   setvar jumpcounter 907 // (+2) [-359]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 47
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1264
  {
   setvar jumpcounter 727 // (+3) [-539]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 48
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1264
  {
   setvar jumpcounter 547 // (+4) [-719]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 49
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1264
  {
   setvar jumpcounter 367 // (+5) [-899]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 50
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1264
  {
   setvar jumpcounter 187 // (+5) [-1079]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 51
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1264
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1264
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 52
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 1088 // (+1) [-179]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 53
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 908 // (+2) [-359]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 54
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 728 // (+3) [-539]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 55
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 548 // (+4) [-719]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 56
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 368 // (+5) [-899]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 57
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 188 // (+6) [-1079]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 58
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 59
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1267
  {
   setvar jumpcounter 1089 // (+1) [-179]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 60
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1267
  {
   setvar jumpcounter 909 // (+2) [-359]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 61
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1267
  {
   setvar jumpcounter 729 // (+3) [-539]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 62
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1267
  {
   setvar jumpcounter 549 // (+4) [-719]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 63
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1267
  {
   setvar jumpcounter 369 // (+5) [-899]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 64
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1267
  {
   setvar jumpcounter 189 // (+6) [-1079]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 65
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1267
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 66
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 1090 // (+1) [-179]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 67
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 910 // (+2) [-359]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 68
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 730 // (+3) [-539]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 69
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 550 // (+4) [-719]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 70
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 370 // (+5) [-899]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 71
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 190 // (+6) [-1079]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 72
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 10 // (+7) [-1259]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 73
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 10 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1270 // 1270
  {
   setvar jumpcounter 1091 // (+1) [-179]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 74
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 10 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1270 // 1270
  {
   setvar jumpcounter 911 // (+2) [-359]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 75
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 10 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1270 // 1270
  {
   setvar jumpcounter 731 // (+3) [-539]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 76
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 10 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1270 // 1270
  {
   setvar jumpcounter 551 // (+4) [-719]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 77
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 10 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1270 // 1270
  {
   setvar jumpcounter 371 // (+5) [-899]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 78
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 10 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1270 // 1270
  {
   setvar jumpcounter 191 // (+6) [-1079]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 79
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 10 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1270 // 1270
  {
   setvar jumpcounter 11 // (+7) [-1259]
   state setjumpcounter
  }
 }
 ifvare PLAYERJUMPSTRENGTHTEMP 80
 {
  ifvare jumpcounter 1261 // 1261
  {
   setvar jumpcounter 2 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1262 // 1262
  {
   setvar jumpcounter 3 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1263 // 1263
  {
   setvar jumpcounter 4 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1264 // 1264
  {
   setvar jumpcounter 5 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1265 // 1265
  {
   setvar jumpcounter 6 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1266 // 1266
  {
   setvar jumpcounter 7 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1267 // 1267
  {
   setvar jumpcounter 8 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1268 // 1268
  {
   setvar jumpcounter 9 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1269 // 1269
  {
   setvar jumpcounter 10 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1270 // 1270
  {
   setvar jumpcounter 11 // (+7) [-1259]
   state setjumpcounter
  }
  ifvare jumpcounter 1271 // 1271
  {
   setvar jumpcounter 1092 // (+1) [-179]
   state setjumpcounter
  }
 }
ends

state readweapontochar
        setvar PLAYERWEAPONBITFIELD 0
        getplayer[THISACTOR].gotweapon 0 temp ifvare temp 1 addvar PLAYERWEAPONBITFIELD 1
        getplayer[THISACTOR].gotweapon 1 temp ifvare temp 1 addvar PLAYERWEAPONBITFIELD 2
        getplayer[THISACTOR].gotweapon 2 temp ifvare temp 1 addvar PLAYERWEAPONBITFIELD 4
        getplayer[THISACTOR].gotweapon 3 temp ifvare temp 1 addvar PLAYERWEAPONBITFIELD 8
        getplayer[THISACTOR].gotweapon 4 temp ifvare temp 1 addvar PLAYERWEAPONBITFIELD 16
        getplayer[THISACTOR].gotweapon 5 temp ifvare temp 1 addvar PLAYERWEAPONBITFIELD 32
        getplayer[THISACTOR].gotweapon 6 temp ifvare temp 1 addvar PLAYERWEAPONBITFIELD 64
        getplayer[THISACTOR].gotweapon 7 temp ifvare temp 1 addvar PLAYERWEAPONBITFIELD 128
        getplayer[THISACTOR].gotweapon 8 temp ifvare temp 1 addvar PLAYERWEAPONBITFIELD 256
        getplayer[THISACTOR].gotweapon 9 temp ifvare temp 1 addvar PLAYERWEAPONBITFIELD 512
        getplayer[THISACTOR].gotweapon 11 temp ifvare temp 1 addvar PLAYERWEAPONBITFIELD 1024
ends

state readchartoweapon
        ifvarand PLAYERWEAPONBITFIELD 1 setplayer[THISACTOR].gotweapon 0 1 else setplayer[THISACTOR].gotweapon 0 0
        ifvarand PLAYERWEAPONBITFIELD 2 setplayer[THISACTOR].gotweapon 1 1 else setplayer[THISACTOR].gotweapon 1 0
        ifvarand PLAYERWEAPONBITFIELD 4 setplayer[THISACTOR].gotweapon 2 1 else setplayer[THISACTOR].gotweapon 2 0
        ifvarand PLAYERWEAPONBITFIELD 8 setplayer[THISACTOR].gotweapon 3 1 else setplayer[THISACTOR].gotweapon 3 0
        ifvarand PLAYERWEAPONBITFIELD 16 setplayer[THISACTOR].gotweapon 4 1 else setplayer[THISACTOR].gotweapon 4 0
        ifvarand PLAYERWEAPONBITFIELD 32 setplayer[THISACTOR].gotweapon 5 1 else setplayer[THISACTOR].gotweapon 5 0
        ifvarand PLAYERWEAPONBITFIELD 64 setplayer[THISACTOR].gotweapon 6 1 else setplayer[THISACTOR].gotweapon 6 0
        ifvarand PLAYERWEAPONBITFIELD 128 setplayer[THISACTOR].gotweapon 7 1 else setplayer[THISACTOR].gotweapon 7 0
        ifvarand PLAYERWEAPONBITFIELD 256 setplayer[THISACTOR].gotweapon 8 1 else setplayer[THISACTOR].gotweapon 8 0
        ifvarand PLAYERWEAPONBITFIELD 512 setplayer[THISACTOR].gotweapon 9 1 else setplayer[THISACTOR].gotweapon 9 0
        ifvarand PLAYERWEAPONBITFIELD 1024 setplayer[THISACTOR].gotweapon 11 1 else setplayer[THISACTOR].gotweapon 11 0
ends

state donotswitchchars
        setvarvar CHARACTERSELECTED? CHARACTEROLD
ends

state setcharacterarrays
        setvarvar CHARACTERARRAY CHARACTERSELECTED?

        setactorvar[CHARACTERARRAY].CHARACTERHP CURRENTHITPOINTS
        setactorvar[CHARACTERARRAY].CHARACTERMAXHP MAXHITPOINTS
        setactorvar[CHARACTERARRAY].CHARACTERAP CURRENTARMORPOINTS
        setactorvar[CHARACTERARRAY].CHARACTERMAXAP MAXARMORPOINTS
        setactorvar[CHARACTERARRAY].CHARACTERAPABSORB ARMORPERCENT
        setactorvar[CHARACTERARRAY].CHARACTEREP CURRENTENERGYPOINTS
        setactorvar[CHARACTERARRAY].CHARACTERMAXEP MAXENERGYPOINTS
        setactorvar[CHARACTERARRAY].CHARACTERFA FIRSTAIDCURRENT
        setactorvar[CHARACTERARRAY].CHARACTERATTACK PLAYERATTACK
        setactorvar[CHARACTERARRAY].CHARACTERDEFENSE PLAYERDEFENSE
        setactorvar[CHARACTERARRAY].CHARACTERBREATHTIME AIRTIME
        setactorvar[CHARACTERARRAY].CHARACTERMAXBREATHTIME MAXAIRTIME
        setactorvar[CHARACTERARRAY].CHARACTERQUADTIME QUADTIME
        setactorvar[CHARACTERARRAY].CHARACTERINVULNTIME INVULNTIME
        setactorvar[CHARACTERARRAY].CHARACTERREGENTIME REGENTIME
        setactorvar[CHARACTERARRAY].CHARACTERAPREGENTIME APREGENTIME
        setactorvar[CHARACTERARRAY].CHARACTERVAMPIRETIME VAMPIRETIME
        setactorvar[CHARACTERARRAY].CHARACTERSTEROIDSTIME STEROIDSTIME
        getplayer[THISACTOR].jetpack_amount TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERJETPACKTIME TEMPVAR
        getplayer[THISACTOR].jetpack_on TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERJETPACKTOGGLE TEMPVAR
        getplayer[THISACTOR].heat_amount TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERGOGGLESTIME TEMPVAR
        getplayer[THISACTOR].heat_on TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERGOGGLESTOGGLE TEMPVAR
        getplayer[THISACTOR].boot_amount TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERBOOTSTIME TEMPVAR
        getplayer[THISACTOR].holoduke_amount TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERHOLOTIME TEMPVAR
        getplayervar[THISACTOR].SCUBATIME TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERSCUBATIME TEMPVAR
        getplayer[THISACTOR].ammo_amount 0 TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERAMMO1 TEMPVAR
        getplayer[THISACTOR].ammo_amount 1 TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERAMMO2 TEMPVAR
        getplayer[THISACTOR].ammo_amount 2 TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERAMMO3 TEMPVAR
        getplayer[THISACTOR].ammo_amount 3 TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERAMMO4 TEMPVAR
        getplayer[THISACTOR].ammo_amount 4 TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERAMMO5 TEMPVAR
        getplayer[THISACTOR].ammo_amount 5 TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERAMMO6 TEMPVAR
        getplayer[THISACTOR].ammo_amount 6 TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERAMMO7 TEMPVAR
        getplayer[THISACTOR].ammo_amount 7 TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERAMMO8 TEMPVAR
        getplayer[THISACTOR].ammo_amount 8 TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERAMMO9 TEMPVAR
        getplayer[THISACTOR].ammo_amount 9 TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERAMMO10 TEMPVAR
        getplayer[THISACTOR].ammo_amount 11 TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERAMMO11 TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERMAXAMMO1 MAXKICK
        setactorvar[CHARACTERARRAY].CHARACTERMAXAMMO2 MAXPISTOL
        setactorvar[CHARACTERARRAY].CHARACTERMAXAMMO3 MAXSHOTGUN
        setactorvar[CHARACTERARRAY].CHARACTERMAXAMMO4 MAXCHAINGUN
        setactorvar[CHARACTERARRAY].CHARACTERMAXAMMO5 MAXRPG
        setactorvar[CHARACTERARRAY].CHARACTERMAXAMMO6 MAXPIPEBOMB
        setactorvar[CHARACTERARRAY].CHARACTERMAXAMMO7 MAXSHRINKER
        setactorvar[CHARACTERARRAY].CHARACTERMAXAMMO8 MAXDEVASTATOR
        setactorvar[CHARACTERARRAY].CHARACTERMAXAMMO9 MAXTRIPBOMB
        setactorvar[CHARACTERARRAY].CHARACTERMAXAMMO10 MAXFREEZER
        setactorvar[CHARACTERARRAY].CHARACTERMAXAMMO11 MAXEXPANDER
        getplayer[THISACTOR].runspeed TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERSPEED TEMPVAR
        setactorvar[CHARACTERARRAY].CHARACTERCRITHITCHANCE CRITICALHITCHANCE
        getplayer[THISACTOR].curr_weapon TEMPVAR
        setactorvar[CHARACTERARRAY].CURRWEAPONCHARACTER TEMPVAR
        state readweapontochar
        setactorvar[CHARACTERARRAY].CHARACTERWEAPBITFIELD PLAYERWEAPONBITFIELD
        setactorvar[CHARACTERARRAY].CHARACTERLEVEL PLAYERLEVEL
        setactorvar[CHARACTERARRAY].CHARACTERTEMPLEVEL PLAYERTEMPLEVEL
        setactorvar[CHARACTERARRAY].CHARACTEREXPPTS EXPPTS
        setactorvar[CHARACTERARRAY].CHARACTERAIRJUMPS multijumpflag
        setactorvar[CHARACTERARRAY].CHARACTERMAXAIRJUMPS PLAYERMAXAIRJUMPS
        setactorvar[CHARACTERARRAY].CHARACTERMAXMANTLETIME MANTLINGTIMERMAX
        setactorvar[CHARACTERARRAY].CHARACTERMANTLETIME MANTLINGTIMER
        setactorvar[CHARACTERARRAY].CHARACTERSTATUS? PLAYERSTATUS?
        setactorvar[CHARACTERARRAY].CHARACTERSHRINKINGRESIST SHRINKINGRESISTPLAYER
        setactorvar[CHARACTERARRAY].CHARACTERHASTETIMER PLAYERHASTETIMER
        setactorvar[CHARACTERARRAY].CHARACTERSLOWTIMER PLAYERSLOWTIMER
        setactorvar[CHARACTERARRAY].CHARACTERPOISONTIMER PLAYERPOISONTIMER
        setactorvar[CHARACTERARRAY].CHARACTERDIMNESSTIMER PLAYERDIMNESSTIMER
        setactorvar[CHARACTERARRAY].CHARACTERREFRACTORTIMER PLAYERREFRACTORTIMER
        setactorvar[CHARACTERARRAY].CHARACTERRAGNAROKTIMER PLAYERRAGNAROKTIMER
        setactorvar[CHARACTERARRAY].CHARACTERCONFUSIONTIMER PLAYERCONFUSIONTIMER
        setactorvar[CHARACTERARRAY].CHARACTERAQUAPROTECTTIMER PLAYERAQUAPROTECTTIMER
        setactorvar[CHARACTERARRAY].CHARACTERSHELLTIMER PLAYERSHELLTIMER
        setactorvar[CHARACTERARRAY].CHARACTERPSISHIELDTIMER PLAYERPSISHIELDTIMER
        setactorvar[CHARACTERARRAY].CHARACTERBLITZKRIEGTIMER PLAYERBLITZKRIEGTIMER
        setactorvar[CHARACTERARRAY].CHARACTERBOOSTERTIMER PLAYERBOOSTERTIMER
        setactorvar[CHARACTERARRAY].CHARACTERPSISHIELDTIMER PLAYERPSISHIELDTIMER
        setactorvar[CHARACTERARRAY].CHARACTERBLOODLUSTTIMER PLAYERBLOODLUSTTIMER
        setactorvar[CHARACTERARRAY].CHARACTERAUTOHPREGENTIMER HITPOINTREGENTICS
        setactorvar[CHARACTERARRAY].CHARACTERAUTOEPREGENTIMER ENERGYPOINTREGENTICS
        setactorvar[CHARACTERARRAY].CHARACTERSHRINKTIMER PLAYERSHRINKTIMER
        setactorvar[CHARACTERARRAY].CHARACTERJUMPSTRENGTH PLAYERJUMPSTRENGTH
        setactorvar[CHARACTERARRAY].CHARACTERLIFTSTRENGTH PLAYERLIFTSTRENGTH
        setactorvar[CHARACTERARRAY].CHARACTERFALLRESIST PLAYERFALLRESIST
        setactorvar[CHARACTERARRAY].CHARACTERDROWNDMGFACTOR DROWNDMGFACTOR
ends

state getcharacterarrays
         setvarvar CHARACTERARRAY CHARACTERSELECTED?

         getactorvar[CHARACTERARRAY].CHARACTERHP CURRENTHITPOINTS
         getactorvar[CHARACTERARRAY].CHARACTERMAXHP MAXHITPOINTS
         getactorvar[CHARACTERARRAY].CHARACTERAP CURRENTARMORPOINTS
         getactorvar[CHARACTERARRAY].CHARACTERMAXAP MAXARMORPOINTS
         getactorvar[CHARACTERARRAY].CHARACTERAPABSORB ARMORPERCENT
         getactorvar[CHARACTERARRAY].CHARACTEREP CURRENTENERGYPOINTS
         getactorvar[CHARACTERARRAY].CHARACTERMAXEP MAXENERGYPOINTS
         getactorvar[CHARACTERARRAY].CHARACTERFA FIRSTAIDCURRENT
         getactorvar[CHARACTERARRAY].CHARACTERATTACK PLAYERATTACK
         getactorvar[CHARACTERARRAY].CHARACTERDEFENSE PLAYERDEFENSE
         getactorvar[CHARACTERARRAY].CHARACTERBREATHTIME AIRTIME
         getactorvar[CHARACTERARRAY].CHARACTERMAXBREATHTIME MAXAIRTIME
         getactorvar[CHARACTERARRAY].CHARACTERQUADTIME QUADTIME
         getactorvar[CHARACTERARRAY].CHARACTERINVULNTIME INVULNTIME
         getactorvar[CHARACTERARRAY].CHARACTERREGENTIME REGENTIME
         getactorvar[CHARACTERARRAY].CHARACTERAPREGENTIME APREGENTIME
         getactorvar[CHARACTERARRAY].CHARACTERVAMPIRETIME VAMPIRETIME
         getactorvar[CHARACTERARRAY].CHARACTERJETPACKTIME TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERSTEROIDSTIME STEROIDSTIME

         ifvare STEROIDSTIME 0 setplayer[THISACTOR].steroids_amount 0
         else ifvare STEROIDSTIME 600 setplayer[THISACTOR].steroids_amount 400 // 150
         else ifvare STEROIDSTIME 1200 setplayer[THISACTOR].steroids_amount 400 // 300
         else ifvare STEROIDSTIME 2400 setplayer[THISACTOR].steroids_amount 400 // 600
         else ifvare STEROIDSTIME 4800 setplayer[THISACTOR].steroids_amount 400 // 1200
         else setplayer[THISACTOR].steroids_amount 399

         setplayer[THISACTOR].jetpack_amount TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERJETPACKTOGGLE TEMPVAR
         setplayer[THISACTOR].jetpack_on TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERGOGGLESTIME TEMPVAR
         setplayer[THISACTOR].heat_amount TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERGOGGLESTOGGLE TEMPVAR
         setplayer[THISACTOR].heat_on TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERBOOTSTIME TEMPVAR
         setplayer[THISACTOR].boot_amount TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERHOLOTIME TEMPVAR
         setplayer[THISACTOR].holoduke_amount TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERSCUBATIME TEMPVAR
         setplayervar[THISACTOR].SCUBATIME TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERAMMO1 TEMPVAR
         setplayer[THISACTOR].ammo_amount 0 TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERAMMO2 TEMPVAR
         setplayer[THISACTOR].ammo_amount 1 TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERAMMO3 TEMPVAR
         setplayer[THISACTOR].ammo_amount 2 TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERAMMO4 TEMPVAR
         setplayer[THISACTOR].ammo_amount 3 TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERAMMO5 TEMPVAR
         setplayer[THISACTOR].ammo_amount 4 TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERAMMO6 TEMPVAR
         setplayer[THISACTOR].ammo_amount 5 TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERAMMO7 TEMPVAR
         setplayer[THISACTOR].ammo_amount 6 TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERAMMO8 TEMPVAR
         setplayer[THISACTOR].ammo_amount 7 TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERAMMO9 TEMPVAR
         setplayer[THISACTOR].ammo_amount 8 TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERAMMO10 TEMPVAR
         setplayer[THISACTOR].ammo_amount 9 TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERAMMO11 TEMPVAR
         setplayer[THISACTOR].ammo_amount 11 TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERMAXAMMO1 MAXKICK
         getactorvar[CHARACTERARRAY].CHARACTERMAXAMMO2 MAXPISTOL
         getactorvar[CHARACTERARRAY].CHARACTERMAXAMMO3 MAXSHOTGUN
         getactorvar[CHARACTERARRAY].CHARACTERMAXAMMO4 MAXCHAINGUN
         getactorvar[CHARACTERARRAY].CHARACTERMAXAMMO5 MAXRPG
         getactorvar[CHARACTERARRAY].CHARACTERMAXAMMO6 MAXPIPEBOMB
         getactorvar[CHARACTERARRAY].CHARACTERMAXAMMO7 MAXSHRINKER
         getactorvar[CHARACTERARRAY].CHARACTERMAXAMMO8 MAXDEVASTATOR
         getactorvar[CHARACTERARRAY].CHARACTERMAXAMMO9 MAXTRIPBOMB
         getactorvar[CHARACTERARRAY].CHARACTERMAXAMMO10 MAXFREEZER
         getactorvar[CHARACTERARRAY].CHARACTERMAXAMMO11 MAXEXPANDER
         getactorvar[CHARACTERARRAY].CHARACTERSPEED TEMPVAR
         setplayer[THISACTOR].runspeed TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERCRITHITCHANCE CRITICALHITCHANCE
         getactorvar[CHARACTERARRAY].CURRWEAPONCHARACTER TEMPVAR
         setplayer[THISACTOR].curr_weapon TEMPVAR
         getactorvar[CHARACTERARRAY].CHARACTERWEAPBITFIELD PLAYERWEAPONBITFIELD
         state readchartoweapon
         getactorvar[CHARACTERARRAY].CHARACTERLEVEL PLAYERLEVEL
         getactorvar[CHARACTERARRAY].CHARACTERTEMPLEVEL PLAYERTEMPLEVEL
         getactorvar[CHARACTERARRAY].CHARACTEREXPPTS EXPPTS
         getactorvar[CHARACTERARRAY].CHARACTERAIRJUMPS multijumpflag
         getactorvar[CHARACTERARRAY].CHARACTERMAXAIRJUMPS PLAYERMAXAIRJUMPS
         getactorvar[CHARACTERARRAY].CHARACTERMAXMANTLETIME MANTLINGTIMERMAX
         getactorvar[CHARACTERARRAY].CHARACTERMANTLETIME MANTLINGTIMER
         getactorvar[CHARACTERARRAY].CHARACTERSTATUS? PLAYERSTATUS?
         getactorvar[CHARACTERARRAY].CHARACTERSHRINKINGRESIST SHRINKINGRESISTPLAYER
         getactorvar[CHARACTERARRAY].CHARACTERHASTETIMER PLAYERHASTETIMER
         getactorvar[CHARACTERARRAY].CHARACTERSLOWTIMER PLAYERSLOWTIMER
         getactorvar[CHARACTERARRAY].CHARACTERPOISONTIMER PLAYERPOISONTIMER
         getactorvar[CHARACTERARRAY].CHARACTERDIMNESSTIMER PLAYERDIMNESSTIMER
         getactorvar[CHARACTERARRAY].CHARACTERREFRACTORTIMER PLAYERREFRACTORTIMER
         getactorvar[CHARACTERARRAY].CHARACTERRAGNAROKTIMER PLAYERRAGNAROKTIMER
         getactorvar[CHARACTERARRAY].CHARACTERCONFUSIONTIMER PLAYERCONFUSIONTIMER
         getactorvar[CHARACTERARRAY].CHARACTERAQUAPROTECTTIMER PLAYERAQUAPROTECTTIMER
         getactorvar[CHARACTERARRAY].CHARACTERSHELLTIMER PLAYERSHELLTIMER
         getactorvar[CHARACTERARRAY].CHARACTERPSISHIELDTIMER PLAYERPSISHIELDTIMER
         getactorvar[CHARACTERARRAY].CHARACTERBLITZKRIEGTIMER PLAYERBLITZKRIEGTIMER
         getactorvar[CHARACTERARRAY].CHARACTERBOOSTERTIMER PLAYERBOOSTERTIMER
         getactorvar[CHARACTERARRAY].CHARACTERPSISHIELDTIMER PLAYERPSISHIELDTIMER
         getactorvar[CHARACTERARRAY].CHARACTERBLOODLUSTTIMER PLAYERBLOODLUSTTIMER
         getactorvar[CHARACTERARRAY].CHARACTERAUTOHPREGENTIMER HITPOINTREGENTICS
         getactorvar[CHARACTERARRAY].CHARACTERAUTOEPREGENTIMER ENERGYPOINTREGENTICS
         getactorvar[CHARACTERARRAY].CHARACTERSHRINKTIMER PLAYERSHRINKTIMER
         getactorvar[CHARACTERARRAY].CHARACTERJUMPSTRENGTH PLAYERJUMPSTRENGTH
         getactorvar[CHARACTERARRAY].CHARACTERLIFTSTRENGTH PLAYERLIFTSTRENGTH
         getactorvar[CHARACTERARRAY].CHARACTERFALLRESIST PLAYERFALLRESIST
         getactorvar[CHARACTERARRAY].CHARACTERDROWNDMGFACTOR DROWNDMGFACTOR
ends

state checkcharacter_status
 getactorvar[CHARACTERARRAY].CHARACTERSTATUS? TEMPVAR
ends

state checkfallresistances
        ifvare VEHICLEID -1
        {
         setvarvar CHARFALLRESIST PLAYERFALLRESISTTEMP
         state damagemod-fallresist
        }
        else
        {
         ifvarg VEHICLETYPE -1 ifvarl VEHICLETYPE 3 setvarvar CHARFALLRESIST 15
        }
ends

state level_calcfallresist
        setvarvar TEMPVAR5 PLAYERTEMPLEVEL
        divvar TEMPVAR5 16
        addvarvar PLAYERFALLRESISTTEMP TEMPVAR5
ends

state level_calcsurvivalrate
        // Factor in Level
        setvarvar TEMPVAR5 PLAYERTEMPLEVEL

        ifvare CHARACTERSELECTED? 1 mulvar TEMPVAR5 7
        else ifvare CHARACTERSELECTED? 2 mulvar TEMPVAR5 5
        else ifvare CHARACTERSELECTED? 3 mulvar TEMPVAR5 11
        else ifvare CHARACTERSELECTED? 4 mulvar TEMPVAR5 10
        else ifvare CHARACTERSELECTED? 5 mulvar TEMPVAR5 8
        else ifvare CHARACTERSELECTED? 6 mulvar TEMPVAR5 3
        else ifvare CHARACTERSELECTED? 7 mulvar TEMPVAR5 6
        else ifvare CHARACTERSELECTED? 8 mulvar TEMPVAR5 14
        else ifvare CHARACTERSELECTED? 9 mulvar TEMPVAR5 2
        else ifvare CHARACTERSELECTED? 10 mulvar TEMPVAR5 12
        else ifvare CHARACTERSELECTED? 11 mulvar TEMPVAR5 15
        else ifvare CHARACTERSELECTED? 12 mulvar TEMPVAR5 4
        else ifvare CHARACTERSELECTED? 13 mulvar TEMPVAR5 13
        else ifvare CHARACTERSELECTED? 14 mulvar TEMPVAR5 1
        else ifvare CHARACTERSELECTED? 15 mulvar TEMPVAR5 9
        else mulvar TEMPVAR5 5
        addvarvar SURVIVALVALUE_TEMP TEMPVAR5

        // Factor in Rabbit's Feet [Equippable Item]
        ifvare PLAYEREQUIPSLOTITEM1 12 addvar SURVIVALVALUE_TEMP 1250
        ifvare PLAYEREQUIPSLOTITEM2 12 addvar SURVIVALVALUE_TEMP 1250
        ifvare PLAYEREQUIPSLOTITEM3 12 addvar SURVIVALVALUE_TEMP 1250
        ifvare PLAYEREQUIPSLOTITEM4 12 addvar SURVIVALVALUE_TEMP 1250

        ifp ponsteroids
        {
         setvarvar TEMPVAR5 10001
         subvarvar TEMPVAR5 SURVIVALVALUE_TEMP
         mulvar TEMPVAR5 3
         divvar TEMPVAR5 4
         addvarvar SURVIVALVALUE_TEMP TEMPVAR5
        }

ends

state checkcharacters
getplayer[THISACTOR].runspeed CHARACTERSPEEDTRUE
//************************************
//*START OF CHARACTER SWITCHING CODES*
//************************************

    ifvarvare CHARACTERSELECTED? CHARACTEROLD // If the character hasn't changed yet
    {
      ifvare CHARACTERSELECTED? 1
      {
        redefinequote 47 ^19HOLODUKE ON
        redefinequote 48 ^19HOLODUKE OFF
        redefinequote 49 ^21HOLODUKE NOT FOUND YET!
        redefinequote 51 ^20HOLODUKE
        redefinequote 91 ^20HOLODUKE

        setvar SURVIVALVALUE_TEMP 1251
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 12096 // In Build Units [6'3" / 191.2cm]
        setvar PLAYERWEIGHT 224 // In lbs

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 2
      {
        redefinequote 47 ^19HOLOJACK ON
        redefinequote 48 ^19HOLOJACK OFF
        redefinequote 49 ^21HOLOJACK NOT FOUND YET!
        redefinequote 51 ^20HOLOJACK
        redefinequote 91 ^20HOLOJACK

        setvar SURVIVALVALUE_TEMP 626
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 10470 // In Build Units [5'5" / 165.5cm]
        setvar PLAYERWEIGHT 146 // In lbs

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 3
      {
        redefinequote 47 ^19HOLOBUBSY ON
        redefinequote 48 ^19HOLOBUBSY OFF
        redefinequote 49 ^21HOLOBUBSY NOT FOUND YET!
        redefinequote 51 ^20HOLOBUBSY
        redefinequote 91 ^20HOLOBUBSY

        setvar SURVIVALVALUE_TEMP 938 // 938
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 10325 // In Build Units [5'4" / 163.2cm]
        setvar PLAYERWEIGHT 137 // In lbs

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 4
      {
        redefinequote 47 ^19HOLOAMI ON
        redefinequote 48 ^19HOLOAMI OFF
        redefinequote 49 ^21HOLOAMI NOT FOUND YET!
        redefinequote 51 ^20HOLOAMI
        redefinequote 91 ^20HOLOAMI

        setvar SURVIVALVALUE_TEMP 501
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 10489 // In Build Units [6'3" / 165.8cm]
        setvar PLAYERWEIGHT 123 // In lbs

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 5
      {
        redefinequote 47 ^19HOLOHIGA ON
        redefinequote 48 ^19HOLOHIGA OFF
        redefinequote 49 ^21HOLOHIGA NOT FOUND YET!
        redefinequote 51 ^20HOLOHIGA
        redefinequote 91 ^20HOLOHIGA

        setvar SURVIVALVALUE_TEMP 1001
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 11723 // In Build Units [6'1" / 185.3cm]
        setvar PLAYERWEIGHT 187 // In lbs

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 6
      {
        redefinequote 47 ^19HOLOESSENCE ON
        redefinequote 48 ^19HOLOESSENCE OFF
        redefinequote 49 ^21HOLOESSENCE NOT FOUND YET!
        redefinequote 51 ^20HOLOESSENCE
        redefinequote 91 ^20HOLOESSENCE

        setvar SURVIVALVALUE_TEMP 1668
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 22351 // In Build Units [11'7" / 353.3cm]
        setvar PLAYERWEIGHT 1032 // In lbs

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 7
      {
        redefinequote 47 ^19HOLOTED ON
        redefinequote 48 ^19HOLOTED OFF
        redefinequote 49 ^21HOLOTED NOT FOUND YET!
        redefinequote 51 ^20HOLOTED
        redefinequote 91 ^20HOLOTED

        setvar SURVIVALVALUE_TEMP 1501
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 11628 // In Build Units [6' / 183.8cm]
        setvar PLAYERWEIGHT 185

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 8
      {
        redefinequote 47 ^19HOLOLISA ON
        redefinequote 48 ^19HOLOLISA OFF
        redefinequote 49 ^21HOLOLISA NOT FOUND YET!
        redefinequote 51 ^20HOLOLISA
        redefinequote 91 ^20HOLOLISA

        setvar SURVIVALVALUE_TEMP 2001
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 10976 // In Build Units [5'8" / 173.5cm]
        setvar PLAYERWEIGHT 130

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 9
      {
        redefinequote 47 ^19HOLOCYBANIS ON
        redefinequote 48 ^19HOLOCYBANIS OFF
        redefinequote 49 ^21HOLOCYBANIS NOT FOUND YET!
        redefinequote 51 ^20HOLOCYBANIS
        redefinequote 91 ^20HOLOCYBANIS

        setvar SURVIVALVALUE_TEMP 1334
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 23825 // In Build Units [12'4" / 376.6cm]
        setvar PLAYERWEIGHT 1186

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 10
      {
       ifvare NETHRAFORM? 0
       {
        redefinequote 47 ^19HOLONETHRA ON
        redefinequote 48 ^19HOLONETHRA OFF
        redefinequote 49 ^21HOLONETHRA NOT FOUND YET!
        redefinequote 51 ^20HOLONETHRA
        redefinequote 91 ^20HOLONETHRA

        setvar PLAYERHEIGHT 11932 // In Build Units [6'2" / 188.6cm]
        setvar PLAYERWEIGHT 114
       }
       else
       {
        redefinequote 47 ^19HOLOCHRISTINA ON
        redefinequote 48 ^19HOLOCHRISTINA OFF
        redefinequote 49 ^21HOLOCHRISTINA NOT FOUND YET!
        redefinequote 51 ^20HOLOCHRISTINA
        redefinequote 91 ^20HOLOCHRISTINA

        setvar PLAYERHEIGHT 11160 // In Build Units [5'9" / 176.4cm]
        setvar PLAYERWEIGHT 138
       }
        setvar SURVIVALVALUE_TEMP 2001
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 11
      {
        redefinequote 47 ^19HOLOPAULA ON
        redefinequote 48 ^19HOLOPAULA OFF
        redefinequote 49 ^21HOLOPAULA NOT FOUND YET!
        redefinequote 51 ^20HOLOPAULA
        redefinequote 91 ^20HOLOPAULA

        setvar SURVIVALVALUE_TEMP 3334
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 11609 // In Build Units [6' / 183.5cm]
        setvar PLAYERWEIGHT 114

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 12
      {
        redefinequote 47 ^19HOLOLORI ON
        redefinequote 48 ^19HOLOLORI OFF
        redefinequote 49 ^21HOLOLORI NOT FOUND YET!
        redefinequote 51 ^20HOLOLORI
        redefinequote 91 ^20HOLOLORI

        setvar SURVIVALVALUE_TEMP 1251
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 11356 // In Build Units [5'10" / 179.5cm]
        setvar PLAYERWEIGHT 136

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 13
      {
        redefinequote 47 ^19HOLOMINAKO ON
        redefinequote 48 ^19HOLOMINAKO OFF
        redefinequote 49 ^21HOLOMINAKO NOT FOUND YET!
        redefinequote 51 ^20HOLOMINAKO
        redefinequote 91 ^20HOLOMINAKO

        setvar SURVIVALVALUE_TEMP 751
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 10451 // In Build Units [5'5" / 165.2cm]
        setvar PLAYERWEIGHT 126

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 14
      {
       ifvare debugtoggle 0
       {
        ifvare PUBLICBETA? 1
        {
         redefinequote 47 ^19HOLO??????? ON
         redefinequote 48 ^19HOLO??????? OFF
         redefinequote 49 ^21HOLO??????? NOT FOUND YET!
         redefinequote 51 ^20HOLO???????
         redefinequote 91 ^20HOLO???????
        }
        else
        {
         redefinequote 47 ^19HOLONAFERIA ON
         redefinequote 48 ^19HOLONAFERIA OFF
         redefinequote 49 ^21HOLONAFERIA NOT FOUND YET!
         redefinequote 51 ^20HOLONAFERIA
         redefinequote 91 ^20HOLONAFERIA
        }
       }
       else
       {
        ifvare PUBLICBETA? 1
        {
         redefinequote 47 ^19HOLOHINOTORI ON
         redefinequote 48 ^19HOLOHINOTORI OFF
         redefinequote 49 ^21HOLOHINOTORI NOT FOUND YET!
         redefinequote 51 ^20HOLOHINOTORI
         redefinequote 91 ^20HOLOHINOTORI
        }
        else
        {
         redefinequote 47 ^19HOLONAFERIA ON
         redefinequote 48 ^19HOLONAFERIA OFF
         redefinequote 49 ^21HOLONAFERIA NOT FOUND YET!
         redefinequote 51 ^20HOLONAFERIA
         redefinequote 91 ^20HOLONAFERIA
        }
       }

        setvar SURVIVALVALUE_TEMP 1501
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 12147 // In Build Units [6'3" / 192cm]
        setvar PLAYERWEIGHT 140

        state setcharacterarrays
      }
      else
      ifvare CHARACTERSELECTED? 15
      {
        redefinequote 47 ^19HOLOMAKEN ON
        redefinequote 48 ^19HOLOMAKEN OFF
        redefinequote 49 ^21HOLOMAKEN NOT FOUND YET!
        redefinequote 51 ^20HOLOMAKEN
        redefinequote 91 ^20HOLOMAKEN

        setvar SURVIVALVALUE_TEMP 1001
        state level_calcsurvivalrate
        setvarvar SURVIVALVALUE SURVIVALVALUE_TEMP
        state damagemod-survival

        setvar PLAYERHEIGHT 10862 // In Build Units [5'7" / 171.7cm]
        setvar PLAYERWEIGHT 124

        state setcharacterarrays
      }
    }    //*******************************************************
    else //*If the game detects a change in the current character*
    {    //*******************************************************
      setvar SWITCHOVERDELAY 13 // Set to >1 to prevent bleed ins for HP, AIRTIME and Inventory Times
      setplayer[THISACTOR].holoduke_on -1 // Turns off Holoform automatically if the last character left it on[since switching back to that person will not make their holoform respawn and waste its' energy.
      setplayer[THISACTOR].scuba_on 0 // Turns off Scuba automatically if the last character left it on so the next character is not stuck with a 'perma-scubatank' even if they don't have one of their own
      setvar HITPOINTREGENTICS 0
      setvar PLAYERREGENCOUNTER 0
      setvar PLAYERAPREGENCOUNTER 0
      setvar HPINCREASED 0 setvar HPLUPDISPLAY 53
      setvar APINCREASED 0 setvar APLUPDISPLAY 53
      setvar ATKINCREASED 0 setvar ATKLUPDISPLAY 53
      setvar DEFINCREASED 0 setvar DEFLUPDISPLAY 53
      setactorvar[HPBARCHILD].HPBARFLASHTIMER 0
      setactorvar[APBARCHILD].APBARFLASHTIMER 0
      setvar DISPLAYHPFLASHTIMER 0
      setvar DISPLAYFAFLASHTIMER 0
      setvar DISPLAYAPFLASHTIMER 0
      ifvare CHARACTERSELECTED? 1 // If switching to Duke...
      {
       ifvarn DUKE? 1 state donotswitchchars
       else
       {
        setvar CHARACTERARRAY 1
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 2
      {
       ifvarn JACK? 1 state donotswitchchars
       else // If Jack is there, try to switch to him.
       {
        setvar CHARACTERARRAY 2
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 3
      {
       ifvarn BUBSY? 1 state donotswitchchars
       else // If Bubsy is there, try to switch to him.
       {
        setvar CHARACTERARRAY 3
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 4
      {
       ifvarn AMI? 1 state donotswitchchars
       else // If Ami is there, try to switch to her.
       {
        setvar CHARACTERARRAY 4
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 5
      {
       ifvarn LOWANG? 1 state donotswitchchars
       else // If Higa is there, try to switch to him.
       {
        setvar CHARACTERARRAY 5
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 6
      {
       ifvarn ESSENCE? 1 state donotswitchchars
       else // If ESSence is there, try to switch to him.
       {
        setvar CHARACTERARRAY 6
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 7
      {
       ifvarn TED? 1 state donotswitchchars
       else // If Ted is there, try to switch to him.
       {
        setvar CHARACTERARRAY 7
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 8
      {
       ifvarn LISA? 1 state donotswitchchars
       else // If Lisa is there, try to switch to her.
       {
        setvar CHARACTERARRAY 8
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 9
      {
       ifvarn CYBANIS? 1 state donotswitchchars
       else // If Cybanis is there, try to switch to him.
       {
        setvar CHARACTERARRAY 9
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 10
      {
       ifvarn NETHRA? 1 state donotswitchchars
       else // If Nethra is there, try to switch to her.
       {
        setvar CHARACTERARRAY 10
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 11
      {
       ifvarn PAULA? 1 state donotswitchchars
       else // If Paula is there, try to switch to her.
       {
        setvar CHARACTERARRAY 11
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 12
      {
       ifvarn LORI? 1 state donotswitchchars
       else // If Lori is there, try to switch to her.
       {
        setvar CHARACTERARRAY 12
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 13
      {
       ifvarn MINAKO? 1 state donotswitchchars
       else // If Minako is there, try to switch to her.
       {
        setvar CHARACTERARRAY 13
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 14
      {
       ifvarn MYSTERY1? 1 state donotswitchchars
       else // If 'Mystery Woman' is there, try to switch to her.
       {
        setvar CHARACTERARRAY 14
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
      else
      ifvare CHARACTERSELECTED? 15
      {
       ifvarn MAKEN? 1 state donotswitchchars
       else // If Maken is there, try to switch to her.
       {
        setvar CHARACTERARRAY 15
        state checkcharacter_status
        ifvarand TEMPVAR 1 state donotswitchchars else state getcharacterarrays
       }
      }
    }
    setvarvar CHARACTEROLD CHARACTERSELECTED? // Sets the 'old' var to the current one to prevent repeats of the code.

//**********************************
//*END OF CHARACTER SWITCHING CODES*
//**********************************
ends

state changecharacterdeathcount
  ifvare gameover? 0
  {
    ifvarg DEATHCHARACTERVAR 0 ifvarl DEATHCHARACTERVAR 16
    {
     addlogvar DEATHCHARACTERVAR
     getactorvar[DEATHCHARACTERVAR].CHARACTERDEATHS TEMP
     addvar TEMP 1
     setactorvar[DEATHCHARACTERVAR].CHARACTERDEATHS TEMP
     addlogvar TEMP
    }
    setvar DEATHCHARACTERVAR 0
  }
ends

state checkforcontinues
  ifvarg CONTINUES? 0
  {
   state changecharacterdeathcount
   setvarvar CURRENTHITPOINTS MAXHITPOINTS
   ifvare DUKE? 1
   {
    setvar CHARACTERARRAY 1
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare JACK? 1
   {
    setvar CHARACTERARRAY 2
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare BUBSY? 1
   {
    setvar CHARACTERARRAY 3
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare AMI? 1
   {
    setvar CHARACTERARRAY 4
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare LOWANG? 1
   {
    setvar CHARACTERARRAY 5
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare ESSENCE? 1
   {
    setvar CHARACTERARRAY 6
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare TED? 1
   {
    setvar CHARACTERARRAY 7
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare LISA? 1
   {
    setvar CHARACTERARRAY 8
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare CYBANIS? 1
   {
    setvar CHARACTERARRAY 9
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare NETHRA? 1
   {
    setvar CHARACTERARRAY 10
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare PAULA? 1
   {
    setvar CHARACTERARRAY 11
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare LORI? 1
   {
    setvar CHARACTERARRAY 12
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare MINAKO? 1
   {
    setvar CHARACTERARRAY 13
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare MYSTERY1? 1
   {
    setvar CHARACTERARRAY 14
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   ifvare MAKEN? 1
   {
    setvar CHARACTERARRAY 15
    getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
    setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   }
   setactor[PLAYERID].extra 16384
   subvar CONTINUES? 1
   setvar DEATHSWITCHDELAY 39
   redefinequote 321 ^20YOUR GROUP WAS SAVED BY ONE OF YOUR CONTINUES!!
   setvarvar fta fta_normal setvar ftq 321
  }
  else
  {
   ifvarn PLAYERSTATUS? 1 state changecharacterdeathcount
   setvar PLAYERSTATUS? 1
  }
ends

state checkbubsylives
     setvar CHARACTERARRAY 3
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvare TEMPVAR 0  
     { 
      setactor[PLAYERID].extra 16384
      getactorvar[CHARACTERARRAY].CHARACTERMAXHP TEMPVAR
      setactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
      getactorvar[CHARACTERARRAY].CHARACTERMAXBREATHTIME temp
      setactorvar[CHARACTERARRAY].CHARACTERBREATHTIME temp
      subvar BUBSYLIVES 1 
      setvar DEATHSWITCHDELAY 39
      redefinequote 321 ^2BUBSY LOSES ONE LIFE!!
      setvarvar fta fta_normal setvar ftq 321
     }
ends

state checkbubsylives2
     setvar CHARACTERARRAY 3
     getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
     ifvare TEMPVAR 0  
     { 
      setactor[PLAYERID].extra 16384
      setvarvar CURRENTHITPOINTS MAXHITPOINTS
      setvarvar AIRTIME MAXAIRTIME
      subvar BUBSYLIVES 1 
      stopsound DUKE_GRUNT
      setvar DEATHSWITCHDELAY 39
      redefinequote 321 ^2BUBSY LOSES ONE LIFE!!
      setvarvar fta fta_normal setvar ftq 321
      break 
     }
ends

state changechar
    ifvarn VEHICLEID -1 setvar bits 268435456
    setvarvar CHARACTERSELECTED? CHARACTERNEW
    setvar CHARACTERNEW 0
    stopsound DUKE_SCREAM
    stopsound DUKE_SCREAM2
    stopsound JACK_FALLSCREAM
    stopsound WANG_SCREAM
    stopsound ESSENCE_FALLSCREAM
    stopsound LISA_FALLSCREAM
    stopsound MAKEN_FALLSCREAM
    setvar AUTOSWITCHATTEMPTS 0
    setvar DEATHSWITCHDELAY 39
    setactor[PLAYERID].extra 16384
ends

state mortalblowstuff
   setactor[PLAYERID].extra 16384
   setvar CURRENTHITPOINTS 1
   stopsound DUKE_GRUNT
   redefinequote 321 ^23SURVIVED A MORTAL BLOW!!   
   setvar DEATHCHARACTERVAR 0
   setvar DEATHSWITCHDELAY 39
   setvarvar fta fta_normal setvar ftq 321
ends

state survivalcheck1
  getactor[PLAYERID].htpicnum TEMPVAR
  ifvare gameover? 0 { ifvare TEMPVAR -1 { setvar SURVIVALCHECK 10001 } else { randvar SURVIVALCHECK 10000 } } else { setvar SURVIVALCHECK 10001 break } 
  ifvarvarl SURVIVALCHECK SURVIVALVALUE
  {
   ifvare CURRENTHITPOINTS 0 state mortalblowstuff
   break 
  }
ends

state switchtorandomcharacter
 getcurraddress TEMPVAR3
 setvar CHARACTERNEW 0 // set to 0
 randvar CHARACTERNEW 14 // 0 to 14
 addvar CHARACTERNEW 1 // +1

 ifvare CHARACTERNEW 1
 {
  ifvare DUKE? 1
  {
   setvar CHARACTERARRAY 1
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 2
 {
  ifvare JACK? 1
  {
   setvar CHARACTERARRAY 2
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 3
 {
  ifvare BUBSY? 1
  {
   setvar CHARACTERARRAY 3
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 4
 {
  ifvare AMI? 1
  {
   setvar CHARACTERARRAY 4
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 5
 {
  ifvare LOWANG? 1
  {
   setvar CHARACTERARRAY 5
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 6
 {
  ifvare ESSENCE? 1
  {
   setvar CHARACTERARRAY 6
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 7
 {
  ifvare TED? 1
  {
   setvar CHARACTERARRAY 7
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 8
 {
  ifvare LISA? 1
  {
   setvar CHARACTERARRAY 8
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 9
 {
  ifvare CYBANIS? 1
  {
   setvar CHARACTERARRAY 9
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 10
 {
  ifvare NETHRA? 1
  {
   setvar CHARACTERARRAY 10
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 11
 {
  ifvare PAULA? 1
  {
   setvar CHARACTERARRAY 11
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 12
 {
  ifvare LORI? 1
  {
   setvar CHARACTERARRAY 12
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 13
 {
  ifvare MINAKO? 1
  {
   setvar CHARACTERARRAY 13
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 14
 {
  ifvare MYSTERY1? 1
  {
   setvar CHARACTERARRAY 14
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
 else
 ifvare CHARACTERNEW 15
 {
  ifvare MAKEN? 1
  {
   setvar CHARACTERARRAY 15
   getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
   ifvarg TEMPVAR 0 state changechar else jump TEMPVAR3
  }
  else jump TEMPVAR3 // state switchtolivingcharacter
 }
ends

state switchtolivingcharacter
 ifvare CHEATGOD 0
 {
  getactor[PLAYERID].htpicnum TEMPVAR
  ifvare gameover? 0 { ifvare TEMPVAR -1 { setvar SURVIVALCHECK 10001 } else { randvar SURVIVALCHECK 10000 } } else { setvar SURVIVALCHECK 10001 break }   
  ifvarvarl SURVIVALCHECK SURVIVALVALUE
  {
   ifvare CURRENTHITPOINTS 0 state mortalblowstuff
   break 
  }
 }
 else
 {
  ifvare CURRENTHITPOINTS 0 state mortalblowstuff
  break 
 }

 ifvare CHARACTERSELECTED? 3 
 { 
  ifvare CURRENTHITPOINTS 0
  {
   ifvarg BUBSYLIVES 0 state checkbubsylives2 // If Bubsy has 'extra lives' left, revive him automatically to 100% HP and Airtime and don't switch him over, but decrement his 'lives' counter by 1
  }
 }
 else
 {
  setvar CHARACTERARRAY 3
  getactorvar[CHARACTERARRAY].CHARACTERHP TEMPVAR
  ifvare TEMPVAR 0
  {
   ifvarg BUBSYLIVES 0 state checkbubsylives2 // If Bubsy has 'extra lives' left, revive him automatically to 100% HP and Airtime and don't switch him over, but decrement his 'lives' counter by 1
  }
 }
 
// Randomizes your next character when one dies.
 ifvare CURRENTHITPOINTS 0
 {
  ifvarvarg SURVIVALCHECK SURVIVALVALUE
  {
   sound CHARACTER_DIE
   palfrom 64 64
   state changecharacterdeathcount
   setvarvar TEMPVAR2 CHARACTEROLD

   ifvare TEMPVAR2 1
   {
    redefinequote 321 ^21DUKE HAS BEEN KILLED!!
    globalsound DUKE_KILLED4
   }
   else
   ifvare TEMPVAR2 2
   {
    redefinequote 321 ^21JACK HAS BEEN KILLED!!
   }
   else
   ifvare TEMPVAR2 3
   {
    redefinequote 321 ^21BUBSY HAS BEEN KILLED!!
   }
   else
   ifvare TEMPVAR2 4
   {
    redefinequote 321 ^21AMI HAS BEEN KILLED!!
   }
   else
   ifvare TEMPVAR2 5
   {
    redefinequote 321 ^21HIGA HAS BEEN KILLED!!
    globalsound WANG_LONGTERM_PAIN1
   }
   else
   ifvare TEMPVAR2 6
   {
    redefinequote 321 ^21ESSENCE HAS BEEN KILLED!!
   }
   else
   ifvare TEMPVAR2 7
   {
    redefinequote 321 ^21TED HAS BEEN KILLED!!
   }
   else
   ifvare TEMPVAR2 8
   {
    redefinequote 321 ^21LISA HAS BEEN KILLED!!
    ifrnd 128 globalsound LISA_DEATH1 else globalsound LISA_DEATH2
   }
   else
   ifvare TEMPVAR2 9
   {
    redefinequote 321 ^21CYBANIS HAS BEEN KILLED!!
   }
   else
   ifvare TEMPVAR2 10
   {
    ifvare NETHRAFORM? 0
    {
     redefinequote 321 ^21NETHRA HAS BEEN KILLED!!
    }
    else
    {
     redefinequote 321 ^21CHRISTINA HAS BEEN KILLED!!
    }
   }
   else
   ifvare TEMPVAR2 11
   {
    redefinequote 321 ^21PAULA HAS BEEN KILLED!!
   }
   else
   ifvare TEMPVAR2 12
   {
    redefinequote 321 ^21LORI HAS BEEN KILLED!!
   }
   else
   ifvare TEMPVAR2 13
   {
    redefinequote 321 ^21MINAKO HAS BEEN KILLED!!
   }
   else
   ifvare TEMPVAR2 14
   {
    ifvare debugtoggle 0
    {
     ifvare PUBLICBETA? 1
     {
      redefinequote 321 ^21??????? HAS BEEN KILLED!!
     }
     else
     {
      redefinequote 321 ^21NAFERIA HAS BEEN KILLED!!
     }
    }
    else
    {
     ifvare PUBLICBETA? 1
     {
      redefinequote 321 ^21HINOTORI HAS BEEN KILLED!!
     }
     else
     {
      redefinequote 321 ^21NAFERIA HAS BEEN KILLED!!
     }
    }
   }
   else
   ifvare TEMPVAR2 15
   {
    redefinequote 321 ^21MAKEN HAS BEEN KILLED!!
    ifrnd 128 globalsound MAKEN_DEATH1 else globalsound MAKEN_DEATH2
   }
   else
   {
    redefinequote 321 ^21SOMEONE HAS BEEN KILLED!!
   }
   setvarvar fta fta_normal setvar ftq 321
  }
 }

 state switchtorandomcharacter
 addvar AUTOSWITCHATTEMPTS 1
ends

state checkpartysize
   setvar PARTYSIZE 0 
   setvar PARTYALIVE 0
       ifvare DUKE? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 1 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 1 state switchtorandomcharacter }
       ifvare JACK? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 2 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 2 state switchtorandomcharacter }
      ifvare BUBSY? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 3 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 3 state switchtorandomcharacter }
        ifvare AMI? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 4 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 4 state switchtorandomcharacter }
     ifvare LOWANG? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 5 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 5 state switchtorandomcharacter }
    ifvare ESSENCE? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 6 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 6 state switchtorandomcharacter }
        ifvare TED? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 7 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 7 state switchtorandomcharacter }
       ifvare LISA? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 8 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 8 state switchtorandomcharacter }
    ifvare CYBANIS? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 9 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 9 state switchtorandomcharacter }
     ifvare NETHRA? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 10 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 10 state switchtorandomcharacter }
      ifvare PAULA? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 11 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 11 state switchtorandomcharacter }
       ifvare LORI? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 12 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 12 state switchtorandomcharacter }
     ifvare MINAKO? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 13 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 13 state switchtorandomcharacter }
   ifvare MYSTERY1? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 14 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 14 state switchtorandomcharacter }
      ifvare MAKEN? 1 { addvar PARTYSIZE 1 setvar CHARACTERARRAY 15 getactorvar[CHARACTERARRAY].CHARACTERHP temp ifvarg temp 0 addvar PARTYALIVE 1 }
                 else { ifvare CHARACTERSELECTED? 15 state switchtorandomcharacter }
ends

state checkcharalive
      getactorvar[CHARACTERARRAY].CHARACTERHP temp
      ifvarg temp 0 
      {
       state checkcharacter_status
       ifvarand TEMPVAR 1 
       {
        subvar TEMPVAR 1
        setactorvar[CHARACTERARRAY].CHARACTERSTATUS? TEMPVAR
       }
      }
      else
      {
       setactorvar[CHARACTERARRAY].CHARACTERSTATUS? 1
       setactorvar[CHARACTERARRAY].CHARACTERHP 0
      }
ends

state iscurrentcharalive
 setvar CHARACTERARRAY 1 state checkcharalive
 setvar CHARACTERARRAY 2 state checkcharalive
 setvar CHARACTERARRAY 3 state checkcharalive
 setvar CHARACTERARRAY 4 state checkcharalive
 setvar CHARACTERARRAY 5 state checkcharalive
 setvar CHARACTERARRAY 6 state checkcharalive
 setvar CHARACTERARRAY 7 state checkcharalive
 setvar CHARACTERARRAY 8 state checkcharalive
 setvar CHARACTERARRAY 9 state checkcharalive
 setvar CHARACTERARRAY 10 state checkcharalive
 setvar CHARACTERARRAY 11 state checkcharalive
 setvar CHARACTERARRAY 12 state checkcharalive
 setvar CHARACTERARRAY 13 state checkcharalive
 setvar CHARACTERARRAY 14 state checkcharalive
 setvar CHARACTERARRAY 15 state checkcharalive
ends
