//INIT
//Database containing all the max EXP / LEVEL of the player
DB_LevelExp(0,0);
DB_LevelExp(1,2000);
DB_LevelExp(2,6000);
DB_LevelExp(3,12000);
DB_LevelExp(4,20000);
DB_LevelExp(5,30000);
DB_LevelExp(6,42000);
DB_LevelExp(7,56000);
DB_LevelExp(8,72000);
DB_LevelExp(9,90000);
DB_LevelExp(10,110000);
DB_LevelExp(11,132000);
DB_LevelExp(12,156000);
DB_LevelExp(13,182000);
DB_LevelExp(14,210000);
DB_LevelExp(15,240000);
DB_LevelExp(16,272000);
DB_LevelExp(17,306000);
DB_LevelExp(18,342000);
DB_LevelExp(19,380000);
DB_LevelExp(20,420000);
DB_LevelExp(21,462000);
DB_LevelExp(22,506000);
DB_LevelExp(23,552000);
DB_LevelExp(24,600000);
DB_LevelExp(25,650000);
DB_LevelExp(26,702000);
DB_LevelExp(27,756000);
DB_LevelExp(28,812000);
DB_LevelExp(29,870000);
DB_LevelExp(30,930000);
//Database containing enemies you want to apply the manual exp/level system too.
//Second parameter is a percentage. In this case, 10% of the level of the enemy
//( 11000 exp if enemy is level 10)
DB_CharacterGain(CHARACTER_Aeril_Animals_W_Black1,0.1);
//KB
IF
CharacterDied(_Character)
AND
DB_CharacterGain(_Character,_Gain)
AND
CharacterGetLevel(_Character,_Level)
AND
DB_LevelExp(_Level,_ExpForLevel)
AND
_Gain > 0
AND
Real(_ExpForLevel,_ExpForLevelAsReal)
AND
RealProduct(_ExpForLevelAsReal,_Gain,_ExpProduct)
AND
Integer(_ExpProduct,_ExpProductAsInt)
THEN
PartyAddExperience(_ExpProductAsInt);
NOT DB_CharacterGain(_Character,_Gain);