This script should work for it:
int TotalMagicPIECES = 0; //For the subscreen. Four items, of one custom type, set as levels 1, 2, 3, 4 const int I_MPIECE0 = 100; //none, L1; assign in Link Init Data const int I_MPIECE1 = 101; //L2 const int I_MPIECE2 = 102; //L3 const int I_MPIECE3 = 103; //L4 //item collect script item script mcp { void run() { ++TotalMagicPIECES; if ( TotalMagicPIECES >= 4 ) { TotalMagicPIECES = 0; Link->MaxMP += 32; Link->MP += 32; Link->Item[I_MPIECE1] = false; Link->Item[I_MPIECE2] = false; Link->Item[I_MPIECE3] = false; } else { if ( TotalMagicPIECES == 1 ) Link->Item[I_MPIECE1] = true; if ( TotalMagicPIECES == 2 ) Link->Item[I_MPIECE2] = true; if ( TotalMagicPIECES == 3 ) Link->Item[I_MPIECE3] = true; } } }